Merge branch 'JAL-1177_prop_rnasecstr' into Release_2_8_1_Branch
authorJim Procter <jprocter@dundee.ac.uk>
Fri, 25 Apr 2014 16:11:28 +0000 (17:11 +0100)
committerJim Procter <jprocter@dundee.ac.uk>
Fri, 25 Apr 2014 16:11:28 +0000 (17:11 +0100)
95 files changed:
schemas/jalview.xsd
src/jalview/appletgui/AnnotationPanel.java
src/jalview/datamodel/Sequence.java
src/jalview/gui/AnnotationPanel.java
src/jalview/gui/Jalview2XML.java
src/jalview/schemabinding/version2/.castor.cdr
src/jalview/schemabinding/version2/AlcodMap.java
src/jalview/schemabinding/version2/Alcodon.java
src/jalview/schemabinding/version2/AlcodonFrame.java
src/jalview/schemabinding/version2/Annotation.java
src/jalview/schemabinding/version2/AnnotationColours.java
src/jalview/schemabinding/version2/AnnotationElement.java
src/jalview/schemabinding/version2/CalcIdParam.java
src/jalview/schemabinding/version2/Colour.java
src/jalview/schemabinding/version2/DBRef.java
src/jalview/schemabinding/version2/Feature.java
src/jalview/schemabinding/version2/FeatureSettings.java
src/jalview/schemabinding/version2/Features.java
src/jalview/schemabinding/version2/Group.java
src/jalview/schemabinding/version2/HiddenColumns.java
src/jalview/schemabinding/version2/JGroup.java
src/jalview/schemabinding/version2/JSeq.java
src/jalview/schemabinding/version2/JalviewModel.java
src/jalview/schemabinding/version2/JalviewModelSequence.java
src/jalview/schemabinding/version2/JalviewUserColours.java
src/jalview/schemabinding/version2/MapListFrom.java
src/jalview/schemabinding/version2/MapListTo.java
src/jalview/schemabinding/version2/MapListType.java
src/jalview/schemabinding/version2/Mapping.java
src/jalview/schemabinding/version2/MappingChoice.java
src/jalview/schemabinding/version2/OtherData.java
src/jalview/schemabinding/version2/Pdbentry.java
src/jalview/schemabinding/version2/PdbentryItem.java
src/jalview/schemabinding/version2/Pdbids.java
src/jalview/schemabinding/version2/Property.java
src/jalview/schemabinding/version2/Sequence.java
src/jalview/schemabinding/version2/SequenceSet.java
src/jalview/schemabinding/version2/SequenceSetProperties.java
src/jalview/schemabinding/version2/SequenceType.java
src/jalview/schemabinding/version2/Setting.java
src/jalview/schemabinding/version2/StructureState.java
src/jalview/schemabinding/version2/ThresholdLine.java
src/jalview/schemabinding/version2/Tree.java
src/jalview/schemabinding/version2/UserColourScheme.java
src/jalview/schemabinding/version2/UserColours.java
src/jalview/schemabinding/version2/VAMSAS.java
src/jalview/schemabinding/version2/VamsasModel.java
src/jalview/schemabinding/version2/Viewport.java
src/jalview/schemabinding/version2/WebServiceParameterSet.java
src/jalview/schemabinding/version2/descriptors/AlcodMapDescriptor.java
src/jalview/schemabinding/version2/descriptors/AlcodonDescriptor.java
src/jalview/schemabinding/version2/descriptors/AlcodonFrameDescriptor.java
src/jalview/schemabinding/version2/descriptors/AnnotationColoursDescriptor.java
src/jalview/schemabinding/version2/descriptors/AnnotationDescriptor.java
src/jalview/schemabinding/version2/descriptors/AnnotationElementDescriptor.java
src/jalview/schemabinding/version2/descriptors/CalcIdParamDescriptor.java
src/jalview/schemabinding/version2/descriptors/ColourDescriptor.java
src/jalview/schemabinding/version2/descriptors/DBRefDescriptor.java
src/jalview/schemabinding/version2/descriptors/FeatureDescriptor.java
src/jalview/schemabinding/version2/descriptors/FeatureSettingsDescriptor.java
src/jalview/schemabinding/version2/descriptors/FeaturesDescriptor.java
src/jalview/schemabinding/version2/descriptors/GroupDescriptor.java
src/jalview/schemabinding/version2/descriptors/HiddenColumnsDescriptor.java
src/jalview/schemabinding/version2/descriptors/JGroupDescriptor.java
src/jalview/schemabinding/version2/descriptors/JSeqDescriptor.java
src/jalview/schemabinding/version2/descriptors/JalviewModelDescriptor.java
src/jalview/schemabinding/version2/descriptors/JalviewModelSequenceDescriptor.java
src/jalview/schemabinding/version2/descriptors/JalviewUserColoursDescriptor.java
src/jalview/schemabinding/version2/descriptors/MapListFromDescriptor.java
src/jalview/schemabinding/version2/descriptors/MapListToDescriptor.java
src/jalview/schemabinding/version2/descriptors/MapListTypeDescriptor.java
src/jalview/schemabinding/version2/descriptors/MappingChoiceDescriptor.java
src/jalview/schemabinding/version2/descriptors/MappingDescriptor.java
src/jalview/schemabinding/version2/descriptors/OtherDataDescriptor.java
src/jalview/schemabinding/version2/descriptors/PdbentryDescriptor.java
src/jalview/schemabinding/version2/descriptors/PdbentryItemDescriptor.java
src/jalview/schemabinding/version2/descriptors/PdbidsDescriptor.java
src/jalview/schemabinding/version2/descriptors/PropertyDescriptor.java
src/jalview/schemabinding/version2/descriptors/SequenceDescriptor.java
src/jalview/schemabinding/version2/descriptors/SequenceSetDescriptor.java
src/jalview/schemabinding/version2/descriptors/SequenceSetPropertiesDescriptor.java
src/jalview/schemabinding/version2/descriptors/SequenceTypeDescriptor.java
src/jalview/schemabinding/version2/descriptors/SettingDescriptor.java
src/jalview/schemabinding/version2/descriptors/StructureStateDescriptor.java
src/jalview/schemabinding/version2/descriptors/ThresholdLineDescriptor.java
src/jalview/schemabinding/version2/descriptors/TreeDescriptor.java
src/jalview/schemabinding/version2/descriptors/UserColourSchemeDescriptor.java
src/jalview/schemabinding/version2/descriptors/UserColoursDescriptor.java
src/jalview/schemabinding/version2/descriptors/VAMSASDescriptor.java
src/jalview/schemabinding/version2/descriptors/VamsasModelDescriptor.java
src/jalview/schemabinding/version2/descriptors/ViewportDescriptor.java
src/jalview/schemabinding/version2/descriptors/WebServiceParameterSetDescriptor.java
src/jalview/schemes/ColourSchemeProperty.java
test/jalview/bin/CommandLineOperations.java
test/jalview/io/Jalview2xmlTests.java [new file with mode: 0644]

index 5631def..eb10ae1 100755 (executable)
@@ -27,7 +27,7 @@
                        <xs:element name="version" type="xs:string" />
                        <xs:element name="vamsasModel" type="vamsas:VAMSAS" />
                        <xs:sequence>
-                               <xs:element name="JSeq" maxOccurs="unbounded">
+                               <xs:element name="JSeq" maxOccurs="unbounded" minOccurs="0">
                                        <xs:complexType>
                                                <xs:sequence>
                                                        <xs:element name="features"
                                                </xs:attribute>
                                        </xs:complexType>
                                </xs:element>
-                               <xs:element name="Viewport" maxOccurs="unbounded">
+                               <xs:element name="Viewport" maxOccurs="unbounded" minOccurs="0">
                                        <xs:complexType>
                                                <xs:sequence>
                                                        <xs:element name="AnnotationColours"
index f33f627..250d222 100755 (executable)
@@ -236,6 +236,10 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI,
       if ((label.length() > 0) && !aa[activeRow].hasText)
       {
         aa[activeRow].hasText = true;
+        if (evt.getActionCommand().equals(STEM))
+        {
+          aa[activeRow].showAllColLabels=true;
+        }
       }
 
       for (int i = 0; i < av.getColumnSelection().size(); i++)
index 5fa37e3..cd817ab 100755 (executable)
@@ -997,6 +997,18 @@ public class Sequence implements SequenceI
       datasetSequence.setPDBId(getPDBId());
       setPDBId(null);
       datasetSequence.updatePDBIds();
+      if (annotation != null)
+      {
+        Vector<AlignmentAnnotation> _annot = annotation;
+        annotation = null;
+        for (AlignmentAnnotation aa : _annot)
+        {
+          aa.sequenceRef = datasetSequence;
+          aa.adjustForAlignment(); // uses annotation's own record of
+                                   // sequence-column mapping
+          datasetSequence.addAlignmentAnnotation(aa);
+        }
+      }
     }
     return datasetSequence;
   }
index e587586..3e9b38e 100755 (executable)
@@ -361,8 +361,11 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
       if ((label.length() > 0) && !aa[activeRow].hasText)
       {
         aa[activeRow].hasText = true;
+        if (evt.getActionCommand().equals(STEM))
+        {
+          aa[activeRow].showAllColLabels=true;
+        }
       }
-
       for (int i = 0; i < av.getColumnSelection().size(); i++)
       {
         int index = av.getColumnSelection().columnAt(i);
@@ -377,6 +380,7 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
 
         anot[index].secondaryStructure = type;
         anot[index].displayCharacter = label;
+        
       }
     }
     av.getAlignment().validateAnnotation(aa[activeRow]);
index ce42174..3bca941 100644 (file)
@@ -39,6 +39,7 @@ import jalview.schemabinding.version2.*;
 import jalview.schemes.*;
 import jalview.util.Platform;
 import jalview.util.jarInputStreamProvider;
+import jalview.viewmodel.AlignmentViewport;
 import jalview.ws.jws2.Jws2Discoverer;
 import jalview.ws.jws2.dm.AAConSettings;
 import jalview.ws.jws2.jabaws2.Jws2Instance;
@@ -278,6 +279,8 @@ public class Jalview2XML
       return;
     }
 
+    Hashtable<String,AlignFrame> dsses = new Hashtable<String,AlignFrame>();
+
     try
     {
 
@@ -332,6 +335,7 @@ public class Jalview2XML
           }
 
           int ap, apSize = af.alignPanels.size();
+
           for (ap = 0; ap < apSize; ap++)
           {
             AlignmentPanel apanel = (AlignmentPanel) af.alignPanels
@@ -343,9 +347,19 @@ public class Jalview2XML
             }
 
             SaveState(apanel, fileName, jout);
+
+            String dssid = getDatasetIdRef(af.getViewport().getAlignment().getDataset());
+            if (!dsses.containsKey(dssid))
+            {
+              dsses.put(dssid, af);
+            }
+
           }
         }
       }
+
+      writeDatasetFor(dsses, ""+jout.hashCode()+" "+uniqueSetSuffix, jout);
+      
       try
       {
         jout.flush();
@@ -375,6 +389,7 @@ public class Jalview2XML
       int ap, apSize = af.alignPanels.size();
       FileOutputStream fos = new FileOutputStream(jarFile);
       JarOutputStream jout = new JarOutputStream(fos);
+      Hashtable<String,AlignFrame> dsses = new Hashtable<String,AlignFrame>();
       for (ap = 0; ap < apSize; ap++)
       {
         AlignmentPanel apanel = (AlignmentPanel) af.alignPanels
@@ -385,8 +400,13 @@ public class Jalview2XML
           jfileName = jfileName + ".xml";
         }
         SaveState(apanel, jfileName, jout);
+        String dssid = getDatasetIdRef(af.getViewport().getAlignment().getDataset());
+        if (!dsses.containsKey(dssid))
+        {
+          dsses.put(dssid, af);
+        }
       }
-
+      writeDatasetFor(dsses, fileName, jout);
       try
       {
         jout.flush();
@@ -404,6 +424,22 @@ public class Jalview2XML
     }
   }
 
+  private void writeDatasetFor(Hashtable<String, AlignFrame> dsses,
+          String fileName, JarOutputStream jout)
+  {
+
+    for (String dssids:dsses.keySet())
+    {
+      AlignFrame _af = dsses.get(dssids);
+      String jfileName = fileName + " Dataset for "+ _af.getTitle();
+      if (!jfileName.endsWith(".xml"))
+      {
+        jfileName = jfileName + ".xml";
+      }
+      SaveState(_af.alignPanel, jfileName, true, jout);
+    }
+  }
+
   /**
    * create a JalviewModel from an algnment view and marshall it to a
    * JarOutputStream
@@ -420,6 +456,26 @@ public class Jalview2XML
   public JalviewModel SaveState(AlignmentPanel ap, String fileName,
           JarOutputStream jout)
   {
+    return SaveState(ap, fileName, false,jout);
+  }
+  /**
+  * create a JalviewModel from an algnment view and marshall it to a
+  * JarOutputStream
+  * 
+  * @param ap
+  *          panel to create jalview model for
+  * @param fileName
+  *          name of alignment panel written to output stream
+  * @param storeDS
+  *          when true, only write the dataset for the alignment, not the data associated with the view.
+  * @param jout
+  *          jar output stream
+  * @param out
+  *          jar entry name
+  */
+  public JalviewModel SaveState(AlignmentPanel ap, String fileName, boolean storeDS,
+          JarOutputStream jout)
+  {
     initSeqRefs();
     Vector jmolViewIds = new Vector(); //
     Vector userColours = new Vector();
@@ -449,6 +505,11 @@ public class Jalview2XML
     {
       // dataset id is the dataset's hashcode
       vamsasSet.setDatasetId(getDatasetIdRef(jal.getDataset()));
+      if (storeDS)
+      {
+        // switch jal and the dataset
+        jal = jal.getDataset();
+      }
     }
     if (jal.getProperties() != null)
     {
@@ -468,10 +529,11 @@ public class Jalview2XML
 
     // SAVE SEQUENCES
     String id = "";
-    jalview.datamodel.SequenceI jds;
+    jalview.datamodel.SequenceI jds,jdatasq;
     for (int i = 0; i < jal.getHeight(); i++)
     {
       jds = jal.getSequenceAt(i);
+      jdatasq=jds.getDatasetSequence() == null ? jds : jds.getDatasetSequence();
       id = seqHash(jds);
 
       if (seqRefIds.get(id) != null)
@@ -503,29 +565,34 @@ public class Jalview2XML
       jseq.setColour(av.getSequenceColour(jds).getRGB());
 
       jseq.setId(id); // jseq id should be a string not a number
-
-      if (av.hasHiddenRows())
+      if (!storeDS)
       {
-        jseq.setHidden(av.getAlignment().getHiddenSequences().isHidden(jds));
-
-        if (av.isHiddenRepSequence(jal.getSequenceAt(i)))
+        // Store any sequences this sequence represents
+        if (av.hasHiddenRows())
         {
-          jalview.datamodel.SequenceI[] reps = av.getRepresentedSequences(
-                  jal.getSequenceAt(i)).getSequencesInOrder(jal);
+          jseq.setHidden(av.getAlignment().getHiddenSequences()
+                  .isHidden(jds));
 
-          for (int h = 0; h < reps.length; h++)
+          if (av.isHiddenRepSequence(jal.getSequenceAt(i)))
           {
-            if (reps[h] != jal.getSequenceAt(i))
+            jalview.datamodel.SequenceI[] reps = av
+                    .getRepresentedSequences(jal.getSequenceAt(i))
+                    .getSequencesInOrder(jal);
+
+            for (int h = 0; h < reps.length; h++)
             {
-              jseq.addHiddenSequences(jal.findIndex(reps[h]));
+              if (reps[h] != jal.getSequenceAt(i))
+              {
+                jseq.addHiddenSequences(jal.findIndex(reps[h]));
+              }
             }
           }
         }
       }
 
-      if (jds.getDatasetSequence().getSequenceFeatures() != null)
+      if (jdatasq.getSequenceFeatures() != null)
       {
-        jalview.datamodel.SequenceFeature[] sf = jds.getDatasetSequence()
+        jalview.datamodel.SequenceFeature[] sf = jdatasq
                 .getSequenceFeatures();
         int index = 0;
         while (index < sf.length)
@@ -567,9 +634,9 @@ public class Jalview2XML
         }
       }
 
-      if (jds.getDatasetSequence().getPDBId() != null)
+      if (jdatasq.getPDBId() != null)
       {
-        Enumeration en = jds.getDatasetSequence().getPDBId().elements();
+        Enumeration en = jdatasq.getPDBId().elements();
         while (en.hasMoreElements())
         {
           Pdbids pdb = new Pdbids();
@@ -578,7 +645,10 @@ public class Jalview2XML
 
           pdb.setId(entry.getId());
           pdb.setType(entry.getType());
-
+          //
+          // store any JMol views associated with this seqeunce
+          // this section copes with duplicate entries in the project, so a
+          // dataset only view *should* be coped with sensibly
           AppJmol jmol;
           // This must have been loaded, is it still visible?
           JInternalFrame[] frames = Desktop.desktop.getAllFrames();
@@ -645,6 +715,7 @@ public class Jalview2XML
                     }
                     pdb.addStructureState(state);
                   }
+
                 }
               }
             }
