Save features and pdbids
authoramwaterhouse <Andrew Waterhouse>
Tue, 29 Nov 2005 17:57:41 +0000 (17:57 +0000)
committeramwaterhouse <Andrew Waterhouse>
Tue, 29 Nov 2005 17:57:41 +0000 (17:57 +0000)
src/jalview/binding/Feature.java [new file with mode: 0755]
src/jalview/binding/Features.java [new file with mode: 0755]
src/jalview/binding/JSeq.java
src/jalview/binding/Pdbentry.java [new file with mode: 0755]
src/jalview/binding/PdbentryItem.java [new file with mode: 0755]
src/jalview/binding/Pdbids.java [new file with mode: 0755]
src/jalview/binding/Property.java [new file with mode: 0755]
src/jalview/gui/Jalview2XML.java

diff --git a/src/jalview/binding/Feature.java b/src/jalview/binding/Feature.java
new file mode 100755 (executable)
index 0000000..95d5192
--- /dev/null
@@ -0,0 +1,305 @@
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 0.9.6</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package jalview.binding;\r
+\r
+  //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import java.io.IOException;\r
+import java.io.Reader;\r
+import java.io.Serializable;\r
+import java.io.Writer;\r
+import org.exolab.castor.xml.MarshalException;\r
+import org.exolab.castor.xml.Marshaller;\r
+import org.exolab.castor.xml.Unmarshaller;\r
+import org.exolab.castor.xml.ValidationException;\r
+import org.xml.sax.ContentHandler;\r
+\r
+/**\r
+ * Class Feature.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class Feature implements java.io.Serializable {\r
+\r
+\r
+      //--------------------------/\r
+     //- Class/Member Variables -/\r
+    //--------------------------/\r
+\r
+    /**\r
+     * Field _begin\r
+     */\r
+    private int _begin;\r
+\r
+    /**\r
+     * keeps track of state for field: _begin\r
+     */\r
+    private boolean _has_begin;\r
+\r
+    /**\r
+     * Field _end\r
+     */\r
+    private int _end;\r
+\r
+    /**\r
+     * keeps track of state for field: _end\r
+     */\r
+    private boolean _has_end;\r
+\r
+    /**\r
+     * Field _type\r
+     */\r
+    private java.lang.String _type;\r
+\r
+    /**\r
+     * Field _description\r
+     */\r
+    private java.lang.String _description;\r
+\r
+    /**\r
+     * Field _status\r
+     */\r
+    private java.lang.String _status;\r
+\r
+\r
+      //----------------/\r
+     //- Constructors -/\r
+    //----------------/\r
+\r
+    public Feature() {\r
+        super();\r
+    } //-- jalview.binding.Feature()\r
+\r
+\r
+      //-----------/\r
+     //- Methods -/\r
+    //-----------/\r
+\r
+    /**\r
+     * Method deleteBegin\r
+     * \r
+     */\r
+    public void deleteBegin()\r
+    {\r
+        this._has_begin= false;\r
+    } //-- void deleteBegin() \r
+\r
+    /**\r
+     * Method deleteEnd\r
+     * \r
+     */\r
+    public void deleteEnd()\r
+    {\r
+        this._has_end= false;\r
+    } //-- void deleteEnd() \r
+\r
+    /**\r
+     * Returns the value of field 'begin'.\r
+     * \r
+     * @return int\r
+     * @return the value of field 'begin'.\r
+     */\r
+    public int getBegin()\r
+    {\r
+        return this._begin;\r
+    } //-- int getBegin() \r
+\r
+    /**\r
+     * Returns the value of field 'description'.\r
+     * \r
+     * @return String\r
+     * @return the value of field 'description'.\r
+     */\r
+    public java.lang.String getDescription()\r
+    {\r
+        return this._description;\r
+    } //-- java.lang.String getDescription() \r
+\r
+    /**\r
+     * Returns the value of field 'end'.\r
+     * \r
+     * @return int\r
+     * @return the value of field 'end'.\r
+     */\r
+    public int getEnd()\r
+    {\r
+        return this._end;\r
+    } //-- int getEnd() \r
+\r
+    /**\r
+     * Returns the value of field 'status'.\r
+     * \r
+     * @return String\r
+     * @return the value of field 'status'.\r
+     */\r
+    public java.lang.String getStatus()\r
+    {\r
+        return this._status;\r
+    } //-- java.lang.String getStatus() \r
+\r
+    /**\r
+     * Returns the value of field 'type'.\r
+     * \r
+     * @return String\r
+     * @return the value of field 'type'.\r
+     */\r
+    public java.lang.String getType()\r
+    {\r
+        return this._type;\r
+    } //-- java.lang.String getType() \r
+\r
+    /**\r
+     * Method hasBegin\r
+     * \r
+     * \r
+     * \r
+     * @return boolean\r
+     */\r
+    public boolean hasBegin()\r
+    {\r
+        return this._has_begin;\r
+    } //-- boolean hasBegin() \r
+\r
+    /**\r
+     * Method hasEnd\r
+     * \r
+     * \r
+     * \r
+     * @return boolean\r
+     */\r
+    public boolean hasEnd()\r
+    {\r
+        return this._has_end;\r
+    } //-- boolean hasEnd() \r
+\r
+    /**\r
+     * Method isValid\r
+     * \r
+     * \r
+     * \r
+     * @return boolean\r
+     */\r
+    public boolean isValid()\r
+    {\r
+        try {\r
+            validate();\r
+        }\r
+        catch (org.exolab.castor.xml.ValidationException vex) {\r
+            return false;\r
+        }\r
+        return true;\r
+    } //-- boolean isValid() \r
+\r
+    /**\r
+     * Method marshal\r
+     * \r
+     * \r
+     * \r
+     * @param out\r
+     */\r
+    public void marshal(java.io.Writer out)\r
+        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
+    {\r
+        \r
+        Marshaller.marshal(this, out);\r
+    } //-- void marshal(java.io.Writer) \r
+\r
+    /**\r
+     * Method marshal\r
+     * \r
+     * \r
+     * \r
+     * @param handler\r
+     */\r
+    public void marshal(org.xml.sax.ContentHandler handler)\r
+        throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
+    {\r
+        \r
+        Marshaller.marshal(this, handler);\r
+    } //-- void marshal(org.xml.sax.ContentHandler) \r
+\r
+    /**\r
+     * Sets the value of field 'begin'.\r
+     * \r
+     * @param begin the value of field 'begin'.\r
+     */\r
+    public void setBegin(int begin)\r
+    {\r
+        this._begin = begin;\r
+        this._has_begin = true;\r
+    } //-- void setBegin(int) \r
+\r
+    /**\r
+     * Sets the value of field 'description'.\r
+     * \r
+     * @param description the value of field 'description'.\r
+     */\r
+    public void setDescription(java.lang.String description)\r
+    {\r
+        this._description = description;\r
+    } //-- void setDescription(java.lang.String) \r
+\r
+    /**\r
+     * Sets the value of field 'end'.\r
+     * \r
+     * @param end the value of field 'end'.\r
+     */\r
+    public void setEnd(int end)\r
+    {\r
+        this._end = end;\r
+        this._has_end = true;\r
+    } //-- void setEnd(int) \r
+\r
+    /**\r
+     * Sets the value of field 'status'.\r
+     * \r
+     * @param status the value of field 'status'.\r
+     */\r
+    public void setStatus(java.lang.String status)\r
+    {\r
+        this._status = status;\r
+    } //-- void setStatus(java.lang.String) \r
+\r
+    /**\r
+     * Sets the value of field 'type'.\r
+     * \r
+     * @param type the value of field 'type'.\r
+     */\r
+    public void setType(java.lang.String type)\r
+    {\r
+        this._type = type;\r
+    } //-- void setType(java.lang.String) \r
+\r
+    /**\r
+     * Method unmarshal\r
+     * \r
+     * \r
+     * \r
+     * @param reader\r
+     * @return Object\r
+     */\r
+    public static java.lang.Object unmarshal(java.io.Reader reader)\r
+        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
+    {\r
+        return (jalview.binding.Feature) Unmarshaller.unmarshal(jalview.binding.Feature.class, reader);\r
+    } //-- java.lang.Object unmarshal(java.io.Reader) \r
+\r
+    /**\r
+     * Method validate\r
+     * \r
+     */\r
+    public void validate()\r
+        throws org.exolab.castor.xml.ValidationException\r
+    {\r
+        org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
+        validator.validate(this);\r
+    } //-- void validate() \r
+\r
+}\r
diff --git a/src/jalview/binding/Features.java b/src/jalview/binding/Features.java
new file mode 100755 (executable)
index 0000000..4706beb
--- /dev/null
@@ -0,0 +1,118 @@
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 0.9.6</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package jalview.binding;\r
+\r
+  //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import java.io.IOException;\r
+import java.io.Reader;\r
+import java.io.Serializable;\r
+import java.io.Writer;\r
+import org.exolab.castor.xml.MarshalException;\r
+import org.exolab.castor.xml.Marshaller;\r
+import org.exolab.castor.xml.Unmarshaller;\r
+import org.exolab.castor.xml.ValidationException;\r
+import org.xml.sax.ContentHandler;\r
+\r
+/**\r
+ * Class Features.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class Features extends Feature \r
+implements java.io.Serializable\r
+{\r
+\r
+\r
+      //----------------/\r
+     //- Constructors -/\r
+    //----------------/\r
+\r
+    public Features() {\r
+        super();\r
+    } //-- jalview.binding.Features()\r
+\r
+\r
+      //-----------/\r
+     //- Methods -/\r
+    //-----------/\r
+\r
+    /**\r
+     * Method isValid\r
+     * \r
+     * \r
+     * \r
+     * @return boolean\r
+     */\r
+    public boolean isValid()\r
+    {\r
+        try {\r
+            validate();\r
+        }\r
+        catch (org.exolab.castor.xml.ValidationException vex) {\r
+            return false;\r
+        }\r
+        return true;\r
+    } //-- boolean isValid() \r
+\r
+    /**\r
+     * Method marshal\r
+     * \r
+     * \r
+     * \r
+     * @param out\r
+     */\r
+    public void marshal(java.io.Writer out)\r
+        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
+    {\r
+        \r
+        Marshaller.marshal(this, out);\r
+    } //-- void marshal(java.io.Writer) \r
+\r
+    /**\r
+     * Method marshal\r
+     * \r
+     * \r
+     * \r
+     * @param handler\r
+     */\r
+    public void marshal(org.xml.sax.ContentHandler handler)\r
+        throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
+    {\r
+        \r
+        Marshaller.marshal(this, handler);\r
+    } //-- void marshal(org.xml.sax.ContentHandler) \r
+\r
+    /**\r
+     * Method unmarshal\r
+     * \r
+     * \r
+     * \r
+     * @param reader\r
+     * @return Object\r
+     */\r
+    public static java.lang.Object unmarshal(java.io.Reader reader)\r
+        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
+    {\r
+        return (jalview.binding.Features) Unmarshaller.unmarshal(jalview.binding.Features.class, reader);\r
+    } //-- java.lang.Object unmarshal(java.io.Reader) \r
+\r
+    /**\r
+     * Method validate\r
+     * \r
+     */\r
+    public void validate()\r
+        throws org.exolab.castor.xml.ValidationException\r
+    {\r
+        org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
+        validator.validate(this);\r
+    } //-- void validate() \r
+\r
+}\r
index 751409f..ee55945 100755 (executable)
@@ -15,6 +15,8 @@ import java.io.IOException;
 import java.io.Reader;\r
 import java.io.Serializable;\r
 import java.io.Writer;\r
