|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jdom.DocType
DocType
represents an XML
DOCTYPE declaration.
Field Summary | |
protected Document |
document
The document having this DOCTYPE |
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 |
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.Object |
clone()
This will return a clone of this DocType . |
boolean |
equals(java.lang.Object ob)
This tests for equality of this DocType to the supplied
Object . |
Document |
getDocument()
This retrieves the owning for
this DocType, or null if not a currently a member of a
. |
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. |
int |
hashCode()
This returns the hash code for this DocType . |
protected DocType |
setDocument(Document document)
This sets the holding this doctype. |
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 java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.lang.String elementName
protected java.lang.String publicID
protected java.lang.String systemID
protected Document document
protected java.lang.String internalSubset
Constructor Detail |
protected DocType()
Default, no-args constructor for implementations to use if needed.
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.
elementName
- String
name of
element being constrained.publicID
- String
public ID of
referenced DTDsystemID
- String
system ID of
referenced DTDIllegalDataException
- if the given system ID is not a legal
system literal or the public ID is not a legal public ID.IllegalNameException
- if the given root element name is not a
legal XML element name.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.
elementName
- String
name of
element being constrained.systemID
- String
system ID of
referenced DTDIllegalDataException
- if the given system ID is not a legal
system literal.IllegalNameException
- if the given root element name is not a
legal XML element name.public DocType(java.lang.String elementName)
This will create the DocType
with
the specified element name
elementName
- String
name of
element being constrained.IllegalNameException
- if the given root element name is not a
legal XML element name.Method Detail |
public java.lang.String getElementName()
This will retrieve the element name being constrained.
String
- element name for DOCTYPEpublic DocType setElementName(java.lang.String elementName)
This will set the root element name declared by this DOCTYPE declaration.
elementName
- String
name of
root element being constrained.DocType
this DocType objectIllegalNameException
- if the given root element name is not a
legal XML element name.public java.lang.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.public DocType setPublicID(java.lang.String publicID)
This will set the public ID of an externally referenced DTD.
DocType
this DocType objectIllegalDataException
- if the given public ID is not a legal
public ID.public java.lang.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.public DocType setSystemID(java.lang.String systemID)
This will set the system ID of an externally referenced DTD.
String
system ID of
referenced DTD.IllegalDataException
- if the given system ID is not a legal
system literal.public Document getDocument()
This retrieves the owning
for
this DocType, or null if not a currently a member of a
Document
.
Document
Document
owning this DocType, or null.protected DocType setDocument(Document document)
This sets the
holding this doctype.
Document
DocType
- Document
holding this doctypeDocument
this DocType
modifiedpublic void setInternalSubset(java.lang.String newData)
This sets the data for the internal subset.
newData
- data for the internal subset, as a
String
.public java.lang.String getInternalSubset()
This returns the data for the internal subset
String
- the internal subsetpublic java.lang.String toString()
This returns a String
representation of the
DocType
, suitable for debugging.
toString
in class java.lang.Object
String
- information about the
DocType
public final boolean equals(java.lang.Object ob)
This tests for equality of this DocType
to the supplied
Object
.
equals
in class java.lang.Object
ob
- Object
to compare to.boolean
- whether the DocType
is
equal to the supplied Object
.public final int hashCode()
This returns the hash code for this DocType
.
hashCode
in class java.lang.Object
int
- hash code.public java.lang.Object clone()
This will return a clone of this DocType
.
clone
in class java.lang.Object
Object
- clone of this DocType
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |