Class MathMLContentContainerImpl
java.lang.Object
org.apache.xerces.dom.NodeImpl
org.apache.xerces.dom.ChildNode
org.apache.xerces.dom.ParentNode
org.apache.xerces.dom.ElementImpl
org.apache.xerces.dom.ElementNSImpl
org.episteme.core.mathematics.loaders.mathml.MathMLElementImpl
org.episteme.core.mathematics.loaders.mathml.MathMLContentContainerImpl
- All Implemented Interfaces:
Serializable, Cloneable, Element, ElementTraversal, EventTarget, MathMLContainer, MathMLContentContainer, MathMLContentElement, MathMLElement, MathMLNodeList, Node, NodeList, TypeInfo
- Direct Known Subclasses:
MathMLApplyElementImpl, MathMLBvarElementImpl, MathMLFnElementImpl, MathMLListElementImpl, MathMLSetElementImpl
Implements a MathML content container.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Field Summary
Fields inherited from class org.apache.xerces.dom.ElementNSImpl
localName, namespaceURIFields inherited from class org.apache.xerces.dom.ElementImpl
attributes, nameFields inherited from class org.apache.xerces.dom.ParentNode
firstChild, fNodeListCache, ownerDocumentFields inherited from class org.apache.xerces.dom.ChildNode
nextSibling, previousSiblingFields 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_NODEFields 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_NODEFields inherited from interface TypeInfo
DERIVATION_EXTENSION, DERIVATION_LIST, DERIVATION_RESTRICTION, DERIVATION_UNION -
Constructor Summary
ConstructorsConstructorDescriptionMathMLContentContainerImpl(MathMLDocumentImpl owner, String qualifiedName) Constructs a MathML content container. -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteArgument(int index) Deletes the argument at the specified index.voiddeleteBoundVariable(int index) Deletes the bound variable at the specified index.voiddeleteDeclaration(int index) Deletes the declaration at the specified index.getArgument(int index) Returns the argument at the specified index.Returns a list of arguments.getBoundVariable(int index) Returns the bound variable at the specified index.Returns theconditionchild element.getDeclaration(int index) Returns the declaration at the specified index.Returns a list of declarations.Returns thedomainofapplicationchild element.Returns themomentaboutchild element.intReturns the number of arguments.intReturns the number of bound variables.protected NodegetNodeByName(String name) Finds a child node by its local name.Returns thedegreechild element.insertArgument(MathMLElement newArgument, int index) Inserts a new argument at the specified index.insertBoundVariable(MathMLBvarElement newBvar, int index) Inserts a new bound variable at the specified index.insertDeclaration(MathMLDeclareElement newDeclaration, int index) Inserts a new declaration at the specified index.removeArgument(int index) Removes the argument at the specified index.removeBoundVariable(int index) Removes the bound variable at the specified index.removeDeclaration(int index) Removes the declaration at the specified index.setArgument(MathMLElement newArgument, int index) Sets the argument at the specified index.setBoundVariable(MathMLBvarElement newBvar, int index) Sets the bound variable at the specified index.voidsetCondition(MathMLConditionElement condition) Sets theconditionchild element.setDeclaration(MathMLDeclareElement newDeclaration, int index) Sets the declaration at the specified index.voidsetDomainOfApplication(MathMLElement domainOfApplication) Sets thedomainofapplicationchild element.voidsetMomentAbout(MathMLElement momentAbout) Sets themomentaboutchild element.protected voidsetNodeByName(Node newNode, String name) Replaces the child node with the given local name.voidsetOpDegree(MathMLElement opDegree) Sets thedegreechild element.Methods inherited from class MathMLElementImpl
getClassName, getHref, getId, getMathElementStyle, getOwnerMathElement, getXref, setClassName, setHref, setId, setMathElementStyle, setXrefMethods inherited from class org.apache.xerces.dom.ElementNSImpl
getLocalName, getNamespaceURI, getPrefix, getTypeName, getTypeNamespace, getXMLBaseAttribute, isDerivedFrom, setPrefix, setTypeMethods inherited from class org.apache.xerces.dom.ElementImpl
cloneNode, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getBaseURI, getChildElementCount, getDefaultAttributes, getElementsByTagName, getElementsByTagNameNS, getFirstElementChild, getLastElementChild, getNextElementSibling, getNodeName, getNodeType, getPreviousElementSibling, getSchemaTypeInfo, getTagName, getXercesAttribute, hasAttribute, hasAttributeNS, hasAttributes, isEqualNode, normalize, reconcileDefaultAttributes, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setOwnerDocument, setReadOnly, setupDefaultAttributes, setXercesAttributeNode, synchronizeDataMethods inherited from class org.apache.xerces.dom.ParentNode
getChildNodes, getChildNodesUnoptimized, getFirstChild, getLastChild, getLength, getOwnerDocument, getTextContent, hasChildNodes, insertBefore, item, removeChild, replaceChild, setTextContent, synchronizeChildrenMethods inherited from class org.apache.xerces.dom.ChildNode
getNextSibling, getParentNode, getPreviousSiblingMethods inherited from class org.apache.xerces.dom.NodeImpl
addEventListener, appendChild, changed, changes, compareDocumentPosition, compareTreePosition, dispatchEvent, getContainer, getFeature, getNodeNumber, getNodeValue, getReadOnly, getUserData, getUserData, getUserDataRecord, isDefaultNamespace, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, needsSyncChildren, removeEventListener, setNodeValue, setUserData, setUserData, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Element
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNSMethods inherited from interface MathMLElement
getClassName, getHref, getId, getMathElementStyle, getOwnerMathElement, getXref, setClassName, setHref, setId, setMathElementStyle, setXrefMethods 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
-
MathMLContentContainerImpl
Constructs a MathML content container.- Parameters:
owner- the MathML document that owns this elementqualifiedName- the qualified name of the element type
-
-
Method Details
-
getCondition
Returns theconditionchild element.- Specified by:
getConditionin interfaceMathMLContentContainer- Returns:
- the condition element
-
setCondition
Sets theconditionchild element.- Specified by:
setConditionin interfaceMathMLContentContainer- Parameters:
condition- the condition element to set- Throws:
DOMException- if the condition element cannot be set
-
getOpDegree
Returns thedegreechild element.- Specified by:
getOpDegreein interfaceMathMLContentContainer- Returns:
- the degree element
-
setOpDegree
Sets thedegreechild element.- Specified by:
setOpDegreein interfaceMathMLContentContainer- Parameters:
opDegree- the degree element to set- Throws:
DOMException- if the degree element cannot be set
-
getDomainOfApplication
Returns thedomainofapplicationchild element.- Specified by:
getDomainOfApplicationin interfaceMathMLContentContainer- Returns:
- the domain of application element
-
setDomainOfApplication
Sets thedomainofapplicationchild element.- Specified by:
setDomainOfApplicationin interfaceMathMLContentContainer- Parameters:
domainOfApplication- the domain of application element to set- Throws:
DOMException- if the element cannot be set
-
getMomentAbout
Returns themomentaboutchild element.- Specified by:
getMomentAboutin interfaceMathMLContentContainer- Returns:
- the moment about element
-
setMomentAbout
Sets themomentaboutchild element.- Specified by:
setMomentAboutin interfaceMathMLContentContainer- Parameters:
momentAbout- the moment about element to set- Throws:
DOMException- if the element cannot be set
-
getNBoundVariables
public int getNBoundVariables()Returns the number of bound variables.- Specified by:
getNBoundVariablesin interfaceMathMLContentContainer- Returns:
- the number of bound variables
-
getBoundVariable
Returns the bound variable at the specified index.- Specified by:
getBoundVariablein interfaceMathMLContentContainer- Parameters:
index- the index of the bound variable (1-based)- Returns:
- the bound variable
-
setBoundVariable
Sets the bound variable at the specified index.- Specified by:
setBoundVariablein interfaceMathMLContentContainer- Parameters:
newBvar- the new bound variable to setindex- the index of the bound variable (1-based)- Returns:
- the new bound variable
- Throws:
DOMException- if the bound variable cannot be set
-
insertBoundVariable
public MathMLBvarElement insertBoundVariable(MathMLBvarElement newBvar, int index) throws DOMException Inserts a new bound variable at the specified index.- Specified by:
insertBoundVariablein interfaceMathMLContentContainer- Parameters:
newBvar- the new bound variable to insertindex- the index where to insert (0 for start)- Returns:
- the new bound variable
- Throws:
DOMException- if the bound variable cannot be inserted
-
removeBoundVariable
Removes the bound variable at the specified index.- Specified by:
removeBoundVariablein interfaceMathMLContentContainer- Parameters:
index- the index of the bound variable to remove (1-based)- Returns:
- the removed bound variable
-
deleteBoundVariable
public void deleteBoundVariable(int index) Deletes the bound variable at the specified index.- Specified by:
deleteBoundVariablein interfaceMathMLContentContainer- Parameters:
index- the index of the bound variable to delete (1-based)
-
getNArguments
public int getNArguments()Returns the number of arguments.- Specified by:
getNArgumentsin interfaceMathMLContainer- Returns:
- the number of arguments
-
getArguments
Returns a list of arguments.- Specified by:
getArgumentsin interfaceMathMLContainer- Returns:
- the argument list
-
getDeclarations
Returns a list of declarations.- Specified by:
getDeclarationsin interfaceMathMLContainer- Returns:
- the declaration list
-
getArgument
Returns the argument at the specified index.- Specified by:
getArgumentin interfaceMathMLContainer- Parameters:
index- the index of the argument to retrieve (1-based)- Returns:
- the argument
- Throws:
DOMException- INDEX_SIZE_ERR if the index is out of bounds
-
setArgument
Sets the argument at the specified index.- Specified by:
setArgumentin interfaceMathMLContainer- Parameters:
newArgument- the new argument to setindex- the index where to set (1-based)- Returns:
- the new argument
- Throws:
DOMException- INDEX_SIZE_ERR if the index is out of bounds
-
insertArgument
Inserts a new argument at the specified index.- Specified by:
insertArgumentin interfaceMathMLContainer- Parameters:
newArgument- the new argument to insertindex- the index where to insert (0 for end)- Returns:
- the inserted argument
- Throws:
DOMException- INDEX_SIZE_ERR if the index is out of bounds
-
removeArgument
Removes the argument at the specified index.- Specified by:
removeArgumentin interfaceMathMLContainer- Parameters:
index- the index of the argument to remove (1-based)- Returns:
- the removed argument
- Throws:
DOMException- INDEX_SIZE_ERR if the index is out of bounds
-
deleteArgument
Deletes the argument at the specified index.- Specified by:
deleteArgumentin interfaceMathMLContainer- Parameters:
index- the index of the argument to delete (1-based)- Throws:
DOMException- INDEX_SIZE_ERR if the index is out of bounds
-
getDeclaration
Returns the declaration at the specified index.- Specified by:
getDeclarationin interfaceMathMLContainer- Parameters:
index- the index of the declaration (1-based)- Returns:
- the declaration element
- Throws:
DOMException- INDEX_SIZE_ERR if the index is out of bounds
-
setDeclaration
public MathMLDeclareElement setDeclaration(MathMLDeclareElement newDeclaration, int index) throws DOMException Sets the declaration at the specified index.- Specified by:
setDeclarationin interfaceMathMLContainer- Parameters:
newDeclaration- the new declaration to setindex- the index where to set (1-based)- Returns:
- the new declaration
- Throws:
DOMException- INDEX_SIZE_ERR if the index is out of bounds
-
insertDeclaration
public MathMLDeclareElement insertDeclaration(MathMLDeclareElement newDeclaration, int index) throws DOMException Inserts a new declaration at the specified index.- Specified by:
insertDeclarationin interfaceMathMLContainer- Parameters:
newDeclaration- the new declaration to insertindex- the index where to insert (0 for end)- Returns:
- the inserted declaration
- Throws:
DOMException- INDEX_SIZE_ERR if the index is out of bounds
-
removeDeclaration
Removes the declaration at the specified index.- Specified by:
removeDeclarationin interfaceMathMLContainer- Parameters:
index- the index of the declaration to remove (1-based)- Returns:
- the removed declaration
- Throws:
DOMException- INDEX_SIZE_ERR if the index is out of bounds
-
deleteDeclaration
Deletes the declaration at the specified index.- Specified by:
deleteDeclarationin interfaceMathMLContainer- Parameters:
index- the index of the declaration to delete (1-based)- Throws:
DOMException- INDEX_SIZE_ERR if the index is out of bounds
-
getNodeByName
-
setNodeByName
-