Class ItemSequence.PropertySequenceImpl
- java.lang.Object
-
- org.apache.jackrabbit.commons.flat.ItemSequence
-
- org.apache.jackrabbit.commons.flat.ItemSequence.PropertySequenceImpl
-
- All Implemented Interfaces:
Iterable<Property>,PropertySequence,Sequence<Property>
- Enclosing class:
- ItemSequence
protected static class ItemSequence.PropertySequenceImpl extends ItemSequence implements PropertySequence
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.jackrabbit.commons.flat.ItemSequence
ItemSequence.NodeSequenceImpl, ItemSequence.PropertySequenceImpl
-
-
Field Summary
-
Fields inherited from class org.apache.jackrabbit.commons.flat.ItemSequence
autoSave, errorHandler, order, root, treeManager
-
-
Constructor Summary
Constructors Constructor Description PropertySequenceImpl(TreeManager treeManager, TreeTraverser.ErrorHandler errorHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PropertyaddProperty(String key, Value value)Add a property with the givenkeyandvalue.PropertygetItem(String key)Retrieve anItemfrom this sequence by itskey.NodegetParent(String key)Returns the parent node for the given key.booleanhasItem(String key)Determine whether this sequence contains a specifickey.Iterator<Property>iterator()Iterator for theItems in this sequence.voidremoveProperty(String key)Remove the property with the given key.-
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
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
PropertySequenceImpl
public PropertySequenceImpl(TreeManager treeManager, TreeTraverser.ErrorHandler errorHandler)
-
-
Method Detail
-
iterator
public Iterator<Property> iterator()
Description copied from interface:SequenceIterator for theItems in this sequence. The order of the items is implementation specific.
-
getItem
public Property getItem(String key) throws RepositoryException
Description copied from interface:SequenceRetrieve anItemfrom this sequence by itskey. If the sequence does not contain thekeythis method throws anItemNotFoundException.- Specified by:
getItemin interfaceSequence<Property>- Parameters:
key- Thekeyof the item to retrieve. Must not benull.- Returns:
- The item belonging to
key. - Throws:
ItemNotFoundExceptionRepositoryException
-
hasItem
public boolean hasItem(String key) throws RepositoryException
Description copied from interface:SequenceDetermine whether this sequence contains a specifickey.- Specified by:
hasItemin interfaceSequence<Property>- Parameters:
key- Thekeyto look up.- Returns:
trueif this sequence containskey.Falseotherwise.- Throws:
RepositoryException
-
addProperty
public Property addProperty(String key, Value value) throws RepositoryException
Description copied from interface:PropertySequenceAdd a property with the givenkeyandvalue.- Specified by:
addPropertyin interfacePropertySequence- Parameters:
key- key of the property to addvalue- value of the property to add- Returns:
- the newly added property
- Throws:
RepositoryException
-
removeProperty
public void removeProperty(String key) throws RepositoryException
Description copied from interface:PropertySequenceRemove the property with the given key.- Specified by:
removePropertyin interfacePropertySequence- Parameters:
key- The key of the property to remove- Throws:
RepositoryException- If there is no property with such a key or another error occurs.
-
getParent
public Node getParent(String key) throws RepositoryException
Description copied from class:ItemSequenceReturns 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:
getParentin classItemSequence- Throws:
RepositoryException
-
-