Class ItemSequence
This class serves as main entry point for obtaining sequences of Node
s and Propertys. It provides factory methods for creating
NodeSequences and PropertySequences.
NodeSequence and PropertySequence instances provide a flat representation of a JCR hierarchy rooted at a certain node. They allow iterating over all items, retrieving items by key, checking whether a given key is mapped, adding new items and removing existing items.
The specifics of the mapping from the flat representation to the JCR
hierarchy are delegated to a TreeManager. Particularly the
TreeManager specifies the order of the items when retrieved as sequence and
when and how to add and remove intermediate nodes when new items are inserted
or removed.
An TreeTraverser.ErrorHandler is used to handle exceptions which occur while
traversing the hierarchy.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic NodeSequencecreateNodeSequence(TreeManager treeManager) Create a newNodeSequenceinstance.static NodeSequencecreateNodeSequence(TreeManager treeManager, TreeTraverser.ErrorHandler errorHandler) Create a newNodeSequenceinstance.static PropertySequencecreatePropertySequence(TreeManager treeManager) Create a newPropertySequenceinstance.static PropertySequencecreatePropertySequence(TreeManager treeManager, TreeTraverser.ErrorHandler errorHandler) Create a newPropertySequenceinstance.Create a newNodeSequenceinstance with the same parameterization as this instance.Create a newPropertySequenceinstance with the same parametrization as this instance.
-
Method Details
-
createNodeSequence
public static NodeSequence createNodeSequence(TreeManager treeManager, TreeTraverser.ErrorHandler errorHandler) Create a newNodeSequenceinstance.- Parameters:
treeManager- TheTreeManagerfor managing the mapping between the sequence view and the JCR hierarchy.errorHandler- TheTreeTraverser.ErrorHandlerfor handling exceptions occurring while- Returns:
-
createNodeSequence
Create a newNodeSequenceinstance.- Parameters:
treeManager- TheTreeManagerfor managing the mapping between the sequence view and the JCR hierarchy.- Returns:
-
createPropertySequence
public static PropertySequence createPropertySequence(TreeManager treeManager, TreeTraverser.ErrorHandler errorHandler) Create a newPropertySequenceinstance.- Parameters:
treeManager- TheTreeManagerfor managing the mapping between the sequence view and the JCR hierarchy.errorHandler- TheTreeTraverser.ErrorHandlerfor handling exceptions occurring while- Returns:
-
createPropertySequence
Create a newPropertySequenceinstance.- Parameters:
treeManager- TheTreeManagerfor managing the mapping between the sequence view and the JCR hierarchy.- Returns:
-
getNodeSequence
Create a newNodeSequenceinstance with the same parameterization as this instance.- Returns:
-
getPropertySequence
Create a newPropertySequenceinstance with the same parametrization as this instance.- Returns:
-