| java.lang.Object org.enhydra.shark.xpdl.XMLElement
All known Subclasses: org.enhydra.shark.xpdl.XMLSimpleElement, org.enhydra.shark.xpdl.XMLBaseForCollectionAndComplex, org.enhydra.shark.xpdl.XMLAttribute, org.enhydra.shark.xpdl.XMLComplexChoice,
XMLElement | abstract public class XMLElement implements Serializable,Cloneable(Code) | | Base class for representing elements from XML schema.
author: Sasa Bojanic |
Constructor Summary | |
public | 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. | public | XMLElement(XMLElement parent, String name, boolean isRequired) Creates a new instance of element: sets name ,
parent isRequired properties to specified ones. |
isReadOnly | protected boolean isReadOnly(Code) | | Indicates if an element is read only.
|
notifyListeners | protected transient boolean notifyListeners(Code) | | |
notifyMainListeners | protected transient boolean notifyMainListeners(Code) | | |
originalElementHashCode | protected Integer originalElementHashCode(Code) | | |
value | protected String value(Code) | | Supposed to contain the value for XML element. This is true for simple elements and
attributes, more complex elements uses it as they need.
|
XMLElement | public XMLElement(XMLElement parent, boolean isRequired)(Code) | | 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.
It also sets the value of this element to an empty String.
|
XMLElement | public XMLElement(XMLElement parent, String name, boolean isRequired)(Code) | | Creates a new instance of element: sets name ,
parent isRequired properties to specified ones.
It also sets the value of this element to an empty String.
|
clone | public Object clone()(Code) | | Used to create exact copy of the element.
|
getOriginalElementHashCode | public Integer getOriginalElementHashCode()(Code) | | |
getParent | public XMLElement getParent()(Code) | | Gets the parent element in DOM tree.
|
isEmpty | public boolean isEmpty()(Code) | | Indicates if element is empty.
|
isMainElement | protected boolean isMainElement()(Code) | | |
isReadOnly | public boolean isReadOnly()(Code) | | Returns the 'read only' status of element.
If element is read only, and one wants to change its property, the RuntimeException will be
thrown.
|
isRequired | public boolean isRequired()(Code) | | Returns if the element is required or not, which is defined by XPDL schema. If element is
required, its value must be defined (In the case of complex elements, all the required
subelements must be defined). Otherwise, the whole Package won't be valid by the XPDL schema.
|
setNotifyListeners | public void setNotifyListeners(boolean notify)(Code) | | |
setNotifyMainListeners | public void setNotifyMainListeners(boolean notify)(Code) | | |
setParent | public void setParent(XMLElement el)(Code) | | Sets the parent element in DOM tree.
This method is used when collection, complex element or complex choice is cloned, to set new
parent element of the cloned sub-elements.
|
setReadOnly | public void setReadOnly(boolean ro)(Code) | | Sets 'read only' property of element to specified value. This enables/disables editing of the
element value for the simple elements and attributes, or changes to attributes and elements of
complex objects and collections.
If element is read only, and one wants to change its property, the RuntimeException will be
thrown.
|
setValue | public void setValue(String v)(Code) | | Sets the element value. If it is simple element or an non-choice attribute, this sets the
actual value of the element. If it is choice attribute, it sets the choosen value. Only some
complex elements (Condition, SchemaType, and ExtendedAttribute) allows you to use this method,
while others will throw RuntimeException.
|
toName | public String toName()(Code) | | Returns the name of element.
|
toValue | public String toValue()(Code) | | Returns the element value.
|
|
|