protected static class ItemSequence.PropertySequenceImpl extends ItemSequence implements PropertySequence
ItemSequence.NodeSequenceImpl, ItemSequence.PropertySequenceImpl
autoSave, errorHandler, order, root, treeManager
Constructor and Description |
---|
PropertySequenceImpl(TreeManager treeManager,
TreeTraverser.ErrorHandler errorHandler) |
Modifier and Type | Method and Description |
---|---|
Property |
addProperty(String key,
Value value)
Add a property with the given
key and value . |
Property |
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<Property> |
iterator()
Iterator for the
Item s in this sequence. |
void |
removeProperty(String key)
Remove the property 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 PropertySequenceImpl(TreeManager treeManager, TreeTraverser.ErrorHandler errorHandler)
public Iterator<Property> iterator()
Sequence
Item
s in this sequence. The order of the items
is implementation specific.public Property 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<Property>
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<Property>
key
- The key
to look up.true
if this sequence contains key
.
False
otherwise.RepositoryException
public Property addProperty(String key, Value value) throws RepositoryException
PropertySequence
key
and value
.addProperty
in interface PropertySequence
key
- key of the property to addvalue
- value of the property to addRepositoryException
public void removeProperty(String key) throws RepositoryException
PropertySequence
removeProperty
in interface PropertySequence
key
- The key of the property to removeRepositoryException
- If there is no property with such a key or
another error occurs.public Node getParent(String key) throws RepositoryException
ItemSequence
getParent
in class ItemSequence
RepositoryException
Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.