public class XMLEntity extends SimpleKeyValueList<java.lang.String,java.lang.Object> implements Entity, EntityList
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
END |
static java.lang.String |
PROPERTY_TAG
Constant of TAG.
|
static java.lang.String |
PROPERTY_VALUE
Constant of VALUE.
|
static java.lang.String |
START |
ALLOWDUPLICATE, ALLOWEMPTYVALUE, BIDI, CASESENSITIVE, flag, MAP, READONLY, REMOVED, VISIBLE| Constructor and Description |
|---|
XMLEntity()
Simple Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
XMLEntity |
createChild()
Method to create a new Child and add it to Children
|
EntityList |
getChild(java.lang.String value,
boolean recursiv)
Gets the child.
|
SimpleList<EntityList> |
getChildren()
Gets the children.
|
SimpleList<Entity> |
getChildren(java.lang.String key,
java.lang.String value)
Return all Children with Filter
|
int |
getChildrenCount() |
MapEntry |
getNewEntity() |
XMLEntity |
getNewList(boolean keyValue) |
java.lang.String |
getTag()
Gets the tag.
|
java.lang.String |
getValue()
Gets the value.
|
boolean |
has(java.lang.String key)
check if Entity has the Key
|
protected java.lang.String |
parseItem(EntityStringConverter converter) |
XMLEntity |
setType(java.lang.String value)
Sets the tag.
|
static XMLEntity |
TAG(java.lang.String tag)
Static Method to generate XMLEntity.
|
java.lang.String |
toString()
Convert Element to String
|
java.lang.String |
toString(int indentFactor)
Make a prettyprinted Text of this Entity.
|
protected void |
toStringChildren(CharacterBuffer sb,
EntityStringConverter converter)
Add The Children to StringBuilder.
|
XMLEntity |
with(java.lang.Object... values)
Adds the child.
|
XMLEntity |
withChild(EntityList value)
Method to add a new Child to List.
|
XMLEntity |
withCloseTag() |
XMLEntity |
withKeyValue(java.lang.Object key,
java.lang.Object value) |
XMLEntity |
without(java.lang.String key) |
XMLEntity |
withValue(Buffer values) |
XMLEntity |
withValue(java.lang.String value)
Instantiates a new xML entity.
|
XMLEntity |
withValue(Tokener tokener)
Construct a XMLEntity from a Tokener.
|
add, add, addToKeyValue, containsKey, containsValue, copyEntity, entrySet, get, getBoolean, getDouble, getInt, getKey, getKeyByIndex, getLong, getPositionValue, getString, getString, getValueByIndex, increment, indexOfValue, iterator, keyIterator, keySet, put, putAll, remove, removeByIndex, removePos, setValue, setValueItem, values, valuesArrayIntern, with, withKeyValueString, withList, withMapaddHashItem, addKeyValue, checkValue, clear, comparator, contains, containsAll, fireProperty, first, flag, get, getByIndex, getPositionKey, getTypClass, getValue, hashKey, hasKeyAndPos, indexOf, init, init, init, isAllowDuplicate, isAllowEmptyValue, isCaseSensitive, isComparator, isEmpty, isReadOnly, isVisible, last, lastIndexOf, move, pack, removeAll, removeByObject, removeItem, reset, retainAll, setAllowEmptyValue, setFlag, setValue, size, subList, toArray, toArray, toString, withAllowDuplicate, withAllowEmptyValue, withCaseSensitive, withFlag, without, withSize, withType, withVisibleclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetKeyByIndex, getString, getValue, put, setAllowEmptyValue, sizecomparator, isComparator, sizepublic static final java.lang.String PROPERTY_TAG
public static final java.lang.String PROPERTY_VALUE
public static final java.lang.String START
public static final java.lang.String END
public XMLEntity withValue(java.lang.String value)
value - the tagpublic XMLEntity withValue(Tokener tokener)
tokener - A Tokener object containing the source string. or a duplicated key.public SimpleList<EntityList> getChildren()
getChildren in interface EntityListpublic int getChildrenCount()
public XMLEntity with(java.lang.Object... values)
with in interface BaseItemwith in class SimpleKeyValueList<java.lang.String,java.lang.Object>values - the childpublic XMLEntity withChild(EntityList value)
value - the new Childpublic XMLEntity createChild()
public EntityList getChild(java.lang.String value, boolean recursiv)
public SimpleList<Entity> getChildren(java.lang.String key, java.lang.String value)
key - The key of Filtervalue - The Value of Filterpublic java.lang.String getTag()
public java.lang.String getValue()
public java.lang.String toString()
BaseItemtoString in interface BaseItemtoString in class AbstractArray<java.lang.String>public java.lang.String toString(int indentFactor)
EntityWarning: This method assumes that the data structure is acyclical.
toString in interface EntitytoString in interface EntityListindentFactor - The number of spaces to add to each level of indentation.{ (left
brace) and ending with } (right
brace).protected java.lang.String parseItem(EntityStringConverter converter)
parseItem in class AbstractArray<java.lang.String>protected void toStringChildren(CharacterBuffer sb, EntityStringConverter converter)
sb - The StringBuilder where The Children addconverter - The Current Converterpublic XMLEntity withCloseTag()
public MapEntry getNewEntity()
public XMLEntity getNewList(boolean keyValue)
getNewList in interface BaseItemgetNewList in class SimpleKeyValueList<java.lang.String,java.lang.Object>public static XMLEntity TAG(java.lang.String tag)
tag - The namepublic XMLEntity withKeyValue(java.lang.Object key, java.lang.Object value)
withKeyValue in class SimpleKeyValueList<java.lang.String,java.lang.Object>public boolean has(java.lang.String key)
Entitypublic XMLEntity withValue(Buffer values)
withValue in interface EntitywithValue in interface EntityList