DefaultDocumentType (dom4j 1.6.1 API)

dom4j API


org.dom4j.tree Class DefaultDocumentType

java.lang.Object
  extended byorg.dom4j.tree.AbstractNode
      extended byorg.dom4j.tree.AbstractDocumentType
          extended byorg.dom4j.tree.DefaultDocumentType
All Implemented Interfaces:
Cloneable, DocumentType, Node, Serializable
Direct Known Subclasses:
DOMDocumentType

public class DefaultDocumentType
extends AbstractDocumentType

DefaultDocumentType is the DOM4J default implementation of an XML document type.

Version:
$Revision: 1.10 $
Author:
James Strachan
See Also:
Serialized Form

Field Summary
protected  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
DefaultDocumentType()
           
DefaultDocumentType(String elementName, String systemID)
           This will create a new DocumentType with a reference to the external DTD
DefaultDocumentType(String elementName, String publicID, String systemID)
           This will create a new DocumentType with a reference to the external DTD
 
Method Summary
 String getElementName()
          This method is the equivalent to the AbstractDocumentType.getName()method.
 List getExternalDeclarations()
          Returns a list of internal DTD declaration objects, defined in the org.dom4j.dtdpackage
 List getInternalDeclarations()
          Returns a list of internal DTD declaration objects, defined in the org.dom4j.dtdpackage
 String getPublicID()
          DOCUMENT ME!
 String getSystemID()
          DOCUMENT ME!
 void setElementName(String elementName)
          This method is the equivalent to the AbstractDocumentType.setName(java.lang.String)method.
 void setExternalDeclarations(List externalDeclarations)
          Sets the list of internal DTD declaration objects, defined in the org.dom4j.dtdpackage
 void setInternalDeclarations(List internalDeclarations)
          Sets the list of internal DTD declaration objects, defined in the org.dom4j.dtdpackage
 void setPublicID(String publicID)
          Sets the public ID of the document type
 void setSystemID(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
 

Field Detail

elementName

protected String elementName
The root element name of the document typ

Constructor Detail

DefaultDocumentType

public DefaultDocumentType()

DefaultDocumentType

public DefaultDocumentType(String elementName,
                           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 type
systemID - is the system ID of the external DTD

DefaultDocumentType

public DefaultDocumentType(String elementName,
                           String publicID,
                           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 type
publicID - is the public ID of the DTD
systemID - is the system ID of the DTD
Method Detail

getElementName

public String getElementName()
Description copied from interface: DocumentType
This method is the equivalent to the Node.getName()method. It is added for clarity.

Returns:
the root element name for the document type.

setElementName

public void setElementName(String elementName)
Description copied from interface: DocumentType
This method is the equivalent to the Node.setName(java.lang.String)method. It is added for clarity.

Parameters:
elementName - DOCUMENT ME!

getPublicID

public String getPublicID()
DOCUMENT ME!

Returns:
the public ID of the document type

setPublicID

public void setPublicID(String publicID)
Sets the public ID of the document type

Parameters:
publicID - DOCUMENT ME!

getSystemID

public String getSystemID()
DOCUMENT ME!

Returns:
the system ID of the document type

setSystemID

public void setSystemID(String systemID)
Sets the system ID of the document type

Parameters:
systemID - DOCUMENT ME!

getInternalDeclarations

public List getInternalDeclarations()
Description copied from interface: DocumentType
Returns a list of internal DTD declaration objects, defined in the org.dom4j.dtdpackage

Returns:
DOCUMENT ME!

setInternalDeclarations

public void setInternalDeclarations(List internalDeclarations)
Description copied from interface: DocumentType
Sets the list of internal DTD declaration objects, defined in the org.dom4j.dtdpackage

Parameters:
internalDeclarations - DOCUMENT ME!

getExternalDeclarations

public List getExternalDeclarations()
Description copied from interface: DocumentType
Returns a list of internal DTD declaration objects, defined in the org.dom4j.dtdpackage

Returns:
DOCUMENT ME!

setExternalDeclarations

public void setExternalDeclarations(List externalDeclarations)
Description copied from interface: DocumentType
Sets the list of internal DTD declaration objects, defined in the org.dom4j.dtdpackage

Parameters:
externalDeclarations - DOCUMENT ME!


Copyright © 2001-2005 MetaStuff Ltd.. All Rights Reserved.