public class ThickBarrel extends Object implements Barrel, Cloneable
Modifier and Type | Field and Description |
---|---|
String |
location
Directory, where is the barrel stored.
|
Constructor and Description |
---|
ThickBarrel(String location)
This constructors open the documents and inverted lists meta data
DB files in
location directory. |
Modifier and Type | Method and Description |
---|---|
Object |
clone() |
void |
close()
Closes DB files.
|
void |
commit()
Not implemented but required by Barrel.
|
long |
deleted()
Returns the number of removed documents (meta data).
|
void |
destroy()
This method calls
close and then removes all files
that this barrel uses. |
static void |
destroy(String location) |
Sequence<? extends IListMetadata> |
expand(String expr)
Description of the Method
|
Bitmap |
getBitmap(String label)
Return the Bitmap of a given label.
|
IListMetadataRead |
getIListMeta(String term)
Return the inverted list metadata of the given
term . |
DocumentData |
getMeta(long uid)
Returns meta data of a given
uid document. |
long |
length()
Returns
size()-deleted() - the number of active
documents. |
BarrelReader |
open()
Return a reader for this Barrel.
|
IMetaReader |
openDocMeta()
Description of the Method
|
IListReader |
openIList(String term,
boolean clean)
Description of the Method
|
void |
query(Query q,
ResultList result)
Solves a query in this barrel.
|
boolean |
removeDoc(long id)
Removes the meta data of the
id -th document. |
void |
setBitmap(String label,
Bitmap value)
Try to set the Bitmap of a given label.
|
void |
setLocation(String location)
Sets the location attribute of the ThickBarrel object
|
long |
size()
Returns the total number of documents meta data.
|
public String location
public ThickBarrel(String location) throws IOException
location
directory. Constructs this barrel
in the given location
directory.location
- Description of the ParameterIOException
- if an I/O error occurspublic Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public Bitmap getBitmap(String label)
Barrel
public void setBitmap(String label, Bitmap value)
Barrel
public void setLocation(String location) throws IOException
location
- The new location valueIOException
- if an I/O error occurspublic DocumentData getMeta(long uid)
uid
document.public IMetaReader openDocMeta()
public IListMetadataRead getIListMeta(String term)
Barrel
term
.getIListMeta
in interface Barrel
term
- the termpublic IListReader openIList(String term, boolean clean)
public Sequence<? extends IListMetadata> expand(String expr)
public void destroy()
close
and then removes all files
that this barrel uses. Destroys the meta data DB files.public static void destroy(String location)
location
- public boolean removeDoc(long id)
id
-th document.public long size()
public long deleted()
public BarrelReader open()
Barrel
public long length()
size()-deleted()
- the number of active
documents.public void commit()
public void close()
close
in interface AutoCloseable
close
in interface Barrel
public void query(Query q, ResultList result)
query
is parsed by
Parser
. This method also prepares
a hit list object that is passed to a rider object. The rider
object is allocated with maximum of ten active open inverted lists
to this barrel.Copyright © 2016 Egothor. All Rights Reserved.