@@ -713,7 +784,7 @@ public class Jalview2XML
       jms.addJSeq(jseq);
     }
 
-    if (av.hasHiddenRows())
+    if (!storeDS && av.hasHiddenRows())
     {
       jal = av.getAlignment();
     }
@@ -757,7 +828,7 @@ public class Jalview2XML
 
     // SAVE TREES
     // /////////////////////////////////
-    if (av.currentTree != null)
+    if (!storeDS && av.currentTree != null)
     {
       // FIND ANY ASSOCIATED TREES
       // NOT IMPLEMENTED FOR HEADLESS STATE AT PRESENT
@@ -804,139 +875,26 @@ public class Jalview2XML
      * store forward refs from an annotationRow to any groups
      */
     IdentityHashMap groupRefs = new IdentityHashMap();
-    if (jal.getAlignmentAnnotation() != null)
+    if (storeDS)
     {
-      jalview.datamodel.AlignmentAnnotation[] aa = jal
-              .getAlignmentAnnotation();
-
-      for (int i = 0; i < aa.length; i++)
-      {
-        Annotation an = new Annotation();
-
-        if (aa[i].annotationId != null)
-        {
-          annotationIds.put(aa[i].annotationId, aa[i]);
-        }
-
-        an.setId(aa[i].annotationId);
-
-        an.setVisible(aa[i].visible);
-
-        an.setDescription(aa[i].description);
-
-        if (aa[i].sequenceRef != null)
-        {
-          // TODO later annotation sequenceRef should be the XML ID of the
-          // sequence rather than its display name
-          an.setSequenceRef(aa[i].sequenceRef.getName());
-        }
-        if (aa[i].groupRef != null)
-        {
-          Object groupIdr = groupRefs.get(aa[i].groupRef);
-          if (groupIdr == null)
-          {
-            // make a locally unique String
-            groupRefs.put(aa[i].groupRef,
-                    groupIdr = ("" + System.currentTimeMillis()
-                            + aa[i].groupRef.getName() + groupRefs.size()));
-          }
-          an.setGroupRef(groupIdr.toString());
-        }
-
-        // store all visualization attributes for annotation
-        an.setGraphHeight(aa[i].graphHeight);
-        an.setCentreColLabels(aa[i].centreColLabels);
-        an.setScaleColLabels(aa[i].scaleColLabel);
-        an.setShowAllColLabels(aa[i].showAllColLabels);
-        an.setBelowAlignment(aa[i].belowAlignment);
-
-        if (aa[i].graph > 0)
+        for (SequenceI sq:jal.getSequences())
         {
-          an.setGraph(true);
-          an.setGraphType(aa[i].graph);
-          an.setGraphGroup(aa[i].graphGroup);
-          if (aa[i].getThreshold() != null)
+       // Store annotation on dataset sequences only
+          jalview.datamodel.AlignmentAnnotation[] aa = sq.getAnnotation();
+          if (aa!=null && aa.length>0)
           {
-            ThresholdLine line = new ThresholdLine();
-            line.setLabel(aa[i].getThreshold().label);
-            line.setValue(aa[i].getThreshold().value);
-            line.setColour(aa[i].getThreshold().colour.getRGB());
-            an.setThresholdLine(line);
+            storeAlignmentAnnotation(aa, groupRefs, av, calcIdSet, storeDS,
+                    vamsasSet);
           }
         }
-        else
-        {
-          an.setGraph(false);
-        }
-
-        an.setLabel(aa[i].label);
-
-        if (aa[i] == av.getAlignmentQualityAnnot()
-                || aa[i] == av.getAlignmentConservationAnnotation()
-                || aa[i] == av.getAlignmentConsensusAnnotation()
-                || aa[i].autoCalculated)
-        {
-          // new way of indicating autocalculated annotation -
-          an.setAutoCalculated(aa[i].autoCalculated);
-        }
-        if (aa[i].hasScore())
-        {
-          an.setScore(aa[i].getScore());
-        }
-
-        if (aa[i].getCalcId() != null)
-        {
-          calcIdSet.add(aa[i].getCalcId());
-          an.setCalcId(aa[i].getCalcId());
-        }
-
-        AnnotationElement ae;
-        if (aa[i].annotations != null)
-        {
-          an.setScoreOnly(false);
-          for (int a = 0; a < aa[i].annotations.length; a++)
-          {
-            if ((aa[i] == null) || (aa[i].annotations[a] == null))
-            {
-              continue;
-            }
-
-            ae = new AnnotationElement();
-            if (aa[i].annotations[a].description != null)
-              ae.setDescription(aa[i].annotations[a].description);
-            if (aa[i].annotations[a].displayCharacter != null)
-              ae.setDisplayCharacter(aa[i].annotations[a].displayCharacter);
-
-            if (!Float.isNaN(aa[i].annotations[a].value))
-              ae.setValue(aa[i].annotations[a].value);
-
-            ae.setPosition(a);
-            if (aa[i].annotations[a].secondaryStructure != ' '
-                    && aa[i].annotations[a].secondaryStructure != '\0')
-              ae.setSecondaryStructure(aa[i].annotations[a].secondaryStructure
-                      + "");
-
-            if (aa[i].annotations[a].colour != null
-                    && aa[i].annotations[a].colour != java.awt.Color.black)
-            {
-              ae.setColour(aa[i].annotations[a].colour.getRGB());
-            }
-
-            an.addAnnotationElement(ae);
-            if (aa[i].autoCalculated)
-            {
-              // only write one non-null entry into the annotation row -
-              // sufficient to get the visualization attributes necessary to
-              // display data
-              continue;
-            }
-          }
-        }
-        else
-        {
-          an.setScoreOnly(true);
-        }
-        vamsasSet.addAnnotation(an);
+    } else {
+      if (jal.getAlignmentAnnotation() != null)
+      {
+        // Store the annotation shown on the alignment.
+        jalview.datamodel.AlignmentAnnotation[] aa = jal
+                .getAlignmentAnnotation();
+        storeAlignmentAnnotation(aa, groupRefs, av, calcIdSet, storeDS,
+                vamsasSet);
       }
     }
     // SAVE GROUPS
@@ -1015,253 +973,255 @@ public class Jalview2XML
 
       jms.setJGroup(groups);
     }
+    if (!storeDS)
+    {
+      // /////////SAVE VIEWPORT
+      Viewport view = new Viewport();
+      view.setTitle(ap.alignFrame.getTitle());
+      view.setSequenceSetId(makeHashCode(av.getSequenceSetId(),
+              av.getSequenceSetId()));
+      view.setId(av.getViewId());
+      view.setViewName(av.viewName);
+      view.setGatheredViews(av.gatherViewsHere);
+
+      if (ap.av.explodedPosition != null)
+      {
+        view.setXpos(av.explodedPosition.x);
+        view.setYpos(av.explodedPosition.y);
+        view.setWidth(av.explodedPosition.width);
+        view.setHeight(av.explodedPosition.height);
+      }
+      else
+      {
+        view.setXpos(ap.alignFrame.getBounds().x);
+        view.setYpos(ap.alignFrame.getBounds().y);
+        view.setWidth(ap.alignFrame.getBounds().width);
+        view.setHeight(ap.alignFrame.getBounds().height);
+      }
 
-    // /////////SAVE VIEWPORT
-    Viewport view = new Viewport();
-    view.setTitle(ap.alignFrame.getTitle());
-    view.setSequenceSetId(makeHashCode(av.getSequenceSetId(),
-            av.getSequenceSetId()));
-    view.setId(av.getViewId());
-    view.setViewName(av.viewName);
-    view.setGatheredViews(av.gatherViewsHere);
-
-    if (ap.av.explodedPosition != null)
-    {
-      view.setXpos(av.explodedPosition.x);
-      view.setYpos(av.explodedPosition.y);
-      view.setWidth(av.explodedPosition.width);
-      view.setHeight(av.explodedPosition.height);
-    }
-    else
-    {
-      view.setXpos(ap.alignFrame.getBounds().x);
-      view.setYpos(ap.alignFrame.getBounds().y);
-      view.setWidth(ap.alignFrame.getBounds().width);
-      view.setHeight(ap.alignFrame.getBounds().height);
-    }
-
-    view.setStartRes(av.startRes);
-    view.setStartSeq(av.startSeq);
+      view.setStartRes(av.startRes);
+      view.setStartSeq(av.startSeq);
 
-    if (av.getGlobalColourScheme() instanceof jalview.schemes.UserColourScheme)
-    {
-      view.setBgColour(SetUserColourScheme(av.getGlobalColourScheme(),
-              userColours, jms));
-    }
-    else if (av.getGlobalColourScheme() instanceof jalview.schemes.AnnotationColourGradient)
-    {
-      jalview.schemes.AnnotationColourGradient acg = (jalview.schemes.AnnotationColourGradient) av
-              .getGlobalColourScheme();
-
-      AnnotationColours ac = new AnnotationColours();
-      ac.setAboveThreshold(acg.getAboveThreshold());
-      ac.setThreshold(acg.getAnnotationThreshold());
-      ac.setAnnotation(acg.getAnnotation());
-      if (acg.getBaseColour() instanceof jalview.schemes.UserColourScheme)
+      if (av.getGlobalColourScheme() instanceof jalview.schemes.UserColourScheme)
       {
-        ac.setColourScheme(SetUserColourScheme(acg.getBaseColour(),
+        view.setBgColour(SetUserColourScheme(av.getGlobalColourScheme(),
                 userColours, jms));
       }
+      else if (av.getGlobalColourScheme() instanceof jalview.schemes.AnnotationColourGradient)
+      {
+        jalview.schemes.AnnotationColourGradient acg = (jalview.schemes.AnnotationColourGradient) av
+                .getGlobalColourScheme();
+
+        AnnotationColours ac = new AnnotationColours();
+        ac.setAboveThreshold(acg.getAboveThreshold());
+        ac.setThreshold(acg.getAnnotationThreshold());
+        ac.setAnnotation(acg.getAnnotation());
+        if (acg.getBaseColour() instanceof jalview.schemes.UserColourScheme)
+        {
+          ac.setColourScheme(SetUserColourScheme(acg.getBaseColour(),
+                  userColours, jms));
+        }
+        else
+        {
+          ac.setColourScheme(ColourSchemeProperty.getColourName(acg
+                  .getBaseColour()));
+        }
+
+        ac.setMaxColour(acg.getMaxColour().getRGB());
+        ac.setMinColour(acg.getMinColour().getRGB());
+        ac.setPerSequence(acg.isSeqAssociated());
+        ac.setPredefinedColours(acg.isPredefinedColours());
+        view.setAnnotationColours(ac);
+        view.setBgColour("AnnotationColourGradient");
+      }
       else
       {
-        ac.setColourScheme(ColourSchemeProperty.getColourName(acg
-                .getBaseColour()));
+        view.setBgColour(ColourSchemeProperty.getColourName(av
+                .getGlobalColourScheme()));
       }
 
-      ac.setMaxColour(acg.getMaxColour().getRGB());
-      ac.setMinColour(acg.getMinColour().getRGB());
-      ac.setPerSequence(acg.isSeqAssociated());
-      ac.setPredefinedColours(acg.isPredefinedColours());
-      view.setAnnotationColours(ac);
-      view.setBgColour("AnnotationColourGradient");
-    }
-    else
-    {
-      view.setBgColour(ColourSchemeProperty.getColourName(av
-              .getGlobalColourScheme()));
-    }
-
-    ColourSchemeI cs = av.getGlobalColourScheme();
+      ColourSchemeI cs = av.getGlobalColourScheme();
 
-    if (cs != null)
-    {
-      if (cs.conservationApplied())
+      if (cs != null)
       {
-        view.setConsThreshold(cs.getConservationInc());
-        if (cs instanceof jalview.schemes.UserColourScheme)
+        if (cs.conservationApplied())
+        {
+          view.setConsThreshold(cs.getConservationInc());
+          if (cs instanceof jalview.schemes.UserColourScheme)
+          {
+            view.setBgColour(SetUserColourScheme(cs, userColours, jms));
+          }
+        }
+
+        if (cs instanceof ResidueColourScheme)
         {
-          view.setBgColour(SetUserColourScheme(cs, userColours, jms));
+          view.setPidThreshold(cs.getThreshold());
         }
       }
 
-      if (cs instanceof ResidueColourScheme)
+      view.setConservationSelected(av.getConservationSelected());
+      view.setPidSelected(av.getAbovePIDThreshold());
+      view.setFontName(av.font.getName());
+      view.setFontSize(av.font.getSize());
+      view.setFontStyle(av.font.getStyle());
+      view.setRenderGaps(av.renderGaps);
+      view.setShowAnnotation(av.getShowAnnotation());
+      view.setShowBoxes(av.getShowBoxes());
+      view.setShowColourText(av.getColourText());
+      view.setShowFullId(av.getShowJVSuffix());
+      view.setRightAlignIds(av.rightAlignIds);
+      view.setShowSequenceFeatures(av.showSequenceFeatures);
+      view.setShowText(av.getShowText());
+      view.setShowUnconserved(av.getShowUnconserved());
+      view.setWrapAlignment(av.getWrapAlignment());
+      view.setTextCol1(av.textColour.getRGB());
+      view.setTextCol2(av.textColour2.getRGB());
+      view.setTextColThreshold(av.thresholdTextColour);
+      view.setShowConsensusHistogram(av.isShowConsensusHistogram());
+      view.setShowSequenceLogo(av.isShowSequenceLogo());
+      view.setNormaliseSequenceLogo(av.isNormaliseSequenceLogo());
+      view.setShowGroupConsensus(av.isShowGroupConsensus());
+      view.setShowGroupConservation(av.isShowGroupConservation());
+      view.setShowNPfeatureTooltip(av.isShowNpFeats());
+      view.setShowDbRefTooltip(av.isShowDbRefs());
+      view.setFollowHighlight(av.followHighlight);
+      view.setFollowSelection(av.followSelection);
+      view.setIgnoreGapsinConsensus(av.getIgnoreGapsConsensus());
+      if (av.featuresDisplayed != null)
       {
-        view.setPidThreshold(cs.getThreshold());
-      }
-    }
+        jalview.schemabinding.version2.FeatureSettings fs = new jalview.schemabinding.version2.FeatureSettings();
 
-    view.setConservationSelected(av.getConservationSelected());
-    view.setPidSelected(av.getAbovePIDThreshold());
-    view.setFontName(av.font.getName());
-    view.setFontSize(av.font.getSize());
-    view.setFontStyle(av.font.getStyle());
-    view.setRenderGaps(av.renderGaps);
-    view.setShowAnnotation(av.getShowAnnotation());
-    view.setShowBoxes(av.getShowBoxes());
-    view.setShowColourText(av.getColourText());
-    view.setShowFullId(av.getShowJVSuffix());
-    view.setRightAlignIds(av.rightAlignIds);
-    view.setShowSequenceFeatures(av.showSequenceFeatures);
-    view.setShowText(av.getShowText());
-    view.setShowUnconserved(av.getShowUnconserved());
-    view.setWrapAlignment(av.getWrapAlignment());
-    view.setTextCol1(av.textColour.getRGB());
-    view.setTextCol2(av.textColour2.getRGB());
-    view.setTextColThreshold(av.thresholdTextColour);
-    view.setShowConsensusHistogram(av.isShowConsensusHistogram());
-    view.setShowSequenceLogo(av.isShowSequenceLogo());
-    view.setNormaliseSequenceLogo(av.isNormaliseSequenceLogo());
-    view.setShowGroupConsensus(av.isShowGroupConsensus());
-    view.setShowGroupConservation(av.isShowGroupConservation());
-    view.setShowNPfeatureTooltip(av.isShowNpFeats());
-    view.setShowDbRefTooltip(av.isShowDbRefs());
-    view.setFollowHighlight(av.followHighlight);
-    view.setFollowSelection(av.followSelection);
-    view.setIgnoreGapsinConsensus(av.getIgnoreGapsConsensus());
-    if (av.featuresDisplayed != null)
-    {
-      jalview.schemabinding.version2.FeatureSettings fs = new jalview.schemabinding.version2.FeatureSettings();
-
-      String[] renderOrder = ap.seqPanel.seqCanvas.getFeatureRenderer().renderOrder;
-
-      Vector settingsAdded = new Vector();
-      Object gstyle = null;
-      GraduatedColor gcol = null;
-      if (renderOrder != null)
-      {
-        for (int ro = 0; ro < renderOrder.length; ro++)
+        String[] renderOrder = ap.seqPanel.seqCanvas.getFeatureRenderer().renderOrder;
+
+        Vector settingsAdded = new Vector();
+        Object gstyle = null;
+        GraduatedColor gcol = null;
+        if (renderOrder != null)
         {
-          gstyle = ap.seqPanel.seqCanvas.getFeatureRenderer()
-                  .getFeatureStyle(renderOrder[ro]);
-          Setting setting = new Setting();
-          setting.setType(renderOrder[ro]);
-          if (gstyle instanceof GraduatedColor)
+          for (int ro = 0; ro < renderOrder.length; ro++)
           {
-            gcol = (GraduatedColor) gstyle;
-            setting.setColour(gcol.getMaxColor().getRGB());
-            setting.setMincolour(gcol.getMinColor().getRGB());
-            setting.setMin(gcol.getMin());
-            setting.setMax(gcol.getMax());
-            setting.setColourByLabel(gcol.isColourByLabel());
-            setting.setAutoScale(gcol.isAutoScale());
-            setting.setThreshold(gcol.getThresh());
-            setting.setThreshstate(gcol.getThreshType());
+            gstyle = ap.seqPanel.seqCanvas.getFeatureRenderer()
+                    .getFeatureStyle(renderOrder[ro]);
+            Setting setting = new Setting();
+            setting.setType(renderOrder[ro]);
+            if (gstyle instanceof GraduatedColor)
+            {
+              gcol = (GraduatedColor) gstyle;
+              setting.setColour(gcol.getMaxColor().getRGB());
+              setting.setMincolour(gcol.getMinColor().getRGB());
+              setting.setMin(gcol.getMin());
+              setting.setMax(gcol.getMax());
+              setting.setColourByLabel(gcol.isColourByLabel());
+              setting.setAutoScale(gcol.isAutoScale());
+              setting.setThreshold(gcol.getThresh());
+              setting.setThreshstate(gcol.getThreshType());
+            }
+            else
+            {
+              setting.setColour(ap.seqPanel.seqCanvas.getFeatureRenderer()
+                      .getColour(renderOrder[ro]).getRGB());
+            }
+
+            setting.setDisplay(av.featuresDisplayed
+                    .containsKey(renderOrder[ro]));
+            float rorder = ap.seqPanel.seqCanvas.getFeatureRenderer()
+                    .getOrder(renderOrder[ro]);
+            if (rorder > -1)
+            {
+              setting.setOrder(rorder);
+            }
+            fs.addSetting(setting);
+            settingsAdded.addElement(renderOrder[ro]);
           }
-          else
+        }
+
+        // Make sure we save none displayed feature settings
+        Iterator en = ap.seqPanel.seqCanvas.getFeatureRenderer().featureColours
+                .keySet().iterator();
+        while (en.hasNext())
+        {
+          String key = en.next().toString();
+          if (settingsAdded.contains(key))
           {
-            setting.setColour(ap.seqPanel.seqCanvas.getFeatureRenderer()
-                    .getColour(renderOrder[ro]).getRGB());
+            continue;
           }
 
-          setting.setDisplay(av.featuresDisplayed
-                  .containsKey(renderOrder[ro]));
+          Setting setting = new Setting();
+          setting.setType(key);
+          setting.setColour(ap.seqPanel.seqCanvas.getFeatureRenderer()
+                  .getColour(key).getRGB());
+
+          setting.setDisplay(false);
           float rorder = ap.seqPanel.seqCanvas.getFeatureRenderer()
-                  .getOrder(renderOrder[ro]);
+                  .getOrder(key);
           if (rorder > -1)
           {
             setting.setOrder(rorder);
           }
           fs.addSetting(setting);
-          settingsAdded.addElement(renderOrder[ro]);
+          settingsAdded.addElement(key);
         }
-      }
-
-      // Make sure we save none displayed feature settings
-      Iterator en = ap.seqPanel.seqCanvas.getFeatureRenderer().featureColours
-              .keySet().iterator();
-      while (en.hasNext())
-      {
-        String key = en.next().toString();
-        if (settingsAdded.contains(key))
+        en = ap.seqPanel.seqCanvas.getFeatureRenderer().featureGroups
+                .keySet().iterator();
+        Vector groupsAdded = new Vector();
+        while (en.hasNext())
         {
-          continue;
+          String grp = en.next().toString();
+          if (groupsAdded.contains(grp))
+          {
+            continue;
+          }
+          Group g = new Group();
+          g.setName(grp);
+          g.setDisplay(((Boolean) ap.seqPanel.seqCanvas
+                  .getFeatureRenderer().featureGroups.get(grp))
+                  .booleanValue());
+          fs.addGroup(g);
+          groupsAdded.addElement(grp);
         }
+        jms.setFeatureSettings(fs);
 
-        Setting setting = new Setting();
-        setting.setType(key);
-        setting.setColour(ap.seqPanel.seqCanvas.getFeatureRenderer()
-                .getColour(key).getRGB());
-
-        setting.setDisplay(false);
-        float rorder = ap.seqPanel.seqCanvas.getFeatureRenderer().getOrder(
-                key);
-        if (rorder > -1)
-        {
-          setting.setOrder(rorder);
-        }
-        fs.addSetting(setting);
-        settingsAdded.addElement(key);
       }
-      en = ap.seqPanel.seqCanvas.getFeatureRenderer().featureGroups
-              .keySet().iterator();
-      Vector groupsAdded = new Vector();
-      while (en.hasNext())
+
+      if (av.hasHiddenColumns())
       {
-        String grp = en.next().toString();
-        if (groupsAdded.contains(grp))
+        if (av.getColumnSelection() == null
+                || av.getColumnSelection().getHiddenColumns() == null)
         {
-          continue;
+          warn("REPORT BUG: avoided null columnselection bug (DMAM reported). Please contact Jim about this.");
         }
-        Group g = new Group();
-        g.setName(grp);
-        g.setDisplay(((Boolean) ap.seqPanel.seqCanvas.getFeatureRenderer().featureGroups
-                .get(grp)).booleanValue());
-        fs.addGroup(g);
-        groupsAdded.addElement(grp);
-      }
-      jms.setFeatureSettings(fs);
-
-    }
-
-    if (av.hasHiddenColumns())
-    {
-      if (av.getColumnSelection() == null
-              || av.getColumnSelection().getHiddenColumns() == null)
-      {
-        warn("REPORT BUG: avoided null columnselection bug (DMAM reported). Please contact Jim about this.");
-      }
-      else
-      {
-        for (int c = 0; c < av.getColumnSelection().getHiddenColumns()
-                .size(); c++)
+        else
         {
-          int[] region = (int[]) av.getColumnSelection().getHiddenColumns()
-                  .elementAt(c);
-          HiddenColumns hc = new HiddenColumns();
-          hc.setStart(region[0]);
-          hc.setEnd(region[1]);
-          view.addHiddenColumns(hc);
+          for (int c = 0; c < av.getColumnSelection().getHiddenColumns()
+                  .size(); c++)
+          {
+            int[] region = (int[]) av.getColumnSelection()
+                    .getHiddenColumns().elementAt(c);
+            HiddenColumns hc = new HiddenColumns();
+            hc.setStart(region[0]);
+            hc.setEnd(region[1]);
+            view.addHiddenColumns(hc);
+          }
         }
       }
-    }
-    if (calcIdSet.size() > 0)
-    {
-      for (String calcId : calcIdSet)
+      if (calcIdSet.size() > 0)
       {
-        if (calcId.trim().length() > 0)
+        for (String calcId : calcIdSet)
         {
-          CalcIdParam cidp = createCalcIdParam(calcId, av);
-          // Some calcIds have no parameters.
-          if (cidp != null)
+          if (calcId.trim().length() > 0)
           {
-            view.addCalcIdParam(cidp);
+            CalcIdParam cidp = createCalcIdParam(calcId, av);
+            // Some calcIds have no parameters.
+            if (cidp != null)
+            {
+              view.addCalcIdParam(cidp);
+            }
           }
         }
       }
-    }
-
-    jms.addViewport(view);
 
+      jms.addViewport(view);
+    }
     object.setJalviewModelSequence(jms);
     object.getVamsasModel().addSequenceSet(vamsasSet);
 
@@ -1290,6 +1250,145 @@ public class Jalview2XML
     return object;
   }
 
+  private void storeAlignmentAnnotation(AlignmentAnnotation[] aa, IdentityHashMap groupRefs, AlignmentViewport av, Set<String> calcIdSet, boolean storeDS, SequenceSet vamsasSet)
+  {
+
+    for (int i = 0; i < aa.length; i++)
+    {
+      Annotation an = new Annotation();
+
+      if (aa[i].annotationId != null)
+      {
+        annotationIds.put(aa[i].annotationId, aa[i]);
+      }
+
+      an.setId(aa[i].annotationId);
+
+      an.setVisible(aa[i].visible);
+
+      an.setDescription(aa[i].description);
+
+      if (aa[i].sequenceRef != null)
+      {
+        // TODO later annotation sequenceRef should be the XML ID of the
+        // sequence rather than its display name
+        an.setSequenceRef(aa[i].sequenceRef.getName());
+      }
+      if (aa[i].groupRef != null)
+      {
+        Object groupIdr = groupRefs.get(aa[i].groupRef);
+        if (groupIdr == null)
+        {
+          // make a locally unique String
+          groupRefs.put(aa[i].groupRef,
+                  groupIdr = ("" + System.currentTimeMillis()
+                          + aa[i].groupRef.getName() + groupRefs.size()));
+        }
+        an.setGroupRef(groupIdr.toString());
+      }
+
+      // store all visualization attributes for annotation
+      an.setGraphHeight(aa[i].graphHeight);
+      an.setCentreColLabels(aa[i].centreColLabels);
+      an.setScaleColLabels(aa[i].scaleColLabel);
+      an.setShowAllColLabels(aa[i].showAllColLabels);
+      an.setBelowAlignment(aa[i].belowAlignment);
+
+      if (aa[i].graph > 0)
+      {
+        an.setGraph(true);
+        an.setGraphType(aa[i].graph);
+        an.setGraphGroup(aa[i].graphGroup);
+        if (aa[i].getThreshold() != null)
+        {
+          ThresholdLine line = new ThresholdLine();
+          line.setLabel(aa[i].getThreshold().label);
+          line.setValue(aa[i].getThreshold().value);
+          line.setColour(aa[i].getThreshold().colour.getRGB());
+          an.setThresholdLine(line);
+        }
+      }
+      else
+      {
+        an.setGraph(false);
+      }
+
+      an.setLabel(aa[i].label);
+
+      if (aa[i] == av.getAlignmentQualityAnnot()
+              || aa[i] == av.getAlignmentConservationAnnotation()
+              || aa[i] == av.getAlignmentConsensusAnnotation()
+              || aa[i].autoCalculated)
+      {
+        // new way of indicating autocalculated annotation -
+        an.setAutoCalculated(aa[i].autoCalculated);
+      }
+      if (aa[i].hasScore())
+      {
+        an.setScore(aa[i].getScore());
+      }
+
+      if (aa[i].getCalcId() != null)
+      {
+        calcIdSet.add(aa[i].getCalcId());
+        an.setCalcId(aa[i].getCalcId());
+      }
+
+      AnnotationElement ae;
+      if (aa[i].annotations != null)
+      {
+        an.setScoreOnly(false);
+        for (int a = 0; a < aa[i].annotations.length; a++)
+        {
+          if ((aa[i] == null) || (aa[i].annotations[a] == null))
+          {
+            continue;
+          }
+
+          ae = new AnnotationElement();
+          if (aa[i].annotations[a].description != null)
+            ae.setDescription(aa[i].annotations[a].description);
+          if (aa[i].annotations[a].displayCharacter != null)
+            ae.setDisplayCharacter(aa[i].annotations[a].displayCharacter);
+
+          if (!Float.isNaN(aa[i].annotations[a].value))
+            ae.setValue(aa[i].annotations[a].value);
+
+          ae.setPosition(a);
+          if (aa[i].annotations[a].secondaryStructure != ' '
+                  && aa[i].annotations[a].secondaryStructure != '\0')
+            ae.setSecondaryStructure(aa[i].annotations[a].secondaryStructure
+                    + "");
+
+          if (aa[i].annotations[a].colour != null
+                  && aa[i].annotations[a].colour != java.awt.Color.black)
+          {
+            ae.setColour(aa[i].annotations[a].colour.getRGB());
+          }
+
+          an.addAnnotationElement(ae);
+          if (aa[i].autoCalculated)
+          {
+            // only write one non-null entry into the annotation row -
+            // sufficient to get the visualization attributes necessary to
+            // display data
+            continue;
+          }
+        }
+      }
+      else
+      {
+        an.setScoreOnly(true);
+      }
+      if (!storeDS || (storeDS && !aa[i].autoCalculated))
+      {
+        // skip autocalculated annotation - these are only provided for alignments
+        vamsasSet.addAnnotation(an);
+      }
+    }
+    
+  }
+
   private CalcIdParam createCalcIdParam(String calcId, AlignViewport av)
   {
     AutoCalcSetting settings = av.getCalcIdSettingsFor(calcId);
@@ -1773,7 +1872,7 @@ public class Jalview2XML
       frefedSequence = new Vector();
     }
 
-    jalview.gui.AlignFrame af = null;
+    jalview.gui.AlignFrame af= null,_af = null;
     Hashtable gatherToThisFrame = new Hashtable();
     final String file = jprovider.getFilename();
     try
@@ -1800,10 +1899,15 @@ public class Jalview2XML
           object = (JalviewModel) unmar.unmarshal(in);
           if (true) // !skipViewport(object))
           {
-            af = LoadFromObject(object, file, true, jprovider);
-            if (af.viewport.gatherViewsHere)
+            _af = LoadFromObject(object, file, true, jprovider);
+            if (object.getJalviewModelSequence().getViewportCount() > 0)
             {
-              gatherToThisFrame.put(af.viewport.getSequenceSetId(), af);
+              af = _af;
+              if (object.getJalviewModelSequence().getViewportCount() > 1
+                      && af.viewport.gatherViewsHere)
+              {
+                gatherToThisFrame.put(af.viewport.getSequenceSetId(), af);
+              }
             }
           }
           entryCount++;
@@ -2026,7 +2130,8 @@ public class Jalview2XML
 
     JalviewModelSequence jms = object.getJalviewModelSequence();
 
-    Viewport view = jms.getViewport(0);
+    Viewport view = (jms.getViewportCount()>0) ? jms.getViewport(0) : null;
+    
     // ////////////////////////////////
     // LOAD SEQUENCES
 
@@ -2551,7 +2656,11 @@ public class Jalview2XML
 
       }
     }
