|
|||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | ||||||||||
See:
Description
| Interface Summary | |
| Cursor | Interface for chainable cursors around an Xindice ResourcesSet. |
| Class Summary | |
| BaseCursor | A base class for cursor working against other cursors. |
| KeyCursor | A cursor that only returns the keys of the resources, the object returned by ist source cursor must be Resources. |
| ResourceSetCursor | Cursor for an XML:DB ResourceSet, is mostly used to get the cursor chain going, or for subclassing or usage as a delegator. |
| SortedCursor | Cursor that sorts its source. |
Cursors for XML:DB ResourseSet.
XML:DB and thereby Xindice have a rich way of sprecying wich part of an XML document/collection to retrive but has a verry limited set of capabilities when it commes to how to retrive it. There are no built in notion of for example sorting or limiting. There are also no way to get at for example only the content of an attribute or get all the resources as a single document
To make it easier to do this type of things with a resource set we use the concept of a nestable Cursor. A Cursor is a java.util.List implementation that takes an optional Cursor as its source: Cursor.setSource(org.backsource.xindice.cursor.Cursor). When the final user of a chain of cursors starts using the cursor throuh Iterator or some othe method the chain of cursors does its works in the chain, transforming the result into a final outcome. What a Cursor contains is losely types, through the Collections API. This means that the only way to know if one cursor may be the source of another cursor is by reading the documentation and see if the type of output from the source is what the consumer expects.
What about the ResourceSet? To wrap the original ResourceSet use the ResourceSetCursor or roll your own.
To help in building cursor there is a greedy base cursor in BaseCursor. The only thing a sublcass needs to do is imlement the abstract metod BaseCursor.swallow() and create a store ArrayList where it puts its result.
|
|||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | ||||||||||