Difference between revisions of "XML Indexer"
(→Implementation Overview) |
(→Managed Resources) |
||
Line 15: | Line 15: | ||
The XMLIndexerFactory creates a WS-Resource per each XMLIndexer. Since there are two kinds of XMLIndexer, there are also two kinds of WS-Resource that the Factory service can create: the GenericXMLIndexer resource and the MetadataXMLIndexer resource. | The XMLIndexerFactory creates a WS-Resource per each XMLIndexer. Since there are two kinds of XMLIndexer, there are also two kinds of WS-Resource that the Factory service can create: the GenericXMLIndexer resource and the MetadataXMLIndexer resource. | ||
The state of each Indexer is published in the DIS by means of its WS-ResourceProperties. These resource properties includes the creation parameters and, if the Indexer is a GenericXMLIndexer, the SetTerminationTime and CurrentTime WS-ResourceProperties. | The state of each Indexer is published in the DIS by means of its WS-ResourceProperties. These resource properties includes the creation parameters and, if the Indexer is a GenericXMLIndexer, the SetTerminationTime and CurrentTime WS-ResourceProperties. | ||
− | |||
− | |||
− | |||
− | |||
=== Implementation Overview === | === Implementation Overview === |
Revision as of 13:43, 21 June 2007
Contents
Introduction
The XMLIndexer Service is a generic indexer of homogeneous collections of XML data. The service allows creating, populating and resolving queries against such collections.
We distinguish between two types of XMLIndexer and each of them manages a collection of XML documents:
- GenericXMLIndexer – a GenericXMLIndexer is completely unaware about the collection and the data handled. This means that it does not impose any constraint about them and, therefore, it assumes that the clients know the schema of the documents to query. It can be used each time it is useful to index and query a (temporary) set of XML data, like a result set.
- MetadataXMLIndexer – a MetadataXMLIndexer is bound to a specific Metadata Collection and it is used to index the elements of such a collection. When a new indexable Metadata Collection is created, the Metadata Catalog Service creates also a new related MetadataXMLIndexer and, each time a new Metadata Object is added/updated in such a collection, the Metadata Catalog Service also adds/updates the MetadataXMLIndexer by feeding it with the new element.
The XMLIndexer follows the Factory pattern and it is composed by:
- the XMLIndexerFactory creates new XMLIndexers
- the GenericXMLIndexer service
- the MetadataXMLIndexer service
Managed Resources
The XMLIndexerFactory creates a WS-Resource per each XMLIndexer. Since there are two kinds of XMLIndexer, there are also two kinds of WS-Resource that the Factory service can create: the GenericXMLIndexer resource and the MetadataXMLIndexer resource. The state of each Indexer is published in the DIS by means of its WS-ResourceProperties. These resource properties includes the creation parameters and, if the Indexer is a GenericXMLIndexer, the SetTerminationTime and CurrentTime WS-ResourceProperties.
Implementation Overview
XMLIndexer consist of two parts:
- MetadataXMLIndexer
MetadataXMLIndexer provides the functionalities to retrieve, update, store MetadataElements into Metadata Collections.
The Service expose the following operations:
- AddElements(Documents[]) --> void
This operation take a list of Documents and adds them to the current collection in exist1.1 DB. A Document is a pair of id and a String representation of the XMLDocument. This operation can be used to update elements already stored given the same id of an existing document. - AddElementsRS(String) --> void
This operation take a string representing a reference to a RSLocator (see ResultSetService). The AddElementRS create a RSReader and stores the element readed in exist1.1 DB.
- ExecuteXPath(string) --> string[]
This operation take a string representing the XPath. It executes the given XPath on the current collection. - ExecuteXPath(string) --> string
This operation take a string representing the XPath. It executes the given XPath on the current collection and return a string representing a reference to RSLocator (see ResultSetService). - ExecuteXQuery(string) --> string[]
This operation take a string representing the XQuery. It executes the given XQuery on the current collection and return an array of string. - ExecuteXPathRS(string) --> string
This operation take a string representing the XQuery. It executes the given XQuery on the current collection and return a string representing a reference to RSLocator (see ResultSetService).
- AddElements(Documents[]) --> void