-
+    if (view==null)
+    {
+      // only dataset in this model, so just return.
+      return null;
+    }
     // ///////////////////////////////
     // LOAD VIEWPORT
 
index af45e9d..f307b15 100644 (file)
@@ -1,4 +1,4 @@
-#Thu Oct 17 10:35:33 BST 2013
+#Fri Apr 25 13:56:18 BST 2014
 jalview.schemabinding.version2.ThresholdLine=jalview.schemabinding.version2.descriptors.ThresholdLineDescriptor
 jalview.schemabinding.version2.SequenceSetProperties=jalview.schemabinding.version2.descriptors.SequenceSetPropertiesDescriptor
 jalview.schemabinding.version2.StructureState=jalview.schemabinding.version2.descriptors.StructureStateDescriptor
index 025de4d..f423223 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index 923a17a..f5654e9 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index 9e1850d..d3fde76 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index 475aef1..98c202e 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index a8a10c6..e20bbc4 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
 
 package jalview.schemabinding.version2;
 
-  //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
 //---------------------------------/
 
 import org.exolab.castor.xml.Marshaller;
@@ -31,461 +38,478 @@ import org.exolab.castor.xml.Unmarshaller;
  * 
  * @version $Revision$ $Date$
  */
-public class AnnotationColours implements java.io.Serializable {
-
-
-      //--------------------------/
-     //- Class/Member Variables -/
-    //--------------------------/
-
-    /**
-     * Field _aboveThreshold.
-     */
-    private int _aboveThreshold;
-
-    /**
-     * keeps track of state for field: _aboveThreshold
-     */
-    private boolean _has_aboveThreshold;
-
-    /**
-     * Field _annotation.
-     */
-    private java.lang.String _annotation;
-
-    /**
-     * Field _minColour.
-     */
-    private int _minColour;
-
-    /**
-     * keeps track of state for field: _minColour
-     */
-    private boolean _has_minColour;
-
-    /**
-     * Field _maxColour.
-     */
-    private int _maxColour;
-
-    /**
-     * keeps track of state for field: _maxColour
-     */
-    private boolean _has_maxColour;
-
-    /**
-     * Field _colourScheme.
-     */
-    private java.lang.String _colourScheme;
-
-    /**
-     * Field _threshold.
-     */
-    private float _threshold;
-
-    /**
-     * keeps track of state for field: _threshold
-     */
-    private boolean _has_threshold;
-
-    /**
-     * Field _perSequence.
-     */
-    private boolean _perSequence;
-
-    /**
-     * keeps track of state for field: _perSequence
-     */
-    private boolean _has_perSequence;
-
-    /**
-     * Field _predefinedColours.
-     */
-    private boolean _predefinedColours;
-
-    /**
-     * keeps track of state for field: _predefinedColours
-     */
-    private boolean _has_predefinedColours;
-
-
-      //----------------/
-     //- Constructors -/
-    //----------------/
-
-    public AnnotationColours() {
-        super();
-    }
-
-
-      //-----------/
-     //- Methods -/
-    //-----------/
-
-    /**
-     */
-    public void deleteAboveThreshold(
-    ) {
-        this._has_aboveThreshold= false;
-    }
-
-    /**
-     */
-    public void deleteMaxColour(
-    ) {
-        this._has_maxColour= false;
-    }
-
-    /**
-     */
-    public void deleteMinColour(
-    ) {
-        this._has_minColour= false;
-    }
-
-    /**
-     */
-    public void deletePerSequence(
-    ) {
-        this._has_perSequence= false;
-    }
-
-    /**
-     */
-    public void deletePredefinedColours(
-    ) {
-        this._has_predefinedColours= false;
-    }
-
-    /**
-     */
-    public void deleteThreshold(
-    ) {
-        this._has_threshold= false;
-    }
-
-    /**
-     * Returns the value of field 'aboveThreshold'.
-     * 
-     * @return the value of field 'AboveThreshold'.
-     */
-    public int getAboveThreshold(
-    ) {
-        return this._aboveThreshold;
-    }
-
-    /**
-     * Returns the value of field 'annotation'.
-     * 
-     * @return the value of field 'Annotation'.
-     */
-    public java.lang.String getAnnotation(
-    ) {
-        return this._annotation;
-    }
-
-    /**
-     * Returns the value of field 'colourScheme'.
-     * 
-     * @return the value of field 'ColourScheme'.
-     */
-    public java.lang.String getColourScheme(
-    ) {
-        return this._colourScheme;
-    }
-
-    /**
-     * Returns the value of field 'maxColour'.
-     * 
-     * @return the value of field 'MaxColour'.
-     */
-    public int getMaxColour(
-    ) {
-        return this._maxColour;
-    }
-
-    /**
-     * Returns the value of field 'minColour'.
-     * 
-     * @return the value of field 'MinColour'.
-     */
-    public int getMinColour(
-    ) {
-        return this._minColour;
-    }
-
-    /**
-     * Returns the value of field 'perSequence'.
-     * 
-     * @return the value of field 'PerSequence'.
-     */
-    public boolean getPerSequence(
-    ) {
-        return this._perSequence;
-    }
-
-    /**
-     * Returns the value of field 'predefinedColours'.
-     * 
-     * @return the value of field 'PredefinedColours'.
-     */
-    public boolean getPredefinedColours(
-    ) {
-        return this._predefinedColours;
-    }
-
-    /**
-     * Returns the value of field 'threshold'.
-     * 
-     * @return the value of field 'Threshold'.
-     */
-    public float getThreshold(
-    ) {
-        return this._threshold;
-    }
-
-    /**
-     * Method hasAboveThreshold.
-     * 
-     * @return true if at least one AboveThreshold has been added
-     */
-    public boolean hasAboveThreshold(
-    ) {
-        return this._has_aboveThreshold;
-    }
-
-    /**
-     * Method hasMaxColour.
-     * 
-     * @return true if at least one MaxColour has been added
-     */
-    public boolean hasMaxColour(
-    ) {
-        return this._has_maxColour;
-    }
-
-    /**
-     * Method hasMinColour.
-     * 
-     * @return true if at least one MinColour has been added
-     */
-    public boolean hasMinColour(
-    ) {
-        return this._has_minColour;
-    }
-
-    /**
-     * Method hasPerSequence.
-     * 
-     * @return true if at least one PerSequence has been added
-     */
-    public boolean hasPerSequence(
-    ) {
-        return this._has_perSequence;
-    }
-
-    /**
-     * Method hasPredefinedColours.
-     * 
-     * @return true if at least one PredefinedColours has been added
-     */
-    public boolean hasPredefinedColours(
-    ) {
-        return this._has_predefinedColours;
-    }
-
-    /**
-     * Method hasThreshold.
-     * 
-     * @return true if at least one Threshold has been added
-     */
-    public boolean hasThreshold(
-    ) {
-        return this._has_threshold;
-    }
-
-    /**
-     * Returns the value of field 'perSequence'.
-     * 
-     * @return the value of field 'PerSequence'.
-     */
-    public boolean isPerSequence(
-    ) {
-        return this._perSequence;
-    }
-
-    /**
-     * Returns the value of field 'predefinedColours'.
-     * 
-     * @return the value of field 'PredefinedColours'.
-     */
-    public boolean isPredefinedColours(
-    ) {
-        return this._predefinedColours;
-    }
-
-    /**
-     * Method isValid.
-     * 
-     * @return true if this object is valid according to the schema
-     */
-    public boolean isValid(
-    ) {
-        try {
-            validate();
-        } catch (org.exolab.castor.xml.ValidationException vex) {
-            return false;
-        }
-        return true;
-    }
-
-    /**
-     * 
-     * 
-     * @param out
-     * @throws org.exolab.castor.xml.MarshalException 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
-     */
-    public void marshal(
-            final java.io.Writer out)
-    throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
-        Marshaller.marshal(this, out);
-    }
-
-    /**
-     * 
-     * 
-     * @param handler
-     * @throws java.io.IOException if an IOException occurs during
-     * marshaling
-     * @throws org.exolab.castor.xml.ValidationException 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
-     */
-    public void marshal(
-            final org.xml.sax.ContentHandler handler)
-    throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
-        Marshaller.marshal(this, handler);
-    }
-
-    /**
-     * Sets the value of field 'aboveThreshold'.
-     * 
-     * @param aboveThreshold the value of field 'aboveThreshold'.
-     */
-    public void setAboveThreshold(
-            final int aboveThreshold) {
-        this._aboveThreshold = aboveThreshold;
-        this._has_aboveThreshold = true;
-    }
-
-    /**
-     * Sets the value of field 'annotation'.
-     * 
-     * @param annotation the value of field 'annotation'.
-     */
-    public void setAnnotation(
-            final java.lang.String annotation) {
-        this._annotation = annotation;
-    }
-
-    /**
-     * Sets the value of field 'colourScheme'.
-     * 
-     * @param colourScheme the value of field 'colourScheme'.
-     */
-    public void setColourScheme(
-            final java.lang.String colourScheme) {
-        this._colourScheme = colourScheme;
-    }
-
-    /**
-     * Sets the value of field 'maxColour'.
-     * 
-     * @param maxColour the value of field 'maxColour'.
-     */
-    public void setMaxColour(
-            final int maxColour) {
-        this._maxColour = maxColour;
-        this._has_maxColour = true;
-    }
-
-    /**
-     * Sets the value of field 'minColour'.
-     * 
-     * @param minColour the value of field 'minColour'.
-     */
-    public void setMinColour(
-            final int minColour) {
-        this._minColour = minColour;
-        this._has_minColour = true;
-    }
-
-    /**
-     * Sets the value of field 'perSequence'.
-     * 
-     * @param perSequence the value of field 'perSequence'.
-     */
-    public void setPerSequence(
-            final boolean perSequence) {
-        this._perSequence = perSequence;
-        this._has_perSequence = true;
-    }
-
-    /**
-     * Sets the value of field 'predefinedColours'.
-     * 
-     * @param predefinedColours the value of field
-     * 'predefinedColours'.
-     */
-    public void setPredefinedColours(
-            final boolean predefinedColours) {
-        this._predefinedColours = predefinedColours;
-        this._has_predefinedColours = true;
-    }
-
-    /**
-     * Sets the value of field 'threshold'.
-     * 
-     * @param threshold the value of field 'threshold'.
-     */
-    public void setThreshold(
-            final float threshold) {
-        this._threshold = threshold;
-        this._has_threshold = true;
-    }
-
-    /**
-     * Method unmarshal.
-     * 
-     * @param reader
-     * @throws org.exolab.castor.xml.MarshalException 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
-     * @return the unmarshaled
-     * jalview.schemabinding.version2.AnnotationColours
-     */
-    public static jalview.schemabinding.version2.AnnotationColours unmarshal(
-            final java.io.Reader reader)
-    throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
-        return (jalview.schemabinding.version2.AnnotationColours) Unmarshaller.unmarshal(jalview.schemabinding.version2.AnnotationColours.class, reader);
-    }
-
-    /**
-     * 
-     * 
-     * @throws org.exolab.castor.xml.ValidationException if this
-     * object is an invalid instance according to the schema
-     */
-    public void validate(
-    )
-    throws org.exolab.castor.xml.ValidationException {
-        org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
-        validator.validate(this);
-    }
+public class AnnotationColours implements java.io.Serializable
+{
+
+  // --------------------------/
+  // - Class/Member Variables -/
+  // --------------------------/
+
+  /**
+   * Field _aboveThreshold.
+   */
+  private int _aboveThreshold;
+
+  /**
+   * keeps track of state for field: _aboveThreshold
+   */
+  private boolean _has_aboveThreshold;
+
+  /**
+   * Field _annotation.
+   */
+  private java.lang.String _annotation;
+
+  /**
+   * Field _minColour.
+   */
+  private int _minColour;
+
+  /**
+   * keeps track of state for field: _minColour
+   */
+  private boolean _has_minColour;
+
+  /**
+   * Field _maxColour.
+   */
+  private int _maxColour;
+
+  /**
+   * keeps track of state for field: _maxColour
+   */
+  private boolean _has_maxColour;
+
+  /**
+   * Field _colourScheme.
+   */
+  private java.lang.String _colourScheme;
+
+  /**
+   * Field _threshold.
+   */
+  private float _threshold;
+
+  /**
+   * keeps track of state for field: _threshold
+   */
+  private boolean _has_threshold;
+
+  /**
+   * Field _perSequence.
+   */
+  private boolean _perSequence;
+
+  /**
+   * keeps track of state for field: _perSequence
+   */
+  private boolean _has_perSequence;
+
+  /**
+   * Field _predefinedColours.
+   */
+  private boolean _predefinedColours;
+
+  /**
+   * keeps track of state for field: _predefinedColours
+   */
+  private boolean _has_predefinedColours;
+
+  // ----------------/
+  // - Constructors -/
+  // ----------------/
+
+  public AnnotationColours()
+  {
+    super();
+  }
+
+  // -----------/
+  // - Methods -/
+  // -----------/
+
+  /**
+     */
+  public void deleteAboveThreshold()
+  {
+    this._has_aboveThreshold = false;
+  }
+
+  /**
+     */
+  public void deleteMaxColour()
+  {
+    this._has_maxColour = false;
+  }
+
+  /**
+     */
+  public void deleteMinColour()
+  {
+    this._has_minColour = false;
+  }
+
+  /**
+     */
+  public void deletePerSequence()
+  {
+    this._has_perSequence = false;
+  }
+
+  /**
+     */
+  public void deletePredefinedColours()
+  {
+    this._has_predefinedColours = false;
+  }
+
+  /**
+     */
+  public void deleteThreshold()
+  {
+    this._has_threshold = false;
+  }
+
+  /**
+   * Returns the value of field 'aboveThreshold'.
+   * 
+   * @return the value of field 'AboveThreshold'.
+   */
+  public int getAboveThreshold()
+  {
+    return this._aboveThreshold;
+  }
+
+  /**
+   * Returns the value of field 'annotation'.
+   * 
+   * @return the value of field 'Annotation'.
+   */
+  public java.lang.String getAnnotation()
+  {
+    return this._annotation;
+  }
+
+  /**
+   * Returns the value of field 'colourScheme'.
+   * 
+   * @return the value of field 'ColourScheme'.
+   */
+  public java.lang.String getColourScheme()
+  {
+    return this._colourScheme;
+  }
+
+  /**
+   * Returns the value of field 'maxColour'.
+   * 
+   * @return the value of field 'MaxColour'.
+   */
+  public int getMaxColour()
+  {
+    return this._maxColour;
+  }
+
+  /**
+   * Returns the value of field 'minColour'.
+   * 
+   * @return the value of field 'MinColour'.
+   */
+  public int getMinColour()
+  {
+    return this._minColour;
+  }
+
+  /**
+   * Returns the value of field 'perSequence'.
+   * 
+   * @return the value of field 'PerSequence'.
+   */
+  public boolean getPerSequence()
+  {
+    return this._perSequence;
+  }
+
+  /**
+   * Returns the value of field 'predefinedColours'.
+   * 
+   * @return the value of field 'PredefinedColours'.
+   */
+  public boolean getPredefinedColours()
+  {
+    return this._predefinedColours;
+  }
+
+  /**
+   * Returns the value of field 'threshold'.
+   * 
+   * @return the value of field 'Threshold'.
+   */
+  public float getThreshold()
+  {
+    return this._threshold;
+  }
+
+  /**
+   * Method hasAboveThreshold.
+   * 
+   * @return true if at least one AboveThreshold has been added
+   */
+  public boolean hasAboveThreshold()
+  {
+    return this._has_aboveThreshold;
+  }
+
+  /**
+   * Method hasMaxColour.
+   * 
+   * @return true if at least one MaxColour has been added
+   */
+  public boolean hasMaxColour()
+  {
+    return this._has_maxColour;
+  }
+
+  /**
+   * Method hasMinColour.
+   * 
+   * @return true if at least one MinColour has been added
+   */
+  public boolean hasMinColour()
+  {
+    return this._has_minColour;
+  }
+
+  /**
+   * Method hasPerSequence.
+   * 
+   * @return true if at least one PerSequence has been added
+   */
+  public boolean hasPerSequence()
+  {
+    return this._has_perSequence;
+  }
+
+  /**
+   * Method hasPredefinedColours.
+   * 
+   * @return true if at least one PredefinedColours has been added
+   */
+  public boolean hasPredefinedColours()
+  {
+    return this._has_predefinedColours;
+  }
+
+  /**
+   * Method hasThreshold.
+   * 
+   * @return true if at least one Threshold has been added
+   */
+  public boolean hasThreshold()
+  {
+    return this._has_threshold;
+  }
+
+  /**
+   * Returns the value of field 'perSequence'.
+   * 
+   * @return the value of field 'PerSequence'.
+   */
+  public boolean isPerSequence()
+  {
+    return this._perSequence;
+  }
+
+  /**
+   * Returns the value of field 'predefinedColours'.
+   * 
+   * @return the value of field 'PredefinedColours'.
+   */
+  public boolean isPredefinedColours()
+  {
+    return this._predefinedColours;
+  }
+
+  /**
+   * Method isValid.
+   * 
+   * @return true if this object is valid according to the schema
+   */
+  public boolean isValid()
+  {
+    try
+    {
+      validate();
+    } catch (org.exolab.castor.xml.ValidationException vex)
+    {
+      return false;
+    }
+    return true;
+  }
+
+  /**
+   * 
+   * 
+   * @param out
+   * @throws org.exolab.castor.xml.MarshalException
+   *           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
+   */
+  public void marshal(final java.io.Writer out)
+          throws org.exolab.castor.xml.MarshalException,
+          org.exolab.castor.xml.ValidationException
+  {
+    Marshaller.marshal(this, out);
+  }
+
+  /**
+   * 
+   * 
+   * @param handler
+   * @throws java.io.IOException
+   *           if an IOException occurs during marshaling
+   * @throws org.exolab.castor.xml.ValidationException
+   *           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
+   */
+  public void marshal(final org.xml.sax.ContentHandler handler)
+          throws java.io.IOException,
+          org.exolab.castor.xml.MarshalException,
+          org.exolab.castor.xml.ValidationException
+  {
+    Marshaller.marshal(this, handler);
+  }
+
+  /**
+   * Sets the value of field 'aboveThreshold'.
+   * 
+   * @param aboveThreshold
+   *          the value of field 'aboveThreshold'.
+   */
+  public void setAboveThreshold(final int aboveThreshold)
+  {
+    this._aboveThreshold = aboveThreshold;
+    this._has_aboveThreshold = true;
+  }
+
+  /**
+   * Sets the value of field 'annotation'.
+   * 
+   * @param annotation
+   *          the value of field 'annotation'.
+   */
+  public void setAnnotation(final java.lang.String annotation)
+  {
+    this._annotation = annotation;
+  }
+
+  /**
+   * Sets the value of field 'colourScheme'.
+   * 
+   * @param colourScheme
+   *          the value of field 'colourScheme'.
+   */
+  public void setColourScheme(final java.lang.String colourScheme)
+  {
+    this._colourScheme = colourScheme;
+  }
+
+  /**
+   * Sets the value of field 'maxColour'.
+   * 
+   * @param maxColour
+   *          the value of field 'maxColour'.
+   */
+  public void setMaxColour(final int maxColour)
+  {
+    this._maxColour = maxColour;
+    this._has_maxColour = true;
+  }
+
+  /**
+   * Sets the value of field 'minColour'.
+   * 
+   * @param minColour
+   *          the value of field 'minColour'.
+   */
+  public void setMinColour(final int minColour)
+  {
+    this._minColour = minColour;
+    this._has_minColour = true;
+  }
+
+  /**
+   * Sets the value of field 'perSequence'.
+   * 
+   * @param perSequence
+   *          the value of field 'perSequence'.
+   */
+  public void setPerSequence(final boolean perSequence)
+  {
+    this._perSequence = perSequence;
+    this._has_perSequence = true;
+  }
+
+  /**
+   * Sets the value of field 'predefinedColours'.
+   * 
+   * @param predefinedColours
+   *          the value of field 'predefinedColours'.
+   */
+  public void setPredefinedColours(final boolean predefinedColours)
+  {
+    this._predefinedColours = predefinedColours;
+    this._has_predefinedColours = true;
+  }
+
+  /**
+   * Sets the value of field 'threshold'.
+   * 
+   * @param threshold
+   *          the value of field 'threshold'.
+   */
+  public void setThreshold(final float threshold)
+  {
+    this._threshold = threshold;
+    this._has_threshold = true;
+  }
+
+  /**
+   * Method unmarshal.
+   * 
+   * @param reader
+   * @throws org.exolab.castor.xml.MarshalException
+   *           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
+   * @return the unmarshaled jalview.schemabinding.version2.AnnotationColours
+   */
+  public static jalview.schemabinding.version2.AnnotationColours unmarshal(
+          final java.io.Reader reader)
+          throws org.exolab.castor.xml.MarshalException,
+          org.exolab.castor.xml.ValidationException
+  {
+    return (jalview.schemabinding.version2.AnnotationColours) Unmarshaller
+            .unmarshal(
+                    jalview.schemabinding.version2.AnnotationColours.class,
+                    reader);
+  }
+
+  /**
+   * 
+   * 
+   * @throws org.exolab.castor.xml.ValidationException
+   *           if this object is an invalid instance according to the schema
+   */
+  public void validate() throws org.exolab.castor.xml.ValidationException
+  {
+    org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
+    validator.validate(this);
+  }
 
 }
