org.exolab.castor.xml.dtd
Class Element
java.lang.Object
org.exolab.castor.xml.dtd.Element
public class Element
extends java.lang.Object
Implementation of DTD Element declaration specification.
$Revision: 1.1.1.1 $ $Date: 2003/03/03 07:09:20 $Element(DTDdocument document) - Constructor, setting owning DTD document of the element.
|
Element(DTDdocument document, String name) - Constructor, setting the name of the element and owning DTD document.
|
Element
public Element(DTDdocument document)
Constructor, setting owning DTD document of the element.
document
- must not be null.
Element
public Element(DTDdocument document,
String name)
Constructor, setting the name of the element and owning DTD document.
document
- must not be null.
addAttribute
public void addAttribute(Attribute attribute)
Adds attribute to the element. If the element already has the attribute
with the same name, does nothing.
addMixedContentChild
public void addMixedContentChild(String child)
throws DTDException
Adds name of a child to the set of children's names.
DTDException
- if there already exists the child with the same name.
getAttributes
public Enumeration getAttributes()
Returns enumeration of the attributes of the element.
getContent
public ContentParticle getContent()
Returns
Content Particle
,
representing the content of the element, if has
ELEMENTS_ONLY
content,
null otherwise.
getDocument
public DTDdocument getDocument()
Returns DTD document owning this element.
getMixedContentChildren
public Iterator getMixedContentChildren()
Returns iterator
of the set of mixed children,
if of MIXED content, null otherwise.
getName
public String getName()
Returns the name of the element.
isAnyContent
public boolean isAnyContent()
True if the element is of ANY content type,
false otherwise.
isElemOnlyContent
public boolean isElemOnlyContent()
True if the element is of ELEMENTS_ONLY content type,
false otherwise.
isEmptyContent
public boolean isEmptyContent()
True if the element is of EMPTY content type, false otherwise.
isMixedContent
public boolean isMixedContent()
True if the element is of MIXED content type, false otherwise.
setAnyContent
public void setAnyContent()
Sets the content type of the element to ANY.
setElemOnlyContent
public void setElemOnlyContent(ContentParticle cp)
Sets the content type of the element to ELEMENTS_ONLY.
cp
- Content Particle representing content of the element.
setEmptyContent
public void setEmptyContent()
Sets the content type of the element to EMPTY.
setMixedContent
public void setMixedContent()
Sets the content type of the element to MIXED.
setName
public void setName(String name)
Sets the name of the element.
Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com