+import java.util.Enumeration;\r
+import java.util.Vector;\r
 import org.exolab.castor.xml.MarshalException;\r
 import org.exolab.castor.xml.Marshaller;\r
 import org.exolab.castor.xml.Unmarshaller;\r
@@ -73,6 +75,16 @@ public class JSeq implements java.io.Serializable {
      */\r
     private boolean _has_id;\r
 \r
+    /**\r
+     * Field _featuresList\r
+     */\r
+    private java.util.Vector _featuresList;\r
+\r
+    /**\r
+     * Field _pdbidsList\r
+     */\r
+    private java.util.Vector _pdbidsList;\r
+\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -80,6 +92,8 @@ public class JSeq implements java.io.Serializable {
 \r
     public JSeq() {\r
         super();\r
+        _featuresList = new Vector();\r
+        _pdbidsList = new Vector();\r
     } //-- jalview.binding.JSeq()\r
 \r
 \r
@@ -88,6 +102,60 @@ public class JSeq implements java.io.Serializable {
     //-----------/\r
 \r
     /**\r
+     * Method addFeatures\r
+     * \r
+     * \r
+     * \r
+     * @param vFeatures\r
+     */\r
+    public void addFeatures(jalview.binding.Features vFeatures)\r
+        throws java.lang.IndexOutOfBoundsException\r
+    {\r
+        _featuresList.addElement(vFeatures);\r
+    } //-- void addFeatures(jalview.binding.Features) \r
+\r
+    /**\r
+     * Method addFeatures\r
+     * \r
+     * \r
+     * \r
+     * @param index\r
+     * @param vFeatures\r
+     */\r
+    public void addFeatures(int index, jalview.binding.Features vFeatures)\r
+        throws java.lang.IndexOutOfBoundsException\r
+    {\r
+        _featuresList.insertElementAt(vFeatures, index);\r
+    } //-- void addFeatures(int, jalview.binding.Features) \r
+\r
+    /**\r
+     * Method addPdbids\r
+     * \r
+     * \r
+     * \r
+     * @param vPdbids\r
+     */\r
+    public void addPdbids(jalview.binding.Pdbids vPdbids)\r
+        throws java.lang.IndexOutOfBoundsException\r
+    {\r
+        _pdbidsList.addElement(vPdbids);\r
+    } //-- void addPdbids(jalview.binding.Pdbids) \r
+\r
+    /**\r
+     * Method addPdbids\r
+     * \r
+     * \r
+     * \r
+     * @param index\r
+     * @param vPdbids\r
+     */\r
+    public void addPdbids(int index, jalview.binding.Pdbids vPdbids)\r
+        throws java.lang.IndexOutOfBoundsException\r
+    {\r
+        _pdbidsList.insertElementAt(vPdbids, index);\r
+    } //-- void addPdbids(int, jalview.binding.Pdbids) \r
+\r
+    /**\r
      * Method deleteColour\r
      * \r
      */\r
@@ -124,6 +192,30 @@ public class JSeq implements java.io.Serializable {
     } //-- void deleteStart() \r
 \r
     /**\r
+     * Method enumerateFeatures\r
+     * \r
+     * \r
+     * \r
+     * @return Enumeration\r
+     */\r
+    public java.util.Enumeration enumerateFeatures()\r
+    {\r
+        return _featuresList.elements();\r
+    } //-- java.util.Enumeration enumerateFeatures() \r
+\r
+    /**\r
+     * Method enumeratePdbids\r
+     * \r
+     * \r
+     * \r
+     * @return Enumeration\r
+     */\r
+    public java.util.Enumeration enumeratePdbids()\r
+    {\r
+        return _pdbidsList.elements();\r
+    } //-- java.util.Enumeration enumeratePdbids() \r
+\r
+    /**\r
      * Returns the value of field 'colour'.\r
      * \r
      * @return int\r
@@ -146,6 +238,54 @@ public class JSeq implements java.io.Serializable {
     } //-- int getEnd() \r
 \r
     /**\r
+     * Method getFeatures\r
+     * \r
+     * \r
+     * \r
+     * @param index\r
+     * @return Features\r
+     */\r
+    public jalview.binding.Features getFeatures(int index)\r
+        throws java.lang.IndexOutOfBoundsException\r
+    {\r
+        //-- check bounds for index\r
+        if ((index < 0) || (index > _featuresList.size())) {\r
+            throw new IndexOutOfBoundsException();\r
+        }\r
+        \r
+        return (jalview.binding.Features) _featuresList.elementAt(index);\r
+    } //-- jalview.binding.Features getFeatures(int) \r
+\r
+    /**\r
+     * Method getFeatures\r
+     * \r
+     * \r
+     * \r
+     * @return Features\r
+     */\r
+    public jalview.binding.Features[] getFeatures()\r
+    {\r
+        int size = _featuresList.size();\r
+        jalview.binding.Features[] mArray = new jalview.binding.Features[size];\r
+        for (int index = 0; index < size; index++) {\r
+            mArray[index] = (jalview.binding.Features) _featuresList.elementAt(index);\r
+        }\r
+        return mArray;\r
+    } //-- jalview.binding.Features[] getFeatures() \r
+\r
+    /**\r
+     * Method getFeaturesCount\r
+     * \r
+     * \r
+     * \r
+     * @return int\r
+     */\r
+    public int getFeaturesCount()\r
+    {\r
+        return _featuresList.size();\r
+    } //-- int getFeaturesCount() \r
+\r
+    /**\r
      * Returns the value of field 'id'.\r
      * \r
      * @return int\r
@@ -157,6 +297,54 @@ public class JSeq implements java.io.Serializable {
     } //-- int getId() \r
 \r
     /**\r
+     * Method getPdbids\r
+     * \r
+     * \r
+     * \r
+     * @param index\r
+     * @return Pdbids\r
+     */\r
+    public jalview.binding.Pdbids getPdbids(int index)\r
+        throws java.lang.IndexOutOfBoundsException\r
+    {\r
+        //-- check bounds for index\r
+        if ((index < 0) || (index > _pdbidsList.size())) {\r
+            throw new IndexOutOfBoundsException();\r
+        }\r
+        \r
+        return (jalview.binding.Pdbids) _pdbidsList.elementAt(index);\r
+    } //-- jalview.binding.Pdbids getPdbids(int) \r
+\r
+    /**\r
+     * Method getPdbids\r
+     * \r
+     * \r
+     * \r
+     * @return Pdbids\r
+     */\r
+    public jalview.binding.Pdbids[] getPdbids()\r
+    {\r
+        int size = _pdbidsList.size();\r
+        jalview.binding.Pdbids[] mArray = new jalview.binding.Pdbids[size];\r
+        for (int index = 0; index < size; index++) {\r
+            mArray[index] = (jalview.binding.Pdbids) _pdbidsList.elementAt(index);\r
+        }\r
+        return mArray;\r
+    } //-- jalview.binding.Pdbids[] getPdbids() \r
+\r
+    /**\r
+     * Method getPdbidsCount\r
+     * \r
+     * \r
+     * \r
+     * @return int\r
+     */\r
+    public int getPdbidsCount()\r
+    {\r
+        return _pdbidsList.size();\r
+    } //-- int getPdbidsCount() \r
+\r
+    /**\r
      * Returns the value of field 'start'.\r
      * \r
      * @return int\r
@@ -262,6 +450,54 @@ public class JSeq implements java.io.Serializable {
     } //-- void marshal(org.xml.sax.ContentHandler) \r
 \r
     /**\r
+     * Method removeAllFeatures\r
+     * \r
+     */\r
+    public void removeAllFeatures()\r
+    {\r
+        _featuresList.removeAllElements();\r
+    } //-- void removeAllFeatures() \r
+\r
+    /**\r
+     * Method removeAllPdbids\r
+     * \r
+     */\r
+    public void removeAllPdbids()\r
+    {\r
+        _pdbidsList.removeAllElements();\r
+    } //-- void removeAllPdbids() \r
+\r
+    /**\r
+     * Method removeFeatures\r
+     * \r
+     * \r
+     * \r
+     * @param index\r
+     * @return Features\r
+     */\r
+    public jalview.binding.Features removeFeatures(int index)\r
+    {\r
+        java.lang.Object obj = _featuresList.elementAt(index);\r
+        _featuresList.removeElementAt(index);\r
+        return (jalview.binding.Features) obj;\r
+    } //-- jalview.binding.Features removeFeatures(int) \r
+\r
+    /**\r
+     * Method removePdbids\r
+     * \r
+     * \r
+     * \r
+     * @param index\r
+     * @return Pdbids\r
+     */\r
+    public jalview.binding.Pdbids removePdbids(int index)\r
+    {\r
+        java.lang.Object obj = _pdbidsList.elementAt(index);\r
+        _pdbidsList.removeElementAt(index);\r
+        return (jalview.binding.Pdbids) obj;\r
+    } //-- jalview.binding.Pdbids removePdbids(int) \r
+\r
+    /**\r
      * Sets the value of field 'colour'.\r
      * \r
      * @param colour the value of field 'colour'.\r
@@ -284,6 +520,40 @@ public class JSeq implements java.io.Serializable {
     } //-- void setEnd(int) \r
 \r
     /**\r
+     * Method setFeatures\r
+     * \r
+     * \r
+     * \r
+     * @param index\r
+     * @param vFeatures\r
+     */\r
+    public void setFeatures(int index, jalview.binding.Features vFeatures)\r
+        throws java.lang.IndexOutOfBoundsException\r
+    {\r
+        //-- check bounds for index\r
+        if ((index < 0) || (index > _featuresList.size())) {\r
+            throw new IndexOutOfBoundsException();\r
+        }\r
+        _featuresList.setElementAt(vFeatures, index);\r
+    } //-- void setFeatures(int, jalview.binding.Features) \r
+\r
+    /**\r
+     * Method setFeatures\r
+     * \r
+     * \r
+     * \r
+     * @param featuresArray\r
+     */\r
+    public void setFeatures(jalview.binding.Features[] featuresArray)\r
+    {\r
+        //-- copy array\r
+        _featuresList.removeAllElements();\r
+        for (int i = 0; i < featuresArray.length; i++) {\r
+            _featuresList.addElement(featuresArray[i]);\r
+        }\r
+    } //-- void setFeatures(jalview.binding.Features) \r
+\r
+    /**\r
      * Sets the value of field 'id'.\r
      * \r
      * @param id the value of field 'id'.\r
@@ -295,6 +565,40 @@ public class JSeq implements java.io.Serializable {
     } //-- void setId(int) \r
 \r
     /**\r
+     * Method setPdbids\r
+     * \r
+     * \r
+     * \r
+     * @param index\r
+     * @param vPdbids\r
+     */\r
+    public void setPdbids(int index, jalview.binding.Pdbids vPdbids)\r
+        throws java.lang.IndexOutOfBoundsException\r
+    {\r
+        //-- check bounds for index\r
+        if ((index < 0) || (index > _pdbidsList.size())) {\r
+            throw new IndexOutOfBoundsException();\r
+        }\r
+        _pdbidsList.setElementAt(vPdbids, index);\r
+    } //-- void setPdbids(int, jalview.binding.Pdbids) \r
+\r
+    /**\r
+     * Method setPdbids\r
+     * \r
+     * \r
+     * \r
+     * @param pdbidsArray\r
+     */\r
+    public void setPdbids(jalview.binding.Pdbids[] pdbidsArray)\r
+    {\r
+        //-- copy array\r
+        _pdbidsList.removeAllElements();\r
+        for (int i = 0; i < pdbidsArray.length; i++) {\r
+            _pdbidsList.addElement(pdbidsArray[i]);\r
+        }\r
+    } //-- void setPdbids(jalview.binding.Pdbids) \r
+\r
+    /**\r
      * Sets the value of field 'start'.\r
      * \r
      * @param start the value of field 'start'.\r
diff --git a/src/jalview/binding/Pdbentry.java b/src/jalview/binding/Pdbentry.java
new file mode 100755 (executable)
index 0000000..7e0ae30
--- /dev/null
@@ -0,0 +1,326 @@
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 0.9.6</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package jalview.binding;\r
+\r
+  //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import java.io.IOException;\r
+import java.io.Reader;\r
+import java.io.Serializable;\r
+import java.io.Writer;\r
+import java.util.Enumeration;\r
+import java.util.Vector;\r
+import org.exolab.castor.xml.MarshalException;\r
+import org.exolab.castor.xml.Marshaller;\r
+import org.exolab.castor.xml.Unmarshaller;\r
+import org.exolab.castor.xml.ValidationException;\r
+import org.xml.sax.ContentHandler;\r
+\r
+/**\r
+ * Class Pdbentry.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class Pdbentry implements java.io.Serializable {\r
+\r
+\r
+      //--------------------------/\r
+     //- Class/Member Variables -/\r
+    //--------------------------/\r
+\r
+    /**\r
+     * Field _id\r
+     */\r
+    private java.lang.String _id;\r
+\r
+    /**\r
+     * Field _type\r
+     */\r
+    private java.lang.String _type;\r
+\r
+    /**\r
+     * Field _items\r
+     */\r
+    private java.util.Vector _items;\r
+\r
+\r
+      //----------------/\r
+     //- Constructors -/\r
+    //----------------/\r
+\r
+    public Pdbentry() {\r
+        super();\r
+        _items = new Vector();\r
+    } //-- jalview.binding.Pdbentry()\r
+\r
+\r
+      //-----------/\r
+     //- Methods -/\r
+    //-----------/\r
+\r
+    /**\r
+     * Method addPdbentryItem\r
+     * \r
+     * \r
+     * \r
+     * @param vPdbentryItem\r
+     */\r
+    public void addPdbentryItem(jalview.binding.PdbentryItem vPdbentryItem)\r
+        throws java.lang.IndexOutOfBoundsException\r
+    {\r
+        _items.addElement(vPdbentryItem);\r
+    } //-- void addPdbentryItem(jalview.binding.PdbentryItem) \r
+\r
+    /**\r
+     * Method addPdbentryItem\r
+     * \r
+     * \r
+     * \r
+     * @param index\r
+     * @param vPdbentryItem\r
+     */\r
+    public void addPdbentryItem(int index, jalview.binding.PdbentryItem vPdbentryItem)\r
+        throws java.lang.IndexOutOfBoundsException\r
+    {\r
+        _items.insertElementAt(vPdbentryItem, index);\r
+    } //-- void addPdbentryItem(int, jalview.binding.PdbentryItem) \r
+\r
+    /**\r
+     * Method enumeratePdbentryItem\r
+     * \r
+     * \r
+     * \r
+     * @return Enumeration\r
+     */\r
+    public java.util.Enumeration enumeratePdbentryItem()\r
+    {\r
+        return _items.elements();\r
+    } //-- java.util.Enumeration enumeratePdbentryItem() \r
+\r
+    /**\r
+     * Returns the value of field 'id'.\r
+     * \r
+     * @return String\r
+     * @return the value of field 'id'.\r
+     */\r
+    public java.lang.String getId()\r
+    {\r
+        return this._id;\r
+    } //-- java.lang.String getId() \r
+\r
+    /**\r
+     * Method getPdbentryItem\r
+     * \r
+     * \r
+     * \r
+     * @param index\r
+     * @return PdbentryItem\r
+     */\r
+    public jalview.binding.PdbentryItem getPdbentryItem(int index)\r
+        throws java.lang.IndexOutOfBoundsException\r
+    {\r
+        //-- check bounds for index\r
+        if ((index < 0) || (index > _items.size())) {\r
+            throw new IndexOutOfBoundsException();\r
+        }\r
+        \r
+        return (jalview.binding.PdbentryItem) _items.elementAt(index);\r
+    } //-- jalview.binding.PdbentryItem getPdbentryItem(int) \r
+\r
+    /**\r
+     * Method getPdbentryItem\r
+     * \r
+     * \r
+     * \r
+     * @return PdbentryItem\r
+     */\r
+    public jalview.binding.PdbentryItem[] getPdbentryItem()\r
+    {\r
+        int size = _items.size();\r
+        jalview.binding.PdbentryItem[] mArray = new jalview.binding.PdbentryItem[size];\r
+        for (int index = 0; index < size; index++) {\r
+            mArray[index] = (jalview.binding.PdbentryItem) _items.elementAt(index);\r
+        }\r
+        return mArray;\r
+    } //-- jalview.binding.PdbentryItem[] getPdbentryItem() \r
+\r
+    /**\r
+     * Method getPdbentryItemCount\r
+     * \r
+     * \r
+     * \r
+     * @return int\r
+     */\r
+    public int getPdbentryItemCount()\r
+    {\r
+        return _items.size();\r
+    } //-- int getPdbentryItemCount() \r
+\r
+    /**\r
+     * Returns the value of field 'type'.\r
+     * \r
+     * @return String\r
+     * @return the value of field 'type'.\r
+     */\r
+    public java.lang.String getType()\r
+    {\r
+        return this._type;\r
+    } //-- java.lang.String getType() \r
+\r
+    /**\r
+     * Method isValid\r
+     * \r
+     * \r
+     * \r
+     * @return boolean\r
+     */\r
+    public boolean isValid()\r
+    {\r
+        try {\r
+            validate();\r
+        }\r
+        catch (org.exolab.castor.xml.ValidationException vex) {\r
+            return false;\r
+        }\r
+        return true;\r
+    } //-- boolean isValid() \r
+\r
+    /**\r
+     * Method marshal\r
+     * \r
+     * \r
+     * \r
+     * @param out\r
+     */\r
+    public void marshal(java.io.Writer out)\r
+        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
+    {\r
+        \r
+        Marshaller.marshal(this, out);\r
+    } //-- void marshal(java.io.Writer) \r
+\r
+    /**\r
+     * Method marshal\r
+     * \r
+     * \r
+     * \r
+     * @param handler\r
+     */\r
+    public void marshal(org.xml.sax.ContentHandler handler)\r
+        throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
+    {\r
+        \r
+        Marshaller.marshal(this, handler);\r
+    } //-- void marshal(org.xml.sax.ContentHandler) \r
+\r
+    /**\r
+     * Method removeAllPdbentryItem\r
+     * \r
+     */\r
+    public void removeAllPdbentryItem()\r
+    {\r
+        _items.removeAllElements();\r
+    } //-- void removeAllPdbentryItem() \r
+\r
+    /**\r
+     * Method removePdbentryItem\r
+     * \r
+     * \r
+     * \r
+     * @param index\r
+     * @return PdbentryItem\r
+     */\r
+    public jalview.binding.PdbentryItem removePdbentryItem(int index)\r
+    {\r
+        java.lang.Object obj = _items.elementAt(index);\r
+        _items.removeElementAt(index);\r
+        return (jalview.binding.PdbentryItem) obj;\r
+    } //-- jalview.binding.PdbentryItem removePdbentryItem(int) \r
+\r
+    /**\r
+     * Sets the value of field 'id'.\r
+     * \r
+     * @param id the value of field 'id'.\r
+     */\r
+    public void setId(java.lang.String id)\r
+    {\r
+        this._id = id;\r
+    } //-- void setId(java.lang.String) \r
+\r
+    /**\r
+     * Method setPdbentryItem\r
+     * \r
+     * \r
+     * \r
+     * @param index\r
+     * @param vPdbentryItem\r
+     */\r
+    public void setPdbentryItem(int index, jalview.binding.PdbentryItem vPdbentryItem)\r
+        throws java.lang.IndexOutOfBoundsException\r
+    {\r
+        //-- check bounds for index\r
+        if ((index < 0) || (index > _items.size())) {\r
+            throw new IndexOutOfBoundsException();\r
+        }\r
+        _items.setElementAt(vPdbentryItem, index);\r
+    } //-- void setPdbentryItem(int, jalview.binding.PdbentryItem) \r
+\r
+    /**\r
+     * Method setPdbentryItem\r
+     * \r
+     * \r
+     * \r
+     * @param pdbentryItemArray\r
+     */\r
+    public void setPdbentryItem(jalview.binding.PdbentryItem[] pdbentryItemArray)\r
+    {\r
+        //-- copy array\r
+        _items.removeAllElements();\r
+        for (int i = 0; i < pdbentryItemArray.length; i++) {\r
+            _items.addElement(pdbentryItemArray[i]);\r
+        }\r
+    } //-- void setPdbentryItem(jalview.binding.PdbentryItem) \r
+\r
+    /**\r
+     * Sets the value of field 'type'.\r
+     * \r
+     * @param type the value of field 'type'.\r
+     */\r
+    public void setType(java.lang.String type)\r
+    {\r
+        this._type = type;\r
+    } //-- void setType(java.lang.String) \r
+\r
+    /**\r
+     * Method unmarshal\r
+     * \r
+     * \r
+     * \r
+     * @param reader\r
+     * @return Object\r
+     */\r
+    public static java.lang.Object unmarshal(java.io.Reader reader)\r
+        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
+    {\r
+        return (jalview.binding.Pdbentry) Unmarshaller.unmarshal(jalview.binding.Pdbentry.class, reader);\r
+    } //-- java.lang.Object unmarshal(java.io.Reader) \r
+\r
+    /**\r
+     * Method validate\r
+     * \r
+     */\r
+    public void validate()\r
+        throws org.exolab.castor.xml.ValidationException\r
+    {\r
+        org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
+        validator.validate(this);\r
+    } //-- void validate() \r
+\r
+}\r
diff --git a/src/jalview/binding/PdbentryItem.java b/src/jalview/binding/PdbentryItem.java
new file mode 100755 (executable)
index 0000000..d797520
--- /dev/null
@@ -0,0 +1,197 @@
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 0.9.6</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package jalview.binding;\r
+\r
+  //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import java.io.Serializable;\r
+import java.util.Enumeration;\r
+import java.util.Vector;\r
+import org.exolab.castor.xml.Marshaller;\r
+import org.exolab.castor.xml.Unmarshaller;\r
+\r
+/**\r
+ * Class PdbentryItem.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class PdbentryItem implements java.io.Serializable {\r
+\r
+\r
+      //--------------------------/\r
+     //- Class/Member Variables -/\r
+    //--------------------------/\r
+\r
+    /**\r
+     * Field _propertyList\r
+     */\r
+    private java.util.Vector _propertyList;\r
+\r
+\r
+      //----------------/\r
+     //- Constructors -/\r
+    //----------------/\r
+\r
+    public PdbentryItem() {\r
+        super();\r
+        _propertyList = new Vector();\r
+    } //-- jalview.binding.PdbentryItem()\r
+\r
+\r
+      //-----------/\r
+     //- Methods -/\r
+    //-----------/\r
+\r
+    /**\r
+     * Method addProperty\r
+     * \r
+     * \r
+     * \r
+     * @param vProperty\r
+     */\r
+    public void addProperty(jalview.binding.Property vProperty)\r
+        throws java.lang.IndexOutOfBoundsException\r
+    {\r
+        _propertyList.addElement(vProperty);\r
+    } //-- void addProperty(jalview.binding.Property) \r
+\r
+    /**\r
+     * Method addProperty\r
+     * \r
+     * \r
+     * \r
+     * @param index\r
+     * @param vProperty\r
+     */\r
+    public void addProperty(int index, jalview.binding.Property vProperty)\r
+        throws java.lang.IndexOutOfBoundsException\r
+    {\r
+        _propertyList.insertElementAt(vProperty, index);\r
+    } //-- void addProperty(int, jalview.binding.Property) \r
+\r
+    /**\r
+     * Method enumerateProperty\r
+     * \r
+     * \r
+     * \r
+     * @return Enumeration\r
+     */\r
+    public java.util.Enumeration enumerateProperty()\r
+    {\r
+        return _propertyList.elements();\r
+    } //-- java.util.Enumeration enumerateProperty() \r
+\r
+    /**\r
+     * Method getProperty\r
+     * \r
+     * \r
+     * \r
+     * @param index\r
+     * @return Property\r
+     */\r
+    public jalview.binding.Property getProperty(int index)\r
+        throws java.lang.IndexOutOfBoundsException\r
+    {\r
+        //-- check bounds for index\r
+        if ((index < 0) || (index > _propertyList.size())) {\r
+            throw new IndexOutOfBoundsException();\r
+        }\r
+        \r
+        return (jalview.binding.Property) _propertyList.elementAt(index);\r
+    } //-- jalview.binding.Property getProperty(int) \r
+\r
+    /**\r
+     * Method getProperty\r
+     * \r
+     * \r
+     * \r
+     * @return Property\r
+     */\r
+    public jalview.binding.Property[] getProperty()\r
+    {\r
+        int size = _propertyList.size();\r
+        jalview.binding.Property[] mArray = new jalview.binding.Property[size];\r
+        for (int index = 0; index < size; index++) {\r
+            mArray[index] = (jalview.binding.Property) _propertyList.elementAt(index);\r
+        }\r
+        return mArray;\r
+    } //-- jalview.binding.Property[] getProperty() \r
+\r
+    /**\r
+     * Method getPropertyCount\r
+     * \r
+     * \r
+     * \r
+     * @return int\r
+     */\r
+    public int getPropertyCount()\r
+    {\r
+        return _propertyList.size();\r
+    } //-- int getPropertyCount() \r
+\r
+    /**\r
+     * Method removeAllProperty\r
+     * \r
+     */\r
+    public void removeAllProperty()\r
+    {\r
+        _propertyList.removeAllElements();\r
+    } //-- void removeAllProperty() \r
+\r
+    /**\r
+     * Method removeProperty\r
+     * \r
+     * \r
+     * \r
+     * @param index\r
+     * @return Property\r
+     */\r
+    public jalview.binding.Property removeProperty(int index)\r
+    {\r
+        java.lang.Object obj = _propertyList.elementAt(index);\r
+        _propertyList.removeElementAt(index);\r
+        return (jalview.binding.Property) obj;\r
+    } //-- jalview.binding.Property removeProperty(int) \r
+\r
+    /**\r
+     * Method setProperty\r
+     * \r
+     * \r
+     * \r
+     * @param index\r
+     * @param vProperty\r
+     */\r
+    public void setProperty(int index, jalview.binding.Property vProperty)\r
+        throws java.lang.IndexOutOfBoundsException\r
+    {\r
+        //-- check bounds for index\r
+        if ((index < 0) || (index > _propertyList.size())) {\r
+            throw new IndexOutOfBoundsException();\r
+        }\r
+        _propertyList.setElementAt(vProperty, index);\r
+    } //-- void setProperty(int, jalview.binding.Property) \r
+\r
+    /**\r
+     * Method setProperty\r
+     * \r
+     * \r
+     * \r
+     * @param propertyArray\r
+     */\r
+    public void setProperty(jalview.binding.Property[] propertyArray)\r
+    {\r
+        //-- copy array\r
+        _propertyList.removeAllElements();\r
+        for (int i = 0; i < propertyArray.length; i++) {\r
+            _propertyList.addElement(propertyArray[i]);\r
+        }\r
+    } //-- void setProperty(jalview.binding.Property) \r
+\r
+}\r
diff --git a/src/jalview/binding/Pdbids.java b/src/jalview/binding/Pdbids.java
new file mode 100755 (executable)
index 0000000..4875b8b
--- /dev/null
@@ -0,0 +1,118 @@
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 0.9.6</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package jalview.binding;\r
+\r
+  //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import java.io.IOException;\r
+import java.io.Reader;\r
+import java.io.Serializable;\r
+import java.io.Writer;\r
+import org.exolab.castor.xml.MarshalException;\r
+import org.exolab.castor.xml.Marshaller;\r
+import org.exolab.castor.xml.Unmarshaller;\r
+import org.exolab.castor.xml.ValidationException;\r
+import org.xml.sax.ContentHandler;\r
+\r
+/**\r
+ * Class Pdbids.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class Pdbids extends Pdbentry \r
+implements java.io.Serializable\r
+{\r
+\r
+\r
+      //----------------/\r
+     //- Constructors -/\r
+    //----------------/\r
+\r
+    public Pdbids() {\r
+        super();\r
+    } //-- jalview.binding.Pdbids()\r
+\r
+\r
+      //-----------/\r
+     //- Methods -/\r
+    //-----------/\r
+\r
+    /**\r
+     * Method isValid\r
+     * \r
+     * \r
+     * \r
+     * @return boolean\r
+     */\r
+    public boolean isValid()\r
+    {\r
+        try {\r
+            validate();\r
+        }\r
+        catch (org.exolab.castor.xml.ValidationException vex) {\r
+            return false;\r
+        }\r
+        return true;\r
+    } //-- boolean isValid() \r
+\r
+    /**\r
+     * Method marshal\r
+     * \r
+     * \r
+     * \r
+     * @param out\r
+     */\r
+    public void marshal(java.io.Writer out)\r
+        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
+    {\r
+        \r
+        Marshaller.marshal(this, out);\r
+    } //-- void marshal(java.io.Writer) \r
+\r
+    /**\r
+     * Method marshal\r
+     * \r
+     * \r
+     * \r
+     * @param handler\r
+     */\r
+    public void marshal(org.xml.sax.ContentHandler handler)\r
+        throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
+    {\r
+        \r
+        Marshaller.marshal(this, handler);\r
+    } //-- void marshal(org.xml.sax.ContentHandler) \r
+\r
+    /**\r
+     * Method unmarshal\r
+     * \r
+     * \r
+     * \r
+     * @param reader\r
+     * @return Object\r
+     */\r
+    public static java.lang.Object unmarshal(java.io.Reader reader)\r
+        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
+    {\r
+        return (jalview.binding.Pdbids) Unmarshaller.unmarshal(jalview.binding.Pdbids.class, reader);\r
+    } //-- java.lang.Object unmarshal(java.io.Reader) \r
+\r
+    /**\r
+     * Method validate\r
+     * \r
+     */\r
+    public void validate()\r
+        throws org.exolab.castor.xml.ValidationException\r
+    {\r
+        org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
+        validator.validate(this);\r
+    } //-- void validate() \r
+\r
+}\r
diff --git a/src/jalview/binding/Property.java b/src/jalview/binding/Property.java
new file mode 100755 (executable)
index 0000000..c0a1cdd
--- /dev/null
@@ -0,0 +1,173 @@
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 0.9.6</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package jalview.binding;\r
+\r
+  //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import java.io.IOException;\r
+import java.io.Reader;\r
+import java.io.Serializable;\r
+import java.io.Writer;\r
+import org.exolab.castor.xml.MarshalException;\r
+import org.exolab.castor.xml.Marshaller;\r
+import org.exolab.castor.xml.Unmarshaller;\r
+import org.exolab.castor.xml.ValidationException;\r
+import org.xml.sax.ContentHandler;\r
+\r
+/**\r
+ * Class Property.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class Property implements java.io.Serializable {\r
+\r
+\r
+      //--------------------------/\r
+     //- Class/Member Variables -/\r
+    //--------------------------/\r
+\r
+    /**\r
+     * Field _name\r
+     */\r
+    private java.lang.String _name;\r
+\r
+    /**\r
+     * Field _value\r
+     */\r
+    private java.lang.String _value;\r
+\r
+\r
+      //----------------/\r
+     //- Constructors -/\r
+    //----------------/\r
+\r
+    public Property() {\r
+        super();\r
+    } //-- jalview.binding.Property()\r
+\r
+\r
+      //-----------/\r
+     //- Methods -/\r
+    //-----------/\r
+\r
+    /**\r
+     * Returns the value of field 'name'.\r
+     * \r
+     * @return String\r
+     * @return the value of field 'name'.\r
+     */\r
+    public java.lang.String getName()\r
+    {\r
+        return this._name;\r
+    } //-- java.lang.String getName() \r
+\r
+    /**\r
+     * Returns the value of field 'value'.\r
+     * \r
+     * @return String\r
+     * @return the value of field 'value'.\r
+     */\r
+    public java.lang.String getValue()\r
+    {\r
+        return this._value;\r
+    } //-- java.lang.String getValue() \r
+\r
+    /**\r
+     * Method isValid\r
+     * \r
+     * \r
+     * \r
+     * @return boolean\r
+     */\r
+    public boolean isValid()\r
+    {\r
+        try {\r
+            validate();\r
+        }\r
+        catch (org.exolab.castor.xml.ValidationException vex) {\r
+            return false;\r
+        }\r
+        return true;\r
+    } //-- boolean isValid() \r
+\r
+    /**\r
+     * Method marshal\r
+     * \r
+     * \r
+     * \r
+     * @param out\r
+     */\r
+    public void marshal(java.io.Writer out)\r
+        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
+    {\r
+        \r
+        Marshaller.marshal(this, out);\r
+    } //-- void marshal(java.io.Writer) \r
+\r
+    /**\r
+     * Method marshal\r
+     * \r
+     * \r
+     * \r
+     * @param handler\r
+     */\r
+    public void marshal(org.xml.sax.ContentHandler handler)\r
+        throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
+    {\r
+        \r
+        Marshaller.marshal(this, handler);\r
+    } //-- void marshal(org.xml.sax.ContentHandler) \r
+\r
+    /**\r
+     * Sets the value of field 'name'.\r
+     * \r
+     * @param name the value of field 'name'.\r
+     */\r
+    public void setName(java.lang.String name)\r
+    {\r
+        this._name = name;\r
+    } //-- void setName(java.lang.String) \r
+\r
+    /**\r
+     * Sets the value of field 'value'.\r
+     * \r
+     * @param value the value of field 'value'.\r
+     */\r
+    public void setValue(java.lang.String value)\r
+    {\r
+        this._value = value;\r
+    } //-- void setValue(java.lang.String) \r
+\r
+    /**\r
+     * Method unmarshal\r
+     * \r
+     * \r
+     * \r
+     * @param reader\r
+     * @return Object\r
+     */\r
+    public static java.lang.Object unmarshal(java.io.Reader reader)\r
+        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
+    {\r
+        return (jalview.binding.Property) Unmarshaller.unmarshal(jalview.binding.Property.class, reader);\r
+    } //-- java.lang.Object unmarshal(java.io.Reader) \r
+\r
+    /**\r
+     * Method validate\r
+     * \r
+     */\r
+    public void validate()\r
+        throws org.exolab.castor.xml.ValidationException\r
+    {\r
+        org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
+        validator.validate(this);\r
+    } //-- void validate() \r
+\r
+}\r
index 28840e7..bbe3389 100755 (executable)
@@ -192,6 +192,56 @@ public class Jalview2XML
 \r
             jseq.setId(id);\r
 \r
