Interface IElement
-
- All Known Subinterfaces:
IEntityLinkElement
public interface IElementAnIElementis an object that can be transparently converted toString(seeIStructuredPropertyConverter) 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IElementaddAttribute(java.lang.String key, java.lang.String value)adds an attribute, replacing any previously existing attributes with the same key.IElementaddChildren(IElement... child)appends a list of children to this children elements list.java.lang.StringgetAttribute(java.lang.String key)java.lang.StringgetAttribute(java.lang.String key, java.lang.String defaultValue)java.util.Map<java.lang.String,java.lang.String>getAttributes()java.util.List<IElement>getChildren()java.lang.StringgetData()The "Data" field is intended for a chunk raw data that can be attached to an element instance.java.lang.StringgetName()IElementsetAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)IElementsetChildren(java.util.List<IElement> children)sets the children of thisIElement, replacing any previously existing children.IElementsetData(java.lang.String data)
-
-
-
Method Detail
-
getName
java.lang.String getName()
- Returns:
- the element's name.
-
getAttribute
java.lang.String getAttribute(java.lang.String key)
- Returns:
- the value of an attribute
- Throws:
java.lang.IllegalArgumentException- if the attribute is not defined for thisIElement
-
getAttribute
java.lang.String getAttribute(java.lang.String key, java.lang.String defaultValue)- Returns:
- the value of an attribute or
defaultValueif the attribute is not defined for thisIElement
-
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
-
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 thisIElement, replacing any previously existing children.
-
-