eXo JCR :: Component :: Webdav Service 1.15.11-GA

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

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

public class HierarchicalProperty
extends Object

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

Version:
$Id: $
Author:
Gennady Azarenkov

Field Summary
protected  HashMap<String,String> attributes
          Property's attributes.
protected  List<HierarchicalProperty> children
          The list of property's children.
protected  QName name
          Property's name.
protected  String value
          Property's value.
 
Constructor Summary
HierarchicalProperty(QName name)
          Shortcut for XMLProperty(name, null).
HierarchicalProperty(QName name, Calendar dateValue, String formatPattern)
          Constructor accepting QName as property name and calendar as value.
HierarchicalProperty(QName name, String value)
          Constructor accepting QName as property name and String as value.
HierarchicalProperty(String name, 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.
 String getAttribute(String attributeName)
           
 HashMap<String,String> getAttributes()
           
 HierarchicalProperty getChild(int index)
          retrieves children property by 0 based index.
 HierarchicalProperty getChild(QName name)
          retrieves children property by name.
 List<HierarchicalProperty> getChildren()
          Returns this property children.
 QName getName()
           
 String getValue()
           
 void setAttribute(String attributeName, String attributeValue)
          sets the attribute.
 void setValue(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 List<HierarchicalProperty> children
The list of property's children.


name

protected QName name
Property's name.


value

protected String value
Property's value.


attributes

protected HashMap<String,String> attributes
Property's attributes.

Constructor Detail

HierarchicalProperty

public HierarchicalProperty(String name,
                            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(QName name,
                            String value)
Constructor accepting QName as property name and String as value.

Parameters:
name - property name
value - property value

HierarchicalProperty

public HierarchicalProperty(QName name,
                            Calendar dateValue,
                            String formatPattern)
Constructor accepting QName as property name and calendar as value.

Parameters:
name - property name
dateValue - property value
formatPattern - date format pattern

HierarchicalProperty

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

Parameters:
name - property name
Method Detail

addChild

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

Parameters:
prop - property name
Returns:
added property

getChildren

public List<HierarchicalProperty> getChildren()
Returns this property children.

Returns:
child properties of this property

getChild

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

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

getChild

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

Parameters:
index - the index of child
Returns:
child with current index

getName

public QName getName()
Returns:
property name

getValue

public String getValue()
Returns:
property value

setValue

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

Parameters:
value - property value

setAttribute

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

Parameters:
attributeName - attribute name
attributeValue - attribute value

getAttribute

public String getAttribute(String attributeName)
Parameters:
attributeName - attribute name
Returns:
attribute attribute

getAttributes

public HashMap<String,String> getAttributes()
Returns:
all attributes

eXo JCR :: Component :: Webdav Service 1.15.11-GA

Copyright © 2014 eXo Platform SAS. All Rights Reserved.