Interface IElement

  • All Known Subinterfaces:

    public interface IElement
    An IElement is an object that can be transparently converted to String (see IStructuredPropertyConverter) e.g. when we want to save the value of a structured (managed) property.

    IElement-s are meant to be used as a convenient, hierarchical property-value persistence technique for managed properties.

    • Method Detail

      • getName

        java.lang.String getName()
        the element's name.
      • getAttribute

        java.lang.String getAttribute​(java.lang.String key)
        the value of an attribute
        java.lang.IllegalArgumentException - if the attribute is not defined for this IElement
      • getAttribute

        java.lang.String getAttribute​(java.lang.String key,
                                      java.lang.String defaultValue)
        the value of an attribute or defaultValue if the attribute is not defined for this IElement
      • getData

        java.lang.String getData()
        The "Data" field is intended for a chunk raw data that can be attached to an element instance. This might be useful in scenarios where
      • getChildren

        java.util.List<IElement> getChildren()
        all children IElement-s.
      • getAttributes

        java.util.Map<java.lang.String,​java.lang.String> getAttributes()
      • setAttributes

        IElement setAttributes​(java.util.Map<java.lang.String,​java.lang.String> attributes)
      • addAttribute

        IElement addAttribute​(java.lang.String key,
                              java.lang.String value)
        adds an attribute, replacing any previously existing attributes with the same key.
      • setData

        IElement setData​(java.lang.String data)
      • setChildren

        IElement setChildren​(java.util.List<IElement> children)
        sets the children of this IElement, replacing any previously existing children.
      • addChildren

        IElement addChildren​(IElement... child)
        appends a list of children to this children elements list.