|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.egothor.store.ThickBarrel
public class ThickBarrel
This object is a core implementation of a barrel that has documents meta data stored in DiscIndexData and inverted lists meta data in DiscKeyIndexData. This object defines a barrel that stores its inverted lists in one big file.
Field Summary | |
---|---|
java.lang.String |
location
Directory, where is the barrel stored. |
Constructor Summary | |
---|---|
ThickBarrel(java.lang.String location)
This constructors open the documents and inverted lists meta data DB files in location directory. |
Method Summary | |
---|---|
java.lang.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(java.lang.String location)
|
Sequence<? extends IListMetadata> |
expand(java.lang.String expr)
Description of the Method |
Bitmap |
getBitmap(java.lang.String label)
Return the Bitmap of a given label. |
IListMetadataRead |
getIListMeta(java.lang.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(java.lang.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(java.lang.String label,
Bitmap value)
Try to set the Bitmap of a given label. |
void |
setLocation(java.lang.String location)
Sets the location attribute of the ThickBarrel object |
long |
size()
Returns the total number of documents meta data. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.lang.String location
Constructor Detail |
---|
public ThickBarrel(java.lang.String location) throws java.io.IOException
location
directory. Constructs this barrel
in the given location
directory.
location
- Description of the Parameter
java.io.IOException
- if an I/O error occursMethod Detail |
---|
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public Bitmap getBitmap(java.lang.String label)
Barrel
getBitmap
in interface Barrel
label
- the label of the requested Bitmap
public void setBitmap(java.lang.String label, Bitmap value)
Barrel
setBitmap
in interface Barrel
label
- the label of the requested Bitmapvalue
- Bitmap of removed documents when label is nullpublic void setLocation(java.lang.String location) throws java.io.IOException
location
- The new location value
java.io.IOException
- if an I/O error occurspublic DocumentData getMeta(long uid)
uid
document.
getMeta
in interface Barrel
uid
- Description of the Parameter
public IMetaReader openDocMeta()
public IListMetadataRead getIListMeta(java.lang.String term)
Barrel
term
.
getIListMeta
in interface Barrel
term
- the term
public IListReader openIList(java.lang.String term, boolean clean)
openIList
in interface Barrel
term
- Description of the Parameterclean
- whether to remove all the items denoted as deleted
public Sequence<? extends IListMetadata> expand(java.lang.String expr)
expand
in interface Barrel
expr
- Description of the Parameter
public void destroy()
close
and then removes all files
that this barrel uses. Destroys the meta data DB files.
destroy
in interface Barrel
public static void destroy(java.lang.String location)
public boolean removeDoc(long id)
id
-th document.
removeDoc
in interface Barrel
id
- Description of the Parameter
public long size()
size
in interface Barrel
public long deleted()
deleted
in interface Barrel
public BarrelReader open()
Barrel
open
in interface Barrel
public long length()
size()-deleted()
- the number of active
documents.
public void commit()
commit
in interface Barrel
public void close()
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.
query
in interface Barrel
q
- Description of the Parameterresult
- Description of the Parameter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |