net.cfoster.sedna
Interface IndexManagementService

All Superinterfaces:
Configurable, Service

public interface IndexManagementService
extends Service

IndexManagementService allows the Sedna XML:DB user to create, remove and list current value indexes within the Sedna XML Database.

This interface class is proprietary to the Sedna XML:DB API and is not part of the original XML:DB specification.

Since:
Sedna XML:DB 1.2

Field Summary
static java.lang.String SERVICE_NAME
           
 
Method Summary
 void createIndex(java.lang.String indexId, java.lang.String on, java.lang.String by, java.lang.String type)
          Creates an index of nodes on a collection specified by the given arguments.
 void createIndexOnResource(java.lang.String indexId, java.lang.String resourceId, java.lang.String on, java.lang.String by, java.lang.String type)
          Creates an index of nodes on a document specified by the given arguments.
 java.lang.String[] listIndexes()
          Retrieve a list of current indexes held within the database.
 void removeIndex(java.lang.String indexId)
          Remove an index from the database based on the indexId argument.
 
Methods inherited from interface org.xmldb.api.base.Service
getName, getVersion, setCollection
 
Methods inherited from interface org.xmldb.api.base.Configurable
getProperty, setProperty
 

Field Detail

SERVICE_NAME

static final java.lang.String SERVICE_NAME
See Also:
Constant Field Values
Method Detail

createIndex

void createIndex(java.lang.String indexId,
                 java.lang.String on,
                 java.lang.String by,
                 java.lang.String type)
                 throws XMLDBException
Creates an index of nodes on a collection specified by the given arguments. The on argument is an XPath expression without any filter expressions that identifies the nodes of a collection that are to be indexed. The by argument is an XPath expression without any filter expressions that specifies the relative path to the nodes whose string-values are used as keys to identify the nodes returned by the on expression. The by expression should not start with / or //. The full path from the root of the collection to the key nodes is on/by.

Parameters:
indexId - is the title of the index created. It should be unique for each index in the database.
on - is an XPath expression without any filter expressions that identifies the nodes of a collection that are to be indexed.
by - is an XPath expression without any filter expressions that specifies the relative path to the nodes whose string-values are used as keys to identify the nodes returned by the on argument.
type - is an atomic type which the value of the keys should be cast to.
Throws:
XMLDBException
Since:
Sedna XML:DB 1.2

createIndexOnResource

void createIndexOnResource(java.lang.String indexId,
                           java.lang.String resourceId,
                           java.lang.String on,
                           java.lang.String by,
                           java.lang.String type)
                           throws XMLDBException
Creates an index of nodes on a document specified by the given arguments. The on argument is an XPath expression without any filter expressions that identifies the nodes of a document that are to be indexed. The by argument is an XPath expression without any filter expressions that specifies the relative path to the nodes whose string-values are used as keys to identify the nodes returned by the on expression. The by expression should not start with / or //. The full path from the root of the document to the key nodes is on/by.

Parameters:
indexId - is the title of the index created. It should be unique for each index in the database.
resourceId - is the document within the Collection to create an index on.
on - is an XPath expression without any filter expressions that identifies the nodes of the document that are to be indexed.
by - is an XPath expression without any filter expressions that specifies the relative path to the nodes whose string-values are used as keys to identify the nodes returned by the on argument.
type - is an atomic type which the value of the keys should be cast to.
Throws:
XMLDBException
Since:
Sedna XML:DB 1.2

removeIndex

void removeIndex(java.lang.String indexId)
                 throws XMLDBException
Remove an index from the database based on the indexId argument.

Parameters:
indexId - is the title of the index which will be deleted.
Throws:
XMLDBException
Since:
Sedna XML:DB 1.2

listIndexes

java.lang.String[] listIndexes()
                               throws XMLDBException
Retrieve a list of current indexes held within the database.

Returns:
a String[] containing title ids of all indexes held within the database.
Throws:
XMLDBException
Since:
Sedna XML:DB 1.2