|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--stuart.xmlApp.dtd.DTDContent
|
+--stuart.xmlApp.dtd.DTDElement
|
+--stuart.xmlApp.dtd.DTDElementOnlyElement
An Element-only DTD Element.
E.g. <!ELEMENT customer (billingAddress, phoneNumber)>
An Element-only element must have at least one child to be considered valid.
| Field Summary | |
static java.lang.String |
NO_CHILDREN_ERROR
|
| Fields inherited from class stuart.xmlApp.dtd.DTDElement |
CONTENT_ANY, CONTENT_ELEMENT_ONLY, CONTENT_EMPTY, CONTENT_MIXED, CONTENT_PCDATA, DUP_ATT_NAME, INT_CONTENT_ANY, INT_CONTENT_PCDATA |
| Fields inherited from class stuart.xmlApp.dtd.DTDContent |
ELEMENT, ENTITY, NOTATION |
| Constructor Summary | |
|
DTDElementOnlyElement(java.lang.String n,
boolean o)
|
protected |
DTDElementOnlyElement(java.lang.String n,
java.lang.String c,
boolean o)
A protected constructor built for the subclass elements, specicially the mixed content model element. |
| Method Summary | |
void |
addChildElement(DTDElement newElement,
char m,
boolean v)
Add a child element to this element. |
void |
addDTDChildElement(DTDChildElement newChild)
Add a DTDChildElement to this element |
DTDChildElement |
getChildAsChildElementAt(int index)
|
int |
getChildCount()
Returns the count of child elements |
DTDElement |
getChildElementAt(int index)
|
java.util.ArrayList |
getChildElements()
Returns the ArrayList of child elements |
int |
getChildIndexValue(DTDElement element)
Returns the index value for the specified element |
boolean |
getOrdered()
Indicates whether child elements are ordered or alternate. |
int |
getSequence()
|
java.lang.String |
getTag()
Returns to DTD Tag for this element. |
int |
getVisibleChildCount()
|
boolean |
hasChildren()
Indicates whether the element has children assigned to it. |
void |
removeChildElementAt(int index)
Remove the DTDChildElement at the specified index |
void |
replaceChildAtIndex(DTDContent newContent,
char m,
int index,
boolean v)
Replace the child at the specified index with the provided element/multiplicty type child. |
void |
setChildMultiplicityAtIndex(int index,
char m)
Change a multiplicity for an existing child. |
void |
setOrdered(boolean v)
|
java.lang.String |
toString()
|
| Methods inherited from class stuart.xmlApp.dtd.DTDElement |
addAttribute, changeSimpleContentModel, getAttributeAt, getAttributeCount, getAttributeTag, getContentModel, getName, getNextSequenceOrder, getTagSet, hasAttributes, main, removeAttributeAt, setName |
| Methods inherited from class stuart.xmlApp.dtd.DTDContent |
setContentType |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String NO_CHILDREN_ERROR
| Constructor Detail |
public DTDElementOnlyElement(java.lang.String n,
boolean o)
protected DTDElementOnlyElement(java.lang.String n,
java.lang.String c,
boolean o)
DTDElement.CONTENT_MIXED.
| Method Detail |
public void addChildElement(DTDElement newElement,
char m,
boolean v)
newElement - The element which will be a child of this element.m - Indicates Multiplicity. Use DTDChildElement.ZERO_OR_MORE,
DTDChildElement.ONE_OR_MORE, DTDChildElement.ZERO_OR_ONE or DTDChildElement.ONEv - Indicates whether the child is visible as an attribute of the parent
public void setChildMultiplicityAtIndex(int index,
char m)
index - The index for the child to be changed.m - Indicates the new multiplicity. Use DTDChildElement.ZERO_OR_MORE,
DTDChildElement.ONE_OR_MORE, DTDChildElement.ZERO_OR_ONE or DTDChildElement.ONEpublic void addDTDChildElement(DTDChildElement newChild)
newChild - A DTDChildElement to addpublic java.lang.String toString()
toString in class DTDElement
public java.lang.String getTag()
throws java.lang.Error
getTag in class DTDElementjava.lang.Errorpublic boolean getOrdered()
True indicates ordered child elements, e.g.
<!ELEMENT customer (billingAddress,phoneNumber)>
False indicates child elements are alternates, e.g.
<!ELEMENT customer (billingAddress|phoneNumber)>
public void setOrdered(boolean v)
public boolean hasChildren()
A DTDElementOnlyElement without children is assumed to be invalid.
public int getChildCount()
public int getVisibleChildCount()
public int getChildIndexValue(DTDElement element)
element - A DTDElement to look for.public DTDElement getChildElementAt(int index)
public DTDChildElement getChildAsChildElementAt(int index)
public java.util.ArrayList getChildElements()
public int getSequence()
public void replaceChildAtIndex(DTDContent newContent,
char m,
int index,
boolean v)
newContent - A DTDContent object to replace the existing content at indexm - Indicates Multiplicity. Use DTDChildElement.ZERO_OR_MORE,
DTDChildElement.ONE_OR_MORE, DTDChildElement.ZERO_OR_ONE or DTDChildElement.ONEindex - The index value of the DTDContent to be replaced.v - Indicates whether the child is visible as an attribute of the parentpublic void removeChildElementAt(int index)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||