index f86908c..a558e86 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index b758899..aab1434 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index d4d0f60..70409b6 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index f9d0ce5..de43ff4 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index 612c9b1..d7deeff 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index ed60cfa..30afdb4 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index 3a889b2..cfcd531 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index 43e71d0..f71c873 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index df4ff32..01ec035 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index 8b80750..56e43b7 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index 9c902a6..070ef7f 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index 770cb2c..5ffff2a 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index a2d8a36..1e3095c 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index abeff9e..2719ecd 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index f112e44..2eeb726 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index 558e3ef..55c54a5 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index 53b1ae3..d94d197 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index 9d54b40..69b7413 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index ca35463..b0f49d0 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index 22e35a2..7908828 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index cbe3778..a2584c2 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index 18dc89b..357c939 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 /**
index a5a3971..8c34216 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index eb30727..e91bd35 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index 00b9039..501c44e 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index 2990ce6..e399ed4 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index 8ec6a73..b46fb1d 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index 9ecebc3..1a6dc08 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index 3baa13b..9de7b21 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index 96a1726..428b3db 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index a8542c6..2e90527 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index f9d7c13..a2a13cb 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index 41ed009..da78647 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index e7d39ed..4c75230 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index 10081da..2d3e829 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index 3f3e3c4..7ea0a45 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index e08c1bc..a3e20c6 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index 03e0d1a..b645f0b 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2;
 
 //---------------------------------/
index d6289da..7adf1d0 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index b4ab798..47d6e01 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index 5b2c0d2..1cebb2a 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index 627ecde..954e3e5 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
 
 package jalview.schemabinding.version2.descriptors;
 
-  //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
 //---------------------------------/
 
 import jalview.schemabinding.version2.AnnotationColours;
@@ -30,468 +37,556 @@ import jalview.schemabinding.version2.AnnotationColours;
  * 
  * @version $Revision$ $Date$
  */
