org.apache.jackrabbit.commons.flat
Class ItemSequence.NodeSequenceImpl
java.lang.Object
org.apache.jackrabbit.commons.flat.ItemSequence
org.apache.jackrabbit.commons.flat.ItemSequence.NodeSequenceImpl
- All Implemented Interfaces:
- Iterable<Node>, NodeSequence, Sequence<Node>
- Enclosing class:
- ItemSequence
protected static class ItemSequence.NodeSequenceImpl
- extends ItemSequence
- implements NodeSequence
| Methods inherited from class org.apache.jackrabbit.commons.flat.ItemSequence |
createNodeSequence, createNodeSequence, createPropertySequence, createPropertySequence, getMinimal, getMinimal, getNodeSequence, getPredecessor, getPredecessor, getPropertySequence, getSuccessor, renamePath |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ItemSequence.NodeSequenceImpl
public ItemSequence.NodeSequenceImpl(TreeManager treeManager,
TreeTraverser.ErrorHandler errorHandler)
iterator
public Iterator<Node> iterator()
- Description copied from interface:
Sequence
- Iterator for the
Items in this sequence. The order of the items
is implementation specific.
- Specified by:
iterator in interface Iterable<Node>- Specified by:
iterator in interface Sequence<Node>
- See Also:
Iterable.iterator()
getItem
public Node getItem(String key)
throws RepositoryException
- Description copied from interface:
Sequence
- Retrieve an
Item from this sequence by its key. If
the sequence does not contain the key this method throws an
ItemNotFoundException.
- Specified by:
getItem in interface Sequence<Node>
- Parameters:
key - The key of the item to retrieve. Must not be
null.
- Returns:
- The item belonging to
key.
- Throws:
ItemNotFoundException
RepositoryException
hasItem
public boolean hasItem(String key)
throws RepositoryException
- Description copied from interface:
Sequence
- Determine whether this sequence contains a specific
key.
- Specified by:
hasItem in interface Sequence<Node>
- Parameters:
key - The key to look up.
- Returns:
true if this sequence contains key.
False otherwise.
- Throws:
RepositoryException
addNode
public Node addNode(String key,
String primaryNodeTypeName)
throws RepositoryException
- Description copied from interface:
NodeSequence
- Add a with the given
key and primary node type name.
- Specified by:
addNode in interface NodeSequence
- Parameters:
key - key of the node to addprimaryNodeTypeName - primary node type of the node to add
- Returns:
- the newly added node
- Throws:
RepositoryException
removeNode
public void removeNode(String key)
throws RepositoryException
- Description copied from interface:
NodeSequence
- Remove the node with the given key.
- Specified by:
removeNode in interface NodeSequence
- Parameters:
key - The key of the node to remove
- Throws:
RepositoryException - If there is no node with such a key or
another error occurs.
getParent
public Node getParent(String key)
throws RepositoryException
- Description copied from class:
ItemSequence
- Returns the parent node for the given key. When the key is not present in
this sequence already, the returned node is the node that would contain
that key if it where present.
- Specified by:
getParent in class ItemSequence
- Throws:
RepositoryException
Copyright © 2004-2014 The Apache Software Foundation. All Rights Reserved.