|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.enhydra.shark.xpdl.XMLElement
public abstract class XMLElement
Base class for representing elements from XML schema.
Field Summary | |
---|---|
protected boolean |
isReadOnly
Indicates if an element is read only. |
protected java.util.List |
listeners
|
protected boolean |
notifyListeners
|
protected boolean |
notifyMainListeners
|
protected java.lang.Integer |
originalElementHashCode
|
protected XMLElement |
parent
Reference to parent object in DOM tree. |
protected java.lang.String |
value
Supposed to contain the value for XML element. |
Constructor Summary | |
---|---|
XMLElement(XMLElement parent,
boolean isRequired)
Creates a new instance of element: sets name to name of concrete class
implementation of this abstract class, and parent and isRequired
properties to the specified ones. |
|
XMLElement(XMLElement parent,
java.lang.String name,
boolean isRequired)
Creates a new instance of element: sets name ,
parent isRequired properties to specified ones. |
Method Summary | |
---|---|
void |
addListener(XMLElementChangeListener listener)
|
java.lang.Object |
clone()
Used to create exact copy of the element. |
protected XMLElementChangeInfo |
createInfo(java.lang.Object oldVal,
java.lang.Object newVal,
java.util.List changedSubElements,
int action)
|
boolean |
equals(java.lang.Object e)
|
java.util.List |
getListeners()
|
protected XMLElement |
getMainElement()
|
java.lang.Integer |
getOriginalElementHashCode()
|
XMLElement |
getParent()
Gets the parent element in DOM tree. |
boolean |
isEmpty()
Indicates if element is empty. |
protected boolean |
isMainElement()
|
boolean |
isReadOnly()
Returns the 'read only' status of element. |
boolean |
isRequired()
Returns if the element is required or not, which is defined by XPDL schema. |
void |
makeAs(XMLElement el)
|
protected void |
notifyListeners(XMLElementChangeInfo info)
|
protected void |
notifyMainListeners(XMLElementChangeInfo info)
|
boolean |
removeListener(XMLElementChangeListener listener)
|
void |
setNotifyListeners(boolean notify)
|
void |
setNotifyMainListeners(boolean notify)
|
void |
setParent(XMLElement el)
Sets the parent element in DOM tree. |
void |
setReadOnly(boolean ro)
Sets 'read only' property of element to specified value. |
void |
setValue(java.lang.String v)
Sets the element value. |
java.lang.String |
toName()
Returns the name of element. |
java.lang.String |
toValue()
Returns the element value. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected transient java.util.List listeners
protected transient boolean notifyMainListeners
protected transient boolean notifyListeners
protected java.lang.Integer originalElementHashCode
protected java.lang.String value
protected boolean isReadOnly
protected XMLElement parent
Constructor Detail |
---|
public XMLElement(XMLElement parent, boolean isRequired)
name
to name of concrete class
implementation of this abstract class, and parent
and isRequired
properties to the specified ones.
It also sets the value of this element to an empty String.
public XMLElement(XMLElement parent, java.lang.String name, boolean isRequired)
name
,
parent
isRequired
properties to specified ones.
It also sets the value of this element to an empty String.
Method Detail |
---|
public void makeAs(XMLElement el)
public void setReadOnly(boolean ro)
If element is read only, and one wants to change its property, the RuntimeException will be thrown.
public boolean isReadOnly()
If element is read only, and one wants to change its property, the RuntimeException will be thrown.
public boolean isRequired()
public boolean isEmpty()
public void setValue(java.lang.String v)
public java.lang.String toValue()
public java.lang.String toName()
public XMLElement getParent()
public void setParent(XMLElement el)
This method is used when collection, complex element or complex choice is cloned, to set new parent element of the cloned sub-elements.
public java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.Integer getOriginalElementHashCode()
public boolean equals(java.lang.Object e)
equals
in class java.lang.Object
public java.util.List getListeners()
public void addListener(XMLElementChangeListener listener)
public boolean removeListener(XMLElementChangeListener listener)
protected void notifyListeners(XMLElementChangeInfo info)
protected void notifyMainListeners(XMLElementChangeInfo info)
protected XMLElement getMainElement()
protected boolean isMainElement()
public void setNotifyMainListeners(boolean notify)
public void setNotifyListeners(boolean notify)
protected XMLElementChangeInfo createInfo(java.lang.Object oldVal, java.lang.Object newVal, java.util.List changedSubElements, int action)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |