org.jscience.io.mathml
Class MathMLDocumentJScienceImpl

java.lang.Object
  extended by org.apache.xerces.dom.NodeImpl
      extended by org.apache.xerces.dom.ChildNode
          extended by org.apache.xerces.dom.ParentNode
              extended by org.apache.xerces.dom.CoreDocumentImpl
                  extended by org.apache.xerces.dom.DocumentImpl
                      extended by org.jscience.ml.mathml.MathMLDocumentImpl
                          extended by org.jscience.io.mathml.MathMLDocumentJScienceImpl
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, org.w3c.dom.Document, org.w3c.dom.events.DocumentEvent, org.w3c.dom.events.EventTarget, MathMLDocument, org.w3c.dom.Node, org.w3c.dom.NodeList, org.w3c.dom.ranges.DocumentRange, org.w3c.dom.traversal.DocumentTraversal

public class MathMLDocumentJScienceImpl
extends MathMLDocumentImpl

The MathMLDocumentJscienceImpl class encapsulates an entire MathML document.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.xerces.dom.DocumentImpl
eventListeners, iterators, mutationEvents, ranges
 
Fields inherited from class org.apache.xerces.dom.CoreDocumentImpl
actualEncoding, allowGrammarAccess, changes, docElement, docType, encoding, errorChecking, fDocumentURI, identifiers, standalone, userData, version, xmlVersionChanged
 
Fields inherited from class org.apache.xerces.dom.ParentNode
firstChild, fNodeListCache, ownerDocument
 
Fields inherited from class org.apache.xerces.dom.ChildNode
nextSibling, previousSibling
 
Fields inherited from class org.apache.xerces.dom.NodeImpl
DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_IS_CONTAINED, DOCUMENT_POSITION_PRECEDING, ELEMENT_DEFINITION_NODE, FIRSTCHILD, flags, HASSTRING, ID, IGNORABLEWS, NORMALIZED, OWNED, ownerNode, READONLY, SPECIFIED, SYNCCHILDREN, SYNCDATA, TREE_POSITION_ANCESTOR, TREE_POSITION_DESCENDANT, TREE_POSITION_DISCONNECTED, TREE_POSITION_EQUIVALENT, TREE_POSITION_FOLLOWING, TREE_POSITION_PRECEDING, TREE_POSITION_SAME_NODE
 
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
 
Constructor Summary
MathMLDocumentJScienceImpl()
          Constructs a MathML document.
 
Method Summary
 org.w3c.dom.Element createApply(MathMLExpression expr)
          Creates a MathML operator/function element (<apply>).
 org.w3c.dom.Element createApply(java.lang.String op, org.w3c.dom.DocumentFragment args)
          Creates a MathML operator/function element (<apply>).
 org.w3c.dom.Element createMatrix(ComplexMatrix m)
          Creates a MathML matrix element (<matrix>).
 org.w3c.dom.Element createMatrix(DoubleMatrix m)
          Creates a MathML matrix element (<matrix>).
 org.w3c.dom.Element createMatrix(IntegerMatrix m)
          Creates a MathML matrix element (<matrix>).
 org.w3c.dom.Element createNumber(Complex z)
          Creates a MathML number element (<cn>).
 org.w3c.dom.Element createNumber(double x)
          Creates a MathML number element (<cn>).
 org.w3c.dom.Element createNumber(int i)
          Creates a MathML number element (<cn>).
 org.w3c.dom.Element createSet(FiniteSet s)
          Creates a MathML set element (<set>).
 org.w3c.dom.Element createVariable(java.lang.Object obj)
          Creates a MathML variable element (<ci>).
 org.w3c.dom.Element createVariable(java.lang.Object obj, java.lang.String type)
          Creates a MathML variable element (<ci>).
 org.w3c.dom.Element createVector(ComplexVector v)
          Creates a MathML vector element (<vector>).
 org.w3c.dom.Element createVector(DoubleVector v)
          Creates a MathML vector element (<vector>).
 org.w3c.dom.Element createVector(IntegerVector v)
          Creates a MathML vector element (<vector>).
 void print(java.io.Writer out)
          Prints this MathML document to a stream.
 
Methods inherited from class org.jscience.ml.mathml.MathMLDocumentImpl
createElementNS, createElementNS, getDoctype, getDocumentElement, getDomain, getReferrer, getURI
 
Methods inherited from class org.apache.xerces.dom.DocumentImpl
addEventListener, cloneNode, copyEventListeners, createEvent, createNodeIterator, createNodeIterator, createRange, createTreeWalker, createTreeWalker, dispatchAggregateEvents, dispatchAggregateEvents, dispatchEvent, dispatchEventToSubtree, dispatchingEventToSubtree, getEventListeners, getImplementation, removeEventListener, saveEnclosingAttr, setEventListeners
 
Methods inherited from class org.apache.xerces.dom.CoreDocumentImpl
abort, adoptNode, changed, changes, checkDOMNSErr, checkNamespaceWF, checkQName, clearIdentifiers, clone, cloneNode, createAttribute, createAttributeNS, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createDocumentType, createElement, createElementDefinition, createEntity, createEntityReference, createNotation, createProcessingInstruction, createTextNode, getAsync, getBaseURI, getDocumentURI, getDomConfig, getElementById, getElementsByTagName, getElementsByTagNameNS, getEncoding, getErrorChecking, getFeature, getIdentifier, getIdentifiers, getInputEncoding, getNodeName, getNodeNumber, getNodeNumber, getNodeType, getOwnerDocument, getStandalone, getStrictErrorChecking, getTextContent, getUserData, getUserData, getUserDataRecord, getVersion, getXmlEncoding, getXmlStandalone, getXmlVersion, importNode, insertBefore, isKidOK, isValidQName, isXMLName, load, loadXML, normalizeDocument, putIdentifier, removeChild, removeIdentifier, renameNode, replaceChild, saveXML, setAsync, setDocumentURI, setEncoding, setErrorChecking, setInputEncoding, setStandalone, setStrictErrorChecking, setTextContent, setUserData, setUserData, setVersion, setXmlEncoding, setXmlStandalone, setXmlVersion, undeferChildren
 
