Berkeley DbXML
version 1.2.1

com.sleepycat.dbxml
Class XmlIndexSpecification

java.lang.Object
  extended bycom.sleepycat.dbxml.XmlIndexSpecification

public class XmlIndexSpecification
extends Object


Constructor Summary
XmlIndexSpecification()
          The XmlIndexSpecification class encapsulates the indexing specification of a container.
 
Method Summary
 void addIndex(String uri, String name, String index)
          The XmlIndexSpecification.addIndex method adds indexing strategies for a named document node.
 void delete()
           
 void deleteIndex(String uri, String name, String index)
          The XmlIndexSpecification.deleteIndex method deletes indexing strategies for a named document node.
 XmlIndexDeclaration find(String uri, String name)
          The XmlIndexSpecification.find method returns the indexing strategies for a named document node.
 XmlIndexDeclaration next()
          The XmlIndexSpecification.reset and XmlIndexSpecification.next methods comprise the iteration interface.
 void replaceIndex(String uri, String name, String index)
          The XmlIndexSpecification.replaceIndex method replaces the indexing strategies for a named document node.
 void reset()
          The XmlIndexSpecification.reset and XmlIndexSpecification.next methods comprise the iteration interface.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlIndexSpecification

public XmlIndexSpecification()
                      throws XmlException
The XmlIndexSpecification class encapsulates the indexing specification of a container. An indexing specification can be retrieved with the XmlContainer.getIndexSpecification method, and modified using the XmlContainer.setIndexSpecification method.

The XmlIndexSpecification class provides an interface for manipulating the indexing specification through the XmlIndexSpecification.addIndex, XmlIndexSpecification.deleteIndex, and XmlIndexSpecification.replaceIndex methods. The class interface also provides the XmlIndexSpecification.next and XmlIndexSpecification.reset methods for iterating through the specified indices. Finally, the XmlIndexSpecification.find method can be used to search for the indexing strategy for a known node.

A copy constructor and assignment operator are 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.

Throws:
XmlException
Method Detail

delete

public void delete()

addIndex

public void addIndex(String uri,
                     String name,
                     String index)
              throws XmlException
The XmlIndexSpecification.addIndex method adds indexing strategies for a named document node.

Parameters:
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 space-separated list of the following indexing strategy names:

  • none-none-none-none
  • node-element-presence-none
  • node-attribute-presence-none
  • node-element-equality-string
  • node-element-equality-number
  • node-element-substring-string
  • node-attribute-equality-string
  • node-attribute-equality-number
  • node-attribute-substring-string
  • edge-element-presence-none
  • edge-attribute-presence-none
  • edge-element-equality-string
  • edge-element-equality-number
  • edge-element-substring-string
  • edge-attribute-equality-string
  • edge-attribute-equality-number
  • edge-attribute-substring-string
Throws:
XmlException

deleteIndex

public void deleteIndex(String uri,
                        String name,
                        String index)
                 throws XmlException
The XmlIndexSpecification.deleteIndex method deletes indexing strategies for a named document node.

Parameters:
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 space-separated list of the following indexing strategy names:
Throws:
XmlException

replaceIndex

public void replaceIndex(String uri,
                         String name,
                         String index)
                  throws XmlException
The XmlIndexSpecification.replaceIndex method replaces the indexing strategies for a named document node. All the existing indexing strategies are deleted, and replaced with the new list of indexing strategies.

Parameters:
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 space-separated list of the following indexing strategy names:
Throws:
XmlException

reset

public void reset()
           throws XmlException
The XmlIndexSpecification.reset and XmlIndexSpecification.next methods comprise the iteration interface. The XmlIndexSpecification.reset method method resets the iterator.

Throws:
XmlException

find

public XmlIndexDeclaration find(String uri,
                                String name)
The XmlIndexSpecification.find method returns the indexing strategies for a named document node.

Parameters:
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.
Returns:
Returns the index strategies defined for this node.

Throws:
XmlException

next

public XmlIndexDeclaration next()
The XmlIndexSpecification.reset and XmlIndexSpecification.next methods comprise the iteration interface. The XmlIndexSpecification.next returns the next document node name and its indexing strategy.

Returns:
Returns the next document node name and its indexing strategy.

Throws:
XmlException

Berkeley DbXML
version 1.2.1

Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.