| 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 database.
|
void |
closeIndex(IndexToken.IndexType type)
Closes the specified index.
|
protected void |
delete(int pre,
boolean text)
Deletes the specified text entry.
|
void |
finishUpdate()
Finishes an update operation: removes the update file and the exclusive lock.
|
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.
|
void |
setIndex(IndexToken.IndexType type,
Index index)
Assigns the specified index.
|
boolean |
startUpdate()
Starts an update operation: writes a file to disk to indicate that an update is
going on, and exclusively locks the table.
|
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).
|
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 close()
Datapublic void closeIndex(IndexToken.IndexType type)
DatacloseIndex in class Datatype - index to be closedpublic void setIndex(IndexToken.IndexType type, Index index)
Datapublic boolean startUpdate()
DatastartUpdate in class Datapublic void finishUpdate()
DatafinishUpdate in class 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