-public class AnnotationColoursDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
-
-
-      //--------------------------/
-     //- Class/Member Variables -/
-    //--------------------------/
-
-    /**
-     * Field _elementDefinition.
-     */
-    private boolean _elementDefinition;
-
-    /**
-     * Field _nsPrefix.
-     */
-    private java.lang.String _nsPrefix;
-
-    /**
-     * Field _nsURI.
-     */
-    private java.lang.String _nsURI;
-
-    /**
-     * Field _xmlName.
-     */
-    private java.lang.String _xmlName;
-
-
-      //----------------/
-     //- Constructors -/
-    //----------------/
-
-    public AnnotationColoursDescriptor() {
-        super();
-        _nsURI = "www.jalview.org";
-        _xmlName = "AnnotationColours";
-        _elementDefinition = true;
-        org.exolab.castor.xml.util.XMLFieldDescriptorImpl  desc           = null;
-        org.exolab.castor.mapping.FieldHandler             handler        = null;
-        org.exolab.castor.xml.FieldValidator               fieldValidator = null;
-        //-- initialize attribute descriptors
-        
-        //-- _aboveThreshold
-        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_aboveThreshold", "aboveThreshold", org.exolab.castor.xml.NodeType.Attribute);
-        handler = new org.exolab.castor.xml.XMLFieldHandler() {
-            public java.lang.Object getValue( java.lang.Object object ) 
-                throws IllegalStateException
-            {
-                AnnotationColours target = (AnnotationColours) object;
-                if (!target.hasAboveThreshold()) { return null; }
-                return new java.lang.Integer(target.getAboveThreshold());
-            }
-            public void setValue( java.lang.Object object, java.lang.Object value) 
-                throws IllegalStateException, IllegalArgumentException
-            {
-                try {
-                    AnnotationColours target = (AnnotationColours) object;
-                    // if null, use delete method for optional primitives 
-                    if (value == null) {
-                        target.deleteAboveThreshold();
-                        return;
-                    }
-                    target.setAboveThreshold( ((java.lang.Integer) value).intValue());
-                } catch (java.lang.Exception ex) {
-                    throw new IllegalStateException(ex.toString());
-                }
-            }
-            public java.lang.Object newInstance(java.lang.Object parent) {
-                return null;
-            }
-        };
-        desc.setHandler(handler);
-        desc.setMultivalued(false);
-        addFieldDescriptor(desc);
-        
-        //-- validation code for: _aboveThreshold
-        fieldValidator = new org.exolab.castor.xml.FieldValidator();
-        { //-- local scope
-            org.exolab.castor.xml.validators.IntValidator typeValidator;
-            typeValidator = new org.exolab.castor.xml.validators.IntValidator();
-            fieldValidator.setValidator(typeValidator);
-            typeValidator.setMinInclusive(-2147483648);
-            typeValidator.setMaxInclusive(2147483647);
-        }
-        desc.setValidator(fieldValidator);
-        //-- _annotation
-        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_annotation", "annotation", org.exolab.castor.xml.NodeType.Attribute);
-        desc.setImmutable(true);
-        handler = new org.exolab.castor.xml.XMLFieldHandler() {
-            public java.lang.Object getValue( java.lang.Object object ) 
-                throws IllegalStateException
-            {
-                AnnotationColours target = (AnnotationColours) object;
-                return target.getAnnotation();
-            }
-            public void setValue( java.lang.Object object, java.lang.Object value) 
-                throws IllegalStateException, IllegalArgumentException
-            {
-                try {
-                    AnnotationColours target = (AnnotationColours) object;
-                    target.setAnnotation( (java.lang.String) value);
-                } catch (java.lang.Exception ex) {
-                    throw new IllegalStateException(ex.toString());
-                }
-            }
-            public java.lang.Object newInstance(java.lang.Object parent) {
-                return null;
-            }
-        };
-        desc.setHandler(handler);
-        desc.setMultivalued(false);
-        addFieldDescriptor(desc);
-        
-        //-- validation code for: _annotation
-        fieldValidator = new org.exolab.castor.xml.FieldValidator();
-        { //-- local scope
-            org.exolab.castor.xml.validators.StringValidator typeValidator;
-            typeValidator = new org.exolab.castor.xml.validators.StringValidator();
-            fieldValidator.setValidator(typeValidator);
-            typeValidator.setWhiteSpace("preserve");
+public class AnnotationColoursDescriptor extends
+        org.exolab.castor.xml.util.XMLClassDescriptorImpl
+{
+
+  // --------------------------/
+  // - Class/Member Variables -/
+  // --------------------------/
+
+  /**
+   * Field _elementDefinition.
+   */
+  private boolean _elementDefinition;
+
+  /**
+   * Field _nsPrefix.
+   */
+  private java.lang.String _nsPrefix;
+
+  /**
+   * Field _nsURI.
+   */
+  private java.lang.String _nsURI;
+
+  /**
+   * Field _xmlName.
+   */
+  private java.lang.String _xmlName;
+
+  // ----------------/
+  // - Constructors -/
+  // ----------------/
+
+  public AnnotationColoursDescriptor()
+  {
+    super();
+    _nsURI = "www.jalview.org";
+    _xmlName = "AnnotationColours";
+    _elementDefinition = true;
+    org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
+    org.exolab.castor.mapping.FieldHandler handler = null;
+    org.exolab.castor.xml.FieldValidator fieldValidator = null;
+    // -- initialize attribute descriptors
+
+    // -- _aboveThreshold
+    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+            java.lang.Integer.TYPE, "_aboveThreshold", "aboveThreshold",
+            org.exolab.castor.xml.NodeType.Attribute);
+    handler = new org.exolab.castor.xml.XMLFieldHandler()
+    {
+      public java.lang.Object getValue(java.lang.Object object)
+              throws IllegalStateException
+      {
+        AnnotationColours target = (AnnotationColours) object;
+        if (!target.hasAboveThreshold())
+        {
+          return null;
         }
-        desc.setValidator(fieldValidator);
-        //-- _minColour
-        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_minColour", "minColour", org.exolab.castor.xml.NodeType.Attribute);
-        handler = new org.exolab.castor.xml.XMLFieldHandler() {
-            public java.lang.Object getValue( java.lang.Object object ) 
-                throws IllegalStateException
-            {
-                AnnotationColours target = (AnnotationColours) object;
-                if (!target.hasMinColour()) { return null; }
-                return new java.lang.Integer(target.getMinColour());
-            }
-            public void setValue( java.lang.Object object, java.lang.Object value) 
-                throws IllegalStateException, IllegalArgumentException
-            {
-                try {
-                    AnnotationColours target = (AnnotationColours) object;
-                    // if null, use delete method for optional primitives 
-                    if (value == null) {
-                        target.deleteMinColour();
-                        return;
-                    }
-                    target.setMinColour( ((java.lang.Integer) value).intValue());
-                } catch (java.lang.Exception ex) {
-                    throw new IllegalStateException(ex.toString());
-                }
-            }
-            public java.lang.Object newInstance(java.lang.Object parent) {
-                return null;
-            }
-        };
-        desc.setHandler(handler);
-        desc.setMultivalued(false);
-        addFieldDescriptor(desc);
-        
-        //-- validation code for: _minColour
-        fieldValidator = new org.exolab.castor.xml.FieldValidator();
-        { //-- local scope
-            org.exolab.castor.xml.validators.IntValidator typeValidator;
-            typeValidator = new org.exolab.castor.xml.validators.IntValidator();
-            fieldValidator.setValidator(typeValidator);
-            typeValidator.setMinInclusive(-2147483648);
-            typeValidator.setMaxInclusive(2147483647);
+        return new java.lang.Integer(target.getAboveThreshold());
+      }
+
+      public void setValue(java.lang.Object object, java.lang.Object value)
+              throws IllegalStateException, IllegalArgumentException
+      {
+        try
+        {
+          AnnotationColours target = (AnnotationColours) object;
+          // if null, use delete method for optional primitives
+          if (value == null)
+          {
+            target.deleteAboveThreshold();
+            return;
+          }
+          target.setAboveThreshold(((java.lang.Integer) value).intValue());
+        } catch (java.lang.Exception ex)
+        {
+          throw new IllegalStateException(ex.toString());
         }
-        desc.setValidator(fieldValidator);
-        //-- _maxColour
-        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_maxColour", "maxColour", org.exolab.castor.xml.NodeType.Attribute);
-        handler = new org.exolab.castor.xml.XMLFieldHandler() {
-            public java.lang.Object getValue( java.lang.Object object ) 
-                throws IllegalStateException
-            {
-                AnnotationColours target = (AnnotationColours) object;
-                if (!target.hasMaxColour()) { return null; }
-                return new java.lang.Integer(target.getMaxColour());
-            }
-            public void setValue( java.lang.Object object, java.lang.Object value) 
-                throws IllegalStateException, IllegalArgumentException
-            {
-                try {
-                    AnnotationColours target = (AnnotationColours) object;
-                    // if null, use delete method for optional primitives 
-                    if (value == null) {
-                        target.deleteMaxColour();
-                        return;
-                    }
-                    target.setMaxColour( ((java.lang.Integer) value).intValue());
-                } catch (java.lang.Exception ex) {
-                    throw new IllegalStateException(ex.toString());
-                }
-            }
-            public java.lang.Object newInstance(java.lang.Object parent) {
-                return null;
-            }
-        };
-        desc.setHandler(handler);
-        desc.setMultivalued(false);
-        addFieldDescriptor(desc);
-        
-        //-- validation code for: _maxColour
-        fieldValidator = new org.exolab.castor.xml.FieldValidator();
-        { //-- local scope
-            org.exolab.castor.xml.validators.IntValidator typeValidator;
-            typeValidator = new org.exolab.castor.xml.validators.IntValidator();
-            fieldValidator.setValidator(typeValidator);
-            typeValidator.setMinInclusive(-2147483648);
-            typeValidator.setMaxInclusive(2147483647);
+      }
+
+      public java.lang.Object newInstance(java.lang.Object parent)
+      {
+        return null;
+      }
+    };
+    desc.setHandler(handler);
+    desc.setMultivalued(false);
+    addFieldDescriptor(desc);
+
+    // -- validation code for: _aboveThreshold
+    fieldValidator = new org.exolab.castor.xml.FieldValidator();
+    { // -- local scope
+      org.exolab.castor.xml.validators.IntValidator typeValidator;
+      typeValidator = new org.exolab.castor.xml.validators.IntValidator();
+      fieldValidator.setValidator(typeValidator);
+      typeValidator.setMinInclusive(-2147483648);
+      typeValidator.setMaxInclusive(2147483647);
+    }
+    desc.setValidator(fieldValidator);
+    // -- _annotation
+    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+            java.lang.String.class, "_annotation", "annotation",
+            org.exolab.castor.xml.NodeType.Attribute);
+    desc.setImmutable(true);
+    handler = new org.exolab.castor.xml.XMLFieldHandler()
+    {
+      public java.lang.Object getValue(java.lang.Object object)
+              throws IllegalStateException
+      {
+        AnnotationColours target = (AnnotationColours) object;
+        return target.getAnnotation();
+      }
+
+      public void setValue(java.lang.Object object, java.lang.Object value)
+              throws IllegalStateException, IllegalArgumentException
+      {
+        try
+        {
+          AnnotationColours target = (AnnotationColours) object;
+          target.setAnnotation((java.lang.String) value);
+        } catch (java.lang.Exception ex)
+        {
+          throw new IllegalStateException(ex.toString());
         }
-        desc.setValidator(fieldValidator);
-        //-- _colourScheme
-        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_colourScheme", "colourScheme", org.exolab.castor.xml.NodeType.Attribute);
-        desc.setImmutable(true);
-        handler = new org.exolab.castor.xml.XMLFieldHandler() {
-            public java.lang.Object getValue( java.lang.Object object ) 
-                throws IllegalStateException
-            {
-                AnnotationColours target = (AnnotationColours) object;
-                return target.getColourScheme();
-            }
-            public void setValue( java.lang.Object object, java.lang.Object value) 
-                throws IllegalStateException, IllegalArgumentException
-            {
-                try {
-                    AnnotationColours target = (AnnotationColours) object;
-                    target.setColourScheme( (java.lang.String) value);
-                } catch (java.lang.Exception ex) {
-                    throw new IllegalStateException(ex.toString());
-                }
-            }
-            public java.lang.Object newInstance(java.lang.Object parent) {
-                return null;
-            }
-        };
-        desc.setHandler(handler);
-        desc.setMultivalued(false);
-        addFieldDescriptor(desc);
-        
-        //-- validation code for: _colourScheme
-        fieldValidator = new org.exolab.castor.xml.FieldValidator();
-        { //-- local scope
-            org.exolab.castor.xml.validators.StringValidator typeValidator;
-            typeValidator = new org.exolab.castor.xml.validators.StringValidator();
-            fieldValidator.setValidator(typeValidator);
-            typeValidator.setWhiteSpace("preserve");
+      }
+
+      public java.lang.Object newInstance(java.lang.Object parent)
+      {
+        return null;
+      }
+    };
+    desc.setHandler(handler);
+    desc.setMultivalued(false);
+    addFieldDescriptor(desc);
+
+    // -- validation code for: _annotation
+    fieldValidator = new org.exolab.castor.xml.FieldValidator();
+    { // -- local scope
+      org.exolab.castor.xml.validators.StringValidator typeValidator;
+      typeValidator = new org.exolab.castor.xml.validators.StringValidator();
+      fieldValidator.setValidator(typeValidator);
+      typeValidator.setWhiteSpace("preserve");
+    }
+    desc.setValidator(fieldValidator);
+    // -- _minColour
+    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+            java.lang.Integer.TYPE, "_minColour", "minColour",
+            org.exolab.castor.xml.NodeType.Attribute);
+    handler = new org.exolab.castor.xml.XMLFieldHandler()
+    {
+      public java.lang.Object getValue(java.lang.Object object)
+              throws IllegalStateException
+      {
+        AnnotationColours target = (AnnotationColours) object;
+        if (!target.hasMinColour())
+        {
+          return null;
         }
-        desc.setValidator(fieldValidator);
-        //-- _threshold
-        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Float.TYPE, "_threshold", "threshold", org.exolab.castor.xml.NodeType.Attribute);
-        handler = new org.exolab.castor.xml.XMLFieldHandler() {
-            public java.lang.Object getValue( java.lang.Object object ) 
-                throws IllegalStateException
-            {
-                AnnotationColours target = (AnnotationColours) object;
-                if (!target.hasThreshold()) { return null; }
-                return new java.lang.Float(target.getThreshold());
-            }
-            public void setValue( java.lang.Object object, java.lang.Object value) 
-                throws IllegalStateException, IllegalArgumentException
-            {
-                try {
-                    AnnotationColours target = (AnnotationColours) object;
-                    // if null, use delete method for optional primitives 
-                    if (value == null) {
-                        target.deleteThreshold();
-                        return;
-                    }
-                    target.setThreshold( ((java.lang.Float) value).floatValue());
-                } catch (java.lang.Exception ex) {
-                    throw new IllegalStateException(ex.toString());
-                }
-            }
-            public java.lang.Object newInstance(java.lang.Object parent) {
-                return null;
-            }
-        };
-        desc.setHandler(handler);
-        desc.setMultivalued(false);
-        addFieldDescriptor(desc);
-        
-        //-- validation code for: _threshold
-        fieldValidator = new org.exolab.castor.xml.FieldValidator();
-        { //-- local scope
-            org.exolab.castor.xml.validators.FloatValidator typeValidator;
-            typeValidator = new org.exolab.castor.xml.validators.FloatValidator();
-            fieldValidator.setValidator(typeValidator);
-            typeValidator.setMinInclusive((float) -3.4028235E38);
-            typeValidator.setMaxInclusive((float) 3.4028235E38);
+        return new java.lang.Integer(target.getMinColour());
+      }
+
+      public void setValue(java.lang.Object object, java.lang.Object value)
+              throws IllegalStateException, IllegalArgumentException
+      {
+        try
+        {
+          AnnotationColours target = (AnnotationColours) object;
+          // if null, use delete method for optional primitives
+          if (value == null)
+          {
+            target.deleteMinColour();
+            return;
+          }
+          target.setMinColour(((java.lang.Integer) value).intValue());
+        } catch (java.lang.Exception ex)
+        {
+          throw new IllegalStateException(ex.toString());
         }
-        desc.setValidator(fieldValidator);
-        //-- _perSequence
-        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_perSequence", "perSequence", org.exolab.castor.xml.NodeType.Attribute);
-        handler = new org.exolab.castor.xml.XMLFieldHandler() {
-            public java.lang.Object getValue( java.lang.Object object ) 
-                throws IllegalStateException
-            {
-                AnnotationColours target = (AnnotationColours) object;
-                if (!target.hasPerSequence()) { return null; }
-                return (target.getPerSequence() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
-            }
-            public void setValue( java.lang.Object object, java.lang.Object value) 
-                throws IllegalStateException, IllegalArgumentException
-            {
-                try {
-                    AnnotationColours target = (AnnotationColours) object;
-                    // if null, use delete method for optional primitives 
-                    if (value == null) {
-                        target.deletePerSequence();
-                        return;
-                    }
-                    target.setPerSequence( ((java.lang.Boolean) value).booleanValue());
-                } catch (java.lang.Exception ex) {
-                    throw new IllegalStateException(ex.toString());
-                }
-            }
-            public java.lang.Object newInstance(java.lang.Object parent) {
-                return null;
-            }
-        };
-        desc.setHandler(handler);
-        desc.setMultivalued(false);
-        addFieldDescriptor(desc);
-        
-        //-- validation code for: _perSequence
-        fieldValidator = new org.exolab.castor.xml.FieldValidator();
-        { //-- local scope
-            org.exolab.castor.xml.validators.BooleanValidator typeValidator;
-            typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
-            fieldValidator.setValidator(typeValidator);
+      }
+
+      public java.lang.Object newInstance(java.lang.Object parent)
+      {
+        return null;
+      }
+    };
+    desc.setHandler(handler);
+    desc.setMultivalued(false);
+    addFieldDescriptor(desc);
+
+    // -- validation code for: _minColour
+    fieldValidator = new org.exolab.castor.xml.FieldValidator();
+    { // -- local scope
+      org.exolab.castor.xml.validators.IntValidator typeValidator;
+      typeValidator = new org.exolab.castor.xml.validators.IntValidator();
+      fieldValidator.setValidator(typeValidator);
+      typeValidator.setMinInclusive(-2147483648);
+      typeValidator.setMaxInclusive(2147483647);
+    }
+    desc.setValidator(fieldValidator);
+    // -- _maxColour
+    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+            java.lang.Integer.TYPE, "_maxColour", "maxColour",
+            org.exolab.castor.xml.NodeType.Attribute);
+    handler = new org.exolab.castor.xml.XMLFieldHandler()
+    {
+      public java.lang.Object getValue(java.lang.Object object)
+              throws IllegalStateException
+      {
+        AnnotationColours target = (AnnotationColours) object;
+        if (!target.hasMaxColour())
+        {
+          return null;
         }
-        desc.setValidator(fieldValidator);
-        //-- _predefinedColours
-        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_predefinedColours", "predefinedColours", org.exolab.castor.xml.NodeType.Attribute);
-        handler = new org.exolab.castor.xml.XMLFieldHandler() {
-            public java.lang.Object getValue( java.lang.Object object ) 
-                throws IllegalStateException
-            {
-                AnnotationColours target = (AnnotationColours) object;
-                if (!target.hasPredefinedColours()) { return null; }
-                return (target.getPredefinedColours() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
-            }
-            public void setValue( java.lang.Object object, java.lang.Object value) 
-                throws IllegalStateException, IllegalArgumentException
-            {
-                try {
-                    AnnotationColours target = (AnnotationColours) object;
-                    // if null, use delete method for optional primitives 
-                    if (value == null) {
-                        target.deletePredefinedColours();
-                        return;
-                    }
-                    target.setPredefinedColours( ((java.lang.Boolean) value).booleanValue());
-                } catch (java.lang.Exception ex) {
-                    throw new IllegalStateException(ex.toString());
-                }
-            }
-            public java.lang.Object newInstance(java.lang.Object parent) {
-                return null;
-            }
-        };
-        desc.setHandler(handler);
-        desc.setMultivalued(false);
-        addFieldDescriptor(desc);
-        
-        //-- validation code for: _predefinedColours
-        fieldValidator = new org.exolab.castor.xml.FieldValidator();
-        { //-- local scope
-            org.exolab.castor.xml.validators.BooleanValidator typeValidator;
-            typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
-            fieldValidator.setValidator(typeValidator);
+        return new java.lang.Integer(target.getMaxColour());
+      }
+
+      public void setValue(java.lang.Object object, java.lang.Object value)
+              throws IllegalStateException, IllegalArgumentException
+      {
+        try
+        {
+          AnnotationColours target = (AnnotationColours) object;
+          // if null, use delete method for optional primitives
+          if (value == null)
+          {
+            target.deleteMaxColour();
+            return;
+          }
+          target.setMaxColour(((java.lang.Integer) value).intValue());
+        } catch (java.lang.Exception ex)
+        {
+          throw new IllegalStateException(ex.toString());
         }
-        desc.setValidator(fieldValidator);
-        //-- initialize element descriptors
-        
-    }
+      }
 
+      public java.lang.Object newInstance(java.lang.Object parent)
+      {
+        return null;
+      }
+    };
+    desc.setHandler(handler);
+    desc.setMultivalued(false);
+    addFieldDescriptor(desc);
 
-      //-----------/
-     //- Methods -/
-    //-----------/
+    // -- validation code for: _maxColour
+    fieldValidator = new org.exolab.castor.xml.FieldValidator();
+    { // -- local scope
+      org.exolab.castor.xml.validators.IntValidator typeValidator;
+      typeValidator = new org.exolab.castor.xml.validators.IntValidator();
+      fieldValidator.setValidator(typeValidator);
+      typeValidator.setMinInclusive(-2147483648);
+      typeValidator.setMaxInclusive(2147483647);
+    }
+    desc.setValidator(fieldValidator);
+    // -- _colourScheme
+    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+            java.lang.String.class, "_colourScheme", "colourScheme",
+            org.exolab.castor.xml.NodeType.Attribute);
+    desc.setImmutable(true);
+    handler = new org.exolab.castor.xml.XMLFieldHandler()
+    {
+      public java.lang.Object getValue(java.lang.Object object)
+              throws IllegalStateException
+      {
+        AnnotationColours target = (AnnotationColours) object;
+        return target.getColourScheme();
+      }
+
+      public void setValue(java.lang.Object object, java.lang.Object value)
+              throws IllegalStateException, IllegalArgumentException
+      {
+        try
+        {
+          AnnotationColours target = (AnnotationColours) object;
+          target.setColourScheme((java.lang.String) value);
+        } catch (java.lang.Exception ex)
+        {
+          throw new IllegalStateException(ex.toString());
+        }
+      }
 
-    /**
-     * Method getAccessMode.
-     * 
-     * @return the access mode specified for this class.
-     */
-    public org.exolab.castor.mapping.AccessMode getAccessMode(
-    ) {
+      public java.lang.Object newInstance(java.lang.Object parent)
+      {
         return null;
-    }
+      }
+    };
+    desc.setHandler(handler);
+    desc.setMultivalued(false);
+    addFieldDescriptor(desc);
 
-    /**
-     * Method getIdentity.
-     * 
-     * @return the identity field, null if this class has no
-     * identity.
-     */
-    public org.exolab.castor.mapping.FieldDescriptor getIdentity(
-    ) {
-        return super.getIdentity();
+    // -- validation code for: _colourScheme
+    fieldValidator = new org.exolab.castor.xml.FieldValidator();
+    { // -- local scope
+      org.exolab.castor.xml.validators.StringValidator typeValidator;
+      typeValidator = new org.exolab.castor.xml.validators.StringValidator();
+      fieldValidator.setValidator(typeValidator);
+      typeValidator.setWhiteSpace("preserve");
     }
+    desc.setValidator(fieldValidator);
+    // -- _threshold
+    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+            java.lang.Float.TYPE, "_threshold", "threshold",
+            org.exolab.castor.xml.NodeType.Attribute);
+    handler = new org.exolab.castor.xml.XMLFieldHandler()
+    {
+      public java.lang.Object getValue(java.lang.Object object)
+              throws IllegalStateException
+      {
+        AnnotationColours target = (AnnotationColours) object;
+        if (!target.hasThreshold())
+        {
+          return null;
+        }
+        return new java.lang.Float(target.getThreshold());
+      }
 
-    /**
-     * Method getJavaClass.
-     * 
-     * @return the Java class represented by this descriptor.
-     */
-    public java.lang.Class getJavaClass(
-    ) {
-        return jalview.schemabinding.version2.AnnotationColours.class;
-    }
+      public void setValue(java.lang.Object object, java.lang.Object value)
+              throws IllegalStateException, IllegalArgumentException
+      {
+        try
+        {
+          AnnotationColours target = (AnnotationColours) object;
+          // if null, use delete method for optional primitives
+          if (value == null)
+          {
+            target.deleteThreshold();
+            return;
+          }
+          target.setThreshold(((java.lang.Float) value).floatValue());
+        } catch (java.lang.Exception ex)
+        {
+          throw new IllegalStateException(ex.toString());
+        }
+      }
 
-    /**
-     * Method getNameSpacePrefix.
-     * 
-     * @return the namespace prefix to use when marshaling as XML.
-     */
-    public java.lang.String getNameSpacePrefix(
-    ) {
-        return _nsPrefix;
-    }
+      public java.lang.Object newInstance(java.lang.Object parent)
+      {
+        return null;
+      }
+    };
+    desc.setHandler(handler);
+    desc.setMultivalued(false);
+    addFieldDescriptor(desc);
 
-    /**
-     * Method getNameSpaceURI.
-     * 
-     * @return the namespace URI used when marshaling and
-     * unmarshaling as XML.
-     */
-    public java.lang.String getNameSpaceURI(
-    ) {
-        return _nsURI;
+    // -- validation code for: _threshold
+    fieldValidator = new org.exolab.castor.xml.FieldValidator();
+    { // -- local scope
+      org.exolab.castor.xml.validators.FloatValidator typeValidator;
+      typeValidator = new org.exolab.castor.xml.validators.FloatValidator();
+      fieldValidator.setValidator(typeValidator);
+      typeValidator.setMinInclusive((float) -3.4028235E38);
+      typeValidator.setMaxInclusive((float) 3.4028235E38);
     }
+    desc.setValidator(fieldValidator);
+    // -- _perSequence
+    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+            java.lang.Boolean.TYPE, "_perSequence", "perSequence",
+            org.exolab.castor.xml.NodeType.Attribute);
+    handler = new org.exolab.castor.xml.XMLFieldHandler()
+    {
+      public java.lang.Object getValue(java.lang.Object object)
+              throws IllegalStateException
+      {
+        AnnotationColours target = (AnnotationColours) object;
+        if (!target.hasPerSequence())
+        {
+          return null;
+        }
+        return (target.getPerSequence() ? java.lang.Boolean.TRUE
+                : java.lang.Boolean.FALSE);
+      }
 
-    /**
-     * Method getValidator.
-     * 
-     * @return a specific validator for the class described by this
-     * ClassDescriptor.
-     */
-    public org.exolab.castor.xml.TypeValidator getValidator(
-    ) {
-        return this;
-    }
+      public void setValue(java.lang.Object object, java.lang.Object value)
+              throws IllegalStateException, IllegalArgumentException
+      {
+        try
+        {
+          AnnotationColours target = (AnnotationColours) object;
+          // if null, use delete method for optional primitives
+          if (value == null)
+          {
+            target.deletePerSequence();
+            return;
+          }
+          target.setPerSequence(((java.lang.Boolean) value).booleanValue());
+        } catch (java.lang.Exception ex)
+        {
+          throw new IllegalStateException(ex.toString());
+        }
+      }
 
-    /**
-     * Method getXMLName.
-     * 
-     * @return the XML Name for the Class being described.
-     */
-    public java.lang.String getXMLName(
-    ) {
-        return _xmlName;
+      public java.lang.Object newInstance(java.lang.Object parent)
+      {
+        return null;
+      }
+    };
+    desc.setHandler(handler);
+    desc.setMultivalued(false);
+    addFieldDescriptor(desc);
+
+    // -- validation code for: _perSequence
+    fieldValidator = new org.exolab.castor.xml.FieldValidator();
+    { // -- local scope
+      org.exolab.castor.xml.validators.BooleanValidator typeValidator;
+      typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
+      fieldValidator.setValidator(typeValidator);
     }
+    desc.setValidator(fieldValidator);
+    // -- _predefinedColours
+    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+            java.lang.Boolean.TYPE, "_predefinedColours",
+            "predefinedColours", org.exolab.castor.xml.NodeType.Attribute);
+    handler = new org.exolab.castor.xml.XMLFieldHandler()
+    {
+      public java.lang.Object getValue(java.lang.Object object)
+              throws IllegalStateException
+      {
+        AnnotationColours target = (AnnotationColours) object;
+        if (!target.hasPredefinedColours())
+        {
+          return null;
+        }
+        return (target.getPredefinedColours() ? java.lang.Boolean.TRUE
+                : java.lang.Boolean.FALSE);
+      }
 
-    /**
-     * Method isElementDefinition.
-     * 
-     * @return true if XML schema definition of this Class is that
-     * of a global
-     * element or element with anonymous type definition.
-     */
-    public boolean isElementDefinition(
-    ) {
-        return _elementDefinition;
+      public void setValue(java.lang.Object object, java.lang.Object value)
+              throws IllegalStateException, IllegalArgumentException
+      {
+        try
+        {
+          AnnotationColours target = (AnnotationColours) object;
+          // if null, use delete method for optional primitives
+          if (value == null)
+          {
+            target.deletePredefinedColours();
+            return;
+          }
+          target.setPredefinedColours(((java.lang.Boolean) value)
+                  .booleanValue());
+        } catch (java.lang.Exception ex)
+        {
+          throw new IllegalStateException(ex.toString());
+        }
+      }
+
+      public java.lang.Object newInstance(java.lang.Object parent)
+      {
+        return null;
+      }
+    };
+    desc.setHandler(handler);
+    desc.setMultivalued(false);
+    addFieldDescriptor(desc);
+
+    // -- validation code for: _predefinedColours
+    fieldValidator = new org.exolab.castor.xml.FieldValidator();
+    { // -- local scope
+      org.exolab.castor.xml.validators.BooleanValidator typeValidator;
+      typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
+      fieldValidator.setValidator(typeValidator);
     }
+    desc.setValidator(fieldValidator);
+    // -- initialize element descriptors
+
+  }
+
+  // -----------/
+  // - Methods -/
+  // -----------/
+
+  /**
+   * Method getAccessMode.
+   * 
+   * @return the access mode specified for this class.
+   */
+  public org.exolab.castor.mapping.AccessMode getAccessMode()
+  {
+    return null;
+  }
+
+  /**
+   * Method getIdentity.
+   * 
+   * @return the identity field, null if this class has no identity.
+   */
+  public org.exolab.castor.mapping.FieldDescriptor getIdentity()
+  {
+    return super.getIdentity();
+  }
+
+  /**
+   * Method getJavaClass.
+   * 
+   * @return the Java class represented by this descriptor.
+   */
+  public java.lang.Class getJavaClass()
+  {
+    return jalview.schemabinding.version2.AnnotationColours.class;
+  }
+
+  /**
+   * Method getNameSpacePrefix.
+   * 
+   * @return the namespace prefix to use when marshaling as XML.
+   */
+  public java.lang.String getNameSpacePrefix()
+  {
+    return _nsPrefix;
+  }
+
+  /**
+   * Method getNameSpaceURI.
+   * 
+   * @return the namespace URI used when marshaling and unmarshaling as XML.
+   */
+  public java.lang.String getNameSpaceURI()
+  {
+    return _nsURI;
+  }
+
+  /**
+   * Method getValidator.
+   * 
+   * @return a specific validator for the class described by this
+   *         ClassDescriptor.
+   */
+  public org.exolab.castor.xml.TypeValidator getValidator()
+  {
+    return this;
+  }
+
+  /**
+   * Method getXMLName.
+   * 
+   * @return the XML Name for the Class being described.
+   */
+  public java.lang.String getXMLName()
+  {
+    return _xmlName;
+  }
+
+  /**
+   * Method isElementDefinition.
+   * 
+   * @return true if XML schema definition of this Class is that of a global
+   *         element or element with anonymous type definition.
+   */
+  public boolean isElementDefinition()
+  {
+    return _elementDefinition;
+  }
 
 }
index cdad97f..eac9bc7 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index a45b335..24a90b9 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index 4c73612..007175c 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index 506c081..a8a2cf5 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index 4ddb77d..514e2d3 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index a7368c0..403e432 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index 79303a6..75586b6 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index 72daa76..498d18d 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index 64a2cd4..0dad270 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index 14af454..ebcec89 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index 12b6af6..4082f2c 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index 06cf7ab..8be5479 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index 63fc0dc..31127fa 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
@@ -253,13 +261,11 @@ public class JalviewModelDescriptor extends
     desc.setContainer(true);
     desc.setClassDescriptor(new jalview.schemabinding.version2.descriptors.JalviewModelSequenceDescriptor());
     desc.setNameSpaceURI("www.jalview.org");
-    desc.setRequired(true);
     desc.setMultivalued(false);
     addFieldDescriptor(desc);
 
     // -- validation code for: _jalviewModelSequence
     fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(1);
     { // -- local scope
     }
     desc.setValidator(fieldValidator);
index eb51911..01b416c 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
@@ -122,13 +130,12 @@ public class JalviewModelSequenceDescriptor extends
     };
     desc.setHandler(handler);
     desc.setNameSpaceURI("www.jalview.org");
-    desc.setRequired(true);
     desc.setMultivalued(true);
     addFieldDescriptor(desc);
 
     // -- validation code for: _JSeqList
     fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(1);
+    fieldValidator.setMinOccurs(0);
     { // -- local scope
     }
     desc.setValidator(fieldValidator);
@@ -233,13 +240,12 @@ public class JalviewModelSequenceDescriptor extends
     };
     desc.setHandler(handler);
     desc.setNameSpaceURI("www.jalview.org");
-    desc.setRequired(true);
     desc.setMultivalued(true);
     addFieldDescriptor(desc);
 
     // -- validation code for: _viewportList
     fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(1);
+    fieldValidator.setMinOccurs(0);
     { // -- local scope
     }
     desc.setValidator(fieldValidator);
index b0283b2..c70f679 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index 788c8b7..9aa7542 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index b75aadb..efdf00f 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index f83c882..8402449 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index 5d5999f..1d57dd5 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index f9e0749..b192ad8 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index 3161f09..69ae032 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index d45ee1e..001c3e5 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index ab5ba35..5748515 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index f911036..2b0f360 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index a7c33b8..eca975a 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index 801bfa7..478f2cf 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index adb4a10..09ffdfc 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index 13e8fcd..e7b075d 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index c6aa523..904bd47 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index 43ac0ed..dd318b3 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index 0fa781c..9d82b98 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index 8d83922..671b60f 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index 467b7f0..b24356e 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index 0d39d82..919b3b6 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index d6404d2..7725ad1 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index 61b822d..6148798 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index d60b798..d9e97f5 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index 4f338e2..5485480 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index 695a799..ba75d45 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*******************************************************************************
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * 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/>.
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
  */
+
 package jalview.schemabinding.version2.descriptors;
 
 //---------------------------------/
index aa928cc..c655fe2 100755 (executable)
@@ -485,6 +485,8 @@ public class ColourSchemeProperty
 
     case TCOFFEE:
       cs = new TCoffeeColourScheme(coll);
+      break;
+      
       // case COVARIATION:
       // cs = new CovariationColourScheme(annotation);
 
index 7d1d30c..a1c41c7 100644 (file)
@@ -22,6 +22,7 @@ import static org.junit.Assert.*;
 
 import java.io.BufferedReader;
 import java.io.File;
+import java.io.IOException;
 import java.io.InputStreamReader;
 
 import org.junit.AfterClass;
@@ -59,6 +60,33 @@ private static class Worker extends Thread {
     }
   }
 }
