Collections services work with a set of similarly structured objects, which could include CTS URNs as properties of a Collection object. Reference Indexing services may map the same kinds of structured objects onto a CTS URN ("complex indexing"). Why do we need two different network services?
While it might be possible to expose the same set of data using either Collections services or Reference Indexing, the two services differ in the support they define for different kinds of data and different query methods.
Collections services define their organization in a very simple data structure that recognizes three logical data types (boolean, string and numbers). Collections services support querying using type-specific operators for these data types.
Reference Indexing services associates either simple data or data structures defined by a Relax NG schema with CTS URNs. It treats CTS URNs as a distinct data type, and supports querying based on the semantics of CTS URNs. It offers only simple XPath-based querying of associated data.
This means that Collections services offer richer and more straightforward support for exposing collections of material in XML or relational databases to network use; Reference Indexing services offer specific support for linking textual references in a CTS source with external information.
In simple cases, the XPath querying offered by Reference Indexing might be adequate by itself to manipulate data outside the CTS text corpus. For rich data sets, Collections services could be used, and a simple Reference Index could be used to associate unique keys in the Collections service with CTS URNs.
The following table summarizes differences between Collections services and Reference Indexing services:
| Feature | Collection service | Reference Index |
|---|---|---|
| Data structure definition | Collections structure (like simplified Hibernate mapping file) | full Relax NG schema |
| Data types | Collections logical data types (string, boolean, number) | XML structure + CTS URN |
| Handling of CTS URNs | Simple string values | Typed data |
| Query mechanism | Collections querying (XPath locations + Collections typed operators) | XPath |