/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4)
- * Copyright (C) 2008 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2b1)
+ * Copyright (C) 2014 The Jalview Authors
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This file is part of Jalview.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * Jalview is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * Jalview is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
*/
package jalview.binding;
-// ---------------------------------/
-// - Imported classes and packages -/
-// ---------------------------------/
+//---------------------------------/
+//- Imported classes and packages -/
+//---------------------------------/
+
+import jalview.util.MessageManager;
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
*
* @param vAnnotationElement
* @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
+ * if the index given is outside the bounds of the collection
*/
public void addAnnotationElement(
final jalview.binding.AnnotationElement vAnnotationElement)
* @param index
* @param vAnnotationElement
* @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
+ * if the index given is outside the bounds of the collection
*/
public void addAnnotationElement(final int index,
final jalview.binding.AnnotationElement vAnnotationElement)
}
/**
- */
+ */
public void deleteGraph()
{
this._has_graph = false;
}
/**
- */
+ */
public void deleteGraphType()
{
this._has_graphType = false;
*
* @param index
* @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
+ * if the index given is outside the bounds of the collection
* @return the value of the jalview.binding.AnnotationElement at the given
* index
*/
// check bounds for index
if (index < 0 || index >= this._annotationElementList.size())
{
- throw new IndexOutOfBoundsException(
- "getAnnotationElement: Index value '" + index
- + "' not in range [0.."
- + (this._annotationElementList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getAnnotationElement",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._annotationElementList.size() - 1)).toString()
+ }));
}
return (jalview.binding.AnnotationElement) _annotationElementList
*
* @param out
* @throws org.exolab.castor.xml.MarshalException
- * if object is null or if any SAXException is thrown during
- * marshaling
+ * if object is null or if any SAXException is thrown during
+ * marshaling
* @throws org.exolab.castor.xml.ValidationException
- * if this object is an invalid instance according to the
- * schema
+ * if this object is an invalid instance according to the schema
*/
public void marshal(final java.io.Writer out)
throws org.exolab.castor.xml.MarshalException,
*
* @param handler
* @throws java.io.IOException
- * if an IOException occurs during marshaling
+ * if an IOException occurs during marshaling
* @throws org.exolab.castor.xml.ValidationException
- * if this object is an invalid instance according to the
- * schema
+ * if this object is an invalid instance according to the schema
* @throws org.exolab.castor.xml.MarshalException
- * if object is null or if any SAXException is thrown during
- * marshaling
+ * if object is null or if any SAXException is thrown during
+ * marshaling
*/
public void marshal(final org.xml.sax.ContentHandler handler)
throws java.io.IOException,
}
/**
- */
+ */
public void removeAllAnnotationElement()
{
this._annotationElementList.clear();
* @param index
* @param vAnnotationElement
* @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
+ * if the index given is outside the bounds of the collection
*/
public void setAnnotationElement(final int index,
final jalview.binding.AnnotationElement vAnnotationElement)
// check bounds for index
if (index < 0 || index >= this._annotationElementList.size())
{
- throw new IndexOutOfBoundsException(
- "setAnnotationElement: Index value '" + index
- + "' not in range [0.."
- + (this._annotationElementList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setAnnotationElement",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._annotationElementList.size() - 1)).toString()
+ }));
}
this._annotationElementList.set(index, vAnnotationElement);
* Sets the value of field 'description'.
*
* @param description
- * the value of field 'description'.
+ * the value of field 'description'.
*/
public void setDescription(final java.lang.String description)
{
* Sets the value of field 'graph'.
*
* @param graph
- * the value of field 'graph'.
+ * the value of field 'graph'.
*/
public void setGraph(final boolean graph)
{
* Sets the value of field 'graphType'.
*
* @param graphType
- * the value of field 'graphType'.
+ * the value of field 'graphType'.
*/
public void setGraphType(final int graphType)
{
* Sets the value of field 'label'.
*
* @param label
- * the value of field 'label'.
+ * the value of field 'label'.
*/
public void setLabel(final java.lang.String label)
{
*
* @param reader
* @throws org.exolab.castor.xml.MarshalException
- * if object is null or if any SAXException is thrown during
- * marshaling
+ * if object is null or if any SAXException is thrown during
+ * marshaling
* @throws org.exolab.castor.xml.ValidationException
- * if this object is an invalid instance according to the
- * schema
+ * if this object is an invalid instance according to the schema
* @return the unmarshaled jalview.binding.Annotation
*/
public static jalview.binding.Annotation unmarshal(
*
*
* @throws org.exolab.castor.xml.ValidationException
- * if this object is an invalid instance according to the
- * schema
+ * if this object is an invalid instance according to the schema
*/
public void validate() throws org.exolab.castor.xml.ValidationException
{