org.apache.slide.common
Class RequestedPropertiesImpl

java.lang.Object
  extended byorg.apache.slide.common.RequestedPropertiesImpl
All Implemented Interfaces:
RequestedProperties

public class RequestedPropertiesImpl
extends java.lang.Object
implements RequestedProperties

Holds one property as part of the SELECT element.

Version:
$Revision: 1.17 $

Field Summary
protected  boolean isAllProp
           
protected  java.util.List propertyList
           
 
Constructor Summary
RequestedPropertiesImpl()
          Default constructor
RequestedPropertiesImpl(org.jdom.Element propElement)
          Constructs a List of RequestedProperty from a <DAV:prop> or <DAV:allprop>.
 
Method Summary
 void add(org.jdom.Element propElement)
          Adds a List of RequestedProperty from a <DAV:prop> or <DAV:allprop>.
 void addProperty(RequestedProperty prop)
          Method addSelectedProperty
 boolean contains(NodeProperty property)
          Checks, if the NodeProperty is a RequestedProperty
 boolean contains(java.lang.String name, java.lang.String namespace)
          Checks, if the property identified by name and namespace, is requested
protected  RequestedProperty createRequestedProperty(java.lang.String name, java.lang.String namespacePrefix, java.lang.String namespaceUri, java.util.List content)
          Creates a RequestedProperty from the given parameters.
 java.util.Iterator getRequestedProperties()
          Method getRequestedProperties
 boolean isAllProp()
          Method isAllProp
 java.util.Iterator iterator()
          Returns an iterator for all selected properties
 void setIsAllProp(boolean isAllProp)
          Set the isAllProp member.
 java.lang.String toString()
          Method toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

isAllProp

protected boolean isAllProp

propertyList

protected java.util.List propertyList
Constructor Detail

RequestedPropertiesImpl

public RequestedPropertiesImpl()
Default constructor


RequestedPropertiesImpl

public RequestedPropertiesImpl(org.jdom.Element propElement)
                        throws PropertyParseException
Constructs a List of RequestedProperty from a <DAV:prop> or <DAV:allprop>.

Parameters:
propElement - <DAV:prop> or <DAV:allprop>.
Throws:
PropertyParseException - if parsing the property fails for any reason.
Method Detail

add

public void add(org.jdom.Element propElement)
         throws PropertyParseException
Adds a List of RequestedProperty from a <DAV:prop> or <DAV:allprop>.

Parameters:
propElement - <DAV:prop> or <DAV:allprop>.
Throws:
PropertyParseException - if parsing the property fails for any reason.

createRequestedProperty

protected RequestedProperty createRequestedProperty(java.lang.String name,
                                                    java.lang.String namespacePrefix,
                                                    java.lang.String namespaceUri,
                                                    java.util.List content)
                                             throws PropertyParseException
Creates a RequestedProperty from the given parameters. This method may be overwritten by subclasses in order to create appropriate implementations of RequestedProperty.

Parameters:
name - the name of the propery.
namespacePrefix - the namespace prefix of the propery.
namespaceUri - the namespace URI of the propery.
Returns:
the created RequestedProperty.
Throws:
PropertyParseException - if parsing the property fails for any reason.

iterator

public java.util.Iterator iterator()
Returns an iterator for all selected properties

Returns:
an Iterator

getRequestedProperties

public java.util.Iterator getRequestedProperties()
Method getRequestedProperties

Specified by:
getRequestedProperties in interface RequestedProperties
Returns:
an Iterator to retrieve all RequestedProperty items
Throws:
java.lang.IllegalStateException - when isAllProp == true

isAllProp

public boolean isAllProp()
Method isAllProp

Specified by:
isAllProp in interface RequestedProperties
Returns:
true, if all properties are requested

setIsAllProp

public void setIsAllProp(boolean isAllProp)
Set the isAllProp member.

Specified by:
setIsAllProp in interface RequestedProperties

contains

public boolean contains(java.lang.String name,
                        java.lang.String namespace)
Checks, if the property identified by name and namespace, is requested

Specified by:
contains in interface RequestedProperties
Parameters:
name - name of the property to be checked
namespace - namespace of the property to be checked
Returns:
true, if property is requested

contains

public boolean contains(NodeProperty property)
Checks, if the NodeProperty is a RequestedProperty

Specified by:
contains in interface RequestedProperties
Parameters:
property - NodeProperty to be checked
Returns:
true, if property is requested

toString

public java.lang.String toString()
Method toString

Returns:
string representation

addProperty

public void addProperty(RequestedProperty prop)
Method addSelectedProperty

Parameters:
prop - a SelectedProperty