Methods inherited from class org.apache.xerces.dom.ParentNode
getChildNodes, getChildNodesUnoptimized, getFirstChild, getLastChild, getLength, hasChildNodes, isEqualNode, item, normalize, setReadOnly, synchronizeChildren
 
Methods inherited from class org.apache.xerces.dom.ChildNode
getNextSibling, getParentNode, getPreviousSibling
 
Methods inherited from class org.apache.xerces.dom.NodeImpl
addEventListener, appendChild, compareDocumentPosition, compareTreePosition, dispatchEvent, getAttributes, getContainer, getLocalName, getNamespaceURI, getNodeValue, getPrefix, getReadOnly, getUserData, getUserData, getUserDataRecord, hasAttributes, isDefaultNamespace, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, needsSyncChildren, removeEventListener, setNodeValue, setPrefix, setUserData, setUserData, synchronizeData, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.Document
adoptNode, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createEntityReference, createProcessingInstruction, createTextNode, getDocumentURI, getDomConfig, getElementById, getElementsByTagName, getElementsByTagNameNS, getImplementation, getInputEncoding, getStrictErrorChecking, getXmlEncoding, getXmlStandalone, getXmlVersion, importNode, normalizeDocument, renameNode, setDocumentURI, setStrictErrorChecking, setXmlStandalone, setXmlVersion
 
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
 

Constructor Detail

MathMLDocumentJScienceImpl

public MathMLDocumentJScienceImpl()
Constructs a MathML document.

Method Detail

createNumber

public org.w3c.dom.Element createNumber(double x)
Creates a MathML number element (<cn>).

Parameters:
x - DOCUMENT ME!
Returns:
DOCUMENT ME!

createNumber

public org.w3c.dom.Element createNumber(int i)
Creates a MathML number element (<cn>).

Parameters:
i - DOCUMENT ME!
Returns:
DOCUMENT ME!

createNumber

public org.w3c.dom.Element createNumber(Complex z)
Creates a MathML number element (<cn>).

Parameters:
z - DOCUMENT ME!
Returns:
DOCUMENT ME!

createVariable

public org.w3c.dom.Element createVariable(java.lang.Object obj)
Creates a MathML variable element (<ci>).

Parameters:
obj - DOCUMENT ME!
Returns:
DOCUMENT ME!

createVariable

public org.w3c.dom.Element createVariable(java.lang.Object obj,
                                          java.lang.String type)
Creates a MathML variable element (<ci>).

Parameters:
obj - DOCUMENT ME!
type - DOCUMENT ME!
Returns:
DOCUMENT ME!

createVector

public org.w3c.dom.Element createVector(DoubleVector v)
Creates a MathML vector element (<vector>).

Parameters:
v - DOCUMENT ME!
Returns:
DOCUMENT ME!

createVector

public org.w3c.dom.Element createVector(IntegerVector v)
Creates a MathML vector element (<vector>).

Parameters:
v - DOCUMENT ME!
Returns:
DOCUMENT ME!

createVector

public org.w3c.dom.Element createVector(ComplexVector v)
Creates a MathML vector element (<vector>).

Parameters:
v - DOCUMENT ME!
Returns:
DOCUMENT ME!

createMatrix

public org.w3c.dom.Element createMatrix(DoubleMatrix m)
Creates a MathML matrix element (<matrix>).

Parameters:
m - DOCUMENT ME!
Returns:
DOCUMENT ME!

createMatrix

public org.w3c.dom.Element createMatrix(IntegerMatrix m)
Creates a MathML matrix element (<matrix>).

Parameters:
m - DOCUMENT ME!
Returns:
DOCUMENT ME!

createMatrix

public org.w3c.dom.Element createMatrix(ComplexMatrix m)
Creates a MathML matrix element (<matrix>).

Parameters:
m - DOCUMENT ME!
Returns:
DOCUMENT ME!

createSet

public org.w3c.dom.Element createSet(FiniteSet s)
Creates a MathML set element (<set>).

Parameters:
s - DOCUMENT ME!
Returns:
DOCUMENT ME!

createApply

public org.w3c.dom.Element createApply(java.lang.String op,
                                       org.w3c.dom.DocumentFragment args)
Creates a MathML operator/function element (<apply>).

Parameters:
op - a MathML tag name (plus, minus, times, divide, etc).
args - DOCUMENT ME!
Returns:
DOCUMENT ME!

createApply

public org.w3c.dom.Element createApply(MathMLExpression expr)
Creates a MathML operator/function element (<apply>).

Parameters:
expr - a MathMLExpression object.
Returns:
DOCUMENT ME!

print

public void print(java.io.Writer out)
           throws java.io.IOException
Prints this MathML document to a stream.

Parameters:
out - DOCUMENT ME!
Throws:
java.io.IOException - DOCUMENT ME!