+private Worker jalviewDesktopRunner(boolean withAwt, String cmd, int timeout) throws InterruptedException, IOException
+  {
+    String _cmd = "java "+(withAwt ? "-Djava.awt.headless=true":"")+" -Djava.ext.dirs=./lib -classpath ./classes jalview.bin.Jalview ";
+    System.out.println("###############Jalview CMD: " + _cmd+cmd);
+    Process ls2_proc = Runtime.getRuntime().exec(_cmd+cmd);
+    BufferedReader outputReader = new BufferedReader(new InputStreamReader(
+            ls2_proc.getInputStream()));
+
+    BufferedReader errorReader = new BufferedReader(new InputStreamReader(
+            ls2_proc.getErrorStream()));
+    Worker worker = new Worker(ls2_proc);
+    worker.start();
+    worker.join(timeout);
+    System.out.println("Output:  ");
+    String ln = null;
+    while ((ln = outputReader.readLine()) != null)
+    {
+      System.out.println(ln);
+    }
+
+    System.out.println("Error:  ");
+    while ((ln = errorReader.readLine()) != null)
+    {
+      System.out.println(ln);
+    }
+    return worker;
+  }
   @Test
   public void testHeadlessModeEPS() throws Exception
   {
@@ -74,36 +102,37 @@ private static class Worker extends Thread {
         _switch=true;
     String jalview_input = "examples/uniref50.fa";
     String jalview_output = "test_uniref50_out.eps";
-    String cmd = "java "+(withAwt ? "-Djava.awt.headless=true":"")+" -Djava.ext.dirs=./lib -classpath ./classes jalview.bin.Jalview -"+_harg+" -open "+ jalview_input + " -eps " + jalview_output;
+    String cmd = ""+_harg+" -open "+ jalview_input + " -eps " + jalview_output;
     String harg = _harg+(withAwt ? "-Djava.awt.headless=true":" NO AWT.HEADLESS");
-    System.out.println("Testing with Headless argument: '"+harg+"'\n###############Jalview CMD: " + cmd);
-    Process ls2_proc = Runtime.getRuntime().exec(cmd);
-    BufferedReader outputReader = new BufferedReader(new InputStreamReader(ls2_proc.getInputStream()));
-        
-    BufferedReader errorReader = new BufferedReader(new InputStreamReader(ls2_proc.getErrorStream()));
-    Worker worker = new Worker(ls2_proc);
-    worker.start();
-    worker.join(9000);
-    System.out.println("Output:  ");
-    String ln=null;
-    while ((ln=outputReader.readLine())!=null) {
-      System.out.println(ln);
-    }
-    
-    System.out.println("Error:  " );
-    while ((ln=errorReader.readLine())!=null) {
-      System.out.println(ln);
-    }
+    System.out.println("Testing with Headless argument: '"+harg+"'\n");
+    Worker worker = jalviewDesktopRunner(withAwt, cmd, 9000);
     assertTrue("Didn't create an output EPS file.["+harg+"]", new File("test_uniref50_out.eps").exists());
     assertTrue("Didn't create an EPS file with any content["+harg+"]", new File("test_uniref50_out.eps").length()>4096);
     if (worker.exit == null){
       worker.interrupt();
       Thread.currentThread().interrupt();
-      ls2_proc.destroy();
+      worker.process.destroy();
       fail("Jalview did not exit after EPS generation (try running test again to verify - timeout at 9000ms). ["+harg+"]");
     }
     } while (!withAwt);
     } 
   }
