org.enhydra.shark.xpdl
Class XMLAttribute
java.lang.Object
org.enhydra.shark.xpdl.XMLElement
org.enhydra.shark.xpdl.XMLAttribute
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
public class XMLAttribute
- extends XMLElement
Represents attribute element from XML schema.
- Author:
- Sasa Bojanic
- See Also:
- Serialized Form
Methods inherited from class org.enhydra.shark.xpdl.XMLElement |
addListener, createInfo, getListeners, getMainElement, getOriginalElementHashCode, getParent, isEmpty, isMainElement, isReadOnly, isRequired, makeAs, notifyListeners, notifyMainListeners, removeListener, setNotifyListeners, setNotifyMainListeners, setParent, setReadOnly, toName, toValue |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
choices
protected java.util.ArrayList choices
- The possible choices.
defaultChoiceIndex
protected int defaultChoiceIndex
XMLAttribute
public XMLAttribute(XMLElement parent,
java.lang.String name,
boolean isRequired)
XMLAttribute
public XMLAttribute(XMLElement parent,
java.lang.String name,
boolean isRequired,
java.lang.String[] choices,
int choosenIndex)
setValue
public void setValue(java.lang.String v)
- Description copied from class:
XMLElement
- 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.
- Overrides:
setValue
in class XMLElement
getChoices
public java.util.ArrayList getChoices()
- The possible String choices.
- Returns:
- the possible choices for this element.
getDefaultChoice
public java.lang.String getDefaultChoice()
getDefaultChoiceIndex
public int getDefaultChoiceIndex()
clone
public java.lang.Object clone()
- Description copied from class:
XMLElement
- Used to create exact copy of the element.
- Overrides:
clone
in class XMLElement
equals
public boolean equals(java.lang.Object e)
- Overrides:
equals
in class XMLElement