org.jdom
Class DocType
- Cloneable, Serializable
public class DocType
extends java.lang.Object
implements Serializable, Cloneable
DocType
represents an XML
DOCTYPE declaration.
Version:
- Brett McLaughlin
- Jason Hunter
protected Document | document - The document having this DOCTYPE
|
protected String | elementName - The element being constrained
|
protected String | internalSubset - The internal subset of the DOCTYPE
|
protected String | publicID - The public ID of the DOCTYPE
|
protected String | systemID - The system ID of the DOCTYPE
|
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.
|
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 | getInternalSubset() - This returns the data for the internal subset
|
String | getPublicID() -
This will retrieve the public ID of an externally
referenced DTD, or an empty
String if
none is referenced.
|
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 | setElementName(String elementName) -
This will set the root element name declared by this
DOCTYPE declaration.
|
void | setInternalSubset(String newData) - This sets the data for the internal subset.
|
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.
|
document
protected Document document
The document having this DOCTYPE
elementName
protected String elementName
The element being constrained
internalSubset
protected String internalSubset
The internal subset of the DOCTYPE
publicID
protected String publicID
The public ID of the DOCTYPE
systemID
protected String systemID
The system ID of the DOCTYPE
DocType
protected DocType()
Default, no-args constructor for implementations
to use if needed.
DocType
public DocType(String elementName)
This will create the DocType
with
the specified element name
elementName
- String
name of
element being constrained.
DocType
public DocType(String elementName,
String systemID)
This will create the DocType
with
the specified element name and reference to an
external DTD.
elementName
- String
name of
element being constrained.systemID
- String
system ID of
referenced DTD
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.
elementName
- String
name of
element being constrained.publicID
- String
public ID of
referenced DTDsystemID
- String
system ID of
referenced DTD
clone
public Object clone()
This will return a clone of this DocType
.
Object
- clone of this DocType
.
equals
public final boolean equals(Object ob)
This tests for equality of this DocType
to the supplied
Object
.
ob
- Object
to compare to.
boolean
- whether the DocType
is
equal to the supplied Object
.
getDocument
public Document getDocument()
This retrieves the owning
Document
for
this DocType, or null if not a currently a member of a
Document
.
Document
owning this DocType, or null.
getElementName
public String getElementName()
This will retrieve the element name being
constrained.
String
- element name for DOCTYPE
getInternalSubset
public String getInternalSubset()
This returns the data for the internal subset
String
- the internal subset
getPublicID
public String getPublicID()
This will retrieve the public ID of an externally
referenced DTD, or an empty String
if
none is referenced.
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.
String
- system ID of referenced DTD.
hashCode
public final int hashCode()
This returns the hash code for this DocType
.
int
- hash code.
setDocument
protected DocType setDocument(Document document)
This sets the
Document
holding this doctype.
Document
this DocType
modified
setElementName
public DocType setElementName(String elementName)
This will set the root element name declared by this
DOCTYPE declaration.
elementName
- String
name of
root element being constrained.
- DocType
DocType
this DocType object
setInternalSubset
public void setInternalSubset(String newData)
This sets the data for the internal subset.
newData
- data for the internal subset, as a
String
.
setPublicID
public DocType setPublicID(String publicID)
This will set the public ID of an externally
referenced DTD.
- DocType
DocType
this DocType object
setSystemID
public DocType setSystemID(String systemID)
This will set the system ID of an externally
referenced DTD.
- systemID
String
system ID of
referenced DTD.
toString
public String toString()
This returns a String
representation of the
DocType
, suitable for debugging.
String
- information about the
DocType
Copyright B) 2002 Jason Hunter, Brett McLaughlin. All Rights Reserved.