+            if(jal.getSequenceAt(i).getDatasetSequence().getSequenceFeatures()!=null)\r
+            {\r
+              Enumeration en = jal.getSequenceAt(i).getDatasetSequence().getSequenceFeatures().elements();\r
+              while(en.hasMoreElements())\r
+              {\r
+                Features features = new Features();\r
+                jalview.datamodel.SequenceFeature sf\r
+                   = (jalview.datamodel.SequenceFeature)en.nextElement();\r
+\r
+                features.setBegin(sf.getBegin());\r
+                features.setEnd(sf.getEnd());\r
+                features.setDescription(sf.getDescription());\r
+                features.setStatus(sf.getStatus());\r
+                features.setType(sf.getType());\r
+                jseq.addFeatures(features);\r
+              }\r
+            }\r
+\r
+            if(jal.getSequenceAt(i).getDatasetSequence().getPDBId()!=null)\r
+            {\r
+              Enumeration en = jal.getSequenceAt(i).getDatasetSequence().getPDBId().elements();\r
+              while(en.hasMoreElements())\r
+              {\r
+                Pdbids pdb = new Pdbids();\r
+                jalview.datamodel.PDBEntry entry\r
+                   = (jalview.datamodel.PDBEntry)en.nextElement();\r
+\r
+                pdb.setId(entry.getId());\r
+                pdb.setType(entry.getType());\r
+\r
+                if(entry.getProperty()!=null)\r
+                {\r
+                  PdbentryItem item = new PdbentryItem();\r
+                  Hashtable properties = entry.getProperty();\r
+                  Enumeration en2 = properties.keys();\r
+                  while(en2.hasMoreElements())\r
+                  {\r
+                    Property prop = new Property();\r
+                    String key = en2.nextElement().toString();\r
+                    prop.setName(key);\r
+                    prop.setValue( properties.get(key).toString() );\r
+                    item.addProperty(prop);\r
+                  }\r
+                  pdb.addPdbentryItem(item);\r
+                }\r
+\r
+                jseq.addPdbids(pdb);\r
+              }\r
+            }\r
+\r
             jms.addJSeq(jseq);\r
             vamsasSet.addSequence(vamsasSeq);\r
             id++;\r
