|
||||||||||
| 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
| Field Summary | |
static java.lang.String |
CONTENT_ANY
|
static java.lang.String |
CONTENT_ELEMENT_ONLY
|
static java.lang.String |
CONTENT_EMPTY
|
static java.lang.String |
CONTENT_MIXED
|
static java.lang.String |
CONTENT_PCDATA
|
static java.lang.String |
DUP_ATT_NAME
|
static int |
INT_CONTENT_ANY
|
static int |
INT_CONTENT_PCDATA
|
| Fields inherited from class stuart.xmlApp.dtd.DTDContent |
ELEMENT, ENTITY, NOTATION |
| Constructor Summary | |
|
DTDElement(java.lang.String n)
Create a new empty DTDElement. |
|
DTDElement(java.lang.String n,
int otherCM)
Create either an Element that accepts ANY content, or an Element that only accepts PCDATA content. |
protected |
DTDElement(java.lang.String n,
java.lang.String cm)
Create a new DTDElement. |
| Method Summary | |
void |
addAttribute(Attribute a)
Add a new Attribute object to the Element |
void |
changeSimpleContentModel(java.lang.String newCM)
Change the simple content model for a specified element. |
Attribute |
getAttributeAt(int index)
Returns the attribute at index |
int |
getAttributeCount()
Returns the number of existing attributes. |
java.lang.String |
getAttributeTag()
Returns the attribute tag for the element. |
java.lang.String |
getContentModel()
Get the Content Model for the Element |
java.lang.String |
getName()
Returns the name of the element. |
int |
getNextSequenceOrder()
|
java.lang.String |
getTag()
Returns to DTD Tag for this element. |
java.lang.String |
getTagSet()
Returns the DTD Tag and, if attributes exist, the attribute tag for this element. |
boolean |
hasAttributes()
Indicates whether the Element has any attributes. |
static void |
main(java.lang.String[] args)
Debugging method. |
void |
removeAttributeAt(int index)
Removes the attribute at the given index param index The index value of the attribute to be removed |
void |
setName(java.lang.String n)
|
java.lang.String |
toString()
|
| 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 CONTENT_EMPTY
public static final java.lang.String CONTENT_PCDATA
public static final java.lang.String CONTENT_ELEMENT_ONLY
public static final java.lang.String CONTENT_ANY
public static final java.lang.String CONTENT_MIXED
public static final int INT_CONTENT_PCDATA
public static final int INT_CONTENT_ANY
public static final java.lang.String DUP_ATT_NAME
| Constructor Detail |
public DTDElement(java.lang.String n)
Eg. <!ELEMENT customer EMPTY>.
n - Name of the Element
public DTDElement(java.lang.String n,
int otherCM)
throws java.lang.IllegalArgumentException
n - The name of the ElementotherCM - INT_CONTENT_PCDATA or INT_CONTENT_ANY
protected DTDElement(java.lang.String n,
java.lang.String cm)
throws java.lang.IllegalArgumentException
n - Name of the Elementcm - Content Model for the Element. Use DTDElement static variables to set.| Method Detail |
public void addAttribute(Attribute a)
a - The attribute object to add to the elementpublic Attribute getAttributeAt(int index)
public void removeAttributeAt(int index)
public int getAttributeCount()
public java.lang.String getTag()
throws java.lang.Error
E.g.
<!ELEMENT hello EMPTY>
getTag in class DTDContentjava.lang.Errorpublic java.lang.String getAttributeTag()
E.g.
<!ATTLIST hello elementAt1 CDATA #FIXED default
elementAt2 NMTOKEN #IMPLIED>
public java.lang.String getTagSet()
E.g.
<!ELEMENT Mixed (#PCDATA | hello*|AnotherElement+)>
<!ATTLIST Mixed elementAt1 CDATA #FIXED hello
elementAt2 NMTOKEN #IMPLIED>
public void setName(java.lang.String n)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic java.lang.String getName()
public java.lang.String toString()
toString in class DTDContentpublic int getNextSequenceOrder()
public java.lang.String getContentModel()
public void changeSimpleContentModel(java.lang.String newCM)
newCM - The new content model. Use the static final CONTENT_type variables.public boolean hasAttributes()
public static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||