org.exoplatform.services.jcr.webdav.resource
Class HierarchicalProperty

java.lang.Object
  extended by org.exoplatform.services.jcr.webdav.resource.HierarchicalProperty

public class HierarchicalProperty
extends java.lang.Object

Created by The eXo Platform SAS .
DOM - like (but lighter) webdav property representation

Version:
$Id: HierarchicalProperty.java 35184 2009-08-07 14:14:37Z pnedonosko $
Author:
Gennady Azarenkov

Field Summary
protected  java.util.HashMap<java.lang.String,java.lang.String> attributes
           
protected  java.util.List<HierarchicalProperty> children
           
protected  javax.xml.namespace.QName name
           
protected  java.lang.String value
           
 
Constructor Summary
HierarchicalProperty(javax.xml.namespace.QName name)
          Shortcut for XMLProperty(name, null)
HierarchicalProperty(javax.xml.namespace.QName name, java.util.Calendar dateValue, java.lang.String formatPattern)
           
HierarchicalProperty(javax.xml.namespace.QName name, java.lang.String value)
           
HierarchicalProperty(java.lang.String name, java.lang.String value)
          Constructor accepting String as property name, both prefixed (i.e.
 
Method Summary
 HierarchicalProperty addChild(HierarchicalProperty prop)
          adds prop as a children to this property
 java.lang.String getAttribute(java.lang.String attributeName)
           
 java.util.HashMap<java.lang.String,java.lang.String> getAttributes()
           
 HierarchicalProperty getChild(int index)
          retrieves children property by 0 based index
 HierarchicalProperty getChild(javax.xml.namespace.QName name)
          retrieves children property by name
 java.util.List<HierarchicalProperty> getChildren()
           
 javax.xml.namespace.QName getName()
           
 java.lang.String getValue()
           
 void setAttribute(java.lang.String attributeName, java.lang.String attributeValue)
          sets the attribute
 void setValue(java.lang.String value)
          sets the property value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

children

protected java.util.List<HierarchicalProperty> children

name

protected javax.xml.namespace.QName name

value

protected java.lang.String value

attributes

protected java.util.HashMap<java.lang.String,java.lang.String> attributes
Constructor Detail

HierarchicalProperty

public HierarchicalProperty(java.lang.String name,
                            java.lang.String value)
Constructor accepting String as property name, both prefixed (i.e. prefix:local) and not (i.e. local) are accepted

Parameters:
name - property name
value - property value (can be null)

HierarchicalProperty

public HierarchicalProperty(javax.xml.namespace.QName name,
                            java.lang.String value)
Parameters:
name -
value -

HierarchicalProperty

public HierarchicalProperty(javax.xml.namespace.QName name,
                            java.util.Calendar dateValue,
                            java.lang.String formatPattern)
Parameters:
name -
dateValue -
formatPattern -

HierarchicalProperty

public HierarchicalProperty(javax.xml.namespace.QName name)
Shortcut for XMLProperty(name, null)

Parameters:
name -
Method Detail

addChild

public HierarchicalProperty addChild(HierarchicalProperty prop)
adds prop as a children to this property

Parameters:
prop -
Returns:
added property

getChildren

public java.util.List<HierarchicalProperty> getChildren()
Returns:
child properties of this property

getChild

public HierarchicalProperty getChild(javax.xml.namespace.QName name)
retrieves children property by name

Parameters:
name -
Returns:
property or null if not found

getChild

public HierarchicalProperty getChild(int index)
retrieves children property by 0 based index

Parameters:
index -
Returns:

getName

public javax.xml.namespace.QName getName()
Returns:
property name

getValue

public java.lang.String getValue()
Returns:
property value

setValue

public void setValue(java.lang.String value)
sets the property value

Parameters:
value -

setAttribute

public void setAttribute(java.lang.String attributeName,
                         java.lang.String attributeValue)
sets the attribute

Parameters:
attributeName -
attributeValue -

getAttribute

public java.lang.String getAttribute(java.lang.String attributeName)
Parameters:
attributeName -
Returns:
attribute

getAttributes

public java.util.HashMap<java.lang.String,java.lang.String> getAttributes()
Returns:
all attributes


Copyright © 2011 eXo Platform SAS. All Rights Reserved.