Class HierarchicalProperty
- java.lang.Object
-
- 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
-
-
Constructor Summary
Constructors Constructor Description HierarchicalProperty(String name, String value)Constructor accepting String as property name, both prefixed (i.e.HierarchicalProperty(QName name)Shortcut for XMLProperty(name, null).HierarchicalProperty(QName name, String value)Constructor accepting QName as property name and String as value.HierarchicalProperty(QName name, Calendar dateValue, String formatPattern)Constructor accepting QName as property name and calendar as value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HierarchicalPropertyaddChild(HierarchicalProperty prop)adds prop as a children to this property.StringgetAttribute(String attributeName)HashMap<String,String>getAttributes()HierarchicalPropertygetChild(int index)retrieves children property by 0 based index.HierarchicalPropertygetChild(QName name)retrieves children property by name.List<HierarchicalProperty>getChildren()Returns this property children.QNamegetName()StringgetValue()voidsetAttribute(String attributeName, String attributeValue)sets the attribute.voidsetValue(String value)sets the property value.
-
-
-
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 namevalue- 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 namevalue- property value
-
HierarchicalProperty
public HierarchicalProperty(QName name, Calendar dateValue, String formatPattern)
Constructor accepting QName as property name and calendar as value.- Parameters:
name- property namedateValue- property valueformatPattern- 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 nameattributeValue- attribute value
-
getAttribute
public String getAttribute(String attributeName)
- Parameters:
attributeName- attribute name- Returns:
- attribute attribute
-
-