|
Berkeley DB XML version 2.3.10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.dbxml.XmlContainer
public class XmlContainer
The XmlContainer class encapsulates a document container and its related
indices and statistics. XmlContainer exposes methods for managing (putting and
deleting) XmlDocument
objects, managing indices, and retrieving
container statistics.
If the container has never before been opened, use
XmlManager.createContainer(java.lang.String)
to instantiate an XmlContainer object.
If the container already exists, use XmlManager.openContainer(java.lang.String)
instead.
XmlContainers are always opened until the last referencing handle is destroyed.
You can delete containers using XmlManager.removeContainer(java.lang.String)
and rename
containers using XmlManager.renameContainer(java.lang.String, java.lang.String)
.
A copy constructor is provided for this class. The class is implemented using a handle-body idiom. When a handle is copied both handles maintain a reference to the same body.
This object is free threaded, and can be safely shared among threads in an application.
Field Summary | |
---|---|
static int |
NodeContainer
Documents are broken down into their component nodes, and these nodes are stored individually in the container. |
static int |
WholedocContainer
Documents are stored intact; all white space and formatting is preserved. |
Constructor Summary | |
---|---|
XmlContainer()
|
Method Summary | |
---|---|
boolean |
addAlias(String alias)
Adds a new named alias for the container. |
void |
addDefaultIndex(String index,
XmlUpdateContext context)
Adds a default index to the container. |
void |
addDefaultIndex(XmlTransaction txn,
String index,
XmlUpdateContext context)
Adds a default index to the container in the scope of a transaction. |
void |
addIndex(String uri,
String name,
String index,
XmlUpdateContext context)
Adds an index of the specified type for the named document node. |
void |
addIndex(XmlTransaction txn,
String uri,
String name,
String index,
XmlUpdateContext context)
Adds an index of the specified type for the named document node in the scope of a transaction. |
void |
close()
Close the container. |
void |
delete()
Free the native resources associated with this object. |
void |
deleteDefaultIndex(String index,
XmlUpdateContext context)
Deletes the default index for the container. |
void |
deleteDefaultIndex(XmlTransaction txn,
String index,
XmlUpdateContext context)
Deletes the default index for the container in the scope of a transaction. |
void |
deleteDocument(String name,
XmlUpdateContext context)
Removes the named document from the container. |
void |
deleteDocument(XmlDocument document,
XmlUpdateContext context)
Removes the specified XmlDocument from the container. |
void |
deleteDocument(XmlTransaction txn,
String name,
XmlUpdateContext context)
Removes the named document from the container in the scope of a transaction. |
void |
deleteDocument(XmlTransaction txn,
XmlDocument document,
XmlUpdateContext context)
Removes the specified XmlDocument from the container in the scope
of a transaction. |
void |
deleteIndex(String uri,
String name,
String index,
XmlUpdateContext context)
Deletes an index of the specified type for the named document node. |
void |
deleteIndex(XmlTransaction txn,
String uri,
String name,
String index,
XmlUpdateContext context)
Deletes an index of the specified type for the named document node in the context of a transaction. |
XmlResults |
getAllDocuments(XmlDocumentConfig config)
Returns all XmlDocument objects in the container,
with configuration options. |
XmlResults |
getAllDocuments(XmlTransaction txn,
XmlDocumentConfig config)
Returns all XmlDocument objects in the container,
with configuration options, in the context of a transaction. |
XmlContainerConfig |
getContainerConfig()
Returns the configuration object for the container. |
int |
getContainerType()
Returns the container's type. |
XmlDocument |
getDocument(String name)
Returns the XmlDocument with the specified name. |
XmlDocument |
getDocument(String name,
XmlDocumentConfig config)
Returns the XmlDocument with the specified name, with
configuration options. |
XmlDocument |
getDocument(XmlTransaction txn,
String name)
Returns the XmlDocument with the specified name in the scope of a
transaction. |
XmlDocument |
getDocument(XmlTransaction txn,
String name,
XmlDocumentConfig config)
Returns the XmlDocument with the specified name in the scope of a transaction, with configuration options. |
boolean |
getIndexNodes()
Returns whether or not the container is indexing at the node level. |
XmlIndexSpecification |
getIndexSpecification()
Retrieves the current index specification for the container. |
XmlIndexSpecification |
getIndexSpecification(XmlTransaction txn)
Retrieves the current index specification for the container in the scope of a transaction. |
XmlIndexSpecification |
getIndexSpecification(XmlTransaction txn,
XmlDocumentConfig config)
Retrieves the current index specification for the container in the scope of a transaction using the specified XmlDocumentConfig object. |
XmlManager |
getManager()
Returns the XmlManager object for the XmlContainer. |
String |
getName()
Returns the name of the XmlContainer. |
XmlValue |
getNode(String handle)
Returns the XmlValue object associated with the specified
handle. |
int |
getNumDocuments()
Returns the number of XmlDocument objects in the container. |
int |
getNumDocuments(XmlTransaction txn)
Returns the number of XmlDocument objects in the container,
in the context of a transaction. |
int |
getPageSize()
Returns the underlying database page size for the container. |
XmlResults |
lookupIndex(XmlQueryContext context,
String uri,
String name,
String index)
Deprecated. as of release 2.2. Use XmlManager.createIndexLookup(com.sleepycat.dbxml.XmlContainer, java.lang.String, java.lang.String, java.lang.String, com.sleepycat.dbxml.XmlValue, int)
and XmlIndexLookup.execute(com.sleepycat.dbxml.XmlQueryContext) instead. |
XmlResults |
lookupIndex(XmlQueryContext context,
String uri,
String name,
String parentUri,
String parentName,
String index)
Deprecated. as of release 2.2. Use XmlManager.createIndexLookup(com.sleepycat.dbxml.XmlContainer, java.lang.String, java.lang.String, java.lang.String, com.sleepycat.dbxml.XmlValue, int)
and XmlIndexLookup.execute(com.sleepycat.dbxml.XmlQueryContext) instead. |
XmlResults |
lookupIndex(XmlQueryContext context,
String uri,
String name,
String parentUri,
String parentName,
String index,
XmlValue value)
Deprecated. as of release 2.2. Use XmlManager.createIndexLookup(com.sleepycat.dbxml.XmlContainer, java.lang.String, java.lang.String, java.lang.String, com.sleepycat.dbxml.XmlValue, int)
and XmlIndexLookup.execute(com.sleepycat.dbxml.XmlQueryContext) instead. |
XmlResults |
lookupIndex(XmlQueryContext context,
String uri,
String name,
String parentUri,
String parentName,
String index,
XmlValue value,
XmlDocumentConfig config)
Deprecated. as of release 2.2. Use XmlManager.createIndexLookup(com.sleepycat.dbxml.XmlContainer, java.lang.String, java.lang.String, java.lang.String, com.sleepycat.dbxml.XmlValue, int)
and XmlIndexLookup.execute(com.sleepycat.dbxml.XmlQueryContext) instead. |
XmlResults |
lookupIndex(XmlQueryContext context,
String uri,
String name,
String index,
XmlValue value)
Deprecated. as of release 2.2. Use XmlManager.createIndexLookup(com.sleepycat.dbxml.XmlContainer, java.lang.String, java.lang.String, java.lang.String, com.sleepycat.dbxml.XmlValue, int)
and XmlIndexLookup.execute(com.sleepycat.dbxml.XmlQueryContext) instead. |
XmlResults |
lookupIndex(XmlQueryContext context,
String uri,
String name,
String index,
XmlValue value,
XmlDocumentConfig config)
Deprecated. as of release 2.2. Use XmlManager.createIndexLookup(com.sleepycat.dbxml.XmlContainer, java.lang.String, java.lang.String, java.lang.String, com.sleepycat.dbxml.XmlValue, int)
and XmlIndexLookup.execute(com.sleepycat.dbxml.XmlQueryContext) instead. |
XmlResults |
lookupIndex(XmlTransaction txn,
XmlQueryContext context,
String uri,
String name,
String index)
Deprecated. as of release 2.2. Use XmlManager.createIndexLookup(com.sleepycat.dbxml.XmlContainer, java.lang.String, java.lang.String, java.lang.String, com.sleepycat.dbxml.XmlValue, int)
and XmlIndexLookup.execute(com.sleepycat.dbxml.XmlQueryContext) instead. |
XmlResults |
lookupIndex(XmlTransaction txn,
XmlQueryContext context,
String uri,
String name,
String parentUri,
String parentName,
String index)
Deprecated. as of release 2.2. Use XmlManager.createIndexLookup(com.sleepycat.dbxml.XmlContainer, java.lang.String, java.lang.String, java.lang.String, com.sleepycat.dbxml.XmlValue, int)
and XmlIndexLookup.execute(com.sleepycat.dbxml.XmlQueryContext) instead. |
XmlResults |
lookupIndex(XmlTransaction txn,
XmlQueryContext context,
String uri,
String name,
String parentUri,
String parentName,
String index,
XmlValue value)
Deprecated. as of release 2.2. Use XmlManager.createIndexLookup(com.sleepycat.dbxml.XmlContainer, java.lang.String, java.lang.String, java.lang.String, com.sleepycat.dbxml.XmlValue, int)
and XmlIndexLookup.execute(com.sleepycat.dbxml.XmlQueryContext) instead. |
XmlResults |
lookupIndex(XmlTransaction txn,
XmlQueryContext context,
String uri,
String name,
String parentUri,
String parentName,
String index,
XmlValue value,
XmlDocumentConfig config)
Deprecated. as of release 2.2. Use XmlManager.createIndexLookup(com.sleepycat.dbxml.XmlContainer, java.lang.String, java.lang.String, java.lang.String, com.sleepycat.dbxml.XmlValue, int)
and XmlIndexLookup.execute(com.sleepycat.dbxml.XmlQueryContext) instead. |
XmlResults |
lookupIndex(XmlTransaction txn,
XmlQueryContext context,
String uri,
String name,
String index,
XmlValue value)
Deprecated. as of release 2.2. Use XmlManager.createIndexLookup(com.sleepycat.dbxml.XmlContainer, java.lang.String, java.lang.String, java.lang.String, com.sleepycat.dbxml.XmlValue, int)
and XmlIndexLookup.execute(com.sleepycat.dbxml.XmlQueryContext) instead. |
XmlResults |
lookupIndex(XmlTransaction txn,
XmlQueryContext context,
String uri,
String name,
String index,
XmlValue value,
XmlDocumentConfig config)
Deprecated. as of release 2.2. Use XmlManager.createIndexLookup(com.sleepycat.dbxml.XmlContainer, java.lang.String, java.lang.String, java.lang.String, com.sleepycat.dbxml.XmlValue, int)
and XmlIndexLookup.execute(com.sleepycat.dbxml.XmlQueryContext) instead. |
XmlStatistics |
lookupStatistics(String uri,
String name,
String index)
Returns an XmlStatistics object for the identified index. |
XmlStatistics |
lookupStatistics(String uri,
String name,
String parentUri,
String parentName,
String index)
Lookup statistics for the identified edge index. |
XmlStatistics |
lookupStatistics(String uri,
String name,
String parentUri,
String parentName,
String index,
XmlValue value)
Lookup statistics for the identified edge index. |
XmlStatistics |
lookupStatistics(String uri,
String name,
String index,
XmlValue value)
Returns an XmlStatistics object for the identified index. |
XmlStatistics |
lookupStatistics(XmlTransaction txn,
String uri,
String name,
String index)
Returns an XmlStatistics object for the identified index. |
XmlStatistics |
lookupStatistics(XmlTransaction txn,
String uri,
String name,
String parentUri,
String parentName,
String index)
Lookup statistics for the identified edge index in the scope of a transaction. |
XmlStatistics |
lookupStatistics(XmlTransaction txn,
String uri,
String name,
String parentUri,
String parentName,
String index,
XmlValue value)
Lookup statistics for the identified edge index in the scope of a transaction. |
XmlStatistics |
lookupStatistics(XmlTransaction txn,
String uri,
String name,
String index,
XmlValue value)
Returns an XmlStatistics object for the identified index. |
String |
putDocument(String name,
String contents,
XmlUpdateContext context)
Inserts a document into the container with a given name and string content. |
void |
putDocument(String name,
String content,
XmlUpdateContext context,
XmlDocumentConfig config)
Inserts a document with given name and string content into the container. |
String |
putDocument(String name,
XmlEventReader reader,
XmlUpdateContext context,
XmlDocumentConfig config)
Inserts a document with given name into the container, using the content retrieved from the given XmlEventReader as content. |
String |
putDocument(String name,
XmlInputStream input,
XmlUpdateContext context)
Inserts a document into the container with a given name and content from a stream. |
void |
putDocument(String name,
XmlInputStream input,
XmlUpdateContext context,
XmlDocumentConfig config)
Inserts a document with given name and content into the container. |
void |
putDocument(XmlDocument document,
XmlUpdateContext context)
Inserts an XmlDocument into the container. |
void |
putDocument(XmlDocument document,
XmlUpdateContext context,
XmlDocumentConfig config)
Inserts an XmlDocument into the container, with configuration options. |
String |
putDocument(XmlTransaction txn,
String name,
String contents,
XmlUpdateContext context)
Inserts a document into the container with a given name and string content in the scope of a transaction. |
void |
putDocument(XmlTransaction txn,
String name,
String content,
XmlUpdateContext context,
XmlDocumentConfig config)
Inserts a document with given name and string content into the container in the scope of a transaction. |
String |
putDocument(XmlTransaction txn,
String name,
XmlEventReader reader,
XmlUpdateContext context,
XmlDocumentConfig config)
Inserts a document with given name into the container, using the content retrieved from the given XmlEventReader as content, within a transaction. |
String |
putDocument(XmlTransaction txn,
String name,
XmlInputStream input,
XmlUpdateContext context)
Inserts a document with given name and content into the container in the scope of a transaction. |
void |
putDocument(XmlTransaction txn,
String name,
XmlInputStream input,
XmlUpdateContext context,
XmlDocumentConfig config)
Inserts a document with given name and content into the container in the scope of a transaction. |
void |
putDocument(XmlTransaction txn,
XmlDocument document,
XmlUpdateContext context)
Inserts an XmlDocument into the container in the scope of a transaction. |
void |
putDocument(XmlTransaction txn,
XmlDocument document,
XmlUpdateContext context,
XmlDocumentConfig config)
Inserts an XmlDocument into the container in the scope of a transaction. |
XmlEventWriter |
putDocumentAsEventWriter(XmlDocument document,
XmlUpdateContext context,
XmlDocumentConfig config)
Prepares to insert an XmlDocument into the container, using
the returned XmlEventWriter . |
XmlEventWriter |
putDocumentAsEventWriter(XmlTransaction txn,
String name,
XmlUpdateContext context,
XmlDocumentConfig config)
Prepares to insert an XmlDocument into the container, using
the returned XmlEventWriter , in the scope of a transaction. |
boolean |
removeAlias(String alias)
Removes the named alias from the container. |
void |
replaceDefaultIndex(String index,
XmlUpdateContext context)
Replaces the container's default index. |
void |
replaceDefaultIndex(XmlTransaction txn,
String index,
XmlUpdateContext context)
Replaces the container's default index in the scope of a transaction. |
void |
replaceIndex(String uri,
String name,
String index,
XmlUpdateContext context)
Replaces an index of the specified type for the named document node. |
void |
replaceIndex(XmlTransaction txn,
String uri,
String name,
String index,
XmlUpdateContext context)
Replaces an index of the specified type for the named document node in the scope of a transaction. |
void |
setIndexSpecification(XmlIndexSpecification index,
XmlUpdateContext context)
Defines the type of indexing to be maintained for a container of documents. |
void |
setIndexSpecification(XmlTransaction txn,
XmlIndexSpecification index,
XmlUpdateContext context)
Defines the type of indexing to be maintained for a container of documents in the scope of a transaction. |
void |
sync()
Flush database pages for the container to disk. |
void |
updateDocument(XmlDocument document,
XmlUpdateContext context)
Updates an XmlDocument in the container. |
void |
updateDocument(XmlTransaction txn,
XmlDocument document,
XmlUpdateContext context)
Updates an XmlDocument in the container in the scope of a transaction. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int WholedocContainer
public static final int NodeContainer
Constructor Detail |
---|
public XmlContainer()
Method Detail |
---|
public void delete()
public void close() throws XmlException
delete()
to free native resources.
This function can be dangerous, as it forcibly closes DB
resources. It should not be used unless
absolutely necessary. Use delete()
instead.
XmlException
public boolean addAlias(String alias) throws XmlException
removeAlias(String)
.
Returns true if the alias is added. Returns false if the
alias is already present.
alias
- The alias to be added.
XmlException
public void addDefaultIndex(String index, XmlUpdateContext context) throws XmlException
XmlIndexSpecification.addDefaultIndex(int, int)
for more information.
index
- A comma-separated list of strings that represent the indexing
strategy. See
XmlIndexSpecification.addIndex(String, String, String)
for a full
description.context
- The update context to use for the operation.
XmlException
public void addDefaultIndex(XmlTransaction txn, String index, XmlUpdateContext context) throws XmlException
XmlIndexSpecification.addDefaultIndex(int, int)
for more information.
txn
- If the operation is to be transaction-protected, the
txn
parameter is an XmlTransaction
handle returned
from XmlManager.createTransaction()
.index
- A comma-separated list of strings that represent the indexing
strategy. See XmlIndexSpecification.addIndex(String, String,
String)
for a full description.context
- The update context to use for the operation.
XmlException
public void addIndex(String uri, String name, String index, XmlUpdateContext context) throws XmlException
XmlIndexSpecification.addIndex(String, String, String)
for more
information.
uri
- The namespace of the node to be indexed. The default namespace
is selected by passing an empty string for the namespace.name
- The name of the element or attribute node to be indexed.index
- A comma-separated list of strings that represent the indexing
strategy. See XmlIndexSpecification.addIndex(String, String,
String)
for a full description.context
- The update context to use for the operation.
XmlException
public void addIndex(XmlTransaction txn, String uri, String name, String index, XmlUpdateContext context) throws XmlException
XmlIndexSpecification.addIndex(String, String, String)
for more
information.
txn
- If the operation is to be transaction-protected, the
txn
parameter is an XmlTransaction
handle returned
from XmlManager.createTransaction()
.uri
- The namespace of the node to be indexed. The default namespace
is selected by passing an empty string for the namespace.name
- The name of the element or attribute node to be indexed.index
- A comma-separated list of strings that represent the indexing
strategy. See XmlIndexSpecification.addIndex(String, String,
String)
for a full description.context
- The update context to use for the operation.
XmlException
public void deleteDefaultIndex(String index, XmlUpdateContext context) throws XmlException
XmlIndexSpecification.deleteDefaultIndex(int, int)
for
more information.
index
- A comma-separated list of strings that represent the indexing
strategy. See
XmlIndexSpecification.addIndex(String, String, String)
for a full
description.context
- The update context to use for the operation.
XmlException
public void deleteDefaultIndex(XmlTransaction txn, String index, XmlUpdateContext context) throws XmlException
XmlIndexSpecification.deleteDefaultIndex(int, int)
for more information.
txn
- If the operation is to be transaction-protected, the
txn
parameter is an XmlTransaction
handle returned
from XmlManager.createTransaction()
.index
- A comma-separated list of strings that represent the indexing
strategy. See XmlIndexSpecification.addIndex(String, String,
String)
for a full description.context
- The update context to use for the operation.
XmlException
public void deleteDocument(String name, XmlUpdateContext context) throws XmlException
name
- The name of the document to be deleted.context
- The update context to use for the operation.
XmlException
public void deleteDocument(XmlDocument document, XmlUpdateContext context) throws XmlException
XmlDocument
from the container.
document
- The XmlDocument
to be deleted from the container.
The name to be deleted is extracted from this parameter.context
- The update context to use for the operation.
XmlException
public void deleteDocument(XmlTransaction txn, String name, XmlUpdateContext context) throws XmlException
txn
- If the operation is to be transaction-protected, the
txn
parameter is an XmlTransaction
handle returned
from XmlManager.createTransaction()
.name
- The name of the document to be deleted.context
- The update context to use for the operation.
XmlException
public void deleteDocument(XmlTransaction txn, XmlDocument document, XmlUpdateContext context) throws XmlException
XmlDocument
from the container in the scope
of a transaction.
txn
- If the operation is to be transaction-protected, the
txn
parameter is an XmlTransaction
handle returned
from XmlManager.createTransaction()
.document
- The XmlDocument
to be deleted from the container.
The name to be deleted is extracted from this parameter.context
- The update context to use for the operation.
XmlException
public void deleteIndex(String uri, String name, String index, XmlUpdateContext context) throws XmlException
XmlIndexSpecification.deleteIndex(java.lang.String, java.lang.String, int, int)
for more information.
uri
- The namespace of the node to be indexed. The default namespace
is selected by passing an empty string for the namespace.name
- The name of the element or attribute node to be indexed.index
- A comma-separated list of strings that represent the indexing
strategy. See XmlIndexSpecification.addIndex(String, String,
String)
for a full description.context
- The update context to use for the operation.
XmlException
public void deleteIndex(XmlTransaction txn, String uri, String name, String index, XmlUpdateContext context) throws XmlException
XmlIndexSpecification.deleteIndex(java.lang.String, java.lang.String, int, int)
for more information.
txn
- If the operation is to be transaction-protected, the
txn
parameter is an XmlTransaction
handle returned
from XmlManager.createTransaction()
.uri
- The namespace of the node to be indexed. The default namespace
is selected by passing an empty string for the namespace.name
- The name of the element or attribute node to be indexed.index
- A comma-separated list of strings that represent the indexing
strategy. See XmlIndexSpecification.addIndex(String, String,
String)
for a full description.context
- The update context to use for the operation.
XmlException
public XmlResults getAllDocuments(XmlDocumentConfig config) throws XmlException
XmlDocument
objects in the container,
with configuration options.
config
- Configuration settings for this operation
XmlException
public XmlResults getAllDocuments(XmlTransaction txn, XmlDocumentConfig config) throws XmlException
XmlDocument
objects in the container,
with configuration options, in the context of a transaction.
txn
- If the operation is to be transaction-protected, the
txn
parameter is an XmlTransaction
handle returned
from XmlManager.createTransaction()
.config
- Configuration settings for this operation
XmlException
public XmlContainerConfig getContainerConfig() throws XmlException
XmlException
public int getContainerType() throws XmlException
NodeContainer
or WholedocContainer
.
XmlException
public XmlDocument getDocument(String name) throws XmlException
XmlDocument
with the specified name.
name
- The name of the XmlDocument
to be retrieved from the
container.
XmlException
public XmlValue getNode(String handle) throws XmlException
XmlValue
object associated with the specified
handle.
The handle must have been returned from XmlValue.getNodeHandle()
on a node within this container, and the document must not have been
modified in a way that invalidates the handle. If the handle is no
longer valid an exception may be thrown, or in some cases, an
incorrect node could be returned.
handle
- The handle returned from XmlValue.getNodeHandle()
.
XmlException
public XmlDocument getDocument(String name, XmlDocumentConfig config) throws XmlException
XmlDocument
with the specified name, with
configuration options.
name
- The name of the XmlDocument
to be retrieved from the
container.config
- Configuration settings for this operation
XmlException
public XmlDocument getDocument(XmlTransaction txn, String name) throws XmlException
XmlDocument
with the specified name in the scope of a
transaction.
txn
- If the operation is to be transaction-protected, the
txn
parameter is an XmlTransaction
handle returned
from XmlManager.createTransaction()
.name
- The name of the XmlDocument
to be retrieved from the
container.
XmlException
public XmlDocument getDocument(XmlTransaction txn, String name, XmlDocumentConfig config) throws XmlException
XmlDocument
with the specified name in the scope of a transaction, with configuration options.
txn
- If the operation is to be transaction-protected, the
txn
parameter is an XmlTransaction
handle returned
from XmlManager.createTransaction()
.name
- The name of the XmlDocument
to be retrieved from the
container.config
- Configuration settings for this operation
XmlException
public boolean getIndexNodes() throws XmlException
Returns true if indexes are at the node level, false otherwise.
XmlException
public int getPageSize() throws XmlException
XmlException
public XmlIndexSpecification getIndexSpecification() throws XmlException
setIndexSpecification(com.sleepycat.dbxml.XmlIndexSpecification, com.sleepycat.dbxml.XmlUpdateContext)
.
XmlException
public XmlIndexSpecification getIndexSpecification(XmlTransaction txn) throws XmlException
setIndexSpecification(com.sleepycat.dbxml.XmlIndexSpecification, com.sleepycat.dbxml.XmlUpdateContext)
.
The application must open the container before attempting to retrieve its index specification.
txn
- If the operation is to be transaction-protected, the
txn
parameter is an XmlTransaction
handle returned
from XmlManager.createTransaction()
.
XmlException
public XmlIndexSpecification getIndexSpecification(XmlTransaction txn, XmlDocumentConfig config) throws XmlException
XmlDocumentConfig
object.
The index specification can be modified using
setIndexSpecification(com.sleepycat.dbxml.XmlIndexSpecification, com.sleepycat.dbxml.XmlUpdateContext)
.
The application must open the container before attempting to retrieve its index specification.
txn
- If the operation is to be transaction-protected, the
txn
parameter is an XmlTransaction
handle returned
from XmlManager.createTransaction()
.config
- If provided, the only valid option is a LockMode
of RMW, set via XmlDocumentConfig.setLockMode(com.sleepycat.db.LockMode)
to indicate a read-modify-write cycle. This
would be used if the index specification is going to be modified in the
transaction.
XmlException
public XmlManager getManager() throws XmlException
XmlManager
object for the XmlContainer.
XmlException
public String getName() throws XmlException
XmlException
public int getNumDocuments() throws XmlException
XmlDocument
objects in the container.
XmlException
public int getNumDocuments(XmlTransaction txn) throws XmlException
XmlDocument
objects in the container,
in the context of a transaction.
txn
- If the operation is to be transaction-protected, the
txn
parameter is an XmlTransaction
handle returned
from XmlManager.createTransaction()
.
XmlException
public XmlResults lookupIndex(XmlQueryContext context, String uri, String name, String index, XmlValue value) throws XmlException
XmlManager.createIndexLookup(com.sleepycat.dbxml.XmlContainer, java.lang.String, java.lang.String, java.lang.String, com.sleepycat.dbxml.XmlValue, int)
and XmlIndexLookup.execute(com.sleepycat.dbxml.XmlQueryContext)
instead.
XmlException
public XmlResults lookupIndex(XmlQueryContext context, String uri, String name, String index) throws XmlException
XmlManager.createIndexLookup(com.sleepycat.dbxml.XmlContainer, java.lang.String, java.lang.String, java.lang.String, com.sleepycat.dbxml.XmlValue, int)
and XmlIndexLookup.execute(com.sleepycat.dbxml.XmlQueryContext)
instead.
XmlException
public XmlResults lookupIndex(XmlQueryContext context, String uri, String name, String parentUri, String parentName, String index, XmlValue value) throws XmlException
XmlManager.createIndexLookup(com.sleepycat.dbxml.XmlContainer, java.lang.String, java.lang.String, java.lang.String, com.sleepycat.dbxml.XmlValue, int)
and XmlIndexLookup.execute(com.sleepycat.dbxml.XmlQueryContext)
instead.
XmlException
public XmlResults lookupIndex(XmlQueryContext context, String uri, String name, String parentUri, String parentName, String index) throws XmlException
XmlManager.createIndexLookup(com.sleepycat.dbxml.XmlContainer, java.lang.String, java.lang.String, java.lang.String, com.sleepycat.dbxml.XmlValue, int)
and XmlIndexLookup.execute(com.sleepycat.dbxml.XmlQueryContext)
instead.
XmlException
public XmlResults lookupIndex(XmlTransaction txn, XmlQueryContext context, String uri, String name, String index, XmlValue value) throws XmlException
XmlManager.createIndexLookup(com.sleepycat.dbxml.XmlContainer, java.lang.String, java.lang.String, java.lang.String, com.sleepycat.dbxml.XmlValue, int)
and XmlIndexLookup.execute(com.sleepycat.dbxml.XmlQueryContext)
instead.
XmlException
public XmlResults lookupIndex(XmlQueryContext context, String uri, String name, String index, XmlValue value, XmlDocumentConfig config) throws XmlException
XmlManager.createIndexLookup(com.sleepycat.dbxml.XmlContainer, java.lang.String, java.lang.String, java.lang.String, com.sleepycat.dbxml.XmlValue, int)
and XmlIndexLookup.execute(com.sleepycat.dbxml.XmlQueryContext)
instead.
XmlException
public XmlResults lookupIndex(XmlTransaction txn, XmlQueryContext context, String uri, String name, String index) throws XmlException
XmlManager.createIndexLookup(com.sleepycat.dbxml.XmlContainer, java.lang.String, java.lang.String, java.lang.String, com.sleepycat.dbxml.XmlValue, int)
and XmlIndexLookup.execute(com.sleepycat.dbxml.XmlQueryContext)
instead.
XmlException
public XmlResults lookupIndex(XmlTransaction txn, XmlQueryContext context, String uri, String name, String index, XmlValue value, XmlDocumentConfig config) throws XmlException
XmlManager.createIndexLookup(com.sleepycat.dbxml.XmlContainer, java.lang.String, java.lang.String, java.lang.String, com.sleepycat.dbxml.XmlValue, int)
and XmlIndexLookup.execute(com.sleepycat.dbxml.XmlQueryContext)
instead.
XmlException
public XmlResults lookupIndex(XmlQueryContext context, String uri, String name, String parentUri, String parentName, String index, XmlValue value, XmlDocumentConfig config) throws XmlException
XmlManager.createIndexLookup(com.sleepycat.dbxml.XmlContainer, java.lang.String, java.lang.String, java.lang.String, com.sleepycat.dbxml.XmlValue, int)
and XmlIndexLookup.execute(com.sleepycat.dbxml.XmlQueryContext)
instead.
XmlException
public XmlResults lookupIndex(XmlTransaction txn, XmlQueryContext context, String uri, String name, String parentUri, String parentName, String index) throws XmlException
XmlManager.createIndexLookup(com.sleepycat.dbxml.XmlContainer, java.lang.String, java.lang.String, java.lang.String, com.sleepycat.dbxml.XmlValue, int)
and XmlIndexLookup.execute(com.sleepycat.dbxml.XmlQueryContext)
instead.
XmlException
public XmlResults lookupIndex(XmlTransaction txn, XmlQueryContext context, String uri, String name, String parentUri, String parentName, String index, XmlValue value) throws XmlException
XmlManager.createIndexLookup(com.sleepycat.dbxml.XmlContainer, java.lang.String, java.lang.String, java.lang.String, com.sleepycat.dbxml.XmlValue, int)
and XmlIndexLookup.execute(com.sleepycat.dbxml.XmlQueryContext)
instead.
XmlException
public XmlResults lookupIndex(XmlTransaction txn, XmlQueryContext context, String uri, String name, String parentUri, String parentName, String index, XmlValue value, XmlDocumentConfig config) throws XmlException
XmlManager.createIndexLookup(com.sleepycat.dbxml.XmlContainer, java.lang.String, java.lang.String, java.lang.String, com.sleepycat.dbxml.XmlValue, int)
and XmlIndexLookup.execute(com.sleepycat.dbxml.XmlQueryContext)
instead.
XmlException
public XmlStatistics lookupStatistics(String uri, String name, String index, XmlValue value) throws XmlException
XmlStatistics
object for the identified index. This object identifies the number of keys (both total and unique) maintained for the identified index.
uri
- The namespace of the node to which this index is applied.name
- The name of the node to which this index is applied.index
- Identifies the index for which you want the statistics returned. The
value supplied here must be a valid index. See
XmlIndexSpecification.addIndex(java.lang.String, java.lang.String, int, int)
for a description of valid index
specifications.value
- Provides the value to which equality indices must be equal. This
parameter is required when returning documents on equality indices, and
it is ignored for all other types of indices.
XmlException
public XmlStatistics lookupStatistics(String uri, String name, String index) throws XmlException
XmlStatistics
object for the identified index. This object identifies the number of keys (both total and unique) maintained for the identified index.
uri
- The namespace of the node to which this index is applied.name
- The name of the node to which this index is applied.index
- Identifies the index for which you want the statistics returned. The
value supplied here must be a valid index. See
XmlIndexSpecification.addIndex(java.lang.String, java.lang.String, int, int)
for a description of valid index
specifications.
XmlException
public XmlStatistics lookupStatistics(XmlTransaction txn, String uri, String name, String index, XmlValue value) throws XmlException
XmlStatistics
object for the identified index. This object identifies the number of keys (both total and unique) maintained for the identified index.
txn
- If the operation is to be transaction-protected, the txn
parameter is an XmlTransaction
handle returned from
XmlManager.createTransaction()
.uri
- The namespace of the node to which this index is applied.name
- The name of the node to which this index is applied.index
- Identifies the index for which you want the statistics returned. The
value supplied here must be a valid index. See
XmlIndexSpecification.addIndex(java.lang.String, java.lang.String, int, int)
for a description of valid index
specifications.value
- Provides the value to which equality indices must be equal. This
parameter is required when returning documents on equality indices, and
it is ignored for all other types of indices.
XmlException
public XmlStatistics lookupStatistics(XmlTransaction txn, String uri, String name, String index) throws XmlException
XmlStatistics
object for the identified index. This object identifies the number of keys (both total and unique) maintained for the identified index.
txn
- If the operation is to be transaction-protected, the txn
parameter is an XmlTransaction
handle returned from
XmlManager.createTransaction()
.uri
- The namespace of the node to which this index is applied.name
- The name of the node to which this index is applied.index
- Identifies the index for which you want the statistics returned. The
value supplied here must be a valid index. See
XmlIndexSpecification.addIndex(java.lang.String, java.lang.String, int, int)
for a description of valid index
specifications.
XmlException
public XmlStatistics lookupStatistics(String uri, String name, String parentUri, String parentName, String index, XmlValue value) throws XmlException
uri
- The namespace of the node to which this index is applied.name
- The name of the node to which this index is applied.parentUri
- The namespace of the parent node to which this edge index is applied.parentName
- The name of the parent node to which this edge index is applied.index
- Identifies the index for which you want the documents returned. The
value supplied here must be a valid index. See
XmlIndexSpecification.addIndex(java.lang.String, java.lang.String, int, int)
for a description of valid index
specifications.value
- Provides the value to which equality indices must be equal. This
parameter is required when returning documents on equality indices, and
it is ignored for all other types of indices.
XmlException
public XmlStatistics lookupStatistics(String uri, String name, String parentUri, String parentName, String index) throws XmlException
uri
- The namespace of the node to which this index is applied.name
- The name of the node to which this index is applied.parentUri
- The namespace of the parent node to which this edge index is applied.parentName
- The name of the parent node to which this edge index is applied.index
- Identifies the index for which you want the documents returned. The
value supplied here must be a valid index. See
XmlIndexSpecification.addIndex(java.lang.String, java.lang.String, int, int)
for a description of valid index
specifications.
XmlException
public XmlStatistics lookupStatistics(XmlTransaction txn, String uri, String name, String parentUri, String parentName, String index, XmlValue value) throws XmlException
uri
- The namespace of the node to which this index is applied.name
- The name of the node to which this index is applied.parentUri
- The namespace of the parent node to which this edge index is applied.parentName
- The name of the parent node to which this edge index is applied.index
- Identifies the index for which you want the documents returned. The
value supplied here must be a valid index. See
XmlIndexSpecification.addIndex(java.lang.String, java.lang.String, int, int)
for a description of valid index
specifications.value
- Provides the value to which equality indices must be equal. This
parameter is required when returning documents on equality indices, and
it is ignored for all other types of indices.
XmlException
public XmlStatistics lookupStatistics(XmlTransaction txn, String uri, String name, String parentUri, String parentName, String index) throws XmlException
uri
- The namespace of the node to which this index is applied.name
- The name of the node to which this index is applied.parentUri
- The namespace of the parent node to which this edge index is applied.parentName
- The name of the parent node to which this edge index is applied.index
- Identifies the index for which you want the documents returned. The
value supplied here must be a valid index. See
XmlIndexSpecification.addIndex(java.lang.String, java.lang.String, int, int)
for a description of valid index
specifications.
XmlException
public void putDocument(XmlDocument document, XmlUpdateContext context) throws XmlException
XmlDocument
into the container.
Note that the name used for the document must be unique in the container
or an exception is thrown. The configuration setting XmlDocumentConfig.setGenerateName(boolean)
, can be used to generate a name. To change a document that already exists in the container, use updateDocument(com.sleepycat.dbxml.XmlDocument, com.sleepycat.dbxml.XmlUpdateContext)
.
The document content is indexed according to the container indexing specification. The indexer supports the Xerces content encodings and expects the content to be well-formed, but it need not be valid.
document
- The document to be inserted.context
- The update context to use for the operation.
XmlException
public String putDocument(String name, String contents, XmlUpdateContext context) throws XmlException
Note that the name used for the document must be unique in the container
or an exception is thrown. The configuration setting XmlDocumentConfig.setGenerateName(boolean)
, can be used to generate a name. To change a document that already exists in the container, use updateDocument(com.sleepycat.dbxml.XmlDocument, com.sleepycat.dbxml.XmlUpdateContext)
.
The document content is indexed according to the container indexing specification. The indexer supports the Xerces content encodings and expects the content to be well-formed, but it need not be valid.
name
- The name of the document to be inserted.contents
- The content of the document to be inserted.context
- The update context to use for the operation.
XmlException
public String putDocument(String name, XmlInputStream input, XmlUpdateContext context) throws XmlException
Note that the name used for the document must be unique in the container
or an exception is thrown. The configuration setting XmlDocumentConfig.setGenerateName(boolean)
, can be used to generate a name. To change a document that already exists in the container, use updateDocument(com.sleepycat.dbxml.XmlDocument, com.sleepycat.dbxml.XmlUpdateContext)
.
The document content is indexed according to the container indexing specification. The indexer supports the Xerces content encodings and expects the content to be well-formed, but it need not be valid.
name
- The name of the document to be inserted.input
- The content of the document to be inserted.context
- The update context to use for the operation.
XmlException
public void putDocument(XmlDocument document, XmlUpdateContext context, XmlDocumentConfig config) throws XmlException
XmlDocument
into the container, with configuration options.
Note that the name used for the document must be unique in the container
or an exception is thrown. The configuration setting XmlDocumentConfig.setGenerateName(boolean)
, can be used to generate a name. To change a document that already exists in the container, use updateDocument(com.sleepycat.dbxml.XmlDocument, com.sleepycat.dbxml.XmlUpdateContext)
.
The document content is indexed according to the container indexing specification. The indexer supports the Xerces content encodings and expects the content to be well-formed, but it need not be valid.
document
- The document to be inserted.context
- The update context to use for the operation.config
- Configuration settings for this operation
XmlException
public void putDocument(XmlTransaction txn, XmlDocument document, XmlUpdateContext context, XmlDocumentConfig config) throws XmlException
XmlDocument
into the container in the scope of a transaction.
Note that the name used for the document must be unique in the container
or an exception is thrown. The configuration setting XmlDocumentConfig.setGenerateName(boolean)
, can be used to generate a name. To change a document that already exists in the container, use updateDocument(com.sleepycat.dbxml.XmlDocument, com.sleepycat.dbxml.XmlUpdateContext)
.
The document content is indexed according to the container indexing specification. The indexer supports the Xerces content encodings and expects the content to be well-formed, but it need not be valid.
txn
- If the operation is to be transaction-protected, the txn
parameter is an XmlTransaction
handle returned from XmlManager.createTransaction()
.document
- The document to be inserted.context
- The update context to use for the operation.config
- Configuration settings for this operation
XmlException
public void putDocument(String name, XmlInputStream input, XmlUpdateContext context, XmlDocumentConfig config) throws XmlException
Note that the name used for the document must be unique in the container
or an exception is thrown. The configuration setting XmlDocumentConfig.setGenerateName(boolean)
, can be used to generate a name. To change a document that already exists in the container, use updateDocument(com.sleepycat.dbxml.XmlDocument, com.sleepycat.dbxml.XmlUpdateContext)
.
The document content is indexed according to the container indexing specification. The indexer supports the Xerces content encodings and expects the content to be well-formed, but it need not be valid.
name
- The name of the document to be inserted.input
- The content of the document to be inserted.context
- The update context to use for the operation.config
- Configuration settings for this operation
XmlException
public void putDocument(XmlTransaction txn, String name, XmlInputStream input, XmlUpdateContext context, XmlDocumentConfig config) throws XmlException
Note that the name used for the document must be unique in the container
or an exception is thrown. The configuration setting XmlDocumentConfig.setGenerateName(boolean)
, can be used to generate a name. To change a document that already exists in the container, use updateDocument(com.sleepycat.dbxml.XmlDocument, com.sleepycat.dbxml.XmlUpdateContext)
.
The document content is indexed according to the container indexing specification. The indexer supports the Xerces content encodings and expects the content to be well-formed, but it need not be valid.
txn
- If the operation is to be transaction-protected, the txn
parameter is an XmlTransaction
handle returned from XmlManager.createTransaction()
.name
- The name of the document to be inserted.input
- The content of the document to be inserted.context
- The update context to use for the operation.config
- Configuration settings for this operation
XmlException
public void putDocument(String name, String content, XmlUpdateContext context, XmlDocumentConfig config) throws XmlException
Note that the name used for the document must be unique in the container
or an exception is thrown. The configuration setting XmlDocumentConfig.setGenerateName(boolean)
, can be used to generate a name. To change a document that already exists in the container, use updateDocument(com.sleepycat.dbxml.XmlDocument, com.sleepycat.dbxml.XmlUpdateContext)
.
The document content is indexed according to the container indexing specification. The indexer supports the Xerces content encodings and expects the content to be well-formed, but it need not be valid.
name
- The name of the document to be inserted.content
- The content of the document to be inserted.context
- The update context to use for the operation.config
- Configuration settings for this operation
XmlException
public String putDocument(String name, XmlEventReader reader, XmlUpdateContext context, XmlDocumentConfig config)
XmlEventReader
as content.
Note that the name used for the document must be unique in the container
or an exception is thrown. The configuration setting XmlDocumentConfig.setGenerateName(boolean)
, can be used to generate a name. To change a document that already exists in the container, use updateDocument(com.sleepycat.dbxml.XmlDocument, com.sleepycat.dbxml.XmlUpdateContext)
.
The content is retrieved from the XmlEventReader
object, and is not subject to
validation.
name
- The name of the document to be inserted.reader
- The XmlEventReader
object from which content is read.context
- The update context to use for the operation.config
- Configuration settings for this operationpublic String putDocument(XmlTransaction txn, String name, XmlEventReader reader, XmlUpdateContext context, XmlDocumentConfig config)
XmlEventReader
as content, within a transaction.
Note that the name used for the document must be unique in the container
or an exception is thrown. The configuration setting XmlDocumentConfig.setGenerateName(boolean)
, can be used to generate a name. To change a document that already exists in the container, use updateDocument(com.sleepycat.dbxml.XmlDocument, com.sleepycat.dbxml.XmlUpdateContext)
.
The content is retrieved from the XmlEventReader
object, and is not subject to
validation.
txn
- If the operation is to be transaction-protected, the txn
parameter is an XmlTransaction
handle returned from XmlManager.createTransaction()
.name
- The name of the document to be inserted.reader
- The XmlEventReader
object from which content is read.context
- The update context to use for the operation.config
- Configuration settings for this operationpublic XmlEventWriter putDocumentAsEventWriter(XmlDocument document, XmlUpdateContext context, XmlDocumentConfig config)
XmlDocument
into the container, using
the returned XmlEventWriter
.
The document content must be provided by the caller via calls to the returned
XmlEventWriter
object. When the content is completely written,
XmlEventWriter.close(boolean)
must be called to complete the operation.
Database resources are held for the duration of the operation, so it should not be delayed if at all possible.
Note that the name used for the document must be unique in the container
or an exception is thrown. The configuration setting XmlDocumentConfig.setGenerateName(boolean)
, can be used to generate a name. To change a document that already exists in the container, use updateDocument(com.sleepycat.dbxml.XmlDocument, com.sleepycat.dbxml.XmlUpdateContext)
.
document
- The document to be inserted.context
- The update context to use for the operation.config
- Configuration settings for this operationpublic XmlEventWriter putDocumentAsEventWriter(XmlTransaction txn, String name, XmlUpdateContext context, XmlDocumentConfig config)
XmlDocument
into the container, using
the returned XmlEventWriter
, in the scope of a transaction.
The document content must be provided by the caller via calls to the returned
XmlEventWriter
object. When the content is completely written,
XmlEventWriter.close(boolean)
must be called to complete the operation.
Database resources are held for the duration of the operation, so it should not be delayed if at all possible.
Note that the name used for the document must be unique in the container
or an exception is thrown. The configuration setting XmlDocumentConfig.setGenerateName(boolean)
, can be used to generate a name. To change a document that already exists in the container, use updateDocument(com.sleepycat.dbxml.XmlDocument, com.sleepycat.dbxml.XmlUpdateContext)
.
txn
- If the operation is to be transaction-protected, the txn
parameter is an XmlTransaction
handle returned from XmlManager.createTransaction()
.name
- The name of the document to be inserted.context
- The update context to use for the operation.config
- Configuration settings for this operationpublic void putDocument(XmlTransaction txn, XmlDocument document, XmlUpdateContext context) throws XmlException
XmlDocument
into the container in the scope of a transaction.
Note that the name used for the document must be unique in the container
or an exception is thrown. The configuration setting XmlDocumentConfig.setGenerateName(boolean)
, can be used to generate a name. To change a document that already exists in the container, use updateDocument(com.sleepycat.dbxml.XmlDocument, com.sleepycat.dbxml.XmlUpdateContext)
.
The document content is indexed according to the container indexing specification. The indexer supports the Xerces content encodings and expects the content to be well-formed, but it need not be valid.
txn
- If the operation is to be transaction-protected, the txn
parameter is an XmlTransaction
handle returned from XmlManager.createTransaction()
.document
- The document to be inserted.context
- The update context to use for the operation.
XmlException
public void putDocument(XmlTransaction txn, String name, String content, XmlUpdateContext context, XmlDocumentConfig config) throws XmlException
Note that the name used for the document must be unique in the container
or an exception is thrown. The configuration setting XmlDocumentConfig.setGenerateName(boolean)
, can be used to generate a name. To change a document that already exists in the container, use updateDocument(com.sleepycat.dbxml.XmlDocument, com.sleepycat.dbxml.XmlUpdateContext)
.
The document content is indexed according to the container indexing specification. The indexer supports the Xerces content encodings and expects the content to be well-formed, but it need not be valid.
txn
- If the operation is to be transaction-protected, the txn
parameter is an XmlTransaction
handle returned from XmlManager.createTransaction()
.name
- The name of the document to be inserted.content
- The content of the document to be inserted.context
- The update context to use for the operation.config
- Configuration settings for this operation
XmlException
public String putDocument(XmlTransaction txn, String name, XmlInputStream input, XmlUpdateContext context) throws XmlException
Note that the name used for the document must be unique in the container
or an exception is thrown. The configuration setting XmlDocumentConfig.setGenerateName(boolean)
, can be used to generate a name. To change a document that already exists in the container, use updateDocument(com.sleepycat.dbxml.XmlDocument, com.sleepycat.dbxml.XmlUpdateContext)
.
The document content is indexed according to the container indexing specification. The indexer supports the Xerces content encodings and expects the content to be well-formed, but it need not be valid.
txn
- If the operation is to be transaction-protected, the txn
parameter is an XmlTransaction
handle returned from XmlManager.createTransaction()
.name
- The name of the document to be inserted.input
- The content of the document to be inserted.context
- The update context to use for the operation.
XmlException
public String putDocument(XmlTransaction txn, String name, String contents, XmlUpdateContext context) throws XmlException
Note that the name used for the document must be unique in the container
or an exception is thrown. The configuration setting XmlDocumentConfig.setGenerateName(boolean)
, can be used to generate a name. To change a document that already exists in the container, use updateDocument(com.sleepycat.dbxml.XmlDocument, com.sleepycat.dbxml.XmlUpdateContext)
.
The document content is indexed according to the container indexing specification. The indexer supports the Xerces content encodings and expects the content to be well-formed, but it need not be valid.
name
- The name of the document to be inserted.contents
- The content of the document to be inserted.context
- The update context to use for the operation.
XmlException
public boolean removeAlias(String alias) throws XmlException
addAlias(String)
.
Returns true if the alias is found, and matches the container.
alias
- The alias to be removed.
XmlException
public void replaceDefaultIndex(String index, XmlUpdateContext context) throws XmlException
XmlIndexSpecification.replaceDefaultIndex(int, int)
for more
information.
index
- A comma-separated list of strings that represent the indexing strategy.
See XmlIndexSpecification.addIndex(String, String, String)
for a full description.context
- The update context to use for the operation.
XmlException
public void replaceDefaultIndex(XmlTransaction txn, String index, XmlUpdateContext context) throws XmlException
XmlIndexSpecification.replaceDefaultIndex(int, int)
for more information.
txn
- If the operation is to be transaction-protected, the txn
parameter is an XmlTransaction
handle returned from
XmlManager.createTransaction()
.index
- A comma-separated list of strings that represent the indexing strategy.
See XmlIndexSpecification.addIndex(String, String, String)
for a full description.context
- The update context to use for the operation.
XmlException
public void replaceIndex(String uri, String name, String index, XmlUpdateContext context) throws XmlException
XmlIndexSpecification.replaceIndex(java.lang.String, java.lang.String, int, int)
for more information.
uri
- The namespace of the node to be indexed. The default namespace is
selected by passing an empty string for the namespace.name
- The name of the element or attribute node to be indexed.index
- A comma-separated list of strings that represent the indexing strategy.
See XmlIndexSpecification.addIndex(String, String, String)
for a full description.context
- The update context to use for the operation.
XmlException
public void replaceIndex(XmlTransaction txn, String uri, String name, String index, XmlUpdateContext context) throws XmlException
XmlIndexSpecification.replaceIndex(java.lang.String, java.lang.String, int, int)
for more information.
txn
- If the operation is to be transaction-protected, the txn
parameter is an XmlTransaction
handle returned from
XmlManager.createTransaction()
.uri
- The namespace of the node to be indexed. The default namespace is
selected by passing an empty string for the namespace.name
- The name of the element or attribute node to be indexed.index
- A comma-separated list of strings that represent the indexing strategy.
See XmlIndexSpecification.addIndex(String, String, String)
for a full description.context
- The update context to use for the operation.
XmlException
public void setIndexSpecification(XmlIndexSpecification index, XmlUpdateContext context) throws XmlException
getIndexSpecification()
method.
If the container is not empty then the contained documents are incrementally indexed. Index keys for disabled index strategies are removed and index keys for enabled index strategies are added. Note that the length of time taken to perform this re-indexing operation is proportional to the size of the container.
index
- The indexing specification for the container.context
- The update context to use for the operation.
XmlException
public void setIndexSpecification(XmlTransaction txn, XmlIndexSpecification index, XmlUpdateContext context) throws XmlException
getIndexSpecification()
method.
If the container is not empty then the contained documents are incrementally indexed. Index keys for disabled index strategies are removed and index keys for enabled index strategies are added. Note that the length of time taken to perform this re-indexing operation is proportional to the size of the container.
txn
- If the operation is to be transaction-protected, the txn
parameter is an XmlTransaction
handle returned from
XmlManager.createTransaction()
.index
- The indexing specification for the container.context
- The update context to use for the operation.
XmlException
public void sync() throws XmlException
XmlException
public void updateDocument(XmlDocument document, XmlUpdateContext context) throws XmlException
XmlDocument
in the container. The document must have
been retrieved from the container using
getDocument(java.lang.String)
, XmlManager.query(java.lang.String, com.sleepycat.dbxml.XmlQueryContext, com.sleepycat.dbxml.XmlDocumentConfig)
, or
XmlQueryExpression.execute(com.sleepycat.dbxml.XmlQueryContext)
. It is possible to use a
constructed XmlDocument object, if its name is set to a valid name in
the container. The document must still exist within the container. The
document content is indexed according to the container indexing
specification, with index keys being removed for the previous document
content, and added for the updated document content.
document
- The XmlDocument
to be updated in the container.context
- The update context to use for the operation.
XmlException
public void updateDocument(XmlTransaction txn, XmlDocument document, XmlUpdateContext context) throws XmlException
XmlDocument
in the container in the scope of a transaction. The document must have been retrieved from the container using
getDocument(java.lang.String)
, XmlManager.query(java.lang.String, com.sleepycat.dbxml.XmlQueryContext, com.sleepycat.dbxml.XmlDocumentConfig)
, or
XmlQueryExpression.execute(com.sleepycat.dbxml.XmlQueryContext)
. It is possible to use a
constructed XmlDocument object, if its name is set to a valid name in
the container. The document must still exist within the container. The
document content is indexed according to the container indexing
specification, with index keys being removed for the previous document
content, and added for the updated document content.
txn
- If the operation is to be transaction-protected, the txn
parameter is an XmlTransaction
handle returned from
XmlManager.createTransaction()
.document
- The XmlDocument
to be updated in the container.context
- The update context to use for the operation.
XmlException
|
Berkeley DB XML version 2.3.10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |