|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.crimson.tree.NodeBase org.apache.crimson.tree.Doctype
Class representing a DTD in DOM Level 1; this class exists purely for editor support, and is of dubious interest otherwise.
Nested Class Summary | |
(package private) static class |
Doctype.EntityNode
|
(package private) static class |
Doctype.Nodemap
|
(package private) static class |
Doctype.NotationNode
|
Field Summary | |
private Doctype.Nodemap |
entities
|
private String |
internalSubset
|
private String |
name
|
private Doctype.Nodemap |
notations
|
(package private) XmlDocument |
ownerDocument
|
private String |
publicId
|
(package private) boolean |
readonly
|
private String |
systemId
|
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 |
Constructor Summary | |
(package private) |
Doctype(String pub,
String sys,
String subset)
XXX Obsolete, but keep it for backwards compatibility |
(package private) |
Doctype(String name,
String publicId,
String systemId,
String internalSubset)
New DOM Level 2 constructor |
Method Summary | |
(package private) void |
addEntityNode(String name,
String value)
Adds an entity node for an internal parsed entity. |
(package private) void |
addEntityNode(String name,
String pub,
String sys,
String not)
Adds an entity node for an external entity, which could be parsed or unparsed. |
(package private) void |
addNotation(String name,
String pub,
String sys)
Adds a notation node. |
org.w3c.dom.Node |
appendChild(org.w3c.dom.Node newChild)
DOM: Throws a HIERARCHY_REQUEST_ERR DOMException. |
org.w3c.dom.Node |
cloneNode(boolean deep)
Only implement shallow clone for now, which is allowed in DOM Level 2. |
org.w3c.dom.NamedNodeMap |
getAttributes()
DOM: returns null. |
org.w3c.dom.NodeList |
getChildNodes()
DOM: Returns an object which permits "live" access to all this node's children. |
org.w3c.dom.NamedNodeMap |
getEntities()
DOM: Returns the internal, external, and unparsed entities declared in this DTD. |
org.w3c.dom.Node |
getFirstChild()
DOM: Returns null. |
int |
getIndexOf(org.w3c.dom.Node maybeChild)
Returns the index of the node in the list of children, such that item() will return that child. |
String |
getInheritedAttribute(String name)
Returns the value of a given attribute, tracing up through ancestors if needed. |
String |
getInternalSubset()
The internal subset as a string. |
String |
getLanguage()
Returns the language id (value of xml:lang
attribute) applicable to this node, if known. |
org.w3c.dom.Node |
getLastChild()
DOM: returns null. |
int |
getLength()
DOM: Returns zero. |
String |
getLocalName()
DOM2: returns null. |
(package private) String |
getMessage(String messageId)
|
(package private) String |
getMessage(String messageId,
Object[] parameters)
|
String |
getName()
DOM: Returns the name declared for the document root node. |
String |
getNamespaceURI()
DOM2: returns null. |
org.w3c.dom.Node |
getNextSibling()
DOM: Returns the node immediately following this node in a breadth first traversal of the tree, or null if there is no such sibling. |
String |
getNodeName()
DOM: Returns the name declared for the document root node. |
short |
getNodeType()
DOM: Returns DOCUMENT_TYPE_NODE |
String |
getNodeValue()
DOM: Returns null; overridden by subclasses as needed. |
org.w3c.dom.NamedNodeMap |
getNotations()
DOM: Returns the notations declared in this DTD. |
org.w3c.dom.Document |
getOwnerDocument()
DOM: Returns the document to which this node belongs. |
(package private) ParentNode |
getParentImpl()
|
org.w3c.dom.Node |
getParentNode()
DOM: Returns the node's parent. |
String |
getPrefix()
DOM2: returns null. |
org.w3c.dom.Node |
getPreviousSibling()
DOM: Returns the node immediately preceding this node in a breadth first traversal of the tree, or null if there is no such sibling. |
String |
getPublicId()
The public identifier of the external subset. |
String |
getSystemId()
The system identifier of the external subset. |
boolean |
hasAttributes()
Returns whether this node (if it is an element) has any attributes. |
boolean |
hasChildNodes()
DOM: Returns false. |
org.w3c.dom.Node |
insertBefore(org.w3c.dom.Node newChild,
org.w3c.dom.Node refChild)
DOM: Throws a HIERARCHY_REQUEST_ERR DOMException. |
boolean |
isReadonly()
Method to allow easy determination of whether a node is read only. |
boolean |
isSupported(String feature,
String version)
DOM2: |
org.w3c.dom.Node |
item(int i)
DOM: Returns null. |
void |
normalize()
DOM2: noop. |
org.w3c.dom.Node |
removeChild(org.w3c.dom.Node oldChild)
DOM: Throws a HIERARCHY_REQUEST_ERR DOMException. |
org.w3c.dom.Node |
replaceChild(org.w3c.dom.Node newChild,
org.w3c.dom.Node refChild)
DOM: Throws a HIERARCHY_REQUEST_ERR DOMException. |
void |
setNodeValue(String value)
DOM: does nothing; overridden by subclasses as needed. |
protected void |
setOwnerDocument(XmlDocument doc)
|
(package private) void |
setParentNode(ParentNode arg,
int index)
|
void |
setPrefix(String prefix)
DOM2: throws DOMException.NAMESPACE_ERR Overridden by subclasses that support namespaces. |
(package private) void |
setPrintInfo(String pub,
String sys,
String subset)
|
(package private) void |
setReadonly()
Marks the sets of entities and notations as readonly. |
void |
setReadonly(boolean deep)
Sets the node to be readonly; applies recursively to the children of this node if the parameter is true. |
void |
writeChildrenXml(XmlWriteContext context)
Does nothing; this type of node has no children. |
void |
writeXml(XmlWriteContext context)
Writes out a textual DTD, trusting that any internal subset text is in fact well formed XML. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.w3c.dom.Node |
appendChild, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix |
Field Detail |
private String name
private Doctype.Nodemap entities
private Doctype.Nodemap notations
private String publicId
private String systemId
private String internalSubset
XmlDocument ownerDocument
boolean readonly
Constructor Detail |
Doctype(String pub, String sys, String subset)
Doctype(String name, String publicId, String systemId, String internalSubset)
Method Detail |
void setPrintInfo(String pub, String sys, String subset)
public void writeXml(XmlWriteContext context) throws IOException
writeXml
in interface XmlWritable
IOException
public short getNodeType()
getNodeType
in interface org.w3c.dom.Node
public String getName()
getName
in interface org.w3c.dom.DocumentType
public String getNodeName()
getNodeName
in interface org.w3c.dom.Node
public org.w3c.dom.Node cloneNode(boolean deep)
cloneNode
in interface org.w3c.dom.Node
public org.w3c.dom.NamedNodeMap getEntities()
getEntities
in interface org.w3c.dom.DocumentType
public org.w3c.dom.NamedNodeMap getNotations()
getNotations
in interface org.w3c.dom.DocumentType
public String getPublicId()
getPublicId
in interface org.w3c.dom.DocumentType
public String getSystemId()
getSystemId
in interface org.w3c.dom.DocumentType
public String getInternalSubset()
getInternalSubset
in interface org.w3c.dom.DocumentType
protected void setOwnerDocument(XmlDocument doc)
setOwnerDocument
in class NodeBase
void addNotation(String name, String pub, String sys)
void addEntityNode(String name, String pub, String sys, String not)
void addEntityNode(String name, String value)
void setReadonly()
ParentNode getParentImpl()
public boolean isReadonly()
NodeEx
isReadonly
in interface NodeEx
true
if the node is read onlypublic void setReadonly(boolean deep)
NodeEx
setReadonly
in interface NodeEx
deep
- If true
recursively set the nodes in the
subtree under the current node to be read only.
If false
then set only the current node to be
readonlypublic String getLanguage()
xml:lang
attribute) applicable to this node, if known. Traces up
through ancestors as needed.
getLanguage
in interface NodeEx
public String getInheritedAttribute(String name)
getInheritedAttribute
in interface NodeEx
name
- identifies the attribute; colons may be included,
but namespace prefixes are not interpreted
public void writeChildrenXml(XmlWriteContext context) throws IOException
writeChildrenXml
in interface XmlWritable
IOException
public org.w3c.dom.Node getParentNode()
getParentNode
in interface org.w3c.dom.Node
void setParentNode(ParentNode arg, int index) throws org.w3c.dom.DOMException
org.w3c.dom.DOMException
public org.w3c.dom.Document getOwnerDocument()
getOwnerDocument
in interface org.w3c.dom.Node
public boolean hasChildNodes()
hasChildNodes
in interface org.w3c.dom.Node
public void setNodeValue(String value)
setNodeValue
in interface org.w3c.dom.Node
public String getNodeValue()
getNodeValue
in interface org.w3c.dom.Node
public org.w3c.dom.Node getFirstChild()
getFirstChild
in interface org.w3c.dom.Node
public int getLength()
getLength
in interface org.w3c.dom.NodeList
public org.w3c.dom.Node item(int i)
item
in interface org.w3c.dom.NodeList
public org.w3c.dom.NodeList getChildNodes()
In this implementation, nodes provide such access without needing another node as an intermediary; "this" is returned.
getChildNodes
in interface org.w3c.dom.Node
public org.w3c.dom.Node getLastChild()
getLastChild
in interface org.w3c.dom.Node
public org.w3c.dom.Node appendChild(org.w3c.dom.Node newChild) throws org.w3c.dom.DOMException
appendChild
in interface org.w3c.dom.Node
org.w3c.dom.DOMException
- thrown always.public org.w3c.dom.Node insertBefore(org.w3c.dom.Node newChild, org.w3c.dom.Node refChild) throws org.w3c.dom.DOMException
insertBefore
in interface org.w3c.dom.Node
org.w3c.dom.DOMException
- thrown always.public org.w3c.dom.Node replaceChild(org.w3c.dom.Node newChild, org.w3c.dom.Node refChild) throws org.w3c.dom.DOMException
replaceChild
in interface org.w3c.dom.Node
org.w3c.dom.DOMException
- thrown always.public org.w3c.dom.Node removeChild(org.w3c.dom.Node oldChild) throws org.w3c.dom.DOMException
removeChild
in interface org.w3c.dom.Node
org.w3c.dom.DOMException
- thrown always.public org.w3c.dom.Node getNextSibling()
getNextSibling
in interface org.w3c.dom.Node
public org.w3c.dom.Node getPreviousSibling()
getPreviousSibling
in interface org.w3c.dom.Node
public org.w3c.dom.NamedNodeMap getAttributes()
getAttributes
in interface org.w3c.dom.Node
public void normalize()
normalize
in interface org.w3c.dom.Node
public boolean isSupported(String feature, String version)
isSupported
in interface org.w3c.dom.Node
public String getNamespaceURI()
getNamespaceURI
in interface org.w3c.dom.Node
public String getPrefix()
getPrefix
in interface org.w3c.dom.Node
public void setPrefix(String prefix) throws org.w3c.dom.DOMException
setPrefix
in interface org.w3c.dom.Node
org.w3c.dom.DOMException
public String getLocalName()
getLocalName
in interface org.w3c.dom.Node
public boolean hasAttributes()
hasAttributes
in interface org.w3c.dom.Node
public int getIndexOf(org.w3c.dom.Node maybeChild)
NodeEx
getIndexOf
in interface NodeEx
maybeChild
- the node which may be a child of this one
String getMessage(String messageId)
String getMessage(String messageId, Object[] parameters)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |