Interface IElement
- 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 Summary
Modifier and TypeMethodDescriptionaddAttribute(String key, String value) adds an attribute, replacing any previously existing attributes with the same key.addChildren(IElement... child) appends a list of children to this children elements list.getAttribute(String key) getAttribute(String key, String defaultValue) getData()The "Data" field is intended for a chunk raw data that can be attached to an element instance.getName()setAttributes(Map<String, String> attributes) setChildren(List<IElement> children) sets the children of thisIElement, replacing any previously existing children.
-
Method Details
-
getName
String getName()- Returns:
- the element's name.
-
getAttribute
- Returns:
- the value of an attribute
- Throws:
IllegalArgumentException- if the attribute is not defined for thisIElement
-
getAttribute
- Returns:
- the value of an attribute or
defaultValueif the attribute is not defined for thisIElement
-
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
- Returns:
- all children
IElement-s.
-
getAttributes
-
setAttributes
-
addAttribute
adds an attribute, replacing any previously existing attributes with the same key. -
setData
-
setChildren
sets the children of thisIElement, replacing any previously existing children.
-