| Constructor and Description |
|---|
MemData(Data data)
Light-weight constructor, adopting data structures from the
specified database.
|
MemData(Names tag,
Names att,
PathSummary ps,
Namespaces ns,
Prop pr)
Constructor.
|
MemData(Prop pr)
Constructor, creating a new, empty database.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the current database.
|
void |
closeIndex(IndexToken.IndexType type)
Closes the specified index.
|
protected void |
delete(int pre,
boolean text)
Deletes the specified text entry.
|
void |
flush()
Flushes the database.
|
protected long |
index(int pre,
int id,
byte[] txt,
int kind)
Indexes a text and returns the reference.
|
protected void |
indexDelete(int pre,
int size)
Delete a node and its descendants from the corresponding indexes.
|
boolean |
pinned()
Checks if this database is also opened (pinned) by other instances.
|
void |
setIndex(IndexToken.IndexType type,
Index index)
Assigns the specified index.
|
byte[] |
text(int pre,
boolean text)
Returns a text (text, comment, pi) or attribute value.
|
double |
textDbl(int pre,
boolean text)
Returns a text (text, comment, pi) or attribute value as double value.
|
long |
textItr(int pre,
boolean text)
Returns a text (text, comment, pi) or attribute value as integer value.
|
int |
textLen(int pre,
boolean text)
Returns the byte length of a text (text, comment, pi).
|
boolean |
update(boolean updating)
Marks a database as updating.
|
void |
updateText(int pre,
byte[] val,
int kind)
Updates the specified text or attribute value.
|
public MemData(Names tag, Names att, PathSummary ps, Namespaces ns, Prop pr)
tag - tag indexatt - attribute name indexps - path summaryns - namespacespr - database propertiespublic MemData(Data data)
data - data referencepublic MemData(Prop pr)
pr - property referencepublic void flush()
Datapublic void close()
Datapublic void closeIndex(IndexToken.IndexType type)
DatacloseIndex in class Datatype - index to be closedpublic void setIndex(IndexToken.IndexType type, Index index)
Datapublic boolean update(boolean updating)
Datapublic boolean pinned()
Datapublic byte[] text(int pre,
boolean text)
Datapublic long textItr(int pre,
boolean text)
Datapublic double textDbl(int pre,
boolean text)
Datapublic int textLen(int pre,
boolean text)
Dataprotected void delete(int pre,
boolean text)
Datapublic void updateText(int pre,
byte[] val,
int kind)
DataupdateText in class Datapre - pre valueval - contentkind - node kindprotected long index(int pre,
int id,
byte[] txt,
int kind)
Dataprotected void indexDelete(int pre,
int size)
DataindexDelete in class Datapre - pre value of the node to deletesize - number of descendants