| Constructor and Description |
|---|
PathSummary(Data d)
Constructor, specifying a data reference.
|
PathSummary(Data d,
DataInput in)
Constructor, specifying an input file.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the index.
|
int |
count(IndexToken token)
Returns the (approximate/estimated) number of hits for the specified token.
|
static java.util.ArrayList<PathNode> |
desc(java.util.ArrayList<PathNode> in,
boolean desc)
Returns all children or descendants of the specified nodes.
|
TokenList |
desc(byte[] k,
boolean d,
boolean o)
Returns descendant tags and attributes for the specified start key.
|
java.util.ArrayList<PathNode> |
desc(int n,
int k)
Returns all children or descendants of the specified nodes with the
specified tag or attribute value.
|
TokenList |
desc(TokenList tl,
boolean d,
boolean o)
Returns descendant tags and attributes for the specified descendant path.
|
EntryIterator |
entries(byte[] prefix)
Returns all entries that start with the specified prefix.
|
void |
finish(Data d)
Sets the data reference.
|
void |
index(int n,
byte k,
int l)
Adds an entry.
|
void |
index(int n,
byte k,
int l,
byte[] v,
MetaData md)
Adds an entry, including its value.
|
byte[] |
info()
Returns information on the index structure.
|
IndexIterator |
iter(IndexToken token)
Returns an iterator for the index results.
|
static java.util.ArrayList<PathNode> |
parent(java.util.ArrayList<PathNode> in)
Returns all parents of the specified nodes.
|
java.util.ArrayList<PathNode> |
root()
Returns the root node.
|
java.lang.String |
toString() |
void |
write(DataOutput out)
Writes the path summary to the specified output.
|
public PathSummary(Data d)
d - data referencepublic void write(DataOutput out) throws java.io.IOException
out - output streamjava.io.IOException - I/O exceptionpublic void finish(Data d)
d - referencepublic void close()
Indexpublic void index(int n,
byte k,
int l)
n - name referencek - node kindl - current levelpublic void index(int n,
byte k,
int l,
byte[] v,
MetaData md)
n - name referencek - node kindl - current levelv - valuemd - meta datapublic java.util.ArrayList<PathNode> root()
public static java.util.ArrayList<PathNode> parent(java.util.ArrayList<PathNode> in)
in - input nodespublic static java.util.ArrayList<PathNode> desc(java.util.ArrayList<PathNode> in, boolean desc)
in - input nodesdesc - if false, return only childrenpublic java.util.ArrayList<PathNode> desc(int n, int k)
n - name referencek - node kindpublic TokenList desc(byte[] k, boolean d, boolean o)
k - input keyd - if false, return only childreno - true/false: sort by occurrence/lexicographicallypublic TokenList desc(TokenList tl, boolean d, boolean o)
tl - input stepsd - if false, return only childreno - true/false: sort by occurrence/lexicographicallypublic byte[] info()
Indexpublic IndexIterator iter(IndexToken token)
Indexpublic int count(IndexToken token)
Indexpublic EntryIterator entries(byte[] prefix)
Indexpublic java.lang.String toString()
toString in class java.lang.Object