Difference between revisions of "XML Indexer"

From Gcube Wiki
Jump to: navigation, search
(Implementation Overview)
(Introduction)
Line 1: Line 1:
 
=== Introduction ===
 
=== Introduction ===
The XMLIndexer factory Service allow to create a GenericXMLIndexerService and a MetadataXMLIndexerService.
+
The XMLIndexer Service is a generic indexer of homogeneous collections of XML data. The service allows creating, populating and resolving queries against such collections.  
The GenericXMLIndexerService is not implemented yet. A MetadataXMLIndexer operate over a collection of homogeneus XML documents bound to a specific MetadataCollection, this indexer can be populated, updated, recreated and queried.
+
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.
  
 
=== Implementation Overview ===
 
=== Implementation Overview ===

Revision as of 11:52, 21 June 2007

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.

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).

Dependencies

Usage Examples