Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.jdom
Class DocType  view DocType download DocType.java

java.lang.Object
  extended byorg.jdom.Content
      extended byorg.jdom.DocType
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class DocType
extends Content

An XML DOCTYPE declaration. Method allow the user to get and set the root element name, public id, and system id.

Version:
$Revision: 1.31 $, $Date: 2004/02/27 11:32:57 $

Field Summary
private static java.lang.String CVS_ID
           
protected  java.lang.String elementName
          The element being constrained
protected  java.lang.String internalSubset
          The internal subset of the DOCTYPE
protected  java.lang.String publicID
          The public ID of the DOCTYPE
protected  java.lang.String systemID
          The system ID of the DOCTYPE
 
Fields inherited from class org.jdom.Content
parent
 
Constructor Summary
protected DocType()
          Default, no-args constructor for implementations to use if needed.
  DocType(java.lang.String elementName)
          This will create the DocType with the specified element name
  DocType(java.lang.String elementName, java.lang.String systemID)
          This will create the DocType with the specified element name and reference to an external DTD.
  DocType(java.lang.String elementName, java.lang.String publicID, java.lang.String systemID)
          This will create the DocType with the specified element name and a reference to an external DTD.
 
Method Summary
 java.lang.String getElementName()
          This will retrieve the element name being constrained.
 java.lang.String getInternalSubset()
          This returns the data for the internal subset.
 java.lang.String getPublicID()
          This will retrieve the public ID of an externally referenced DTD, or an empty String if none is referenced.
 java.lang.String getSystemID()
          This will retrieve the system ID of an externally referenced DTD, or an empty String if none is referenced.
 java.lang.String getValue()
          Returns the empty string since doctypes don't have an XPath 1.0 string value.
 DocType setElementName(java.lang.String elementName)
          This will set the root element name declared by this DOCTYPE declaration.
 void setInternalSubset(java.lang.String newData)
          This sets the data for the internal subset.
 DocType setPublicID(java.lang.String publicID)
          This will set the public ID of an externally referenced DTD.
 DocType setSystemID(java.lang.String systemID)
          This will set the system ID of an externally referenced DTD.
 java.lang.String toString()
          This returns a String representation of the DocType, suitable for debugging.
 
Methods inherited from class org.jdom.Content
clone, detach, equals, getDocument, getParent, getParentElement, hashCode, setParent
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CVS_ID

private static final java.lang.String CVS_ID
See Also:
Constant Field Values

elementName

protected java.lang.String elementName
The element being constrained


publicID

protected java.lang.String publicID
The public ID of the DOCTYPE


systemID

protected java.lang.String systemID
The system ID of the DOCTYPE


internalSubset

protected java.lang.String internalSubset
The internal subset of the DOCTYPE

Constructor Detail

DocType

protected DocType()
Default, no-args constructor for implementations to use if needed.


DocType

public DocType(java.lang.String elementName,
               java.lang.String publicID,
               java.lang.String systemID)
This will create the DocType with the specified element name and a reference to an external DTD.


DocType

public DocType(java.lang.String elementName,
               java.lang.String systemID)
This will create the DocType with the specified element name and reference to an external DTD.


DocType

public DocType(java.lang.String elementName)
This will create the DocType with the specified element name

Method Detail

getElementName

public java.lang.String getElementName()
This will retrieve the element name being constrained.


setElementName

public DocType setElementName(java.lang.String elementName)
This will set the root element name declared by this DOCTYPE declaration.


getPublicID

public java.lang.String getPublicID()
This will retrieve the public ID of an externally referenced DTD, or an empty String if none is referenced.


setPublicID

public DocType setPublicID(java.lang.String publicID)
This will set the public ID of an externally referenced DTD.


getSystemID

public java.lang.String getSystemID()
This will retrieve the system ID of an externally referenced DTD, or an empty String if none is referenced.


setSystemID

public DocType setSystemID(java.lang.String systemID)
This will set the system ID of an externally referenced DTD.


getValue

public java.lang.String getValue()
Returns the empty string since doctypes don't have an XPath 1.0 string value.

Specified by:
getValue in class Content

setInternalSubset

public void setInternalSubset(java.lang.String newData)
This sets the data for the internal subset.


getInternalSubset

public java.lang.String getInternalSubset()
This returns the data for the internal subset.


toString

public java.lang.String toString()
This returns a String representation of the DocType, suitable for debugging.