|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.data.PathSummary
public final class PathSummary
This class stores the path summary of a document. It contains all unique location paths of the document.
Field Summary | |
---|---|
PathNode |
root
Root node. |
Constructor Summary | |
---|---|
PathSummary()
Default constructor. |
|
PathSummary(DataInput in)
Constructor, specifying an input file. |
Method Summary | |
---|---|
void |
add(int n,
int l,
byte k)
Opens an element. |
void |
close()
Closes the index. |
ArrayList<PathNode> |
desc(ArrayList<PathNode> in,
boolean desc)
Returns all children or descendants of the specified nodes. |
TokenList |
desc(byte[] k,
Data data,
boolean d,
boolean o)
Returns descendant tags and attributes for the specified start key. |
void |
desc(PathNode in,
ArrayList<PathNode> out,
int t,
int k,
boolean desc)
Adds nodes to the hash set if they comply to the specified arguments. |
TokenList |
desc(TokenList tl,
Data data,
boolean d,
boolean o)
Returns descendant tags and attributes for the specified descendant path. |
IndexIterator |
ids(IndexToken tok)
Returns an iterator for the index results. |
byte[] |
info()
Returns information on the index structure. |
void |
init()
Initializes the data structures. |
int |
nrIDs(IndexToken tok)
Returns the (approximate/estimated) number of ids for the specified token. |
ArrayList<PathNode> |
parent(ArrayList<PathNode> in)
Returns all parents of the specified nodes. |
void |
plan(Data data,
Serializer ser)
Serializes the path node. |
ArrayList<PathNode> |
root()
Returns the root node. |
void |
write(DataOutput out)
Writes the path summary to the specified output. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public PathNode root
Constructor Detail |
---|
public PathSummary()
public PathSummary(DataInput in) throws IOException
in
- input stream
IOException
- I/O exceptionMethod Detail |
---|
public void init()
public void add(int n, int l, byte k)
n
- name referencel
- current levelk
- node kindpublic void write(DataOutput out) throws IOException
out
- output stream
IOException
- I/O exceptionpublic ArrayList<PathNode> desc(ArrayList<PathNode> in, boolean desc)
in
- input nodesdesc
- if false, return only children
public ArrayList<PathNode> parent(ArrayList<PathNode> in)
in
- input nodes
public ArrayList<PathNode> root()
public void desc(PathNode in, ArrayList<PathNode> out, int t, int k, boolean desc)
in
- input nodeout
- output nodest
- name referencek
- node kinddesc
- if false, return only childrenpublic TokenList desc(byte[] k, Data data, boolean d, boolean o)
k
- input keydata
- data referenced
- if false, return only childreno
- true/false: sort by occurrence/lexicographically
public TokenList desc(TokenList tl, Data data, boolean d, boolean o)
tl
- input stepsdata
- data referenced
- if false, return only childreno
- true/false: sort by occurrence/lexicographically
public void plan(Data data, Serializer ser) throws IOException
data
- data referenceser
- serializer
IOException
- I/O exceptionpublic IndexIterator ids(IndexToken tok)
Index
ids
in interface Index
tok
- token to be found
public int nrIDs(IndexToken tok)
Index
nrIDs
in interface Index
tok
- token to be found
public void close()
Index
close
in interface Index
public byte[] info()
Index
info
in interface Index
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |