|
JDOM2 0.0.2-BETA |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jdom2.Content
org.jdom2.DocType
public class DocType
An XML DOCTYPE declaration. Method allow the user to get and set the root element name, public id, and system id.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.jdom2.Content |
|---|
Content.CType |
| Field Summary | |
|---|---|
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.jdom2.Content |
|---|
ctype, 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 | |
|---|---|
DocType |
clone()
Returns a deep, unattached copy of this child and its descendants detached from any parent or document. |
DocType |
detach()
Detaches this child from its parent or does nothing if the child has no parent. |
java.lang.String |
getElementName()
This will retrieve the element name being constrained. |
java.lang.String |
getInternalSubset()
This returns the data for the internal subset. |
Document |
getParent()
Return this child's parent, or null if this child is currently not attached. |
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. |
protected DocType |
setParent(Parent parent)
Sets the parent of this Content. |
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.jdom2.Content |
|---|
equals, getCType, getDocument, getNamespacesInherited, getNamespacesInScope, getNamespacesIntroduced, getParentElement, hashCode |
| 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 java.lang.String internalSubset
| Constructor Detail |
|---|
protected DocType()
public DocType(java.lang.String elementName,
java.lang.String publicID,
java.lang.String systemID)
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
IllegalDataException - 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)
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
IllegalDataException - 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)
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()
String - element name for DOCTYPEpublic DocType setElementName(java.lang.String elementName)
elementName - String name of
root element being constrained.
DocType this DocType object
IllegalNameException - if the given root element name is not a
legal XML element name.public java.lang.String getPublicID()
String if
none is referenced.
String - public ID of referenced DTD.public DocType setPublicID(java.lang.String publicID)
publicID - id to set
DocType this DocType object
IllegalDataException - if the given public ID is not a legal
public ID.public java.lang.String getSystemID()
String if
none is referenced.
String - system ID of referenced DTD.public DocType setSystemID(java.lang.String systemID)
systemID - id to set
String system ID of
referenced DTD.
IllegalDataException - if the given system ID is not a legal
system literal.public java.lang.String getValue()
getValue in class Contentpublic void setInternalSubset(java.lang.String newData)
newData - data for the internal subset, as a
String.public java.lang.String getInternalSubset()
String - the internal subsetpublic java.lang.String toString()
String representation of the
DocType, suitable for debugging.
toString in class java.lang.ObjectString - information about the
DocTypepublic DocType clone()
Content
This method can be overridden by particular Content subclasses to return
a specific type of Content (co-variant return type). All overriding
subclasses must call super.clone();
clone in class Contentpublic DocType detach()
Content
This method can be overridden by particular Content subclasses to return
a specific type of Content (co-variant return type). All overriding
subclasses must call super.detach();
detach in class Contentprotected DocType setParent(Parent parent)
Content
This method can be overridden by particular Content subclasses to return
a specific type of Content (co-variant return type). All overriding
subclasses must call super.setParent(Parent);
setParent in class Contentparent - new parent element
public Document getParent()
ContentElement
or a Document.
This method can be overridden by particular Content subclasses to return
a specific type of Parent (co-variant return type). All overriding
subclasses must call super.getParent();
getParent in class Content
|
JDOM2 0.0.2-BETA |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||