protected static class ItemSequence.PropertySequenceImpl extends ItemSequence implements PropertySequence
ItemSequence.NodeSequenceImpl, ItemSequence.PropertySequenceImpl
autoSave, errorHandler, order, root, treeManager
Constructor and Description |
---|
ItemSequence.PropertySequenceImpl(TreeManager treeManager,
TreeTraverser.ErrorHandler errorHandler) |
Modifier and Type | Method and Description |
---|---|
javax.jcr.Property |
addProperty(String key,
javax.jcr.Value value)
Add a property with the given
key and value . |
javax.jcr.Property |
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.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
public ItemSequence.PropertySequenceImpl(TreeManager treeManager, TreeTraverser.ErrorHandler errorHandler)
public Iterator<javax.jcr.Property> iterator()
Sequence
Item
s in this sequence. The order of the items
is implementation specific.iterator
in interface Iterable<javax.jcr.Property>
iterator
in interface Sequence<javax.jcr.Property>
Iterable.iterator()
public javax.jcr.Property 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.Property addProperty(String key, javax.jcr.Value value) throws javax.jcr.RepositoryException
PropertySequence
key
and value
.addProperty
in interface PropertySequence
key
- key of the property to addvalue
- value of the property to addjavax.jcr.RepositoryException
public void removeProperty(String key) throws javax.jcr.RepositoryException
PropertySequence
removeProperty
in interface PropertySequence
key
- The key of the property to removejavax.jcr.RepositoryException
- If there is no property 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.