|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.crimson.tree.NodeBase
org.apache.crimson.tree.DataNode
org.apache.crimson.tree.TextNode
Node representing XML text.
Subclasses should not currently attempt to modify the representation of content, but may add new methods to support more sophisticated access or manipulation of that content.
| Nested Class Summary | |
(package private) static class |
DataNode.NodeListImpl
|
| Field Summary | |
(package private) static DataNode.NodeListImpl |
childNodes
|
(package private) char[] |
data
|
(package private) XmlDocument |
ownerDocument
|
(package private) boolean |
readonly
|
| 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 | |
TextNode()
Constructs a text object with no text and unattached to any document. |
|
TextNode(char[] buf,
int offset,
int len)
Constructs text object by copying text from the input buffer. |
|
TextNode(String s)
Constructs a text object by copying text from the string. |
|
| Method Summary | |
org.w3c.dom.Node |
appendChild(org.w3c.dom.Node newChild)
DOM: Throws a HIERARCHY_REQUEST_ERR DOMException. |
void |
appendData(String newData)
DOM: Appends the string to the existing stored data. |
org.w3c.dom.Node |
cloneNode(boolean deep)
DOM: returns a new text node with the same contents as this one. |
void |
deleteData(int offset,
int count)
DOM: Removes a range of characters from the text. |
org.w3c.dom.NamedNodeMap |
getAttributes()
DOM: returns null. |
org.w3c.dom.NodeList |
getChildNodes()
DOM: Returns the children of this node. |
String |
getData()
DOM: Returns the text data as a string. |
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 |
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 the length of the node's data. |
String |
getLocalName()
DOM2: returns null. |
(package private) String |
getMessage(String messageId)
|
(package private) String |
getMessage(String messageId,
Object[] parameters)
|
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 string "#text". |
short |
getNodeType()
DOM: Returns the TEXT_NODE node type constant. |
String |
getNodeValue()
DOM: Returns the node's character data. |
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. |
char[] |
getText()
Returns the text of the node. |
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. |
void |
insertData(int offset,
String newData)
DOM: Inserts the given data into the existing stored data at the specified offset. |
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 |
joinNextText()
Combines this text node with its next sibling to create a single text node. |
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 |
replaceData(int offset,
int count,
String arg)
DOM: Replaces count characters starting at the specified offset in the data with the characters from the specified arg. |
void |
setData(String data)
DOM: Assigns the text data. |
void |
setNodeValue(String value)
DOM: Assigns the node's character data. |
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. |
void |
setReadonly(boolean deep)
Sets the node to be readonly; applies recursively to the children of this node if the parameter is true. |
void |
setText(char[] buf)
Assigns the text of the node. |
org.w3c.dom.Text |
splitText(int offset)
DOM: Splits this text node into two, returning the part beginning at offset. |
String |
substringData(int offset,
int count)
DOM: Returns the specified substring of the data in this node. |
String |
toString()
Returns the contents of this text as a String. |
void |
writeChildrenXml(XmlWriteContext context)
Does nothing; this type of node has no children. |
void |
writeXml(XmlWriteContext context)
Writes the text, escaping XML metacharacters as needed to let this text be parsed again without change. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.w3c.dom.CharacterData |
appendData, deleteData, getData, getLength, insertData, replaceData, setData, substringData |
| 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 |
char[] data
static DataNode.NodeListImpl childNodes
XmlDocument ownerDocument
boolean readonly
| Constructor Detail |
public TextNode()
public TextNode(char[] buf,
int offset,
int len)
public TextNode(String s)
| Method Detail |
public void writeXml(XmlWriteContext context)
throws IOException
writeXml in interface XmlWritableIOExceptionpublic void joinNextText()
public short getNodeType()
getNodeType in interface org.w3c.dom.Node
public org.w3c.dom.Text splitText(int offset)
throws org.w3c.dom.DOMException
splitText in interface org.w3c.dom.Textorg.w3c.dom.DOMExceptionpublic org.w3c.dom.Node cloneNode(boolean deep)
cloneNode in interface org.w3c.dom.Nodepublic String getNodeName()
getNodeName in interface org.w3c.dom.Nodepublic char[] getText()
public void setText(char[] buf)
public String toString()
toString in class Objectpublic String getData()
getData in interface org.w3c.dom.CharacterDatapublic void setData(String data)
setData in interface org.w3c.dom.CharacterDatapublic int getLength()
getLength in interface org.w3c.dom.CharacterDatagetLength in class NodeBase
public String substringData(int offset,
int count)
throws org.w3c.dom.DOMException
substringData in interface org.w3c.dom.CharacterDataorg.w3c.dom.DOMExceptionpublic void appendData(String newData)
appendData in interface org.w3c.dom.CharacterData
public void insertData(int offset,
String newData)
throws org.w3c.dom.DOMException
insertData in interface org.w3c.dom.CharacterDataorg.w3c.dom.DOMException
public void deleteData(int offset,
int count)
throws org.w3c.dom.DOMException
deleteData in interface org.w3c.dom.CharacterDataorg.w3c.dom.DOMException
public void replaceData(int offset,
int count,
String arg)
throws org.w3c.dom.DOMException
replaceData in interface org.w3c.dom.CharacterDataorg.w3c.dom.DOMExceptionpublic org.w3c.dom.NodeList getChildNodes()
getChildNodes in interface org.w3c.dom.NodegetChildNodes in class NodeBasepublic String getNodeValue()
getNodeValue in interface org.w3c.dom.NodegetNodeValue in class NodeBasepublic void setNodeValue(String value)
setNodeValue in interface org.w3c.dom.NodesetNodeValue in class NodeBaseParentNode getParentImpl()
public boolean isReadonly()
NodeEx
isReadonly in interface NodeEx true if the node is read onlypublic void setReadonly(boolean deep)
NodeEx
setReadonly in interface NodeExdeep - 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 NodeExpublic String getInheritedAttribute(String name)
getInheritedAttribute in interface NodeExname - identifies the attribute; colons may be included,
but namespace prefixes are not interpreted
public void writeChildrenXml(XmlWriteContext context)
throws IOException
writeChildrenXml in interface XmlWritableIOExceptionpublic 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.DOMExceptionprotected void setOwnerDocument(XmlDocument doc)
public org.w3c.dom.Document getOwnerDocument()
getOwnerDocument in interface org.w3c.dom.Nodepublic boolean hasChildNodes()
hasChildNodes in interface org.w3c.dom.Nodepublic org.w3c.dom.Node getFirstChild()
getFirstChild in interface org.w3c.dom.Nodepublic org.w3c.dom.Node item(int i)
item in interface org.w3c.dom.NodeListpublic 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.Nodeorg.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.Nodeorg.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.Nodeorg.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.Nodeorg.w3c.dom.DOMException - thrown always.public org.w3c.dom.Node getNextSibling()
getNextSibling in interface org.w3c.dom.Nodepublic org.w3c.dom.Node getPreviousSibling()
getPreviousSibling in interface org.w3c.dom.Nodepublic org.w3c.dom.NamedNodeMap getAttributes()
getAttributes in interface org.w3c.dom.Nodepublic void normalize()
normalize in interface org.w3c.dom.Node
public boolean isSupported(String feature,
String version)
isSupported in interface org.w3c.dom.Nodepublic String getNamespaceURI()
getNamespaceURI in interface org.w3c.dom.Nodepublic 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.Nodeorg.w3c.dom.DOMExceptionpublic String getLocalName()
getLocalName in interface org.w3c.dom.Nodepublic boolean hasAttributes()
hasAttributes in interface org.w3c.dom.Nodepublic int getIndexOf(org.w3c.dom.Node maybeChild)
NodeEx
getIndexOf in interface NodeExmaybeChild - 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 | |||||||||