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
  • Field Details

  • Constructor Details

    • 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 Details

    • addChild

      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