#include <DbXml.hpp> class DbXml::XmlIndexSpecification { public: XmlIndexSpecification(); XmlIndexSpecification(const XmlIndexSpecification &); ~XmlIndexSpecification(); XmlIndexSpecification &operator = (const XmlIndexSpecification &) ... };
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. The XmlIndexSpecification::find method can be
used to search for the indexing strategy for a known node.
Finally, you can set a default index specification for a container using XmlIndexSpecification::addDefaultIndex. You can replace and delete the default index using XmlIndexSpecification::replaceDefaultIndex and XmlIndexSpecification::deleteDefaultIndex.
Note that adding an index to a container results in re-indexing all of the documents in that container, which can take a very long time. It is good practice to design an application to add useful indices before populating a container.
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. This object is not thread-safe, and can only be safely used by one thread at a time in an application.