public class XmlContainer
extends java.lang.Object
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.
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
XmlContainer(XmlContainer o)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addAlias(java.lang.String alias)
Adds a new named alias for the container.
|
void |
addDefaultIndex(java.lang.String index)
Adds a default index to the container.
|
void |
addDefaultIndex(java.lang.String index,
XmlUpdateContext context)
Adds a default index to the container.
|
void |
addDefaultIndex(XmlTransaction txn,
java.lang.String index)
Adds a default index to the container in the scope of a transaction.
|
void |
addDefaultIndex(XmlTransaction txn,
java.lang.String index,
XmlUpdateContext context)
Adds a default index to the container in the scope of a transaction.
|
void |
addIndex(java.lang.String uri,
java.lang.String name,
int indexType,
int syntaxType)
Adds an index of the specified type for the named document node.
|
void |
addIndex(java.lang.String uri,
java.lang.String name,
int indexType,
int syntaxType,
XmlUpdateContext context)
Adds an index of the specified type for the named document node.
|
void |
addIndex(java.lang.String uri,
java.lang.String name,
java.lang.String index)
Adds an index of the specified type for the named document node.
|
void |
addIndex(java.lang.String uri,
java.lang.String name,
java.lang.String index,
XmlUpdateContext context)
Adds an index of the specified type for the named document node.
|
void |
addIndex(XmlTransaction txn,
java.lang.String uri,
java.lang.String name,
int indexType,
int syntaxType)
Adds an index of the specified type for the named document node in the
scope of a transaction.
|
void |
addIndex(XmlTransaction txn,
java.lang.String uri,
java.lang.String name,
int indexType,
int syntaxType,
XmlUpdateContext context)
Adds an index of the specified type for the named document node in the
scope of a transaction.
|
void |
addIndex(XmlTransaction txn,
java.lang.String uri,
java.lang.String name,
java.lang.String index)
Adds an index of the specified type for the named document node in the
scope of a transaction.
|
void |
addIndex(XmlTransaction txn,
java.lang.String uri,
java.lang.String name,
java.lang.String index,
XmlUpdateContext context)
Adds an index of the specified type for the named document node in the
scope of a transaction.
|
void |
close()
This is a synonym for
delete() |
void |
delete()
Close the container.
|
void |
deleteDefaultIndex(java.lang.String index)
Deletes the default index for the container.
|
void |
deleteDefaultIndex(java.lang.String index,
XmlUpdateContext context)
Deletes the default index for the container.
|
void |
deleteDefaultIndex(XmlTransaction txn,
java.lang.String index)
Deletes the default index for the container in the scope of a transaction.
|
void |
deleteDefaultIndex(XmlTransaction txn,
java.lang.String index,
XmlUpdateContext context)
Deletes the default index for the container in the scope of a transaction.
|
void |
deleteDocument(java.lang.String name)
Removes the named document from the container.
|
void |
deleteDocument(java.lang.String name,
XmlUpdateContext context)
Removes the named document from the container.
|
void |
deleteDocument(XmlDocument document)
Removes the specified
XmlDocument from the container. |
void |
deleteDocument(XmlDocument document,
XmlUpdateContext context)
Removes the specified
XmlDocument from the container. |
void |
deleteDocument(XmlTransaction txn,
java.lang.String name)
Removes the named document from the container in the scope of a
transaction.
|
void |
deleteDocument(XmlTransaction txn,
java.lang.String name,
XmlUpdateContext context)
Removes the named document from the container in the scope of a
transaction.
|
void |
deleteDocument(XmlTransaction txn,
XmlDocument document)
Removes the specified
XmlDocument 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(java.lang.String uri,
java.lang.String name,
java.lang.String index,
XmlUpdateContext context)
Deletes an index of the specified type for the named document node.
|
void |
deleteIndex(XmlTransaction txn,
java.lang.String uri,
java.lang.String name,
java.lang.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. |
boolean |
getAutoIndexing()
Retrieves the current state of automatic indexing for the container.
|
boolean |
getAutoIndexing(XmlTransaction txn)
Retrieves the current state of automatic indexing for the container in the scope of a transaction.
|
XmlContainerConfig |
getContainerConfig()
Returns a copy of the configuration object for the container.
|
int |
getContainerType()
Returns the container's type.
|
XmlDocument |
getDocument(java.lang.String name)
Returns the
XmlDocument with the specified name. |
XmlDocument |
getDocument(java.lang.String name,
XmlDocumentConfig config)
Returns the
XmlDocument with the specified name, with
configuration options. |
XmlDocument |
getDocument(XmlTransaction txn,
java.lang.String name)
Returns the
XmlDocument with the specified name in the scope of a
transaction. |
XmlDocument |
getDocument(XmlTransaction txn,
java.lang.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. |
java.lang.String |
getName()
Returns the name of the XmlContainer.
|
XmlResults |
getNode(java.lang.String handle)
Returns the
XmlResults which contains the object associated with the specified handle. |
XmlResults |
getNode(XmlTransaction txn,
java.lang.String handle,
XmlDocumentConfig config)
Returns the
XmlResults which contains the object associated with the specified handle in the scope of a transaction. |
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,
java.lang.String uri,
java.lang.String name,
java.lang.String index)
|
XmlResults |
lookupIndex(XmlQueryContext context,
java.lang.String uri,
java.lang.String name,
java.lang.String parentUri,
java.lang.String parentName,
java.lang.String index)
|
XmlResults |
lookupIndex(XmlQueryContext context,
java.lang.String uri,
java.lang.String name,
java.lang.String parentUri,
java.lang.String parentName,
java.lang.String index,
XmlValue value)
|
XmlResults |
lookupIndex(XmlQueryContext context,
java.lang.String uri,
java.lang.String name,
java.lang.String parentUri,
java.lang.String parentName,
java.lang.String index,
XmlValue value,
XmlDocumentConfig config)
|
XmlResults |
lookupIndex(XmlQueryContext context,
java.lang.String uri,
java.lang.String name,
java.lang.String index,
XmlValue value)
|
XmlResults |
lookupIndex(XmlQueryContext context,
java.lang.String uri,
java.lang.String name,
java.lang.String index,
XmlValue value,
XmlDocumentConfig config)
|
XmlResults |
lookupIndex(XmlTransaction txn,
XmlQueryContext context,
java.lang.String uri,
java.lang.String name,
java.lang.String index)
|
XmlResults |
lookupIndex(XmlTransaction txn,
XmlQueryContext context,
java.lang.String uri,
java.lang.String name,
java.lang.String parentUri,
java.lang.String parentName,
java.lang.String index)
|
XmlResults |
lookupIndex(XmlTransaction txn,
XmlQueryContext context,
java.lang.String uri,
java.lang.String name,
java.lang.String parentUri,
java.lang.String parentName,
java.lang.String index,
XmlValue value)
|
XmlResults |
lookupIndex(XmlTransaction txn,
XmlQueryContext context,
java.lang.String uri,
java.lang.String name,
java.lang.String parentUri,
java.lang.String parentName,
java.lang.String index,
XmlValue value,
XmlDocumentConfig config)
|
XmlResults |
lookupIndex(XmlTransaction txn,
XmlQueryContext context,
java.lang.String uri,
java.lang.String name,
java.lang.String index,
XmlValue value)
|
XmlResults |
lookupIndex(XmlTransaction txn,
XmlQueryContext context,
java.lang.String uri,
java.lang.String name,
java.lang.String index,
XmlValue value,
XmlDocumentConfig config)
|
XmlStatistics |
lookupStatistics(java.lang.String uri,
java.lang.String name,
java.lang.String index)
Returns an
XmlStatistics object for the identified index. |
XmlStatistics |
lookupStatistics(java.lang.String uri,
java.lang.String name,
java.lang.String parentUri,
java.lang.String parentName,
java.lang.String index)
Lookup statistics for the identified edge index.
|
XmlStatistics |
lookupStatistics(java.lang.String uri,
java.lang.String name,
java.lang.String parentUri,
java.lang.String parentName,
java.lang.String index,
XmlValue value)
Lookup statistics for the identified edge index.
|
XmlStatistics |
lookupStatistics(java.lang.String uri,
java.lang.String name,
java.lang.String index,
XmlValue value)
Returns an
XmlStatistics object for the identified index. |
XmlStatistics |
lookupStatistics(XmlTransaction txn,
java.lang.String uri,
java.lang.String name,
java.lang.String index)
Returns an
XmlStatistics object for the identified index. |
XmlStatistics |
lookupStatistics(XmlTransaction txn,
java.lang.String uri,
java.lang.String name,
java.lang.String parentUri,
java.lang.String parentName,
java.lang.String index)
Lookup statistics for the identified edge index in the scope of a transaction.
|
XmlStatistics |
lookupStatistics(XmlTransaction txn,
java.lang.String uri,
java.lang.String name,
java.lang.String parentUri,
java.lang.String parentName,
java.lang.String index,
XmlValue value)
Lookup statistics for the identified edge index in the scope of a transaction.
|
XmlStatistics |
lookupStatistics(XmlTransaction txn,
java.lang.String uri,
java.lang.String name,
java.lang.String index,
XmlValue value)
Returns an
XmlStatistics object for the identified index. |
java.lang.String |
putDocument(java.lang.String name,
java.lang.String contents)
Inserts a document into the container with a given name and string content.
|
java.lang.String |
putDocument(java.lang.String name,
java.lang.String content,
XmlDocumentConfig config)
Inserts a document with given name and string content into the container.
|
java.lang.String |
putDocument(java.lang.String name,
java.lang.String contents,
XmlUpdateContext context)
Inserts a document into the container with a given name and string content.
|
java.lang.String |
putDocument(java.lang.String name,
java.lang.String content,
XmlUpdateContext context,
XmlDocumentConfig config)
Inserts a document with given name and string content into the container.
|
java.lang.String |
putDocument(java.lang.String name,
XmlEventReader reader)
Inserts a document with given name into the container, using the content retrieved from
the given
XmlEventReader as content. |
java.lang.String |
putDocument(java.lang.String name,
XmlEventReader reader,
XmlDocumentConfig config)
Inserts a document with given name into the container, using the content retrieved from
the given
XmlEventReader as content. |
java.lang.String |
putDocument(java.lang.String name,
XmlEventReader reader,
XmlUpdateContext context)
Inserts a document with given name into the container, using the content retrieved from
the given
XmlEventReader as content. |
java.lang.String |
putDocument(java.lang.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. |
java.lang.String |
putDocument(java.lang.String name,
XmlInputStream input)
Inserts a document into the container with a given name and content from a stream.
|
java.lang.String |
putDocument(java.lang.String name,
XmlInputStream input,
XmlDocumentConfig config)
Inserts a document into the container with a given name and content from a stream.
|
java.lang.String |
putDocument(java.lang.String name,
XmlInputStream input,
XmlUpdateContext context)
Inserts a document into the container with a given name and content from a stream.
|
java.lang.String |
putDocument(java.lang.String name,
XmlInputStream input,
XmlUpdateContext context,
XmlDocumentConfig config)
Inserts a document with given name and content into the container.
|
void |
putDocument(XmlDocument document)
Inserts an
XmlDocument into the container, with configuration options. |
void |
putDocument(XmlDocument document,
XmlDocumentConfig config)
Inserts an
XmlDocument into the container, with configuration options. |
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. |
java.lang.String |
putDocument(XmlTransaction txn,
java.lang.String name,
java.lang.String content)
Inserts a document with given name and string content into the container in the scope of a transaction.
|
java.lang.String |
putDocument(XmlTransaction txn,
java.lang.String name,
java.lang.String content,
XmlDocumentConfig config)
Inserts a document with given name and string content into the container in the scope of a transaction.
|
java.lang.String |
putDocument(XmlTransaction txn,
java.lang.String name,
java.lang.String contents,
XmlUpdateContext context)
Inserts a document into the container with a given name and string content in the scope of a transaction.
|
java.lang.String |
putDocument(XmlTransaction txn,
java.lang.String name,
java.lang.String content,
XmlUpdateContext context,
XmlDocumentConfig config)
Inserts a document with given name and string content into the container in the scope of a transaction.
|
java.lang.String |
putDocument(XmlTransaction txn,
java.lang.String name,
XmlEventReader reader)
Inserts a document with given name into the container, using the content retrieved from
the given
XmlEventReader as content, within a transaction. |
java.lang.String |
putDocument(XmlTransaction txn,
java.lang.String name,
XmlEventReader reader,
XmlDocumentConfig config)
Inserts a document with given name into the container, using the content retrieved from
the given
XmlEventReader as content, within a transaction. |
java.lang.String |
putDocument(XmlTransaction txn,
java.lang.String name,
XmlEventReader reader,
XmlUpdateContext context)
Inserts a document with given name into the container, using the content retrieved from
the given
XmlEventReader as content, within a transaction. |
java.lang.String |
putDocument(XmlTransaction txn,
java.lang.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. |
java.lang.String |
putDocument(XmlTransaction txn,
java.lang.String name,
XmlInputStream input)
Inserts a document with given name and content into the container in the scope of a transaction.
|
java.lang.String |
putDocument(XmlTransaction txn,
java.lang.String name,
XmlInputStream input,
XmlDocumentConfig config)
Inserts a document with given name and content into the container in the scope of a transaction.
|
java.lang.String |
putDocument(XmlTransaction txn,
java.lang.String name,
XmlInputStream input,
XmlUpdateContext context)
Inserts a document with given name and content into the container in the scope of a transaction.
|
java.lang.String |
putDocument(XmlTransaction txn,
java.lang.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)
Inserts an
XmlDocument into the container in the scope of a transaction. |
void |
putDocument(XmlTransaction txn,
XmlDocument document,
XmlDocumentConfig config)
Inserts an
XmlDocument 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)
Prepares to insert an
XmlDocument into the container, using
the returned XmlEventWriter . |
XmlEventWriter |
putDocumentAsEventWriter(XmlDocument document,
XmlDocumentConfig config)
Prepares to insert an
XmlDocument into the container, using
the returned XmlEventWriter . |
XmlEventWriter |
putDocumentAsEventWriter(XmlDocument document,
XmlUpdateContext context)
Prepares to insert an
XmlDocument into the container, using
the returned XmlEventWriter . |
XmlEventWriter |
putDocumentAsEventWriter(XmlDocument document,
XmlUpdateContext context,
XmlDocumentConfig config)
Prepares to insert an
XmlDocument into the container, using
the returned XmlEventWriter . |
XmlEventWriter |
putDocumentAsEventWriter(XmlTransaction txn,
XmlDocument document)
Prepares to insert an
XmlDocument into the container, using
the returned XmlEventWriter , in the scope of a transaction. |
XmlEventWriter |
putDocumentAsEventWriter(XmlTransaction txn,
XmlDocument document,
XmlDocumentConfig config)
Prepares to insert an
XmlDocument into the container, using
the returned XmlEventWriter , in the scope of a transaction. |
XmlEventWriter |
putDocumentAsEventWriter(XmlTransaction txn,
XmlDocument document,
XmlUpdateContext context)
Prepares to insert an
XmlDocument into the container, using
the returned XmlEventWriter , in the scope of a transaction. |
XmlEventWriter |
putDocumentAsEventWriter(XmlTransaction txn,
XmlDocument document,
XmlUpdateContext context,
XmlDocumentConfig config)
Prepares to insert an
XmlDocument into the container, using
the returned XmlEventWriter , in the scope of a transaction. |
boolean |
removeAlias(java.lang.String alias)
Removes the named alias from the container.
|
void |
replaceDefaultIndex(java.lang.String index)
Replaces the container's default index.
|
void |
replaceDefaultIndex(java.lang.String index,
XmlUpdateContext context)
Replaces the container's default index.
|
void |
replaceDefaultIndex(XmlTransaction txn,
java.lang.String index)
Replaces the container's default index in the scope of a transaction.
|
void |
replaceDefaultIndex(XmlTransaction txn,
java.lang.String index,
XmlUpdateContext context)
Replaces the container's default index in the scope of a transaction.
|
void |
replaceIndex(java.lang.String uri,
java.lang.String name,
java.lang.String index)
Replaces an index of the specified type for the named document node.
|
void |
replaceIndex(java.lang.String uri,
java.lang.String name,
java.lang.String index,
XmlUpdateContext context)
Replaces an index of the specified type for the named document node.
|
void |
replaceIndex(XmlTransaction txn,
java.lang.String uri,
java.lang.String name,
java.lang.String index)
Replaces an index of the specified type for the named document node in the scope of a transaction.
|
void |
replaceIndex(XmlTransaction txn,
java.lang.String uri,
java.lang.String name,
java.lang.String index,
XmlUpdateContext context)
Replaces an index of the specified type for the named document node in the scope of a transaction.
|
void |
setAutoIndexing(boolean value)
Sets the current state of automatic indexing for the container.
|
void |
setAutoIndexing(XmlTransaction txn,
boolean value)
Sets the current state of automatic indexing for the container in the scope of a transaction.
|
void |
setIndexSpecification(XmlIndexSpecification index)
Defines the type of indexing to be maintained for a container of
documents.
|
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)
Defines the type of indexing to be maintained for a container of
documents in the scope of a transaction.
|
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)
Updates an
XmlDocument in the container. |
void |
updateDocument(XmlDocument document,
XmlUpdateContext context)
Updates an
XmlDocument in the container. |
void |
updateDocument(XmlTransaction txn,
XmlDocument document)
Updates an
XmlDocument in the container in the scope of a transaction. |
void |
updateDocument(XmlTransaction txn,
XmlDocument document,
XmlUpdateContext context)
Updates an
XmlDocument in the container in the scope of a transaction. |
public static final int WholedocContainer
public static final int NodeContainer
public XmlContainer(XmlContainer o) throws XmlException
XmlException
public void delete()
public void close() throws XmlException
delete()
XmlException
public boolean addAlias(java.lang.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(java.lang.String index) 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.XmlException
public void addDefaultIndex(java.lang.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, java.lang.String index) 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.XmlException
public void addDefaultIndex(XmlTransaction txn, java.lang.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(java.lang.String uri, java.lang.String name, java.lang.String index) 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.XmlException
public void addIndex(java.lang.String uri, java.lang.String name, java.lang.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(java.lang.String uri, java.lang.String name, int indexType, int syntaxType) throws XmlException
XmlIndexSpecification.addIndex(String, 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.indexType
- A series of values bitwise OR'd together to form the index strategy. See XmlIndexSpecification.addIndex(String, String, int, int)
for a complete description.syntaxType
- Identifies the type of information being indexed. See XmlIndexSpecification.addIndex(String, String, int, int)
for a complete description.XmlException
public void addIndex(java.lang.String uri, java.lang.String name, int indexType, int syntaxType, XmlUpdateContext context) throws XmlException
XmlIndexSpecification.addIndex(String, 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.indexType
- A series of values bitwise OR'd together to form the index strategy. See XmlIndexSpecification.addIndex(String, String, int, int)
for a complete description.syntaxType
- Identifies the type of information being indexed. See XmlIndexSpecification.addIndex(String, String, int, int)
for a complete description.context
- The update context to use for the operation.XmlException
public void addIndex(XmlTransaction txn, java.lang.String uri, java.lang.String name, java.lang.String index) 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.XmlException
public void addIndex(XmlTransaction txn, java.lang.String uri, java.lang.String name, java.lang.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 addIndex(XmlTransaction txn, java.lang.String uri, java.lang.String name, int indexType, int syntaxType) throws XmlException
XmlIndexSpecification.addIndex(String, 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.indexType
- A series of values bitwise OR'd together to form the index strategy. See XmlIndexSpecification.addIndex(String, String, int, int)
for a complete description.syntaxType
- Identifies the type of information being indexed. See XmlIndexSpecification.addIndex(String, String, int, int)
for a complete description.XmlException
public void addIndex(XmlTransaction txn, java.lang.String uri, java.lang.String name, int indexType, int syntaxType, XmlUpdateContext context) throws XmlException
XmlIndexSpecification.addIndex(String, 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.indexType
- A series of values bitwise OR'd together to form the index strategy. See XmlIndexSpecification.addIndex(String, String, int, int)
for a complete description.syntaxType
- Identifies the type of information being indexed. See XmlIndexSpecification.addIndex(String, String, int, int)
for a complete description.context
- The update context to use for the operation.XmlException
public void deleteDefaultIndex(java.lang.String index) 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.XmlException
public void deleteDefaultIndex(java.lang.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, java.lang.String index) 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.XmlException
public void deleteDefaultIndex(XmlTransaction txn, java.lang.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(java.lang.String name) throws XmlException
name
- The name of the document to be deleted.XmlException
public void deleteDocument(java.lang.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) 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.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, java.lang.String name) 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.XmlException
public void deleteDocument(XmlTransaction txn, java.lang.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) 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.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(java.lang.String uri, java.lang.String name, java.lang.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, java.lang.String uri, java.lang.String name, java.lang.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. The results are unconditionally returned
using lazy evaluation, which means that methods such as XmlResults.size()
will
throw an exception.config
- Configuration settings for this operation. If null,
the default is to return lazy documents.XmlException
public XmlResults getAllDocuments(XmlTransaction txn, XmlDocumentConfig config) throws XmlException
XmlDocument
objects in the container,
with configuration options, in the context of a transaction.
The results are unconditionally returned
using lazy evaluation, which means that methods such as XmlResults.size()
will
throw an exception.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. If null,
the default is to return lazy documents.XmlException
public boolean getAutoIndexing() throws XmlException
setAutoIndexing(boolean)
. See setAutoIndexing(boolean)
for a description of the feature.XmlException
public boolean getAutoIndexing(XmlTransaction txn) throws XmlException
setAutoIndexing(boolean)
.
The application must open the container before attempting to retrieve this value.
txn
- If the operation is to be transaction-protected, the
txn
parameter is an XmlTransaction
handle returned
from XmlManager.createTransaction()
.XmlException
public XmlContainerConfig getContainerConfig() throws XmlException
XmlException
public int getContainerType() throws XmlException
NodeContainer
or WholedocContainer
.XmlException
public XmlDocument getDocument(java.lang.String name) throws XmlException
XmlDocument
with the specified name.name
- The name of the XmlDocument
to be retrieved from the
container.XmlException
public XmlResults getNode(java.lang.String handle) throws XmlException
XmlResults
which contains the 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 XmlResults getNode(XmlTransaction txn, java.lang.String handle, XmlDocumentConfig config) throws XmlException
XmlResults
which contains the object associated with the specified handle in the scope of a transaction.
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.
txn
- If the operation is to be transaction-protected, the
txn
parameter is an XmlTransaction
handle returned
from XmlManager.createTransaction()
.handle
- The handle returned from XmlValue.getNodeHandle()
.config
- Configuration settings for this operation.XmlException
public XmlDocument getDocument(java.lang.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 operationXmlException
public XmlDocument getDocument(XmlTransaction txn, java.lang.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, java.lang.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 operationXmlException
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)
.XmlException
public XmlIndexSpecification getIndexSpecification(XmlTransaction txn) throws XmlException
setIndexSpecification(com.sleepycat.dbxml.XmlIndexSpecification)
.
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)
.
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 java.lang.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, java.lang.String uri, java.lang.String name, java.lang.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, java.lang.String uri, java.lang.String name, java.lang.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, java.lang.String uri, java.lang.String name, java.lang.String parentUri, java.lang.String parentName, java.lang.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, java.lang.String uri, java.lang.String name, java.lang.String parentUri, java.lang.String parentName, java.lang.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, java.lang.String uri, java.lang.String name, java.lang.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, java.lang.String uri, java.lang.String name, java.lang.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, java.lang.String uri, java.lang.String name, java.lang.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, java.lang.String uri, java.lang.String name, java.lang.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, java.lang.String uri, java.lang.String name, java.lang.String parentUri, java.lang.String parentName, java.lang.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, java.lang.String uri, java.lang.String name, java.lang.String parentUri, java.lang.String parentName, java.lang.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, java.lang.String uri, java.lang.String name, java.lang.String parentUri, java.lang.String parentName, java.lang.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, java.lang.String uri, java.lang.String name, java.lang.String parentUri, java.lang.String parentName, java.lang.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(java.lang.String uri, java.lang.String name, java.lang.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(java.lang.String uri, java.lang.String name, java.lang.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, java.lang.String uri, java.lang.String name, java.lang.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, java.lang.String uri, java.lang.String name, java.lang.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(java.lang.String uri, java.lang.String name, java.lang.String parentUri, java.lang.String parentName, java.lang.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(java.lang.String uri, java.lang.String name, java.lang.String parentUri, java.lang.String parentName, java.lang.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, java.lang.String uri, java.lang.String name, java.lang.String parentUri, java.lang.String parentName, java.lang.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, java.lang.String uri, java.lang.String name, java.lang.String parentUri, java.lang.String parentName, java.lang.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) 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)
.
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.XmlException
public void putDocument(XmlDocument document, 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)
.
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.config
- Configuration settings for this operationXmlException
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)
.
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 java.lang.String putDocument(java.lang.String name, java.lang.String contents) 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)
.
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.
Returns the document name.
name
- The name of the document to be inserted.contents
- The content of the document to be inserted.XmlException
public java.lang.String putDocument(java.lang.String name, java.lang.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)
.
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.
Returns the document name.
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 java.lang.String putDocument(java.lang.String name, XmlInputStream input) throws XmlException
Note that the name used for the document must be unique in the container
or an exception is thrown. To change a document that already exists in the container, use updateDocument(com.sleepycat.dbxml.XmlDocument)
.
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.
Returns the document name.
name
- The name of the document to be inserted.input
- The content of the document to be inserted.XmlException
public java.lang.String putDocument(java.lang.String name, XmlInputStream input, 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)
.
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.
Returns the document name.
name
- The name of the document to be inserted.input
- The content of the document to be inserted.config
- Configuration settings for this operation.XmlException
public java.lang.String putDocument(java.lang.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)
.
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.
Returns the document name.
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)
.
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) 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. To change a document that already exists in the container, use updateDocument(com.sleepycat.dbxml.XmlDocument)
.
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.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)
.
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 operationXmlException
public java.lang.String putDocument(java.lang.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)
.
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.
Returns the document name.
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 operationXmlException
public java.lang.String putDocument(XmlTransaction txn, java.lang.String name, XmlInputStream input) throws XmlException
Note that the name used for the document must be unique in the container
or an exception is thrown. To change a document that already exists in the container, use updateDocument(com.sleepycat.dbxml.XmlDocument)
.
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.
Returns the document name.
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.XmlException
public java.lang.String putDocument(XmlTransaction txn, java.lang.String name, XmlInputStream input, 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)
.
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.
Returns the document name.
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.config
- Configuration settings for this operationXmlException
public java.lang.String putDocument(XmlTransaction txn, java.lang.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)
.
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.
Returns the document name.
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 operationXmlException
public java.lang.String putDocument(java.lang.String name, java.lang.String content, 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)
.
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
Returns the document name..
name
- The name of the document to be inserted.content
- The content of the document to be inserted.config
- Configuration settings for this operationXmlException
public java.lang.String putDocument(java.lang.String name, java.lang.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)
.
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.
Returns the document name.
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 operationXmlException
public java.lang.String putDocument(java.lang.String name, XmlEventReader reader) throws XmlException
XmlEventReader
as content.
Note that the name used for the document must be unique in the container
or an exception is thrown. To change a document that already exists in the container, use updateDocument(com.sleepycat.dbxml.XmlDocument)
.
The content is retrieved from the XmlEventReader
object, and is not subject to
validation.
Returns the document name.
name
- The name of the document to be inserted.reader
- The XmlEventReader
object from which content is read.XmlException
public java.lang.String putDocument(java.lang.String name, XmlEventReader reader, XmlUpdateContext context) throws XmlException
XmlEventReader
as content.
Note that the name used for the document must be unique in the container
or an exception is thrown. To change a document that already exists in the container, use updateDocument(com.sleepycat.dbxml.XmlDocument)
.
The content is retrieved from the XmlEventReader
object, and is not subject to
validation.
Returns the document name.
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.XmlException
public java.lang.String putDocument(java.lang.String name, XmlEventReader reader, XmlDocumentConfig config) throws XmlException
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)
.
The content is retrieved from the XmlEventReader
object, and is not subject to
validation.
Returns the document name.
name
- The name of the document to be inserted.reader
- The XmlEventReader
object from which content is read.config
- Configuration settings for this operationXmlException
public java.lang.String putDocument(java.lang.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)
.
The content is retrieved from the XmlEventReader
object, and is not subject to
validation.
Returns the document name.
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 java.lang.String putDocument(XmlTransaction txn, java.lang.String name, XmlEventReader reader) throws XmlException
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.
The content is retrieved from the XmlEventReader
object, and is not subject to
validation.
Returns the document name.
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.XmlException
public java.lang.String putDocument(XmlTransaction txn, java.lang.String name, XmlEventReader reader, XmlUpdateContext context) throws XmlException
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.
The content is retrieved from the XmlEventReader
object, and is not subject to
validation.
Returns the document name.
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.XmlException
public java.lang.String putDocument(XmlTransaction txn, java.lang.String name, XmlEventReader reader, XmlDocumentConfig config) throws XmlException
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)
.
The content is retrieved from the XmlEventReader
object, and is not subject to
validation.
Returns the document name.
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.config
- Configuration settings for this operationXmlException
public java.lang.String putDocument(XmlTransaction txn, java.lang.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)
.
The content is retrieved from the XmlEventReader
object, and is not subject to
validation.
Returns the document name.
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) throws XmlException
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()
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. To change a document that already exists in the container, use updateDocument(com.sleepycat.dbxml.XmlDocument)
.
document
- The document to be inserted.XmlException
public XmlEventWriter putDocumentAsEventWriter(XmlDocument document, XmlDocumentConfig config) throws XmlException
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()
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)
.
document
- The document to be inserted.config
- Configuration settings for this operation.XmlException
public XmlEventWriter putDocumentAsEventWriter(XmlDocument document, XmlUpdateContext context) throws XmlException
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()
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. To change a document that already exists in the container, use updateDocument(com.sleepycat.dbxml.XmlDocument)
.
document
- The document to be inserted.context
- The update context to use for the operation.XmlException
public 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()
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)
.
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, XmlDocument document) throws XmlException
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()
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. To change a document that already exists in the container, use updateDocument(com.sleepycat.dbxml.XmlDocument)
.
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.XmlException
public XmlEventWriter putDocumentAsEventWriter(XmlTransaction txn, XmlDocument document, XmlUpdateContext context) throws XmlException
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()
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. To change a document that already exists in the container, use updateDocument(com.sleepycat.dbxml.XmlDocument)
.
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 XmlEventWriter putDocumentAsEventWriter(XmlTransaction txn, XmlDocument document, XmlDocumentConfig config) throws XmlException
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()
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)
.
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.config
- Configuration settings for this operation.XmlException
public XmlEventWriter putDocumentAsEventWriter(XmlTransaction txn, XmlDocument document, 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()
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)
.
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 operationpublic void putDocument(XmlTransaction txn, XmlDocument document, 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)
.
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.config
- Configuration settings for this operationXmlException
public 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)
.
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 java.lang.String putDocument(XmlTransaction txn, java.lang.String name, java.lang.String content) throws XmlException
Note that the name used for the document must be unique in the container
or an exception is thrown. To change a document that already exists in the container, use updateDocument(com.sleepycat.dbxml.XmlDocument)
.
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.
Returns the document name.
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.XmlException
public java.lang.String putDocument(XmlTransaction txn, java.lang.String name, java.lang.String content, 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)
.
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.
Returns the document name.
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.config
- Configuration settings for this operationXmlException
public java.lang.String putDocument(XmlTransaction txn, java.lang.String name, java.lang.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)
.
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.
Returns the document name.
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 operationXmlException
public java.lang.String putDocument(XmlTransaction txn, java.lang.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)
.
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.
Returns the document name.
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 java.lang.String putDocument(XmlTransaction txn, java.lang.String name, java.lang.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)
.
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.
Returns the document name.
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(java.lang.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(java.lang.String index) 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.XmlException
public void replaceDefaultIndex(java.lang.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, java.lang.String index) 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.XmlException
public void replaceDefaultIndex(XmlTransaction txn, java.lang.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(java.lang.String uri, java.lang.String name, java.lang.String index) 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.XmlException
public void replaceIndex(java.lang.String uri, java.lang.String name, java.lang.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, java.lang.String uri, java.lang.String name, java.lang.String index) 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.XmlException
public void replaceIndex(XmlTransaction txn, java.lang.String uri, java.lang.String name, java.lang.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 setAutoIndexing(boolean value) throws XmlException
getAutoIndexing()
.
If the value on the container is true (the default for newly-created containers) then indexes are added automatically for leaf elements and attributes. The indexes added are "node-equality-string" and "node-equality-double" for elements and attributes. If auto-indexing is not desired it should be disabled using this interface upon container creation. Auto-indexing is recognized by insertion of new documents as well as updates of existing documents, including modification via XQuery Update. The auto-indexing state is persistent and will remain stable across container close/re-open operations. Indexes added via auto-indexing are normal indexes and can be removed using the normal mechanisms.
A significant implication of auto-indexing is that any operation that may add an index
(e.g. putDocument(com.sleepycat.dbxml.XmlDocument)
) can have the side effect of reindexing
the entire container. For this reason auto-indexing is not recommended for
containers of heterogenous documents and that it be disabled once a representative set
of documents has been inserted.
value
- Set to true to enable auto-indexing, false otherwise.XmlException
public void setAutoIndexing(XmlTransaction txn, boolean value) throws XmlException
getAutoIndexing()
.txn
- If the operation is to be transaction-protected, the
txn
parameter is an XmlTransaction
handle returned
from XmlManager.createTransaction()
.value
- Set to true to enable auto-indexing, false otherwise.XmlException
public void setIndexSpecification(XmlIndexSpecification index) 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.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) 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.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) 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.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) 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.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
Copyright (c) 2004,2014 Oracle. All rights reserved.