View Javadoc

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   * The matrixrow element is the container element for the elements of a
28   * matrix.
29   * 
30   * 
31   */
32  public interface MathMLMatrixrowElement extends MathMLContentElement {
33      /**
34       * The number of entries in the row.
35       * 
36       * @return value of the nEntries attribute.
37       */
38      int getNEntries();
39  
40      /**
41       * A convenience method to retrieve the contents of an entry by index.
42       * 
43       * @param index
44       *            Position of the entry in the row. The first entry is
45       *            numbered 1.
46       * @return The MathMLContentElement element representing the index-th
47       *         entry in the row.
48       * @throws DOMException
49       *             INDEX_SIZE_ERR: Raised if index is greater than the number
50       *             of entries in the row.
51       */
52      MathMLContentElement getEntry(int index) throws DOMException;
53  
54      /**
55       * A convenience method to insert an entry before the current index-th
56       * entry of the row. If index is 0, newEntry is appended as the last
57       * entry. Note that this method increases the size of the matrixrow.
58       * 
59       * @param newEntry
60       *            The MathMLContentElement to be representing the new entry to
61       *            be inserted into the row.
62       * @param index
63       *            The index before which newEntry is to be inserted in the
64       *            row. The first entry is numbered 1.
65       * @return The MathMLContentElement child of this MathMLMatrixrowElement
66       *         representing newEntry in the DOM.
67       * @throws DOMException
68       *             INDEX_SIZE_ERR: Raised if index is greater than the number
69       *             of entries in the row.
70       */
71      MathMLContentElement insertEntry(MathMLContentElement newEntry, int index)
72              throws DOMException;
73  
74      /**
75       * A convenience method to set the contents of the entry at position index
76       * in the row to newEntry. If there is already a entry at the specified
77       * index, it is replaced by the new entry.
78       * 
79       * @param newEntry
80       *            The MathMLContentElement representing the element that is to
81       *            be the index-th entry.
82       * @param index
83       *            The index of the entry that is to be set equal to newEntry.
84       *            The first entry is numbered 1.
85       * @return The MathMLContentElement child of this MathMLMatrixRowElement
86       *         representing newEntry in the DOM.
87       * @throws DOMException
88       *             INDEX_SIZE_ERR: Raised if index is greater than one more
89       *             than the number of elements in the row.
90       */
91      MathMLContentElement setEntry(MathMLContentElement newEntry, int index)
92              throws DOMException;
93  
94      /**
95       * A convenience method to delete an entry. The deletion changes the
96       * indices of the following entries.
97       * 
98       * @param index
99       *            Position of the entry to be deleted in the row. The first
100      *            entry is numbered 1.
101      * @return None
102      * @throws DOMException
103      *             INDEX_SIZE_ERR: Raised if index is greater than the number
104      *             of entries in the row.
105      */
106     void deleteEntry(int index) throws DOMException;
107 
108     /**
109      * A convenience method to remove an entry from the row and return the
110      * removed entry to the caller.
111      * 
112      * @param index
113      *            Position of the entry to be removed from the row. The first
114      *            entry is numbered 1.
115      * @return The MathMLContentElement being removed from the row.
116      * @throws DOMException
117      *             INDEX_SIZE_ERR: Raised if index is greater than the number
118      *             of entries in the row.
119      */
120     MathMLContentElement removeEntry(int index) throws DOMException;
121 };