Interface IElement
-
- All Known Subinterfaces:
IEntityLinkElement
public interface IElement
AnIElement
is 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 IElement
addAttribute(java.lang.String key, java.lang.String value)
adds an attribute, replacing any previously existing attributes with the same key.IElement
addChildren(IElement... child)
appends a list of children to this children elements list.java.lang.String
getAttribute(java.lang.String key)
java.lang.String
getAttribute(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.String
getData()
The "Data" field is intended for a chunk raw data that can be attached to an element instance.java.lang.String
getName()
IElement
setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
IElement
setChildren(java.util.List<IElement> children)
sets the children of thisIElement
, replacing any previously existing children.IElement
setData(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
defaultValue
if 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.
-
-