Top Description Fields Constructors Methods
org.dom4j.tree

public Class DefaultDocumentType

extends AbstractDocumentType
Class Inheritance
Known Direct Subclasses
org.dom4j.dom.DOMDocumentType
Imports
org.dom4j.dtd.Decl, java.util.List

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

Author
James Strachan
Version
$Revision: 1.10 $

Field Summary

Modifier and TypeField and Description
protected String
elementName

The root element name of the document typ

private List<Decl>
externalDeclarations

The external DTD declarations

private List<Decl>
internalDeclarations

The internal DTD declarations

private String
publicID

Holds value of property publicID.

private String
systemID

Holds value of property systemID.

Constructor Summary

AccessConstructor and Description
public
public
DefaultDocumentType(String
is the root element name of the document type
elementName
,
String
is the system ID of the external DTD
systemID
)

This will create a new DocumentType with a reference to the external DTD

public
DefaultDocumentType(String
is the root element name of the document type
elementName
,
String
is the public ID of the DTD
publicID
,
String
is the system ID of the DTD
systemID
)

This will create a new DocumentType with a reference to the external DTD

Method Summary

Modifier and TypeMethod and Description
public String
getElementName()

Implements org.dom4j.DocumentType.getElementName.

This method is the equivalent to the getNamemethod.
public List<Decl>
getExternalDeclarations()

Implements org.dom4j.DocumentType.getExternalDeclarations.

Returns a list of internal DTD declaration objects, defined in the org.dom4j.dtdpackage
public List<Decl>
getInternalDeclarations()

Implements org.dom4j.DocumentType.getInternalDeclarations.

Returns a list of internal DTD declaration objects, defined in the org.dom4j.dtdpackage
public String

Returns:

the public ID of the document type
getPublicID
()

Implements org.dom4j.DocumentType.getPublicID.

DOCUMENT ME!
public String

Returns:

the system ID of the document type
getSystemID
()

Implements org.dom4j.DocumentType.getSystemID.

DOCUMENT ME!
public void
setElementName(String
DOCUMENT ME!
elementName
)

Implements org.dom4j.DocumentType.setElementName.

This method is the equivalent to the setNamemethod.
public void
setExternalDeclarations(List<Decl>
DOCUMENT ME!
externalDeclarations
)

Implements org.dom4j.DocumentType.setExternalDeclarations.

Sets the list of internal DTD declaration objects, defined in the org.dom4j.dtdpackage
public void
setInternalDeclarations(List<Decl>
DOCUMENT ME!
internalDeclarations
)

Implements org.dom4j.DocumentType.setInternalDeclarations.

Sets the list of internal DTD declaration objects, defined in the org.dom4j.dtdpackage
public void
setPublicID(String
DOCUMENT ME!
publicID
)

Implements org.dom4j.DocumentType.setPublicID.

Sets the public ID of the document type
public void
setSystemID(String
DOCUMENT ME!
systemID
)

Implements org.dom4j.DocumentType.setSystemID.

Sets the system ID of the document type
Inherited from org.dom4j.tree.AbstractDocumentType:
acceptasXMLgetNamegetNodeTypegetPathgetTextgetUniquePathsetNametoStringwrite

Field Detail

elementNameback to summary
protected String elementName

The root element name of the document typ

externalDeclarationsback to summary
private List<Decl> externalDeclarations

The external DTD declarations

internalDeclarationsback to summary
private List<Decl> internalDeclarations

The internal DTD declarations

publicIDback to summary
private String publicID

Holds value of property publicID.

systemIDback to summary
private String systemID

Holds value of property systemID.

Constructor Detail

DefaultDocumentTypeback to summary
public DefaultDocumentType()
DefaultDocumentTypeback to summary
public DefaultDocumentType(String elementName, String systemID)

This will create a new DocumentType with a reference to the external DTD

Parameters
elementName:String

is the root element name of the document type

systemID:String

is the system ID of the external DTD

DefaultDocumentTypeback to summary
public DefaultDocumentType(String elementName, String publicID, String systemID)

This will create a new DocumentType with a reference to the external DTD

Parameters
elementName:String

is the root element name of the document type

publicID:String

is the public ID of the DTD

systemID:String

is the system ID of the DTD

Method Detail

getElementNameback to summary
public String getElementName()

Implements org.dom4j.DocumentType.getElementName.

Doc from org.dom4j.DocumentType.getElementName.

This method is the equivalent to the getNamemethod. It is added for clarity.

Returns:String

the root element name for the document type.

getExternalDeclarationsback to summary
public List<Decl> getExternalDeclarations()

Implements org.dom4j.DocumentType.getExternalDeclarations.

Doc from org.dom4j.DocumentType.getExternalDeclarations.

Returns a list of internal DTD declaration objects, defined in the org.dom4j.dtdpackage

Returns:List<Decl>

DOCUMENT ME!

getInternalDeclarationsback to summary
public List<Decl> getInternalDeclarations()

Implements org.dom4j.DocumentType.getInternalDeclarations.

Doc from org.dom4j.DocumentType.getInternalDeclarations.

Returns a list of internal DTD declaration objects, defined in the org.dom4j.dtdpackage

Returns:List<Decl>

DOCUMENT ME!

getPublicIDback to summary
public String getPublicID()

Implements org.dom4j.DocumentType.getPublicID.

DOCUMENT ME!

Returns:String

the public ID of the document type

getSystemIDback to summary
public String getSystemID()

Implements org.dom4j.DocumentType.getSystemID.

DOCUMENT ME!

Returns:String

the system ID of the document type

setElementNameback to summary
public void setElementName(String elementName)

Implements org.dom4j.DocumentType.setElementName.

Doc from org.dom4j.DocumentType.setElementName.

This method is the equivalent to the setNamemethod. It is added for clarity.

Parameters
elementName:String

DOCUMENT ME!

setExternalDeclarationsback to summary
public void setExternalDeclarations(List<Decl> externalDeclarations)

Implements org.dom4j.DocumentType.setExternalDeclarations.

Doc from org.dom4j.DocumentType.setExternalDeclarations.

Sets the list of internal DTD declaration objects, defined in the org.dom4j.dtdpackage

Parameters
externalDeclarations:List<Decl>

DOCUMENT ME!

setInternalDeclarationsback to summary
public void setInternalDeclarations(List<Decl> internalDeclarations)

Implements org.dom4j.DocumentType.setInternalDeclarations.

Doc from org.dom4j.DocumentType.setInternalDeclarations.

Sets the list of internal DTD declaration objects, defined in the org.dom4j.dtdpackage

Parameters
internalDeclarations:List<Decl>

DOCUMENT ME!

setPublicIDback to summary
public void setPublicID(String publicID)

Implements org.dom4j.DocumentType.setPublicID.

Sets the public ID of the document type

Parameters
publicID:String

DOCUMENT ME!

setSystemIDback to summary
public void setSystemID(String systemID)

Implements org.dom4j.DocumentType.setSystemID.

Sets the system ID of the document type

Parameters
systemID:String

DOCUMENT ME!