Package org.exoplatform.common.util
Class HierarchicalProperty
java.lang.Object
org.exoplatform.common.util.HierarchicalProperty
Created by The eXo Platform SAS .
DOM - like (but lighter) property representation
DOM - like (but lighter) property representation
- Version:
- $Id: $
- Author:
- Gennady Azarenkov
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHierarchicalProperty(String name, String value, String namespaceURI) Constructor accepting String as property name, both prefixed (i.e.HierarchicalProperty(QName name) Shortcut for XMLProperty(name, null).HierarchicalProperty(QName name, String value) HierarchicalProperty(QName name, Calendar dateValue, String formatPattern) -
Method Summary
Modifier and TypeMethodDescriptionaddChild(HierarchicalProperty prop) Adds prop as a children to this property.getAttribute(String attributeName) getChild(int index) Retrieves child property by 0 based index.Retrieves child property by name.getName()getValue()voidsetAttribute(String attributeName, String attributeValue) sets the attributevoidsetAttribute(QName attributeName, String attributeValue) sets the attributevoidsets the property value
-
Field Details
-
children
Child properties. -
name
Property name. -
value
Property value. -
attributes
-
-
Constructor Details
-
HierarchicalProperty
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
- Parameters:
name-value-
-
HierarchicalProperty
- Parameters:
name-dateValue-formatPattern-
-
HierarchicalProperty
Shortcut for XMLProperty(name, null).- Parameters:
name-
-
-
Method Details
-
addChild
Adds prop as a children to this property.- Parameters:
prop-- Returns:
- added property
-
getChildren
- Returns:
- child properties of this property
-
getChild
Retrieves child property by name.- Parameters:
name-- Returns:
- property or null if not found
-
getChild
Retrieves child property by 0 based index.- Parameters:
index-- Returns:
-
getName
- Returns:
- property name
-
getValue
- Returns:
- property value
-
setValue
sets the property value- Parameters:
value-
-
setAttribute
sets the attribute- Parameters:
attributeName-attributeValue-
-
setAttribute
sets the attribute- Parameters:
attributeName-attributeValue-
-
getAttribute
- Parameters:
attributeName-- Returns:
- attribute
-
getAttributes
- Returns:
- all attributes
-
getStringName
- Returns:
- name as string prefix:localPart
-