eXo WS :: Commons Utils 2.3.11-GA

org.exoplatform.common.util
Class HierarchicalProperty

java.lang.Object
  extended by org.exoplatform.common.util.HierarchicalProperty

public class HierarchicalProperty
extends Object

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

Version:
$Id: $
Author:
Gennady Azarenkov

Field Summary
protected  HashMap<String,String> attributes
           
protected  List<HierarchicalProperty> children
          Child properties.
protected  QName name
          Property name.
protected  String value
          Property value.
 
Constructor Summary
HierarchicalProperty(QName name)
          Shortcut for XMLProperty(name, null).
HierarchicalProperty(QName name, Calendar dateValue, String formatPattern)
           
HierarchicalProperty(QName name, String value)
           
HierarchicalProperty(String name, String value, String namespaceURI)
          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 child property by 0 based index.
 HierarchicalProperty getChild(QName name)
          Retrieves child property by name.
 List<HierarchicalProperty> getChildren()
           
 QName getName()
           
 String getStringName()
           
 String getValue()
           
 void setAttribute(QName attributeName, String attributeValue)
          sets the attribute
 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
Child properties.


name

protected QName name
Property name.


value

protected String value
Property value.


attributes

protected HashMap<String,String> attributes
Constructor Detail

HierarchicalProperty

public HierarchicalProperty(String name,
                            String value,
                            String namespaceURI)
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)
Parameters:
name -
value -

HierarchicalProperty

public HierarchicalProperty(QName name,
                            Calendar dateValue,
                            String formatPattern)
Parameters:
name -
dateValue -
formatPattern -

HierarchicalProperty

public HierarchicalProperty(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 List<HierarchicalProperty> getChildren()
Returns:
child properties of this property

getChild

public HierarchicalProperty getChild(QName name)
Retrieves child property by name.

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

getChild

public HierarchicalProperty getChild(int index)
Retrieves child property by 0 based index.

Parameters:
index -
Returns:

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 -

setAttribute

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

Parameters:
attributeName -
attributeValue -

setAttribute

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

Parameters:
attributeName -
attributeValue -

getAttribute

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

getAttributes

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

getStringName

public String getStringName()
Returns:
name as string prefix:localPart

eXo WS :: Commons Utils 2.3.11-GA

Copyright © 2014 eXo Platform SAS. All Rights Reserved.