| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| MathMLContentToken |
|
| 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.Node; | |
| 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 the interface from which the interfaces representing the MathML | |
| 28 | * Content token elements (ci, cn and csymbol) are derived. These elements may | |
| 29 | * contain MathML Presentation elements, Text nodes, or a combination of both. | |
| 30 | * Thus the getArgument and insertArgument methods have been provided to deal | |
| 31 | * with this distinction between these elements and other MathML Content | |
| 32 | * elements. | |
| 33 | * | |
| 34 | * | |
| 35 | */ | |
| 36 | public interface MathMLContentToken extends MathMLContentElement { | |
| 37 | /** | |
| 38 | * The arguments of this element, returned as a MathMLNodeList. Note that | |
| 39 | * this is not necessarily the same as Node::childNodes, particularly in | |
| 40 | * the case of the cn element. The reason is that the sep elements that | |
| 41 | * are used to separate the arguments of a cn are not returned. | |
| 42 | * | |
| 43 | * @return value of the arguments attribute. | |
| 44 | */ | |
| 45 | MathMLNodeList getArguments(); | |
| 46 | ||
| 47 | /** | |
| 48 | * A URI pointing to a semantic definition for this content element. Note | |
| 49 | * that there is no stipulation about the form this definition may take! | |
| 50 | * | |
| 51 | * @return value of the definitionURL attribute. | |
| 52 | */ | |
| 53 | String getDefinitionURL(); | |
| 54 | ||
| 55 | /** | |
| 56 | * setter for the definitionURL attribute. | |
| 57 | * | |
| 58 | * @param definitionURL | |
| 59 | * new value for definitionURL. | |
| 60 | * @see #getDefinitionURL() | |
| 61 | */ | |
| 62 | void setDefinitionURL(String definitionURL); | |
| 63 | ||
| 64 | /** | |
| 65 | * A string describing the syntax in which the definition located at | |
| 66 | * definitionURL is given. | |
| 67 | * | |
| 68 | * @return value of the encoding attribute. | |
| 69 | */ | |
| 70 | String getEncoding(); | |
| 71 | ||
| 72 | /** | |
| 73 | * setter for the encoding attribute. | |
| 74 | * | |
| 75 | * @param encoding | |
| 76 | * new value for encoding. | |
| 77 | * @see #getEncoding() | |
| 78 | */ | |
| 79 | void setEncoding(String encoding); | |
| 80 | ||
| 81 | /** | |
| 82 | * A convenience method to retrieve the child argument at the position | |
| 83 | * referenced by index. Note that this is not necessarily the same as the | |
| 84 | * index-th child Node of this Element; in particular, sep elements will | |
| 85 | * not be counted. | |
| 86 | * | |
| 87 | * @param index | |
| 88 | * Position of desired argument in the list of arguments. The | |
| 89 | * first argument is numbered 1. | |
| 90 | * @return The Node retrieved. | |
| 91 | */ | |
| 92 | Node getArgument(int index); | |
| 93 | ||
| 94 | /** | |
| 95 | * A convenience method to insert newArgument before the current index-th | |
| 96 | * argument child of this element. If index is 0, newArgument is appended | |
| 97 | * as the last argument. | |
| 98 | * | |
| 99 | * @param newArgument | |
| 100 | * Node to be inserted as the index-th argument. This will | |
| 101 | * either be a MathMLElement or a Text node. | |
| 102 | * @param index | |
| 103 | * Position before which newArgument is to be inserted. The | |
| 104 | * first argument is numbered 1.Note that this is not | |
| 105 | * necessarily the index of the Node in the list of child | |
| 106 | * nodes, as nodes representing such elements as sep are not | |
| 107 | * counted as arguments. | |
| 108 | * @param newArgument | |
| 109 | * Node to be inserted as the index-th argument. This will | |
| 110 | * either be a MathMLElement or a Text node. | |
| 111 | * @return The Node inserted. This is the element within the DOM. | |
| 112 | */ | |
| 113 | Node insertArgument(Node newArgument, int index); | |
| 114 | ||
| 115 | /** | |
| 116 | * A convenience method to set an argument child at the position | |
| 117 | * referenced by index. If there is currently an argument at this | |
| 118 | * position, it is replaced by newArgument. | |
| 119 | * | |
| 120 | * @param newArgument | |
| 121 | * Node to be inserted as the argument. This will either be a | |
| 122 | * MathMLElement or a Text node. | |
| 123 | * @param index | |
| 124 | * Position of the argument that is to be set to newArgument in | |
| 125 | * the list of arguments. The first argument is numbered 1. | |
| 126 | * Note that this is not necessarily the index of the Node in | |
| 127 | * the list of child nodes, as nodes representing such elements | |
| 128 | * as sep are not counted as arguments. | |
| 129 | * @param newArgument | |
| 130 | * Node to be inserted as the argument. This will either be a | |
| 131 | * MathMLElement or a Text node. | |
| 132 | * @return The Node inserted. This is the element within the DOM. | |
| 133 | */ | |
| 134 | Node setArgument(Node newArgument, int index); | |
| 135 | ||
| 136 | /** | |
| 137 | * A convenience method to delete the argument child located at the | |
| 138 | * position referenced by index. | |
| 139 | * | |
| 140 | * @param index | |
| 141 | * Position of the argument to be deleted from the list of | |
| 142 | * arguments. The first argument is numbered 1. | |
| 143 | */ | |
| 144 | void deleteArgument(int index); | |
| 145 | ||
| 146 | /** | |
| 147 | * A convenience method to delete the argument child located at the | |
| 148 | * position referenced by index, and to return it to the caller. | |
| 149 | * | |
| 150 | * @param index | |
| 151 | * Position of the argument to be deleted from the list of | |
| 152 | * arguments. The first argument is numbered 1. | |
| 153 | * @return A Node representing the deleted argument. | |
| 154 | */ | |
| 155 | Node removeArgument(int index); | |
| 156 | }; |