001 /*
002 * Copyright 2007 - 2007 JEuclid, http://jeuclid.sf.net
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package org.w3c.dom.mathml;
017
018 import org.w3c.dom.DOMException;
019
020 /*
021 * Please note: This file was automatically generated from the source of the
022 * MathML specification. Do not edit it. If there are errors or missing
023 * elements, please correct the stylesheet instead.
024 */
025
026 /**
027 * The matrixrow element is the container element for the elements of a
028 * matrix.
029 *
030 *
031 */
032 public interface MathMLMatrixrowElement extends MathMLContentElement {
033 /**
034 * The number of entries in the row.
035 *
036 * @return value of the nEntries attribute.
037 */
038 int getNEntries();
039
040 /**
041 * A convenience method to retrieve the contents of an entry by index.
042 *
043 * @param index
044 * Position of the entry in the row. The first entry is
045 * numbered 1.
046 * @return The MathMLContentElement element representing the index-th
047 * entry in the row.
048 * @throws DOMException
049 * INDEX_SIZE_ERR: Raised if index is greater than the number
050 * of entries in the row.
051 */
052 MathMLContentElement getEntry(int index) throws DOMException;
053
054 /**
055 * A convenience method to insert an entry before the current index-th
056 * entry of the row. If index is 0, newEntry is appended as the last
057 * entry. Note that this method increases the size of the matrixrow.
058 *
059 * @param newEntry
060 * The MathMLContentElement to be representing the new entry to
061 * be inserted into the row.
062 * @param index
063 * The index before which newEntry is to be inserted in the
064 * row. The first entry is numbered 1.
065 * @return The MathMLContentElement child of this MathMLMatrixrowElement
066 * representing newEntry in the DOM.
067 * @throws DOMException
068 * INDEX_SIZE_ERR: Raised if index is greater than the number
069 * of entries in the row.
070 */
071 MathMLContentElement insertEntry(MathMLContentElement newEntry, int index)
072 throws DOMException;
073
074 /**
075 * A convenience method to set the contents of the entry at position index
076 * in the row to newEntry. If there is already a entry at the specified
077 * index, it is replaced by the new entry.
078 *
079 * @param newEntry
080 * The MathMLContentElement representing the element that is to
081 * be the index-th entry.
082 * @param index
083 * The index of the entry that is to be set equal to newEntry.
084 * The first entry is numbered 1.
085 * @return The MathMLContentElement child of this MathMLMatrixRowElement
086 * representing newEntry in the DOM.
087 * @throws DOMException
088 * INDEX_SIZE_ERR: Raised if index is greater than one more
089 * than the number of elements in the row.
090 */
091 MathMLContentElement setEntry(MathMLContentElement newEntry, int index)
092 throws DOMException;
093
094 /**
095 * A convenience method to delete an entry. The deletion changes the
096 * indices of the following entries.
097 *
098 * @param index
099 * 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 };