All Known Subinterfaces:
IEntityLinkElement

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 Details

    • getName

      String getName()
      Returns:
      the element's name.
    • getAttribute

      String getAttribute(String key)
      Returns:
      the value of an attribute
      Throws:
      IllegalArgumentException - if the attribute is not defined for this IElement
    • getAttribute

      String getAttribute(String key, String defaultValue)
      Returns:
      the value of an attribute or defaultValue if the attribute is not defined for this IElement
    • getData

      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

      List<IElement> getChildren()
      Returns:
      all children IElement-s.
    • getAttributes

      Map<String,String> getAttributes()
    • setAttributes

      IElement setAttributes(Map<String,String> attributes)
    • addAttribute

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

      IElement setData(String data)
    • setChildren

      IElement setChildren(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.