org.exolab.castor.xml.dtd
public class Element extends Object
Version: $Revision: 1.1.1.1 $ $Date: 2003/03/03 07:09:20 $
Constructor Summary | |
---|---|
Element(DTDdocument document, String name)
Constructor, setting the name of the element and owning DTD document. | |
Element(DTDdocument document)
Constructor, setting owning DTD document of the element. |
Method Summary | |
---|---|
void | addAttribute(Attribute attribute)
Adds attribute to the element. |
void | addMixedContentChild(String child)
Adds name of a child to the set of children's names. |
Enumeration | getAttributes()
Returns enumeration of the attributes of the element. |
ContentParticle | getContent()
Returns {@link org.exolab.castor.xml.dtd.ContentParticle Content Particle},
representing the content of the element, if has ELEMENTS_ONLY
content, null otherwise. |
DTDdocument | getDocument()
Returns DTD document owning this element. |
Iterator | getMixedContentChildren()
Returns {@link java.util.Iterator iterator} of the set of mixed children,
if of MIXED content, null otherwise. |
String | getName()
Returns the name of the element. |
boolean | isAnyContent()
True if the element is of ANY content type,
false otherwise. |
boolean | isElemOnlyContent()
True if the element is of ELEMENTS_ONLY content type,
false otherwise. |
boolean | isEmptyContent()
True if the element is of EMPTY content type, false otherwise. |
boolean | isMixedContent()
True if the element is of MIXED content type, false otherwise. |
void | setAnyContent()
Sets the content type of the element to ANY. |
void | setElemOnlyContent(ContentParticle cp)
Sets the content type of the element to ELEMENTS_ONLY. |
void | setEmptyContent()
Sets the content type of the element to EMPTY. |
void | setMixedContent()
Sets the content type of the element to MIXED. |
void | setName(String name)
Sets the name of the element. |
Parameters: document must not be null.
Parameters: document must not be null.
Throws: DTDException if there already exists the child with the same name.
Parameters: cp Content Particle representing content of the element.