@@ -346,6 +396,7 @@ public class Jalview2XML
             jms.setJGroup(groups);\r
         }\r
 \r
+\r
         ///////////SAVE VIEWPORT\r
         Viewport view = new Viewport();\r
         view.setTitle(af.getTitle());\r
@@ -570,7 +621,6 @@ public class Jalview2XML
         //LOAD SEQUENCES\r
         jalview.datamodel.Sequence[] jseqs = new jalview.datamodel.Sequence[vamsasSeq.length];\r
         JSeq[] JSEQ = object.getJalviewModelSequence().getJSeq();\r
-\r
         for (int i = 0; i < vamsasSeq.length; i++)\r
         {\r
             jseqs[i] = new jalview.datamodel.Sequence(vamsasSeq[i].getName(),\r
@@ -582,9 +632,41 @@ public class Jalview2XML
             seqids.add(jseqs[i]);\r
         }\r
 \r
+        ///SequenceFeatures are added to the DatasetSequence,\r
+        // so we must create the dataset before loading features\r
         /////////////////////////////////\r
         jalview.datamodel.Alignment al = new jalview.datamodel.Alignment(jseqs);\r
+        al.setDataset(null);\r
+        /////////////////////////////////\r
+\r
+        for (int i = 0; i < vamsasSeq.length; i++)\r
+        {\r
+          if (JSEQ[i].getFeaturesCount() > 0)\r
+          {\r
+            Features[] features = JSEQ[i].getFeatures();\r
+            for (int f = 0; f < features.length; f++)\r
+            {\r
+              //features[f].getBegin()\r
+              jalview.datamodel.SequenceFeature sf\r
+                  = new jalview.datamodel.SequenceFeature(features[f].getType(),\r
+                  features[f].getDescription(), features[f].getStatus(),\r
+                  features[f].getBegin(), features[f].getEnd());\r
+              al.getSequenceAt(i).getDatasetSequence().addSequenceFeature(sf);\r
+            }\r
+          }\r
+          if (JSEQ[i].getPdbidsCount() > 0)\r
+          {\r
+            Pdbids[] ids = JSEQ[i].getPdbids();\r
+            for (int p = 0; p < ids.length; p++)\r
+            {\r
+              jalview.datamodel.PDBEntry entry = new jalview.datamodel.PDBEntry();\r
+              entry.setId(ids[p].getId());\r
+              entry.setType(ids[p].getType());\r
+              al.getSequenceAt(i).getDatasetSequence().addPDBId(entry);\r
+            }\r
 \r
+          }\r
+        }\r
         /////////////////////////////////\r
         //////////////////////////////////\r
         //LOAD ANNOTATIONS\r
@@ -763,11 +845,9 @@ public class Jalview2XML
 \r
         if (view.getShowSequenceFeatures())\r
         {\r
-            af.featureSettings.setEnabled(true);\r
-            af.viewport.showSequenceFeatures = true;\r
-            af.sequenceFeatures.setSelected(true);\r
-            new SequenceFeatureFetcher(al, af.alignPanel);\r
-            al.featuresAdded = true;\r
+           af.featureSettings.setEnabled(true);\r
+           af.viewport.showSequenceFeatures = true;\r
+           af.sequenceFeatures.setSelected(true);\r
         }\r
 \r
         Desktop.addInternalFrame(af, view.getTitle(),\r