|
Oracle® Application Server XML Java API Reference 10g Release 3 (10.1.3) B28238-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.xml.parser.v2.XMLNode
oracle.xml.parser.v2.DTD
Implements the DOM DocumentType interface and holds the Document Type Definition information for an XML document.
Field Summary |
Fields inherited from interface org.w3c.dom.Node |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
Fields inherited from interface org.w3c.dom.validation.NodeEditVAL |
VAL_FALSE, VAL_INCOMPLETE, VAL_NS_WF, VAL_SCHEMA, VAL_TRUE, VAL_UNKNOWN, VAL_WF |
Constructor Summary | |
DTD() Default constructor. |
Method Summary | |
XMLDocument |
convertDTD2Schema() get XML Schema DOM tree from this DTD object |
ElementDecl |
findElementDecl(java.lang.String name) Finds an element declaration for the given tag name. |
Entity |
findEntity(java.lang.String n, boolean par) Finds a named entity in the DTD. |
Notation |
findNotation(java.lang.String name) Retrieves the named notation from the DTD. |
NamedNodeMap |
getElementDecls() A NamedNodeMap containing the element declarations in the DTD. |
NamedNodeMap |
getEntities() A NamedNodeMap containing the general entities, both external and internal, declared in the DTD. |
java.lang.String |
getInternalSubset() Gets the internal subset of the DTD |
java.lang.String |
getName() Gets the name of the DTD; i.e., the name immediately following the DOCTYPE keyword. |
java.lang.String |
getNodeName() Gets the name of this node, depending on its type |
short |
getNodeType() Gets a code representing the type of the underlying object |
NamedNodeMap |
getNotations() A NamedNodeMap containing the notations declared in the DTD. |
Document |
getOwnerDocument() Gets the Document object associated with this node. |
java.lang.String |
getPublicId() Gets The public identifier associated with the DTD, if specified. |
java.lang.String |
getRootTag() Get the root tag for the DTD |
java.lang.String |
getSystemId() Gets the system identifier associated with the DTD, if specified. |
boolean |
hasChildNodes() This is a convenience method to allow easy determination of whether a node has any children. return false always, as DTD cannot have any overrides method in XMLNode |
void |
printExternalDTD(java.io.OutputStream out) Writes the contents of this document to the given output stream. |
void |
printExternalDTD(java.io.OutputStream out, java.lang.String enc) Writes the contents of the external DTD to the given output stream. |
void |
printExternalDTD(java.io.PrintWriter out) Writes the contents of this document to the given output stream. |
void |
readExternal(java.io.ObjectInput inArg) This method reads the information written in the compressed stream by writeExternal method and restores the object correspondingly. |
void |
setRootTag(java.lang.String root) Set the root tag for the DTD |
void |
writeExternal(java.io.ObjectOutput outArg) This method saves the state of the object by creating a binray compressed stream with information about this object. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.w3c.dom.Node |
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getParentNode, getPrefix, getPreviousSibling, hasAttributes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix |
Constructor Detail |
public DTD()
Method Detail |
public short getNodeType()
getNodeType
in interface Node
getNodeType
in class XMLNode
public java.lang.String getNodeName()
getNodeName
in interface Node
getNodeName
in class XMLNode
public java.lang.String getName()
DOCTYPE
keyword.getName
in interface DocumentType
public NamedNodeMap getEntities()
NamedNodeMap
containing the general entities, both external and internal, declared in the DTD. Duplicates are discarded. For example in:<!DOCTYPE ex SYSTEM "ex.dtd" [ <!ENTITY foo "foo"> <!ENTITY bar "bar"> <!ENTITY % baz "baz">]> <ex/> the interface provides access to foo
and bar
but not baz
. Every node in this map also implements the Entity
interface.entities
cannot be altered in any way.getEntities
in interface DocumentType
public NamedNodeMap getNotations()
NamedNodeMap
containing the notations declared in the DTD. Duplicates are discarded. Every node in this map also implements the Notation
interface.notations
cannot be altered in any way.getNotations
in interface DocumentType
public NamedNodeMap getElementDecls()
NamedNodeMap
containing the element declarations in the DTD. Every node in this map is an ElementDecl
object.elementdecls
cannot be altered in any way.public boolean hasChildNodes()
hasChildNodes
in interface Node
hasChildNodes
in class XMLNode
false
as DTD node can not have any children,public java.lang.String getPublicId()
null
.getPublicId
in interface DocumentType
public java.lang.String getSystemId()
null
.getSystemId
in interface DocumentType
getSystemId
in class XMLNode
public java.lang.String getInternalSubset()
getInternalSubset
in interface DocumentType
public Document getOwnerDocument()
Document
object associated with this node. This is also the Document
object used to create new nodes. When this node is a Document
this is null
.getOwnerDocument
in interface Node
getOwnerDocument
in class XMLNode
public void setRootTag(java.lang.String root)
root
- the root tagpublic java.lang.String getRootTag()
public final Entity findEntity(java.lang.String n, boolean par)
n
- The name of the entity.Entity
object; returns null if it is not found.public final ElementDecl findElementDecl(java.lang.String name)
name
- The tag name.public final Notation findNotation(java.lang.String name)
name
- The name of the notation.Notation
object; returns null if it is not found.public XMLDocument convertDTD2Schema()
public void printExternalDTD(java.io.PrintWriter out) throws java.io.IOException
out
- PrintWriter
to write tojava.io.IOException
- if an error occurspublic void printExternalDTD(java.io.OutputStream out) throws java.io.IOException
out
- OutputStream
to write tojava.io.IOException
- if an error occurspublic void printExternalDTD(java.io.OutputStream out, java.lang.String enc) throws java.io.IOException
out
- OutputStream
to write toenc
- Encoding to use for the outputjava.io.IOException
- if an invalid encoding was specified or if any other error occurspublic void writeExternal(java.io.ObjectOutput outArg) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
writeExternal
in class XMLNode
outArg
- The ObjectOutput stream used to write the serialized/ compressed stream.java.io.IOException
- is thrown when there is an exception while writing the serialized/compressed stream.public void readExternal(java.io.ObjectInput inArg) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
readExternal
in class XMLNode
inArg
- the ObjectInput stream used for reading the compressed stream.java.io.IOException
- is thrown when there is an error in reading the input stream.java.lang.ClassNotFoundException
- is thrown when the class is not found.
|
Oracle® Application Server XML Java API Reference 10g Release 3 (10.1.3) B28238-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |