|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.index.resource.Resources
public final class Resources
This index organizes the resources of a database (XML documents and raw files).
Constructor Summary | |
---|---|
Resources(Data d)
Constructor. |
Method Summary | |
---|---|
TokenList |
binaries(java.lang.String path)
Returns the database paths to all binary files that match the specified path. |
TokenBoolMap |
children(byte[] path,
boolean dir)
Returns the child resources for the given path. |
void |
close()
Closes the index. |
int |
count(IndexToken token)
Returns the (approximate/estimated) number of hits for the specified token. |
void |
delete(int pre,
int size)
Deletes the specified entry and updates subsequent nodes. |
int |
doc(java.lang.String path)
Returns the pre value of the node that matches the specified path, or -1 . |
IntList |
docs()
Returns the pre values of all document nodes. |
IntList |
docs(java.lang.String path)
Returns the pre values of all document nodes starting with the specified path. |
IntList |
docs(java.lang.String path,
boolean exact)
Returns the pre values of all document nodes matching the specified path. |
EntryIterator |
entries(IndexEntries entries)
Returns all entries that match the specified token. |
byte[] |
info()
Returns information on the index structure. |
void |
init()
Initializes the index. |
void |
insert(int pre,
DataClip clip)
Adds entries to the index and updates subsequent nodes. |
boolean |
isDir(byte[] path)
Determines whether the given path is the path to a directory. |
IndexIterator |
iter(IndexToken token)
Returns an iterator for the index results. |
void |
read(DataInput in)
Reads information on database resources from disk. |
void |
rename(int pre,
byte[] value)
Updates the index after a document has been renamed. |
void |
replace(int pre,
int size,
DataClip clip)
Replaces entries in the index. |
void |
write(DataOutput out)
Writes information on database resources to disk. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Resources(Data d)
d
- data referenceMethod Detail |
---|
public void read(DataInput in) throws java.io.IOException
in
- input stream
java.io.IOException
- I/O exceptionpublic void write(DataOutput out) throws java.io.IOException
out
- output stream
java.io.IOException
- I/O exceptionpublic IntList docs()
pre
values of all document nodes.
public void init()
Index
init
in interface Index
public void insert(int pre, DataClip clip)
pre
- insertion positionclip
- data clippublic void delete(int pre, int size)
pre
- pre valuesize
- number of deleted nodespublic void rename(int pre, byte[] value)
pre
- pre value of updated documentvalue
- new namepublic void replace(int pre, int size, DataClip clip)
pre
- insertion positionsize
- number of deleted nodesclip
- data clippublic IntList docs(java.lang.String path)
path
- input path
public IntList docs(java.lang.String path, boolean exact)
path
- input pathexact
- exact (no prefix) matches
public int doc(java.lang.String path)
-1
.
path
- input path
public TokenList binaries(java.lang.String path)
path
- input path
public boolean isDir(byte[] path)
path
- given path
public TokenBoolMap children(byte[] path, boolean dir)
path
- pathdir
- returns directories
false
public void close()
Index
close
in interface Index
public IndexIterator iter(IndexToken token)
Index
iter
in interface Index
token
- token to be found
public int count(IndexToken token)
Index
count
in interface Index
token
- token to be found
public byte[] info()
Index
info
in interface Index
public EntryIterator entries(IndexEntries entries)
Index
entries
in interface Index
entries
- index entries
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |