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:
java.lang.Cloneable, DocumentType, Node, java.io.Serializable
Direct Known Subclasses:
DOMDocumentType

public class DefaultDocumentType
extends AbstractDocumentType

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

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

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

Field Detail

elementName

protected java.lang.String elementName
The root element name of the document typ

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 type
systemID - 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 type
publicID - is the public ID of the DTD
systemID - 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 the Node.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 the Node.setName(java.lang.String) method. It is added for clarity.


getPublicID

public java.lang.String getPublicID()
Returns:
the public ID of the document type

setPublicID

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


getSystemID

public java.lang.String getSystemID()
Returns:
the system ID of the document type

setSystemID

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


getInternalDeclarations

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


setInternalDeclarations

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


getExternalDeclarations

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


setExternalDeclarations

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



Copyright © 2004 MetaStuff Ltd. All Rights Reserved. Hosted by

SourceForge Logo