protected static class ItemSequence.NodeSequenceImpl extends ItemSequence implements NodeSequence
ItemSequence.NodeSequenceImpl, ItemSequence.PropertySequenceImpl
autoSave, errorHandler, order, root, treeManager
Constructor and Description |
---|
NodeSequenceImpl(TreeManager treeManager,
TreeTraverser.ErrorHandler errorHandler) |
Modifier and Type | Method and Description |
---|---|
Node |
addNode(String key,
String primaryNodeTypeName)
Add a with the given
key and primary node type name. |
Node |
getItem(String key)
Retrieve an
Item from this sequence by its key . |
Node |
getParent(String key)
Returns the parent node for the given key.
|
boolean |
hasItem(String key)
Determine whether this sequence contains a specific
key . |
Iterator<Node> |
iterator()
Iterator for the
Item s in this sequence. |
void |
removeNode(String key)
Remove the node with the given key.
|
createNodeSequence, createNodeSequence, createPropertySequence, createPropertySequence, getMinimal, getMinimal, getNodeSequence, getPredecessor, getPredecessor, getPropertySequence, getSuccessor, renamePath
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public NodeSequenceImpl(TreeManager treeManager, TreeTraverser.ErrorHandler errorHandler)
public Iterator<Node> iterator()
Sequence
Item
s in this sequence. The order of the items
is implementation specific.public Node getItem(String key) throws RepositoryException
Sequence
Item
from this sequence by its key
. If
the sequence does not contain the key
this method throws an
ItemNotFoundException
.getItem
in interface Sequence<Node>
key
- The key
of the item to retrieve. Must not be
null
.key
.ItemNotFoundException
RepositoryException
public boolean hasItem(String key) throws RepositoryException
Sequence
key
.hasItem
in interface Sequence<Node>
key
- The key
to look up.true
if this sequence contains key
.
False
otherwise.RepositoryException
public Node addNode(String key, String primaryNodeTypeName) throws RepositoryException
NodeSequence
key
and primary node type name.addNode
in interface NodeSequence
key
- key of the node to addprimaryNodeTypeName
- primary node type of the node to addRepositoryException
public void removeNode(String key) throws RepositoryException
NodeSequence
removeNode
in interface NodeSequence
key
- The key of the node to removeRepositoryException
- If there is no node with such a key or
another error occurs.public Node getParent(String key) throws RepositoryException
ItemSequence
getParent
in class ItemSequence
RepositoryException
Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.