org.w3c.dom.mathml
Interface MathMLContentToken

All Superinterfaces:
Element, MathMLContentElement, MathMLElement, Node
All Known Subinterfaces:
MathMLCiElement, MathMLCnElement, MathMLCsymbolElement

public interface MathMLContentToken
extends MathMLContentElement

This is the interface from which the interfaces representing the MathML Content token elements (ci, cn and csymbol) are derived. These elements may contain MathML Presentation elements, Text nodes, or a combination of both. Thus the getArgument and insertArgument methods have been provided to deal with this distinction between these elements and other MathML Content elements.


Field Summary
 
Fields inherited from interface org.w3c.dom.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
 
Method Summary
 void deleteArgument(int index)
          A convenience method to delete the argument child located at the position referenced by index.
 Node getArgument(int index)
          A convenience method to retrieve the child argument at the position referenced by index.
 MathMLNodeList getArguments()
          The arguments of this element, returned as a MathMLNodeList.
 String getDefinitionURL()
          A URI pointing to a semantic definition for this content element.
 String getEncoding()
          A string describing the syntax in which the definition located at definitionURL is given.
 Node insertArgument(Node newArgument, int index)
          A convenience method to insert newArgument before the current index-th argument child of this element.
 Node removeArgument(int index)
          A convenience method to delete the argument child located at the position referenced by index, and to return it to the caller.
 Node setArgument(Node newArgument, int index)
          A convenience method to set an argument child at the position referenced by index.
 void setDefinitionURL(String definitionURL)
          setter for the definitionURL attribute.
 void setEncoding(String encoding)
          setter for the encoding attribute.
 
Methods inherited from interface org.w3c.dom.mathml.MathMLElement
getClassName, getHref, getId, getMathElementStyle, getOwnerMathElement, getXref, setClassName, setHref, setId, setMathElementStyle, setXref
 
Methods inherited from interface org.w3c.dom.Element
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS
 
Methods inherited from interface org.w3c.dom.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
 

Method Detail

getArguments

MathMLNodeList getArguments()
The arguments of this element, returned as a MathMLNodeList. Note that this is not necessarily the same as Node::childNodes, particularly in the case of the cn element. The reason is that the sep elements that are used to separate the arguments of a cn are not returned.

Returns:
value of the arguments attribute.

getDefinitionURL

String getDefinitionURL()
A URI pointing to a semantic definition for this content element. Note that there is no stipulation about the form this definition may take!

Returns:
value of the definitionURL attribute.

setDefinitionURL

void setDefinitionURL(String definitionURL)
setter for the definitionURL attribute.

Parameters:
definitionURL - new value for definitionURL.
See Also:
getDefinitionURL()

getEncoding

String getEncoding()
A string describing the syntax in which the definition located at definitionURL is given.

Returns:
value of the encoding attribute.

setEncoding

void setEncoding(String encoding)
setter for the encoding attribute.

Parameters:
encoding - new value for encoding.
See Also:
getEncoding()

getArgument

Node getArgument(int index)
A convenience method to retrieve the child argument at the position referenced by index. Note that this is not necessarily the same as the index-th child Node of this Element; in particular, sep elements will not be counted.

Parameters:
index - Position of desired argument in the list of arguments. The first argument is numbered 1.
Returns:
The Node retrieved.

insertArgument

Node insertArgument(Node newArgument,
                    int index)
A convenience method to insert newArgument before the current index-th argument child of this element. If index is 0, newArgument is appended as the last argument.

Parameters:
newArgument - Node to be inserted as the index-th argument. This will either be a MathMLElement or a Text node.
index - Position before which newArgument is to be inserted. The first argument is numbered 1.Note that this is not necessarily the index of the Node in the list of child nodes, as nodes representing such elements as sep are not counted as arguments.
newArgument - Node to be inserted as the index-th argument. This will either be a MathMLElement or a Text node.
Returns:
The Node inserted. This is the element within the DOM.

setArgument

Node setArgument(Node newArgument,
                 int index)
A convenience method to set an argument child at the position referenced by index. If there is currently an argument at this position, it is replaced by newArgument.

Parameters:
newArgument - Node to be inserted as the argument. This will either be a MathMLElement or a Text node.
index - Position of the argument that is to be set to newArgument in the list of arguments. The first argument is numbered 1. Note that this is not necessarily the index of the Node in the list of child nodes, as nodes representing such elements as sep are not counted as arguments.
newArgument - Node to be inserted as the argument. This will either be a MathMLElement or a Text node.
Returns:
The Node inserted. This is the element within the DOM.

deleteArgument

void deleteArgument(int index)
A convenience method to delete the argument child located at the position referenced by index.

Parameters:
index - Position of the argument to be deleted from the list of arguments. The first argument is numbered 1.

removeArgument

Node removeArgument(int index)
A convenience method to delete the argument child located at the position referenced by index, and to return it to the caller.

Parameters:
index - Position of the argument to be deleted from the list of arguments. The first argument is numbered 1.
Returns:
A Node representing the deleted argument.


Copyright © 2002-2010 The JEuclid project. All Rights Reserved.