Jalview 2.6 source licence
[jalview.git] / src / jalview / schemabinding / version2 / StructureState.java
index 373db78..4ce6aa7 100644 (file)
@@ -1,26 +1,25 @@
 /*
- * 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.6)
+ * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
  * 
- * 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.
  * 
- * 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
+ * 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 Jalview.  If not, see <http://www.gnu.org/licenses/>.
  */
 package jalview.schemabinding.version2;
 
-// ---------------------------------/
-// - Imported classes and packages -/
-// ---------------------------------/
+//---------------------------------/
+//- Imported classes and packages -/
+//---------------------------------/
 
 import org.exolab.castor.xml.Marshaller;
 import org.exolab.castor.xml.Unmarshaller;
@@ -92,6 +91,15 @@ public class StructureState implements java.io.Serializable
    */
   private boolean _has_height;
 
+  /**
+   * additional identifier which properly disambiguates the structure view from
+   * any other view with the same attributes. This is not an ID, because it is
+   * possible to have many references to the same physical structure view from
+   * different sequences in an alignment. A structureState element citing the
+   * same viewId will appear for each instance.
+   */
+  private java.lang.String _viewId;
+
   // ----------------/
   // - Constructors -/
   // ----------------/
@@ -107,35 +115,35 @@ public class StructureState implements java.io.Serializable
   // -----------/
 
   /**
-   */
+     */
   public void deleteHeight()
   {
     this._has_height = false;
   }
 
   /**
-   */
+     */
   public void deleteVisible()
   {
     this._has_visible = false;
   }
 
   /**
-   */
+     */
   public void deleteWidth()
   {
     this._has_width = false;
   }
 
   /**
-   */
+     */
   public void deleteXpos()
   {
     this._has_xpos = false;
   }
 
   /**
-   */
+     */
   public void deleteYpos()
   {
     this._has_ypos = false;
@@ -163,6 +171,21 @@ public class StructureState implements java.io.Serializable
   }
 
   /**
+   * Returns the value of field 'viewId'. The field 'viewId' has the following
+   * description: additional identifier which properly disambiguates the
+   * structure view from any other view with the same attributes. This is not an
+   * ID, because it is possible to have many references to the same physical
+   * structure view from different sequences in an alignment. A structureState
+   * element citing the same viewId will appear for each instance.
+   * 
+   * @return the value of field 'ViewId'.
+   */
+  public java.lang.String getViewId()
+  {
+    return this._viewId;
+  }
+
+  /**
    * Returns the value of field 'visible'.
    * 
    * @return the value of field 'Visible'.
@@ -284,11 +307,10 @@ public class StructureState implements java.io.Serializable
    * 
    * @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,
@@ -302,13 +324,12 @@ public class StructureState implements java.io.Serializable
    * 
    * @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,
@@ -323,7 +344,7 @@ public class StructureState implements java.io.Serializable
    * description: internal content storage
    * 
    * @param content
-   *                the value of field 'content'.
+   *          the value of field 'content'.
    */
   public void setContent(final java.lang.String content)
   {
@@ -334,7 +355,7 @@ public class StructureState implements java.io.Serializable
    * Sets the value of field 'height'.
    * 
    * @param height
-   *                the value of field 'height'.
+   *          the value of field 'height'.
    */
   public void setHeight(final int height)
   {
@@ -343,10 +364,26 @@ public class StructureState implements java.io.Serializable
   }
 
   /**
+   * Sets the value of field 'viewId'. The field 'viewId' has the following
+   * description: additional identifier which properly disambiguates the
+   * structure view from any other view with the same attributes. This is not an
+   * ID, because it is possible to have many references to the same physical
+   * structure view from different sequences in an alignment. A structureState
+   * element citing the same viewId will appear for each instance.
+   * 
+   * @param viewId
+   *          the value of field 'viewId'.
+   */
+  public void setViewId(final java.lang.String viewId)
+  {
+    this._viewId = viewId;
+  }
+
+  /**
    * Sets the value of field 'visible'.
    * 
    * @param visible
-   *                the value of field 'visible'.
+   *          the value of field 'visible'.
    */
   public void setVisible(final boolean visible)
   {
@@ -358,7 +395,7 @@ public class StructureState implements java.io.Serializable
    * Sets the value of field 'width'.
    * 
    * @param width
-   *                the value of field 'width'.
+   *          the value of field 'width'.
    */
   public void setWidth(final int width)
   {
@@ -370,7 +407,7 @@ public class StructureState implements java.io.Serializable
    * Sets the value of field 'xpos'.
    * 
    * @param xpos
-   *                the value of field 'xpos'.
+   *          the value of field 'xpos'.
    */
   public void setXpos(final int xpos)
   {
@@ -382,7 +419,7 @@ public class StructureState implements java.io.Serializable
    * Sets the value of field 'ypos'.
    * 
    * @param ypos
-   *                the value of field 'ypos'.
+   *          the value of field 'ypos'.
    */
   public void setYpos(final int ypos)
   {
@@ -395,11 +432,10 @@ public class StructureState implements java.io.Serializable
    * 
    * @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.schemabinding.version2.StructureState
    */
   public static jalview.schemabinding.version2.StructureState unmarshal(
@@ -416,8 +452,7 @@ public class StructureState implements java.io.Serializable
    * 
    * 
    * @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
   {