org.w3c.dom.mathml
Interface MathMLSemanticsElement

All Superinterfaces:
Element, MathMLElement, Node
All Known Implementing Classes:
Semantics

public interface MathMLSemanticsElement
extends MathMLElement

This interface represents the semantics element in MathML.


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 deleteAnnotation(int index)
          A convenience method to delete the index-th alternate content associated with this semantics element.
 MathMLElement getAnnotation(int index)
          This method gives access to the index-th alternate content associated with a semantics element.
 MathMLElement getBody()
          This attribute represents the first child of the semantics element, i.e. the child giving the primary content represented by the element.
 int getNAnnotations()
          Represents the number of annotation or annotation-xml children of the semantics element, i.e. the number of alternate content forms for this element.
 MathMLElement insertAnnotation(MathMLElement newAnnotation, int index)
          This method inserts newAnnotation before the current index-th alternate content associated with a semantics element.
 MathMLElement removeAnnotation(int index)
          A convenience method to delete the index-th alternate content associated with this semantics element, and to return it to the caller.
 MathMLElement setAnnotation(MathMLElement newAnnotation, int index)
          This method allows setting or replacement of the index-th alternate content associated with a semantics element.
 void setBody(MathMLElement body)
          setter for the body 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

getBody

MathMLElement getBody()
This attribute represents the first child of the semantics element, i.e. the child giving the primary content represented by the element.

Returns:
value of the body attribute.

setBody

void setBody(MathMLElement body)
setter for the body attribute.

Parameters:
body - new value for body.
See Also:
getBody()

getNAnnotations

int getNAnnotations()
Represents the number of annotation or annotation-xml children of the semantics element, i.e. the number of alternate content forms for this element.

Returns:
value of the nAnnotations attribute.

getAnnotation

MathMLElement getAnnotation(int index)
This method gives access to the index-th alternate content associated with a semantics element.

Parameters:
index - The one-based index of the annotation being retrieved.
Returns:
The MathMLAnnotationElement or MathMLXMLAnnotationElement representing the index-th annotation or annotation-xml child of the semantics element. Note that all child elements of a semantics element other than the first are required to be of one of these types.

insertAnnotation

MathMLElement insertAnnotation(MathMLElement newAnnotation,
                               int index)
                               throws DOMException
This method inserts newAnnotation before the current index-th alternate content associated with a semantics element. If index is 0, newAnnotation is appended as the last annotation or annotation-xml child of this element.

Parameters:
newAnnotation - A MathMLAnnotationElement or MathMLXMLAnnotationElement representing the new annotation or annotation-xml to be inserted.
index - The position in the list of annotation or annotation-xml children before which newAnnotation is to be inserted. The first annotation is numbered 1.
Returns:
The MathMLAnnotationElement or MathMLXMLAnnotationElement child of this element that represents the new annotation in the DOM.
Throws:
DOMException - HIERARCHY_REQUEST_ERR: Raised if newAnnotation is not a MathMLAnnotationElement or MathMLXMLAnnotationElement. INDEX_SIZE_ERR: Raised if index is greater than the current number of annotation or annotation-xml children of this semantics element.

setAnnotation

MathMLElement setAnnotation(MathMLElement newAnnotation,
                            int index)
                            throws DOMException
This method allows setting or replacement of the index-th alternate content associated with a semantics element. If there is already an annotation or annotation-xml element with this index, it is replaced by newAnnotation.

Parameters:
newAnnotation - A MathMLAnnotationElement or MathMLXMLAnnotationElement representing the new value of the index-th annotation or annotation-xml child of this semantics element.
index - The position in the list of annotation or annotation-xml children of this semantics element that is to be occupied by newAnnotation. The first annotation element is numbered 1.
Returns:
The MathMLAnnotationElement or MathMLXMLAnnotationElement child of this element that represents the new annotation in the DOM.
Throws:
DOMException - HIERARCHY_REQUEST_ERR: Raised if newAnnotation is not a MathMLAnnotationElement or MathMLXMLAnnotationElement. INDEX_SIZE_ERR: Raised if index is greater than one more than the current number of annotation or annotation-xml children of this semantics element.

deleteAnnotation

void deleteAnnotation(int index)
A convenience method to delete the index-th alternate content associated with this semantics element.

Parameters:
index - The one-based index of the annotation being deleted.

removeAnnotation

MathMLElement removeAnnotation(int index)
A convenience method to delete the index-th alternate content associated with this semantics element, and to return it to the caller.

Parameters:
index - The one-based index of the annotation being deleted.
Returns:
The MathMLAnnotationElement or MathMLXMLAnnotationElement being deleted.


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