-
+//  @Test
+//  public void testJalview2XMLDataset() throws Exception
+//  {
+//    String jalview_input = "examples/uniref50.fa";
+//    String jalview_output = "test_uniref50_out.eps";
+//    String cmd = ""+" -open "+ jalview_input + " -eps " + jalview_output;
+//    //String harg = _harg+(withAwt ? "-Djava.awt.headless=true":" NO AWT.HEADLESS");
+//    System.out.println("Testing with Headless argument: '"+harg+"'\n");
+//    Worker worker = jalviewDesktopRunner(withAwt, cmd, 9000);
+//    assertTrue("Didn't create an output EPS file.["+harg+"]", new File("test_uniref50_out.eps").exists());
+//    assertTrue("Didn't create an EPS file with any content["+harg+"]", new File("test_uniref50_out.eps").length()>4096);
+//    if (worker.exit == null){
+//      worker.interrupt();
+//      Thread.currentThread().interrupt();
+//      worker.process.destroy();
+//      fail("Jalview did not exit after EPS generation (try running test again to verify - timeout at 9000ms). ["+harg+"]");
+//    }
+//  }
 }
diff --git a/test/jalview/io/Jalview2xmlTests.java b/test/jalview/io/Jalview2xmlTests.java
new file mode 100644 (file)
index 0000000..4ef038a
--- /dev/null
@@ -0,0 +1,97 @@
+package jalview.io;
+
+import static org.junit.Assert.*;
+import jalview.datamodel.AlignmentAnnotation;
+import jalview.datamodel.SequenceI;
+import jalview.gui.AlignFrame;
+
+import java.io.File;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class Jalview2xmlTests
+{
+
+  /**
+   * @throws java.lang.Exception
+   */
+  @BeforeClass
+  public static void setUpBeforeClass() throws Exception
+  {
+    jalview.bin.Jalview.main(new String[] {"-props","test/src/jalview/io/testProps.jvprops"});
+  }
+
+  /**
+   * @throws java.lang.Exception
+   */
+  @AfterClass
+  public static void tearDownAfterClass() throws Exception
+  {
+    jalview.gui.Desktop.instance.quit();
+  }
+  public int countDsAnn(jalview.viewmodel.AlignmentViewport avp)
+  {
+    int numdsann=0;
+    for (SequenceI sq: avp.getAlignment().getDataset().getSequences()) {
+      if (sq.getAnnotation() != null)
+      {
+        for (AlignmentAnnotation dssa : sq.getAnnotation())
+        {
+          if (dssa.isValidStruc())
+          {
+            numdsann++;
+          }
+        }
+      }
+    }
+    return numdsann;
+  }
+  @Test
+  public void testRNAStructureRecovery() throws Exception
+  {
+    String inFile = "examples/RF00031_folded.stk";
+    String tfile = File.createTempFile("JalviewTest", ".jvp").getAbsolutePath();
+    AlignFrame af = new jalview.io.FileLoader().LoadFileWaitTillLoaded(inFile, FormatAdapter.FILE);
+    assertTrue("Didn't read input file "+inFile, af!=null);
+    int olddsann=countDsAnn(af.getViewport());
+    assertTrue("Didn't find any dataset annotations",olddsann>0);
+    assertTrue("Failed to store as a project.",af.saveAlignment(tfile, "Jalview"));
+    af.closeMenuItem_actionPerformed(true);
+    af=null;
+    af = new jalview.io.FileLoader().LoadFileWaitTillLoaded(tfile, FormatAdapter.FILE);
+    assertTrue("Failed to import new project", af!=null);
+    int newdsann=countDsAnn(af.getViewport());
+    assertTrue("Differing numbers of dataset sequence annotation\nOriginally "+olddsann+" and now "+newdsann,olddsann==newdsann);
+    System.out.println("Read in same number of annotations as originally present ("+olddsann+")");
+  }
+  @Test
+  public void testTCoffeeScores() throws Exception
+  {
+    String inFile = "examples/uniref50.fa",inAnnot="examples/uniref50.score_ascii";
+    String tfile = File.createTempFile("JalviewTest", ".jvp").getAbsolutePath();
+    AlignFrame af = new jalview.io.FileLoader().LoadFileWaitTillLoaded(inFile, FormatAdapter.FILE);
+    assertTrue("Didn't read input file "+inFile, af!=null);
+    af.loadJalviewDataFile(inAnnot, FormatAdapter.FILE, null,null);
+    assertTrue(
+            "Didn't set T-coffee colourscheme",
+            af.getViewport().getGlobalColourScheme().getClass()
+                    .equals(jalview.schemes.TCoffeeColourScheme.class));
+    assertTrue(
+            "Recognise T-Coffee score from string",
+            jalview.schemes.ColourSchemeProperty.getColour(af.getViewport()
+                    .getAlignment(),
+                    jalview.schemes.ColourSchemeProperty.getColourName(af
+                            .getViewport().getGlobalColourScheme())) != null);
+
+    assertTrue("Failed to store as a project.",af.saveAlignment(tfile, "Jalview"));
+    af.closeMenuItem_actionPerformed(true);
+    af=null;
+    af = new jalview.io.FileLoader().LoadFileWaitTillLoaded(tfile, FormatAdapter.FILE);
+    assertTrue("Failed to import new project", af!=null);
+    assertTrue("Didn't set T-coffee colourscheme for imported project.",af.getViewport().getGlobalColourScheme().getClass().equals(jalview.schemes.TCoffeeColourScheme.class));
+    System.out.println("T-Coffee score shading successfully recovered from project.");
+  }
+
+}