org.apache.jackrabbit.commons.flat
Class ItemSequence.PropertySequenceImpl

java.lang.Object
  extended by org.apache.jackrabbit.commons.flat.ItemSequence
      extended by 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
ItemSequence.PropertySequenceImpl(TreeManager treeManager, TreeTraverser.ErrorHandler errorHandler)
           
 
Method Summary
 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 Items in this sequence.
 void removeProperty(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
 

Constructor Detail

ItemSequence.PropertySequenceImpl

public ItemSequence.PropertySequenceImpl(TreeManager treeManager,
                                         TreeTraverser.ErrorHandler errorHandler)
Method Detail

iterator

public Iterator<Property> iterator()
Description copied from interface: Sequence
Iterator for the Items in this sequence. The order of the items is implementation specific.

Specified by:
iterator in interface Iterable<Property>
Specified by:
iterator in interface Sequence<Property>
See Also:
Iterable.iterator()

getItem

public Property getItem(String key)
                 throws RepositoryException
Description copied from interface: Sequence
Retrieve an Item from this sequence by its key. If the sequence does not contain the key this method throws an ItemNotFoundException.

Specified by:
getItem in interface Sequence<Property>
Parameters:
key - The key of the item to retrieve. Must not be null.
Returns:
The item belonging to key.
Throws:
ItemNotFoundException
RepositoryException

hasItem

public boolean hasItem(String key)
                throws RepositoryException
Description copied from interface: Sequence
Determine whether this sequence contains a specific key.

Specified by:
hasItem in interface Sequence<Property>
Parameters:
key - The key to look up.
Returns:
true if this sequence contains key. False otherwise.
Throws:
RepositoryException

addProperty

public Property addProperty(String key,
                            Value value)
                     throws RepositoryException
Description copied from interface: PropertySequence
Add a property with the given key and value.

Specified by:
addProperty in interface PropertySequence
Parameters:
key - key of the property to add
value - 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: PropertySequence
Remove the property with the given key.

Specified by:
removeProperty in interface PropertySequence
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: ItemSequence
Returns 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:
getParent in class ItemSequence
Throws:
RepositoryException


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.