Package org.w3c.dom.mathml
Interface MathMLContainer
-
- All Known Subinterfaces:
MathMLActionElement,MathMLApplyElement,MathMLBvarElement,MathMLContentContainer,MathMLEncloseElement,MathMLFencedElement,MathMLFnElement,MathMLLambdaElement,MathMLListElement,MathMLMathElement,MathMLPaddedElement,MathMLPresentationContainer,MathMLSetElement,MathMLStyleElement,MathMLTableCellElement
- All Known Implementing Classes:
AbstractContainer,AbstractElementWithDelegates,AbstractTableElement,AbstractTableRow,Maction,MathImpl,Menclose,Merror,Mfenced,Mlabeledtr,Mpadded,Mphantom,Mrow,Mstyle,Mtable,Mtd,Mtr,Semantics
public interface MathMLContainerThis is an abstract interface containing functionality required by MathML elements that may contain arbitrarily many child elements. No elements are directly supported by this interface; all instances are instances of either MathMLPresentationContainer, MathMLContentContainer, or MathMLMathElement.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddeleteArgument(int index)This method deletes the index-th child element that is an argument of this element.voiddeleteDeclaration(int index)This method deletes the MathMLDeclareElement representing the index-th declare child element of this element.MathMLElementgetArgument(int index)This method returns the indexth child argument element of this element.MathMLNodeListgetArguments()This attribute accesses the child MathMLElements of this element which are arguments of it, as a MathMLNodeList.MathMLDeclareElementgetDeclaration(int index)This method retrieves the index-th child declare element of this element.MathMLNodeListgetDeclarations()Provides access to the declare elements which are children of this element, in a MathMLNodeList.intgetNArguments()The number of child elements of this element which represent arguments of the element, as opposed to qualifiers or declare elements.MathMLElementinsertArgument(MathMLElement newArgument, int index)This method inserts newArgument before the current index-th argument of this element.MathMLDeclareElementinsertDeclaration(MathMLDeclareElement newDeclaration, int index)This method inserts newDeclaration before the current index-th child declare element of this element.MathMLElementremoveArgument(int index)This method deletes the index-th child element that is an argument of this element, and returns it to the caller.MathMLDeclareElementremoveDeclaration(int index)This method removes the MathMLDeclareElement representing the index-th declare child element of this element, and returns it to the caller.MathMLElementsetArgument(MathMLElement newArgument, int index)This method sets newArgument as the index-th argument of this element.MathMLDeclareElementsetDeclaration(MathMLDeclareElement newDeclaration, int index)This method inserts newDeclaration as the index-th child declaration of this element.
-
-
-
Method Detail
-
getNArguments
int getNArguments()
The number of child elements of this element which represent arguments of the element, as opposed to qualifiers or declare elements. Thus for a MathMLContentContainer it does not contain elements representing bound variables, conditions, separators, degrees, or upper or lower limits (bvar, condition, sep, degree, lowlimit, or uplimit).- Returns:
- value of the nArguments attribute.
-
getArguments
MathMLNodeList getArguments()
This attribute accesses the child MathMLElements of this element which are arguments of it, as a MathMLNodeList. Note that this list does not contain any MathMLElements representing qualifier elements or declare elements.- Returns:
- value of the arguments attribute.
-
getDeclarations
MathMLNodeList getDeclarations()
Provides access to the declare elements which are children of this element, in a MathMLNodeList. All Nodes in this list must be MathMLDeclareElements.- Returns:
- value of the declarations attribute.
-
getArgument
MathMLElement getArgument(int index) throws org.w3c.dom.DOMException
This method returns the indexth child argument element of this element. This frequently differs from the value of Node::childNodes().item(index), as qualifier elements and declare elements are not counted.- Parameters:
index- The one-based index of the argument to be retrieved.- Returns:
- A MathMLElement representing the index-th argument of this element.
- Throws:
org.w3c.dom.DOMException- INDEX_SIZE_ERR: Raised if index is greater than the number of child elements.
-
setArgument
MathMLElement setArgument(MathMLElement newArgument, int index) throws org.w3c.dom.DOMException
This method sets newArgument as the index-th argument of this element. If there is currently an index-th argument, it is replaced by newArgument. This frequently differs from setting the node at Node::childNodes().item(index), as qualifier elements and declare elements are not counted.- Parameters:
newArgument- A MathMLElement representing the element that is to be set as the index-th argument of this element.index- The index of the argument that is to be set to newArgument. The first argument is numbered 1. If index is one more than the current number of arguments, a new argument is appended.- Returns:
- The MathMLElement child of this element that represents the new argument in the DOM.
- Throws:
org.w3c.dom.DOMException- HIERARCHY_REQUEST_ERR: Raised if this element does not permit a child element of the type of newArgument, if this is a MathMLContentContainer and newArgument is a qualifier element, or if newElement is a MathMLDeclareElement. INDEX_SIZE_ERR: Raised if index is greater than one more than the number of child elements.
-
insertArgument
MathMLElement insertArgument(MathMLElement newArgument, int index) throws org.w3c.dom.DOMException
This method inserts newArgument before the current index-th argument of this element. If index is 0, or if index is one more than the current number of arguments, newArgument is appended as the last argument. This frequently differs from setting the node at Node::childNodes().item(index), as qualifier elements and declare elements are not counted.- Parameters:
newArgument- A MathMLElement representing the element that is to be inserted as a child argument of this element.index- The one-based index of the position before which newArgument is to be inserted. The first argument is numbered 1.- Returns:
- The MathMLElement child of this element that represents the new argument in the DOM.
- Throws:
org.w3c.dom.DOMException- HIERARCHY_REQUEST_ERR: Raised if this element does not permit a child argument of the type of newArgument, or, for MathMLContentContainers, if newArgument represents a qualifier element. INDEX_SIZE_ERR: Raised if index is greater than one more than the number of child arguments.
-
deleteArgument
void deleteArgument(int index) throws org.w3c.dom.DOMExceptionThis method deletes the index-th child element that is an argument of this element. Note that child elements which are qualifier elements or declare elements are not counted in determining the index-th argument.- Parameters:
index- The one-based index of the argument to be deleted.- Throws:
org.w3c.dom.DOMException- INDEX_SIZE_ERR: Raised if index is greater than the number of child elements.
-
removeArgument
MathMLElement removeArgument(int index) throws org.w3c.dom.DOMException
This method deletes the index-th child element that is an argument of this element, and returns it to the caller. Note that child elements that are qualifier elements or declare elements are not counted in determining the index-th argument.- Parameters:
index- The one-based index of the argument to be removed.- Returns:
- A MathMLElement representing the argument being removed.
- Throws:
org.w3c.dom.DOMException- INDEX_SIZE_ERR: Raised if index is greater than the number of child elements.
-
getDeclaration
MathMLDeclareElement getDeclaration(int index) throws org.w3c.dom.DOMException
This method retrieves the index-th child declare element of this element.- Parameters:
index- A one-based index into the list of child declare elements of this element giving the position of the declare element to be retrieved.- Returns:
- The MathMLDeclareElement representing the index-th child declare.
- Throws:
org.w3c.dom.DOMException- INDEX_SIZE_ERR: Raised if index is greater than the number of child declare elements.
-
setDeclaration
MathMLDeclareElement setDeclaration(MathMLDeclareElement newDeclaration, int index) throws org.w3c.dom.DOMException
This method inserts newDeclaration as the index-th child declaration of this element. If there is already an index-th declare child element, it is replaced by newDeclaration.- Parameters:
newDeclaration- A MathMLDeclareElement to be inserted as the index-th child declare element.index- A one-based index into the list of child declare elements of this element giving the position into which newDeclaration is to be inserted. If index is one more than the number of declare children of this element, newDeclaration is appended as the last declare child.- Returns:
- The MathMLDeclareElement being inserted.
- Throws:
org.w3c.dom.DOMException- INDEX_SIZE_ERR: Raised if index is greater than one more than the number of child declare elements. HIERARCHY_REQUEST_ERR: Raised if this element does not permit child declare elements.
-
insertDeclaration
MathMLDeclareElement insertDeclaration(MathMLDeclareElement newDeclaration, int index) throws org.w3c.dom.DOMException
This method inserts newDeclaration before the current index-th child declare element of this element. If index is 0, newDeclaration is appended as the last child declare element.- Parameters:
newDeclaration- A MathMLDeclareElement to be inserted as the index-th child declare element.index- A one-based index into the list of child declare elements of this element giving the position before which newDeclaration is to be inserted. If index is 0 or if it is one more than the number of child declare children, newDeclaration is appended as the last child declare element.- Returns:
- The MathMLDeclareElement child of this element representing newDeclaration in the DOM.
- Throws:
org.w3c.dom.DOMException- INDEX_SIZE_ERR: Raised if index is greater than one more than the number of child declare elements. HIERARCHY_REQUEST_ERR: Raised if this element does not permit child declare elements.
-
removeDeclaration
MathMLDeclareElement removeDeclaration(int index) throws org.w3c.dom.DOMException
This method removes the MathMLDeclareElement representing the index-th declare child element of this element, and returns it to the caller. Note that index is the position in the list of declare element children, as opposed to the position in the list of all child Nodes.- Parameters:
index- The one-based index of the declare element to be removed.- Returns:
- The MathMLDeclareElement being removed as a child Node of this element.
- Throws:
org.w3c.dom.DOMException- INDEX_SIZE_ERR: Raised if index is greater than the number of child declare elements.
-
deleteDeclaration
void deleteDeclaration(int index) throws org.w3c.dom.DOMExceptionThis method deletes the MathMLDeclareElement representing the index-th declare child element of this element. Note that index is the position in the list of declare element children, as opposed to the position in the list of all child Nodes.- Parameters:
index- The one-based index of the declare element to be removed.- Throws:
org.w3c.dom.DOMException- INDEX_SIZE_ERR: Raised if index is greater than the number of child declare elements.
-
-