Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jdom
Class DocType

    java.lang.Object
      |
      +--org.jdom.DocType

public class DocType
extends Object
implements Serializable, Cloneable

`DocType` represents an XML DOCTYPE declaration.

Version:
  1.0
Author:
  Brett McLaughlin, Jason Hunter
See Also:
  Serialized Form

Field Summary
`protected Document` | `document` The document having this DOCTYPE
`protected String` | `elementName` The element being constrained
`protected String` | `publicID` The public ID of the DOCTYPE
`protected String` | `systemID` The system ID of the DOCTYPE

Constructor Summary
`protected` | `DocType()` Default, no-args constructor for implementations to use if needed.
`` | `DocType(String elementName)` This will create the `DocType` with the specified element name
`` | `DocType(String elementName, String systemID)` This will create the `DocType` with the specified element name and reference to an external DTD.
`` | `DocType(String elementName, String publicID, String systemID)` This will create the `DocType` with the specified element name and a reference to an external DTD.

Method Summary
`Object` | `clone()` This will return a clone of this `DocType`.
`boolean` | `equals(Object ob)` This tests for equality of this `DocType` to the supplied `Object`.
`Document` | `getDocument()` This retrieves the owning ``Document`` for this DocType, or null if not a currently a member of a ``Document``.
`String` | `getElementName()` This will retrieve the element name being constrained.
`String` | `getPublicID()` This will retrieve the public ID of an externally referenced DTD, or an empty `String` if none is referenced.
`String` | `getSerializedForm()` Deprecated. Deprecated in Beta7, use XMLOutputter.outputString(DocType) instead
`String` | `getSystemID()` This will retrieve the system ID of an externally referenced DTD, or an empty `String` if none is referenced.
`int` | `hashCode()` This returns the hash code for this `DocType`.
`protected DocType` | `setDocument(Document document)` This sets the ``Document`` holding this doctype.
`DocType` | `setPublicID(String publicID)` This will set the public ID of an externally referenced DTD.
`DocType` | `setSystemID(String systemID)` This will set the system ID of an externally referenced DTD.
`String` | `toString()` This returns a `String` representation of the `DocType`, suitable for debugging.

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### elementName

    protected String elementName

  The element being constrained

### publicID

    protected String publicID

  The public ID of the DOCTYPE

### systemID

    protected String systemID

  The system ID of the DOCTYPE

### document

    protected Document document

  The document having this DOCTYPE

Constructor Detail

### DocType

    protected DocType()

  Default, no-args constructor for implementations to use if needed.

### DocType

    public DocType(String elementName,
                   String publicID,
                   String systemID)

  This will create the `DocType` with the specified element name and a reference to an external DTD.

  Parameters:
    `elementName` - `String` name of element being constrained.
    `publicID` - `String` public ID of referenced DTD
    `systemID` - `String` system ID of referenced DTD

### DocType

    public DocType(String elementName,
                   String systemID)

  This will create the `DocType` with the specified element name and reference to an external DTD.

  Parameters:
    `elementName` - `String` name of element being constrained.
    `systemID` - `String` system ID of referenced DTD

### DocType

    public DocType(String elementName)

  This will create the `DocType` with the specified element name

  Parameters:
    `elementName` - `String` name of element being constrained.

Method Detail

### getElementName

    public String getElementName()

  This will retrieve the element name being constrained.

  Returns:
    `String` - element name for DOCTYPE

### getPublicID

    public String getPublicID()

  This will retrieve the public ID of an externally referenced DTD, or an empty `String` if none is referenced.

  Returns:
    `String` - public ID of referenced DTD.

### setPublicID

    public DocType setPublicID(String publicID)

  This will set the public ID of an externally referenced DTD.

  Returns:
    publicID `String` public ID of referenced DTD.

### getSystemID

    public String getSystemID()

  This will retrieve the system ID of an externally referenced DTD, or an empty `String` if none is referenced.

  Returns:
    `String` - system ID of referenced DTD.

### setSystemID

    public DocType setSystemID(String systemID)

  This will set the system ID of an externally referenced DTD.

  Returns:
    systemID `String` system ID of referenced DTD.

### getDocument

    public Document getDocument()

  This retrieves the owning ``Document`` for this DocType, or null if not a currently a member of a ``Document``.

  Returns:
    `Document` owning this DocType, or null.

### setDocument

    protected DocType setDocument(Document document)

  This sets the ``Document`` holding this doctype.

  Parameters:
    `document` - `Document` holding this doctype
  Returns:
    `Document` this `DocType` modified

### toString

    public String toString()

  This returns a `String` representation of the `DocType`, suitable for debugging.

  Overrides:
    toString in class Object
  Returns:
    `String` - information about the `DocType`

### equals

    public final boolean equals(Object ob)

  This tests for equality of this `DocType` to the supplied `Object`.

  Overrides:
    equals in class Object
  Parameters:
    `ob` - `Object` to compare to.
  Returns:
    `boolean` - whether the `DocType` is equal to the supplied `Object`.

### hashCode

    public final int hashCode()

  This returns the hash code for this `DocType`.

  Overrides:
    hashCode in class Object
  Returns:
    `int` - hash code.

### clone

    public Object clone()

  This will return a clone of this `DocType`.

  Overrides:
    clone in class Object
  Returns:
    `Object` - clone of this `DocType`.

### getSerializedForm

    public final String getSerializedForm()

  Deprecated. Deprecated in Beta7, use XMLOutputter.outputString(DocType) instead

  This will return the `DocType` in XML format, usable in an XML document.

  Returns:
    `String` - the serialized form of the `DocType`.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001 Jason Hunter, Brett McLaughlin. All Rights Reserved.