protected static class ItemSequence.NodeSequenceImpl extends ItemSequence implements NodeSequence
ItemSequence.NodeSequenceImpl, ItemSequence.PropertySequenceImpl
autoSave, errorHandler, order, root, treeManager
Constructor and Description |
---|
ItemSequence.NodeSequenceImpl(TreeManager treeManager,
TreeTraverser.ErrorHandler errorHandler) |
Modifier and Type | Method and Description |
---|---|
javax.jcr.Node |
addNode(String key,
String primaryNodeTypeName)
Add a with the given
key and primary node type name. |
javax.jcr.Node |
getItem(String key)
Retrieve an
Item from this sequence by its key . |
javax.jcr.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<javax.jcr.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
public ItemSequence.NodeSequenceImpl(TreeManager treeManager, TreeTraverser.ErrorHandler errorHandler)
public Iterator<javax.jcr.Node> iterator()
Sequence
Item
s in this sequence. The order of the items
is implementation specific.iterator
in interface Iterable<javax.jcr.Node>
iterator
in interface Sequence<javax.jcr.Node>
Iterable.iterator()
public javax.jcr.Node getItem(String key) throws javax.jcr.RepositoryException
Sequence
Item
from this sequence by its key
. If
the sequence does not contain the key
this method throws an
ItemNotFoundException
.public boolean hasItem(String key) throws javax.jcr.RepositoryException
Sequence
key
.public javax.jcr.Node addNode(String key, String primaryNodeTypeName) throws javax.jcr.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 addjavax.jcr.RepositoryException
public void removeNode(String key) throws javax.jcr.RepositoryException
NodeSequence
removeNode
in interface NodeSequence
key
- The key of the node to removejavax.jcr.RepositoryException
- If there is no node with such a key or
another error occurs.public javax.jcr.Node getParent(String key) throws javax.jcr.RepositoryException
ItemSequence
getParent
in class ItemSequence
javax.jcr.RepositoryException
Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.