| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| MathMLContainer |
|
| 1.0;1 |
| 1 | /* | |
| 2 | * Copyright 2007 - 2007 JEuclid, http://jeuclid.sf.net | |
| 3 | * | |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
| 5 | * you may not use this file except in compliance with the License. | |
| 6 | * You may obtain a copy of the License at | |
| 7 | * | |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 | |
| 9 | * | |
| 10 | * Unless required by applicable law or agreed to in writing, software | |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 13 | * See the License for the specific language governing permissions and | |
| 14 | * limitations under the License. | |
| 15 | */ | |
| 16 | package org.w3c.dom.mathml; | |
| 17 | ||
| 18 | import org.w3c.dom.DOMException; | |
| 19 | ||
| 20 | /* | |
| 21 | * Please note: This file was automatically generated from the source of the | |
| 22 | * MathML specification. Do not edit it. If there are errors or missing | |
| 23 | * elements, please correct the stylesheet instead. | |
| 24 | */ | |
| 25 | ||
| 26 | /** | |
| 27 | * This is an abstract interface containing functionality required by MathML | |
| 28 | * elements that may contain arbitrarily many child elements. No elements are | |
| 29 | * directly supported by this interface; all instances are instances of either | |
| 30 | * MathMLPresentationContainer, MathMLContentContainer, or MathMLMathElement. | |
| 31 | * | |
| 32 | * | |
| 33 | */ | |
| 34 | public interface MathMLContainer { | |
| 35 | /** | |
| 36 | * The number of child elements of this element which represent arguments | |
| 37 | * of the element, as opposed to qualifiers or declare elements. Thus for | |
| 38 | * a MathMLContentContainer it does not contain elements representing | |
| 39 | * bound variables, conditions, separators, degrees, or upper or lower | |
| 40 | * limits (bvar, condition, sep, degree, lowlimit, or uplimit). | |
| 41 | * | |
| 42 | * @return value of the nArguments attribute. | |
| 43 | */ | |
| 44 | int getNArguments(); | |
| 45 | ||
| 46 | /** | |
| 47 | * This attribute accesses the child MathMLElements of this element which | |
| 48 | * are arguments of it, as a MathMLNodeList. Note that this list does not | |
| 49 | * contain any MathMLElements representing qualifier elements or declare | |
| 50 | * elements. | |
| 51 | * | |
| 52 | * @return value of the arguments attribute. | |
| 53 | */ | |
| 54 | MathMLNodeList getArguments(); | |
| 55 | ||
| 56 | /** | |
| 57 | * Provides access to the declare elements which are children of this | |
| 58 | * element, in a MathMLNodeList. All Nodes in this list must be | |
| 59 | * MathMLDeclareElements. | |
| 60 | * | |
| 61 | * @return value of the declarations attribute. | |
| 62 | */ | |
| 63 | MathMLNodeList getDeclarations(); | |
| 64 | ||
| 65 | /** | |
| 66 | * This method returns the indexth child argument element of this element. | |
| 67 | * This frequently differs from the value of | |
| 68 | * Node::childNodes().item(index), as qualifier elements and declare | |
| 69 | * elements are not counted. | |
| 70 | * | |
| 71 | * @param index | |
| 72 | * The one-based index of the argument to be retrieved. | |
| 73 | * @return A MathMLElement representing the index-th argument of this | |
| 74 | * element. | |
| 75 | * @throws DOMException | |
| 76 | * INDEX_SIZE_ERR: Raised if index is greater than the number | |
| 77 | * of child elements. | |
| 78 | */ | |
| 79 | MathMLElement getArgument(int index) throws DOMException; | |
| 80 | ||
| 81 | /** | |
| 82 | * This method sets newArgument as the index-th argument of this element. | |
| 83 | * If there is currently an index-th argument, it is replaced by | |
| 84 | * newArgument. This frequently differs from setting the node at | |
| 85 | * Node::childNodes().item(index), as qualifier elements and declare | |
| 86 | * elements are not counted. | |
| 87 | * | |
| 88 | * @param newArgument | |
| 89 | * A MathMLElement representing the element that is to be set | |
| 90 | * as the index-th argument of this element. | |
| 91 | * @param index | |
| 92 | * The index of the argument that is to be set to newArgument. | |
| 93 | * The first argument is numbered 1. If index is one more than | |
| 94 | * the current number of arguments, a new argument is appended. | |
| 95 | * @return The MathMLElement child of this element that represents the new | |
| 96 | * argument in the DOM. | |
| 97 | * @throws DOMException | |
| 98 | * HIERARCHY_REQUEST_ERR: Raised if this element does not | |
| 99 | * permit a child element of the type of newArgument, if this | |
| 100 | * is a MathMLContentContainer and newArgument is a qualifier | |
| 101 | * element, or if newElement is a MathMLDeclareElement. | |
| 102 | * INDEX_SIZE_ERR: Raised if index is greater than one more | |
| 103 | * than the number of child elements. | |
| 104 | */ | |
| 105 | MathMLElement setArgument(MathMLElement newArgument, int index) | |
| 106 | throws DOMException; | |
| 107 | ||
| 108 | /** | |
| 109 | * This method inserts newArgument before the current index-th argument of | |
| 110 | * this element. If index is 0, or if index is one more than the current | |
| 111 | * number of arguments, newArgument is appended as the last argument. This | |
| 112 | * frequently differs from setting the node at | |
| 113 | * Node::childNodes().item(index), as qualifier elements and declare | |
| 114 | * elements are not counted. | |
| 115 | * | |
| 116 | * @param newArgument | |
| 117 | * A MathMLElement representing the element that is to be | |
| 118 | * inserted as a child argument of this element. | |
| 119 | * @param index | |
| 120 | * The one-based index of the position before which newArgument | |
| 121 | * is to be inserted. The first argument is numbered 1. | |
| 122 | * @return The MathMLElement child of this element that represents the new | |
| 123 | * argument in the DOM. | |
| 124 | * @throws DOMException | |
| 125 | * HIERARCHY_REQUEST_ERR: Raised if this element does not | |
| 126 | * permit a child argument of the type of newArgument, or, for | |
| 127 | * MathMLContentContainers, if newArgument represents a | |
| 128 | * qualifier element. INDEX_SIZE_ERR: Raised if index is | |
| 129 | * greater than one more than the number of child arguments. | |
| 130 | */ | |
| 131 | MathMLElement insertArgument(MathMLElement newArgument, int index) | |
| 132 | throws DOMException; | |
| 133 | ||
| 134 | /** | |
| 135 | * This method deletes the index-th child element that is an argument of | |
| 136 | * this element. Note that child elements which are qualifier elements or | |
| 137 | * declare elements are not counted in determining the index-th argument. | |
| 138 | * | |
| 139 | * @param index | |
| 140 | * The one-based index of the argument to be deleted. | |
| 141 | * @throws DOMException | |
| 142 | * INDEX_SIZE_ERR: Raised if index is greater than the number | |
| 143 | * of child elements. | |
| 144 | */ | |
| 145 | void deleteArgument(int index) throws DOMException; | |
| 146 | ||
| 147 | /** | |
| 148 | * This method deletes the index-th child element that is an argument of | |
| 149 | * this element, and returns it to the caller. Note that child elements | |
| 150 | * that are qualifier elements or declare elements are not counted in | |
| 151 | * determining the index-th argument. | |
| 152 | * | |
| 153 | * @param index | |
| 154 | * The one-based index of the argument to be removed. | |
| 155 | * @return A MathMLElement representing the argument being removed. | |
| 156 | * @throws DOMException | |
| 157 | * INDEX_SIZE_ERR: Raised if index is greater than the number | |
| 158 | * of child elements. | |
| 159 | */ | |
| 160 | MathMLElement removeArgument(int index) throws DOMException; | |
| 161 | ||
| 162 | /** | |
| 163 | * This method retrieves the index-th child declare element of this | |
| 164 | * element. | |
| 165 | * | |
| 166 | * @param index | |
| 167 | * A one-based index into the list of child declare elements of | |
| 168 | * this element giving the position of the declare element to | |
| 169 | * be retrieved. | |
| 170 | * @return The MathMLDeclareElement representing the index-th child | |
| 171 | * declare. | |
| 172 | * @throws DOMException | |
| 173 | * INDEX_SIZE_ERR: Raised if index is greater than the number | |
| 174 | * of child declare elements. | |
| 175 | */ | |
| 176 | MathMLDeclareElement getDeclaration(int index) throws DOMException; | |
| 177 | ||
| 178 | /** | |
| 179 | * This method inserts newDeclaration as the index-th child declaration of | |
| 180 | * this element. If there is already an index-th declare child element, it | |
| 181 | * is replaced by newDeclaration. | |
| 182 | * | |
| 183 | * @param newDeclaration | |
| 184 | * A MathMLDeclareElement to be inserted as the index-th child | |
| 185 | * declare element. | |
| 186 | * @param index | |
| 187 | * A one-based index into the list of child declare elements of | |
| 188 | * this element giving the position into which newDeclaration | |
| 189 | * is to be inserted. If index is one more than the number of | |
| 190 | * declare children of this element, newDeclaration is appended | |
| 191 | * as the last declare child. | |
| 192 | * @return The MathMLDeclareElement being inserted. | |
| 193 | * @throws DOMException | |
| 194 | * INDEX_SIZE_ERR: Raised if index is greater than one more | |
| 195 | * than the number of child declare elements. | |
| 196 | * HIERARCHY_REQUEST_ERR: Raised if this element does not | |
| 197 | * permit child declare elements. | |
| 198 | */ | |
| 199 | MathMLDeclareElement setDeclaration(MathMLDeclareElement newDeclaration, | |
| 200 | int index) throws DOMException; | |
| 201 | ||
| 202 | /** | |
| 203 | * This method inserts newDeclaration before the current index-th child | |
| 204 | * declare element of this element. If index is 0, newDeclaration is | |
| 205 | * appended as the last child declare element. | |
| 206 | * | |
| 207 | * @param newDeclaration | |
| 208 | * A MathMLDeclareElement to be inserted as the index-th child | |
| 209 | * declare element. | |
| 210 | * @param index | |
| 211 | * A one-based index into the list of child declare elements of | |
| 212 | * this element giving the position before which newDeclaration | |
| 213 | * is to be inserted. If index is 0 or if it is one more than | |
| 214 | * the number of child declare children, newDeclaration is | |
| 215 | * appended as the last child declare element. | |
| 216 | * @return The MathMLDeclareElement child of this element representing | |
| 217 | * newDeclaration in the DOM. | |
| 218 | * @throws DOMException | |
| 219 | * INDEX_SIZE_ERR: Raised if index is greater than one more | |
| 220 | * than the number of child declare elements. | |
| 221 | * HIERARCHY_REQUEST_ERR: Raised if this element does not | |
| 222 | * permit child declare elements. | |
| 223 | */ | |
| 224 | MathMLDeclareElement insertDeclaration( | |
| 225 | MathMLDeclareElement newDeclaration, int index) | |
| 226 | throws DOMException; | |
| 227 | ||
| 228 | /** | |
| 229 | * This method removes the MathMLDeclareElement representing the index-th | |
| 230 | * declare child element of this element, and returns it to the caller. | |
| 231 | * Note that index is the position in the list of declare element | |
| 232 | * children, as opposed to the position in the list of all child Nodes. | |
| 233 | * | |
| 234 | * @param index | |
| 235 | * The one-based index of the declare element to be removed. | |
| 236 | * @return The MathMLDeclareElement being removed as a child Node of this | |
| 237 | * element. | |
| 238 | * @throws DOMException | |
| 239 | * INDEX_SIZE_ERR: Raised if index is greater than the number | |
| 240 | * of child declare elements. | |
| 241 | */ | |
| 242 | MathMLDeclareElement removeDeclaration(int index) throws DOMException; | |
| 243 | ||
| 244 | /** | |
| 245 | * This method deletes the MathMLDeclareElement representing the index-th | |
| 246 | * declare child element of this element. Note that index is the position | |
| 247 | * in the list of declare element children, as opposed to the position in | |
| 248 | * the list of all child Nodes. | |
| 249 | * | |
| 250 | * @param index | |
| 251 | * The one-based index of the declare element to be removed. | |
| 252 | * @throws DOMException | |
| 253 | * INDEX_SIZE_ERR: Raised if index is greater than the number | |
| 254 | * of child declare elements. | |
| 255 | */ | |
| 256 | void deleteDeclaration(int index) throws DOMException; | |
| 257 | }; |