Class PMRCharacterDataImpl
java.lang.Object
org.episteme.natural.chemistry.loaders.cml.dom.pmr.PMRNodeImpl
org.episteme.natural.chemistry.loaders.cml.dom.pmr.PMRCharacterDataImpl
- All Implemented Interfaces:
CharacterData, Node
- Direct Known Subclasses:
PMRCommentImpl, PMRTextImpl
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Field Summary
Fields inherited from class PMRNodeImpl
childNodes, delegateNode, parentNode, pmrDocument, siblingNodesFields inherited from interface Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new PMRCharacterDataImpl object.PMRCharacterDataImpl(CharacterData cd, PMRDocument doc) Creates a new PMRCharacterDataImpl object. -
Method Summary
Modifier and TypeMethodDescriptionvoidappendData(String s) Appends a string to the end of the character data.voiddeleteData(int i, int j) Deletes a range of characters from the node.getData()Returns the character data of the node.intReturns the number of characters in the node.voidinsertData(int i, String s) Inserts a string at the specified offset.voidreplaceData(int i, int j, String s) Replaces a range of characters with a new string.voidSets the new character data for the node.substringData(int i, int j) Returns a specified substring of the character data.Methods inherited from class PMRNodeImpl
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getDelegateNode, getDelegateParentNode, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setDelegateNode, setNodeValue, setOwnerDocument, setOwnerDocumentRecursively, setPrefix, setTextContent, setUserData, toString, wrapRecursivelyMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
-
Constructor Details
-
PMRCharacterDataImpl
public PMRCharacterDataImpl()Creates a new PMRCharacterDataImpl object. -
PMRCharacterDataImpl
Creates a new PMRCharacterDataImpl object.- Parameters:
cd- the generic W3C character data to delegate todoc- the owner CML document
-
-
Method Details
-
deleteData
public void deleteData(int i, int j) Deletes a range of characters from the node.- Specified by:
deleteDatain interfaceCharacterData- Parameters:
i- the character offset at which to start deletingj- the number of characters to delete
-
getData
Returns the character data of the node.- Specified by:
getDatain interfaceCharacterData- Returns:
- the character data
-
substringData
Returns a specified substring of the character data.- Specified by:
substringDatain interfaceCharacterData- Parameters:
i- the offset of the first character to extractj- the number of characters to extract- Returns:
- the specified substring
-
appendData
Appends a string to the end of the character data.- Specified by:
appendDatain interfaceCharacterData- Parameters:
s- the string to append
-
setData
Sets the new character data for the node.- Specified by:
setDatain interfaceCharacterData- Parameters:
s- the new character data
-
getLength
public int getLength()Returns the number of characters in the node.- Specified by:
getLengthin interfaceCharacterData- Returns:
- the character count
-
replaceData
Replaces a range of characters with a new string.- Specified by:
replaceDatain interfaceCharacterData- Parameters:
i- the offset at which to start replacingj- the number of characters to replaces- the replacement string
-
insertData
Inserts a string at the specified offset.- Specified by:
insertDatain interfaceCharacterData- Parameters:
i- the character offset at which to inserts- the string to insert
-