Package org.dom4j.tree
Class DefaultDocumentType
- java.lang.Object
-
- org.dom4j.tree.AbstractNode
-
- org.dom4j.tree.AbstractDocumentType
-
- org.dom4j.tree.DefaultDocumentType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,DocumentType
,Node
- Direct Known Subclasses:
DOMDocumentType
public class DefaultDocumentType extends AbstractDocumentType
DefaultDocumentType
is the DOM4J default implementation of an XML document type.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
elementName
The root element name of the document typ-
Fields inherited from class org.dom4j.tree.AbstractNode
NODE_TYPE_NAMES
-
Fields inherited from interface org.dom4j.Node
ANY_NODE, ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, MAX_NODE_TYPE, NAMESPACE_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE, UNKNOWN_NODE
-
-
Constructor Summary
Constructors Constructor Description DefaultDocumentType()
DefaultDocumentType(java.lang.String elementName, java.lang.String systemID)
This will create a newDocumentType
with a reference to the external DTDDefaultDocumentType(java.lang.String elementName, java.lang.String publicID, java.lang.String systemID)
This will create a newDocumentType
with a reference to the external DTD
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getElementName()
This method is the equivalent to theNode.getName()
method.java.util.List<Decl>
getExternalDeclarations()
Returns a list of internal DTD declaration objects, defined in theorg.dom4j.dtd
packagejava.util.List<Decl>
getInternalDeclarations()
Returns a list of internal DTD declaration objects, defined in theorg.dom4j.dtd
packagejava.lang.String
getPublicID()
DOCUMENT ME!java.lang.String
getSystemID()
DOCUMENT ME!void
setElementName(java.lang.String elementName)
This method is the equivalent to theNode.setName(java.lang.String)
method.void
setExternalDeclarations(java.util.List<Decl> externalDeclarations)
Sets the list of internal DTD declaration objects, defined in theorg.dom4j.dtd
packagevoid
setInternalDeclarations(java.util.List<Decl> internalDeclarations)
Sets the list of internal DTD declaration objects, defined in theorg.dom4j.dtd
packagevoid
setPublicID(java.lang.String publicID)
Sets the public ID of the document typevoid
setSystemID(java.lang.String systemID)
Sets the system ID of the document type-
Methods inherited from class org.dom4j.tree.AbstractDocumentType
accept, asXML, getName, getNodeType, getPath, getText, getUniquePath, setName, toString, write
-
Methods inherited from class org.dom4j.tree.AbstractNode
asXPathResult, clone, createPattern, createXPath, createXPathFilter, createXPathResult, detach, getDocument, getDocumentFactory, getNodeTypeName, getParent, getPath, getStringValue, getUniquePath, hasContent, isReadOnly, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, setDocument, setParent, setText, supportsParent, valueOf
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.dom4j.Node
asXPathResult, clone, createXPath, detach, getDocument, getNodeTypeName, getParent, getPath, getStringValue, getUniquePath, hasContent, isReadOnly, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, setDocument, setParent, setText, supportsParent, valueOf
-
-
-
-
Constructor Detail
-
DefaultDocumentType
public DefaultDocumentType()
-
DefaultDocumentType
public DefaultDocumentType(java.lang.String elementName, java.lang.String systemID)
This will create a new
DocumentType
with a reference to the external DTD- Parameters:
elementName
- is the root element name of the document typesystemID
- is the system ID of the external DTD
-
DefaultDocumentType
public DefaultDocumentType(java.lang.String elementName, java.lang.String publicID, java.lang.String systemID)
This will create a new
DocumentType
with a reference to the external DTD- Parameters:
elementName
- is the root element name of the document typepublicID
- is the public ID of the DTDsystemID
- is the system ID of the DTD
-
-
Method Detail
-
getElementName
public java.lang.String getElementName()
Description copied from interface:DocumentType
This method is the equivalent to theNode.getName()
method. It is added for clarity.- Returns:
- the root element name for the document type.
-
setElementName
public void setElementName(java.lang.String elementName)
Description copied from interface:DocumentType
This method is the equivalent to theNode.setName(java.lang.String)
method. It is added for clarity.- Parameters:
elementName
- DOCUMENT ME!
-
getPublicID
public java.lang.String getPublicID()
DOCUMENT ME!- Returns:
- the public ID of the document type
-
setPublicID
public void setPublicID(java.lang.String publicID)
Sets the public ID of the document type- Parameters:
publicID
- DOCUMENT ME!
-
getSystemID
public java.lang.String getSystemID()
DOCUMENT ME!- Returns:
- the system ID of the document type
-
setSystemID
public void setSystemID(java.lang.String systemID)
Sets the system ID of the document type- Parameters:
systemID
- DOCUMENT ME!
-
getInternalDeclarations
public java.util.List<Decl> getInternalDeclarations()
Description copied from interface:DocumentType
Returns a list of internal DTD declaration objects, defined in theorg.dom4j.dtd
package- Returns:
- DOCUMENT ME!
-
setInternalDeclarations
public void setInternalDeclarations(java.util.List<Decl> internalDeclarations)
Description copied from interface:DocumentType
Sets the list of internal DTD declaration objects, defined in theorg.dom4j.dtd
package- Parameters:
internalDeclarations
- DOCUMENT ME!
-
getExternalDeclarations
public java.util.List<Decl> getExternalDeclarations()
Description copied from interface:DocumentType
Returns a list of internal DTD declaration objects, defined in theorg.dom4j.dtd
package- Returns:
- DOCUMENT ME!
-
setExternalDeclarations
public void setExternalDeclarations(java.util.List<Decl> externalDeclarations)
Description copied from interface:DocumentType
Sets the list of internal DTD declaration objects, defined in theorg.dom4j.dtd
package- Parameters:
externalDeclarations
- DOCUMENT ME!
-
-