|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.beasys.commerce.util.dom.DOMBase | +--com.beasys.commerce.util.dom.NodeImpl | +--com.beasys.commerce.util.dom.CharacterDataImpl
An implementation of the W3C's DOM CharacterData object.
Subclasses need to implement cloneNode(), getNodeType(), and getNodeName().
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 | |
CharacterDataImpl(org.w3c.dom.Document doc,
org.w3c.dom.Node parent,
java.lang.String data)
Constructor. |
Method Summary | |
void |
appendData(java.lang.String data)
Append data to the character data. |
protected void |
checkCount(int count)
Check that the given count is valid for editing operations on this character data. |
protected void |
checkOffset(int offset)
Check that the given offset is valid for editing operations on this character data. |
void |
deleteData(int offset,
int count)
Remove a range of character data. |
java.lang.String |
getData()
Get the character data. |
int |
getLength()
Get the length of the character data. |
java.lang.String |
getNodeValue()
Get the node value. |
void |
insertData(int offset,
java.lang.String data)
Insert new character data. |
void |
replaceData(int offset,
int count,
java.lang.String data)
Replace the character data at offset/count with the new data. |
void |
setData(java.lang.String data)
Set the character data. |
void |
setNodeValue(java.lang.String value)
Set the node value. |
java.lang.String |
substringData(int offset,
int count)
Extract a range of the character data. |
Methods inherited from class com.beasys.commerce.util.dom.NodeImpl |
allowsChildren, appendChild, appendChildren, checkAllowChild, cloneNode, cloneNode, getAllowableChildrenTypes, getAttributes, getChildNodes, getFirstChild, getLastChild, getNextSibling, getNodeName, getNodeType, getNodeType, getParentNode, getPreviousSibling, hasChildNodes, insertBefore, insertChildrenBefore, isAncestor, removeChild, replaceChild, setParentNode |
Methods inherited from class com.beasys.commerce.util.dom.DOMBase |
checkOwnerDocument, checkReadOnly, getOwnerDocument, isReadOnly, setReadOnly |
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, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getNextSibling, getNodeName, getNodeType, getOwnerDocument, getParentNode, getPreviousSibling, hasChildNodes, insertBefore, removeChild, replaceChild |
Constructor Detail |
public CharacterDataImpl(org.w3c.dom.Document doc, org.w3c.dom.Node parent, java.lang.String data)
doc
- the owning document.parent
- the parent node.data
- the character data.Method Detail |
public java.lang.String getNodeValue()
For all subclasses of CharacterData, the node value is the character data.
getNodeValue
in interface org.w3c.dom.Node
getNodeValue
in class NodeImpl
getData()
public void setNodeValue(java.lang.String value)
For all subclasses of CharacterData, the node value is the character data.
setNodeValue
in interface org.w3c.dom.Node
setNodeValue
in class NodeImpl
setData(java.lang.String)
public java.lang.String getData()
getData
in interface org.w3c.dom.CharacterData
public void setData(java.lang.String data) throws org.w3c.dom.DOMException
setData
in interface org.w3c.dom.CharacterData
org.w3c.dom.DOMException
- thrown if the node is readonlypublic int getLength()
getLength
in interface org.w3c.dom.CharacterData
public void appendData(java.lang.String data) throws org.w3c.dom.DOMException
appendData
in interface org.w3c.dom.CharacterData
data
- the new character data.org.w3c.dom.DOMException
- thrown if the node is readonlyprotected void checkOffset(int offset)
org.w3c.dom.DOMException
- thrown if the offset is invalid.protected void checkCount(int count)
org.w3c.dom.DOMException
- thrown if the count is invalid.public void deleteData(int offset, int count) throws org.w3c.dom.DOMException
deleteData
in interface org.w3c.dom.CharacterData
offset
- the offset in the character data to start removing at.count
- the number of charactere to remove.org.w3c.dom.DOMException
- thrown if the data cannot be removed.public void insertData(int offset, java.lang.String data) throws org.w3c.dom.DOMException
insertData
in interface org.w3c.dom.CharacterData
offset
- the offset in the character data to add at.data
- the data to add.org.w3c.dom.DOMException
- thrown if the character data cannot be added.public void replaceData(int offset, int count, java.lang.String data) throws org.w3c.dom.DOMException
replaceData
in interface org.w3c.dom.CharacterData
offset
- the offset in the character data to start replacing at.count
- the number of characters to replace.data
- the data to add.org.w3c.dom.DOMException
- thrown if the data cannot be replaced.public java.lang.String substringData(int offset, int count) throws org.w3c.dom.DOMException
substringData
in interface org.w3c.dom.CharacterData
offset
- the offset to start at.count
- the number of character to return.org.w3c.dom.DOMException
- thrown if the character data cannot be
retrieved.
|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |