-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * dataset sequence id for this sequence. Will be created as
- * union of sequences.
- *
- */
- private java.lang.String _dsseqid;
-
- /**
- * Field _DBRefList.
- */
- private java.util.Vector _DBRefList;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public Sequence() {
- super();
- this._DBRefList = new java.util.Vector();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- *
- *
- * @param vDBRef
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addDBRef(
- final jalview.schemabinding.version2.DBRef vDBRef)
- throws java.lang.IndexOutOfBoundsException {
- this._DBRefList.addElement(vDBRef);
- }
-
- /**
- *
- *
- * @param index
- * @param vDBRef
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addDBRef(
- final int index,
- final jalview.schemabinding.version2.DBRef vDBRef)
- throws java.lang.IndexOutOfBoundsException {
- this._DBRefList.add(index, vDBRef);
- }
-
- /**
- * Method enumerateDBRef.
- *
- * @return an Enumeration over all
- * jalview.schemabinding.version2.DBRef elements
- */
- public java.util.Enumeration enumerateDBRef(
- ) {
- return this._DBRefList.elements();
- }
-
- /**
- * Method getDBRef.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the
- * jalview.schemabinding.version2.DBRef at the given index
- */
- public jalview.schemabinding.version2.DBRef getDBRef(
- final int index)
- throws java.lang.IndexOutOfBoundsException {
- // check bounds for index
- if (index < 0 || index >= this._DBRefList.size()) {
- throw new IndexOutOfBoundsException("getDBRef: Index value '" + index + "' not in range [0.." + (this._DBRefList.size() - 1) + "]");
- }
-
- return (jalview.schemabinding.version2.DBRef) _DBRefList.get(index);
- }
-
- /**
- * Method getDBRef.Returns the contents of the collection in an
- * Array. <p>Note: Just in case the collection contents are
- * changing in another thread, we pass a 0-length Array of the
- * correct type into the API call. This way we <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public jalview.schemabinding.version2.DBRef[] getDBRef(
- ) {
- jalview.schemabinding.version2.DBRef[] array = new jalview.schemabinding.version2.DBRef[0];
- return (jalview.schemabinding.version2.DBRef[]) this._DBRefList.toArray(array);
- }
-
- /**
- * Method getDBRefCount.
- *
- * @return the size of this collection
- */
- public int getDBRefCount(
- ) {
- return this._DBRefList.size();
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * dataset sequence id for this sequence. Will be created as union of
+ * sequences.
+ *
+ */
+ private java.lang.String _dsseqid;
+
+ /**
+ * Field _DBRefList.
+ */
+ private java.util.Vector _DBRefList;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public Sequence()
+ {
+ super();
+ this._DBRefList = new java.util.Vector();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ *
+ *
+ * @param vDBRef
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addDBRef(final jalview.schemabinding.version2.DBRef vDBRef)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._DBRefList.addElement(vDBRef);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vDBRef
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addDBRef(final int index,
+ final jalview.schemabinding.version2.DBRef vDBRef)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._DBRefList.add(index, vDBRef);
+ }
+
+ /**
+ * Method enumerateDBRef.
+ *
+ * @return an Enumeration over all jalview.schemabinding.version2.DBRef
+ * elements
+ */
+ public java.util.Enumeration enumerateDBRef()
+ {
+ return this._DBRefList.elements();
+ }
+
+ /**
+ * Method getDBRef.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.schemabinding.version2.DBRef at the given
+ * index
+ */
+ public jalview.schemabinding.version2.DBRef getDBRef(final int index)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ // check bounds for index
+ if (index < 0 || index >= this._DBRefList.size())
+ {
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getDBRef",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._DBRefList.size() - 1)).toString()
+ }));