Class MathMLDocumentImpl

java.lang.Object
org.apache.xerces.dom.NodeImpl
org.apache.xerces.dom.ChildNode
org.apache.xerces.dom.ParentNode
org.apache.xerces.dom.CoreDocumentImpl
org.apache.xerces.dom.DocumentImpl
org.episteme.core.mathematics.loaders.mathml.MathMLDocumentImpl
All Implemented Interfaces:
Serializable, Cloneable, Document, DocumentEvent, EventTarget, MathMLDocument, Node, NodeList, DocumentRange, DocumentTraversal
Direct Known Subclasses:
MathMLDocumentEpistemeImpl

public class MathMLDocumentImpl extends org.apache.xerces.dom.DocumentImpl implements MathMLDocument
Implements a MathML document.
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
See Also:
  • Constructor Details

    • MathMLDocumentImpl

      public MathMLDocumentImpl()
      Creates a new MathMLDocumentImpl object.
  • Method Details

    • getDoctype

      public DocumentType getDoctype()
      Returns the Document Type Definition (DTD) associated with this document.
      Specified by:
      getDoctype in interface Document
      Overrides:
      getDoctype in class org.apache.xerces.dom.CoreDocumentImpl
      Returns:
      the document type
    • getDocumentElement

      public Element getDocumentElement()
      Returns the root element of the MathML document. If no root element exists, a new "math" element is created.
      Specified by:
      getDocumentElement in interface Document
      Overrides:
      getDocumentElement in class org.apache.xerces.dom.CoreDocumentImpl
      Returns:
      the root element
    • createElementNS

      public Element createElementNS(String namespaceURI, String qualifiedName, String localpart) throws DOMException
      Creates an element of the given qualified name and namespace URI (Xerces specific).
      Overrides:
      createElementNS in class org.apache.xerces.dom.CoreDocumentImpl
      Parameters:
      namespaceURI - the namespace URI of the element to create
      qualifiedName - the qualified name of the element type to instantiate
      localpart - the local part of the qualified name
      Returns:
      a new Element object
      Throws:
      DOMException - if the element cannot be created
    • createElementNS

      public Element createElementNS(String namespaceURI, String qualifiedName) throws DOMException
      Creates an element of the given qualified name and namespace URI. Special handling is provided for MathML elements to instantiate specific implementation classes.
      Specified by:
      createElementNS in interface Document
      Overrides:
      createElementNS in class org.apache.xerces.dom.CoreDocumentImpl
      Parameters:
      namespaceURI - the namespace URI of the element to create
      qualifiedName - the qualified name of the element type to instantiate
      Returns:
      a new Element object
      Throws:
      DOMException - if the element cannot be created
      IllegalStateException - if an internal error occurs during instantiation
    • getReferrer

      public String getReferrer()
      Returns the referrer of the document.
      Specified by:
      getReferrer in interface MathMLDocument
      Returns:
      the referrer URL, or null if not applicable
    • getDomain

      public String getDomain()
      Returns the domain of the document.
      Specified by:
      getDomain in interface MathMLDocument
      Returns:
      the domain name, or null if not applicable
    • getURI

      public String getURI()
      Returns the URI of the document.
      Specified by:
      getURI in interface MathMLDocument
      Returns:
      the document URI, or null if not applicable