Class MathMLPresentationContainerImpl
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.MathMLPresentationContainerImpl
- All Implemented Interfaces:
Serializable, Cloneable, Element, ElementTraversal, EventTarget, MathMLContainer, MathMLElement, MathMLNodeList, MathMLPresentationContainer, MathMLPresentationElement, Node, NodeList, TypeInfo
- Direct Known Subclasses:
MathMLActionElementImpl, MathMLEncloseElementImpl, MathMLFencedElementImpl, MathMLPaddedElementImpl
public class MathMLPresentationContainerImpl
extends MathMLElementImpl
implements MathMLPresentationContainer
Implements a MathML presentation 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
ConstructorsConstructorDescriptionMathMLPresentationContainerImpl(MathMLDocumentImpl owner, String qualifiedName) Constructs a MathML presentation container. -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteArgument(int index) Deletes an argument at a specific index.voiddeleteDeclaration(int index) Deletes a declaration at a specific index.getArgument(int index) Gets a specific argument by index.Gets the list of arguments in this container.getDeclaration(int index) Gets a specific declaration by index.Gets the list of declarations in this container.intGets the number of arguments in this container.insertArgument(MathMLElement newArgument, int index) Inserts an argument at a specific index.insertDeclaration(MathMLDeclareElement newDeclaration, int index) Inserts a declaration at a specific index.removeArgument(int index) Removes an argument at a specific index.removeDeclaration(int index) Removes a declaration at a specific index.setArgument(MathMLElement newArgument, int index) Sets or replaces an argument at a specific index.setDeclaration(MathMLDeclareElement newDeclaration, int index) Sets or replaces a declaration at a specific index.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
-
MathMLPresentationContainerImpl
Constructs a MathML presentation container.- Parameters:
owner- the document that owns this elementqualifiedName- the qualified name of the element
-
-
Method Details
-
getNArguments
public int getNArguments()Gets the number of arguments in this container.- Specified by:
getNArgumentsin interfaceMathMLContainer- Returns:
- the argument count
-
getArguments
Gets the list of arguments in this container.- Specified by:
getArgumentsin interfaceMathMLContainer- Returns:
- the argument list
-
getDeclarations
Gets the list of declarations in this container.- Specified by:
getDeclarationsin interfaceMathMLContainer- Returns:
- the declaration list
-
getArgument
Gets a specific argument by index.- Specified by:
getArgumentin interfaceMathMLContainer- Parameters:
index- the 1-based index of the argument- Returns:
- the argument element
- Throws:
DOMException- if the index is out of bounds
-
setArgument
Sets or replaces an argument at a specific index.- Specified by:
setArgumentin interfaceMathMLContainer- Parameters:
newArgument- the new argument elementindex- the 1-based index (if index is length+1, it appends)- Returns:
- the replaced or appended element
- Throws:
DOMException- if the index is out of bounds
-
insertArgument
Inserts an argument at a specific index.- Specified by:
insertArgumentin interfaceMathMLContainer- Parameters:
newArgument- the new argument elementindex- the 1-based index to insert before (0 or length+1 appends)- Returns:
- the inserted element
- Throws:
DOMException- if the index is out of bounds
-
removeArgument
Removes an argument at a specific index.- Specified by:
removeArgumentin interfaceMathMLContainer- Parameters:
index- the 1-based index of the argument to remove- Returns:
- the removed element
- Throws:
DOMException- if the index is out of bounds
-
deleteArgument
Deletes an argument at a specific index.- Specified by:
deleteArgumentin interfaceMathMLContainer- Parameters:
index- the 1-based index of the argument to delete- Throws:
DOMException- if the index is out of bounds
-
getDeclaration
Gets a specific declaration by index.- Specified by:
getDeclarationin interfaceMathMLContainer- Parameters:
index- the 1-based index of the declaration- Returns:
- the declaration element
- Throws:
DOMException- if the index is out of bounds
-
setDeclaration
public MathMLDeclareElement setDeclaration(MathMLDeclareElement newDeclaration, int index) throws DOMException Sets or replaces a declaration at a specific index.- Specified by:
setDeclarationin interfaceMathMLContainer- Parameters:
newDeclaration- the new declaration elementindex- the 1-based index- Returns:
- the replaced or appended element
- Throws:
DOMException- if the index is out of bounds
-
insertDeclaration
public MathMLDeclareElement insertDeclaration(MathMLDeclareElement newDeclaration, int index) throws DOMException Inserts a declaration at a specific index.- Specified by:
insertDeclarationin interfaceMathMLContainer- Parameters:
newDeclaration- the new declaration elementindex- the 1-based index (0 or length+1 appends)- Returns:
- the inserted element
- Throws:
DOMException- if the index is out of bounds
-
removeDeclaration
Removes a declaration at a specific index.- Specified by:
removeDeclarationin interfaceMathMLContainer- Parameters:
index- the 1-based index of the declaration to remove- Returns:
- the removed element
- Throws:
DOMException- if the index is out of bounds
-
deleteDeclaration
Deletes a declaration at a specific index.- Specified by:
deleteDeclarationin interfaceMathMLContainer- Parameters:
index- the 1-based index of the declaration to delete- Throws:
DOMException- if the index is out of bounds
-