Modifier and Type | Method and Description |
---|---|
TokenList |
binaries(String path)
Returns the database paths to all binary files that start with the specified path.
|
TokenBoolMap |
children(byte[] path,
boolean dir)
Returns the child resources for the given path.
|
void |
close()
Closes the index.
|
int |
costs(IndexToken token)
Returns a cost estimation for searching the specified token.
|
void |
delete(int pre,
int size)
Deletes the specified entry and updates subsequent nodes.
|
int |
doc(String path)
Returns the pre value of the document node that matches the specified path, or
-1 . |
IntList |
docs()
Returns the
pre values of all document nodes. |
IntList |
docs(String path)
Returns the pre values of all document nodes that start with the specified path.
|
boolean |
drop()
Drops the index.
|
EntryIterator |
entries(IndexEntries entries)
Returns all entries that match the specified token.
|
byte[] |
info(MainOptions options)
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.
|
public Resources(Data d)
d
- data referencepublic void read(DataInput in) throws IOException
in
- input streamIOException
- I/O exceptionpublic void write(DataOutput out) throws IOException
out
- output streamIOException
- I/O exceptionpublic IntList docs()
pre
values of all document nodes.public void init()
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(String path)
path
- input pathpublic int doc(String path)
-1
.path
- input path-1
public TokenList binaries(String path)
path
- input pathpublic boolean isDir(byte[] path)
path
- given pathpublic TokenBoolMap children(byte[] path, boolean dir)
path
- pathdir
- returns directoriesfalse
public boolean drop()
Index
public void close()
Index
public IndexIterator iter(IndexToken token)
Index
public int costs(IndexToken token)
Index
public byte[] info(MainOptions options)
Index
public EntryIterator entries(IndexEntries entries)
Index
Copyright © 2005–2015 BaseX Team. All rights reserved.