DefaultEntity is the default Entity implementation. It is a
doubly linked node which supports the parent relationship and can be modified
in place.
| Modifier and Type | Field and Description |
|---|---|
| private Element | parent
The parent of this node |
| Access | Constructor and Description |
|---|---|
| public | |
| public | DefaultEntity(String
is the name of the entity name, String is the text of the entity text)Creates the |
| public | DefaultEntity(Element
is the parent element parent, String is the name of the entity name, String is the text of the entity text)Creates the |
| Modifier and Type | Method and Description |
|---|---|
| public Element | getParent()
Overrides org. Implements org.
|
| public boolean | isReadOnly()
Overrides org. Implements org.
|
| public void | setName(String
is the new name of this node name)Overrides org. Implements org.
Sets the text data of this node or this method will throw an
|
| public void | setParent(Element
is the new parent of this node. parent)Overrides org. Implements org.
|
| public void | setText(String
DOCUMENT ME! text)Overrides org. Implements org. UnsupportedOperationException is thrown as this class is
read only.
|
| public boolean | supportsParent()
Overrides org. Implements org.
|
| parent | back to summary |
|---|---|
| private Element parent The parent of this node | |
| DefaultEntity | back to summary |
|---|---|
| public DefaultEntity(String name) Creates the
| |
| DefaultEntity | back to summary |
|---|---|
| public DefaultEntity(String name, String text) Creates the | |
| DefaultEntity | back to summary |
|---|---|
| public DefaultEntity(Element parent, String name, String text) Creates the | |
| getParent | back to summary |
|---|---|
| public Element getParent() Overrides org. Implements org. Doc from org.
This method is an optional feature and may not be supported for all
| |
| isReadOnly | back to summary |
|---|---|
| public boolean isReadOnly() Overrides org. Implements org. Doc from org.
| |
| setName | back to summary |
|---|---|
| public void setName(String name) Overrides org. Implements org. Doc from org.
Sets the text data of this node or this method will throw an
| |
| setParent | back to summary |
|---|---|
| public void setParent(Element parent) Overrides org. Implements org. Doc from org.
This method should only be called from inside an
| |
| setText | back to summary |
|---|---|
| public void setText(String text) Overrides org. Implements org. Doc from org. sets the value of the entity if it is not defined yet otherwise an
| |
| supportsParent | back to summary |
|---|---|
| public boolean supportsParent() Overrides org. Implements org. Doc from org.
Some XML tree implementations are singly linked and only support downward navigation through children relationships. The default case is that both parent and children relationships are supported though for memory and performance reasons the parent relationship may not be supported.
| |