<classpathentry kind="lib" path="lib/miglayout-4.0-swing.jar"/>
<classpathentry kind="lib" path="lib/jswingreader-0.3.jar" sourcepath="/jswingreader"/>
<classpathentry kind="lib" path="lib/commons-codec-1.3.jar"/>
- <classpathentry kind="lib" path="lib/Jmol-12.2.4.jar" sourcepath="/Users/jimp/Documents/e6-workspace-new/Jmol/src"/>
- <classpathentry kind="lib" path="appletlib/JmolApplet-12.2.4.jar"/>
<classpathentry kind="lib" path="lib/jdas-1.0.4.jar"/>
<classpathentry kind="lib" path="lib/spring-core-3.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="lib/spring-web-3.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="lib/jsoup-1.8.1.jar"/>
<classpathentry kind="lib" path="lib/log4j-to-slf4j-2.0-rc2.jar"/>
<classpathentry kind="lib" path="lib/slf4j-log4j12-1.7.7.jar"/>
- <classpathentry kind="lib" path="lib/VARNAv3-91.jar"/>
+ <classpathentry kind="lib" path="lib/VARNAv3-93.jar"/>
<classpathentry kind="lib" path="lib/jfreesvg-2.1.jar"/>
<classpathentry kind="lib" path="lib/quaqua-filechooser-only-8.0.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/plugin"/>
<classpathentry kind="lib" path="lib/jetty-http-9.2.10.v20150310.jar"/>
<classpathentry kind="lib" path="lib/jetty-io-9.2.10.v20150310.jar"/>
<classpathentry kind="lib" path="lib/java-json.jar"/>
+ <classpathentry kind="lib" path="lib/Jmol-14.2.14_2015.06.11.jar"/>
<classpathentry kind="con" path="org.testng.TESTNG_CONTAINER"/>
<classpathentry kind="output" path="classes"/>
</classpath>
<property name="packageDir" value="dist" />
<property name="outputJar" value="jalview.jar" />
<!-- Jalview Applet JMol Jar Dependency -->
- <property name="jmolJar" value="JmolApplet-12.2.4.jar" />
+ <property name="jmolJar" value="JmolApplet-14.2.14_2015.06.01.jar" />
<property name="varnaJar" value="VARNAv3-91.jar" />
<property name="jsoup" value="jsoup-1.8.1.jar" />
<property name="jsonSimple" value="json_simple-1.1.jar" />
label.input_output = Input/Output
label.cut_paste = Cut'n'Paste
label.adjusting_parameters_for_calculation = Adjusting parameters for existing Calculation
-label.2d_rna_structure_line = 2D RNA {0}
+label.2d_rna_structure_line = 2D RNA {0} (alignment)
label.2d_rna_sequence_name = 2D RNA - {0}
label.edit_name_and_description_current_group = Edit name and description of current group.
label.view_structure_for = View structure for {0}
<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
- *
- * This file is part of Jalview.
- *
- * Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
- *
- * Jalview is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
- * The Jalview Authors are detailed in the 'AUTHORS' file.
--->
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:vamsas="www.vamsas.ac.uk/jalview/version2" xmlns:jalview="www.jalview.org/colours" xmlns:jv="www.jalview.org" xmlns:jvws="www.jalview.org/xml/wsparamset" targetNamespace="www.jalview.org" elementFormDefault="qualified" attributeFormDefault="unqualified">
- <xs:import namespace="www.vamsas.ac.uk/jalview/version2" schemaLocation="vamsas.xsd"/>
- <xs:import namespace="www.jalview.org/colours" schemaLocation="JalviewUserColours.xsd"/>
- <xs:import namespace="www.jalview.org/xml/wsparamset" schemaLocation="JalviewWsParamSet.xsd"/>
+<!-- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors * * This file is part of
+ Jalview. * * Jalview is free software: you can redistribute it and/or * modify
+ it under the terms of the GNU General Public License * as published by the
+ Free Software Foundation, either version 3 of the License, or (at your option)
+ any later version. * * Jalview is distributed in the hope that it will be
+ useful, but * WITHOUT ANY WARRANTY; without even the implied warranty * of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General
+ Public License for more details. * * You should have received a copy of the
+ GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
+ * The Jalview Authors are detailed in the 'AUTHORS' file. -->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:vamsas="www.vamsas.ac.uk/jalview/version2" xmlns:jalview="www.jalview.org/colours"
+ xmlns:jv="www.jalview.org" xmlns:jvws="www.jalview.org/xml/wsparamset"
+ targetNamespace="www.jalview.org" elementFormDefault="qualified"
+ attributeFormDefault="unqualified">
+ <xs:import namespace="www.vamsas.ac.uk/jalview/version2"
+ schemaLocation="vamsas.xsd" />
+ <xs:import namespace="www.jalview.org/colours"
+ schemaLocation="JalviewUserColours.xsd" />
+ <xs:import namespace="www.jalview.org/xml/wsparamset"
+ schemaLocation="JalviewWsParamSet.xsd" />
<xs:complexType name="JalviewModel">
<xs:sequence>
<xs:element name="creationDate" type="xs:dateTime" />
<xs:element name="JSeq" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:sequence>
- <xs:element name="features"
- type="jv:feature" minOccurs="0" maxOccurs="unbounded" />
- <xs:element name="pdbids" minOccurs="0"
- maxOccurs="unbounded">
+ <xs:element name="features" type="jv:feature"
+ minOccurs="0" maxOccurs="unbounded" />
+ <xs:element name="pdbids" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:complexContent>
- <xs:extension
- base="jv:pdbentry">
+ <xs:extension base="jv:pdbentry">
<xs:sequence>
- <xs:element
- name="structureState" minOccurs="0"
+ <xs:element name="structureState" minOccurs="0"
maxOccurs="unbounded">
<xs:complexType>
<xs:simpleContent>
- <xs:extension
- base="xs:string">
- <xs:attributeGroup
- ref="jv:swingwindow" />
- <xs:attribute
- name="visible" type="xs:boolean" />
- <xs:attribute
- name="viewId" type="xs:string" use="optional">
+ <xs:extension base="xs:string">
+ <xs:attributeGroup ref="jv:swingwindow" />
+ <xs:attribute name="visible" type="xs:boolean" />
+ <xs:attribute name="viewId" type="xs:string"
+ use="optional">
<xs:annotation>
<xs:documentation>
additional
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute
- name="alignwithAlignPanel" type="xs:boolean"
- use="optional" default="true">
+ <xs:attribute name="alignwithAlignPanel"
+ type="xs:boolean" use="optional" default="true">
<xs:annotation>
<xs:documentation>
Flag
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute
- name="colourwithAlignPanel" type="xs:boolean"
- use="optional" default="false">
+ <xs:attribute name="colourwithAlignPanel"
+ type="xs:boolean" use="optional" default="false">
<xs:annotation>
<xs:documentation>
Flag
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute
- name="colourByJmol" type="xs:boolean" use="optional"
- default="true">
+ <xs:attribute name="colourByJmol" type="xs:boolean"
+ use="optional" default="true">
<xs:annotation>
<xs:documentation>
Flag
use="optional">
<xs:annotation>
<xs:documentation>
- An identifier for the viewer type, currently either
- JMOL or CHIMERA
+ An
+ identifier
+ for
+ the
+ viewer
+ type,
+ currently
+ either
+ JMOL
+ or
+ CHIMERA
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexContent>
</xs:complexType>
</xs:element>
- <xs:element name="hiddenSequences"
- type="xs:int" minOccurs="0" maxOccurs="unbounded" />
+ <xs:element name="hiddenSequences" type="xs:int"
+ minOccurs="0" maxOccurs="unbounded" />
+ <xs:element name="rnaViewer" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>Reference to a viewer showing RNA structure
+ for this sequence. Schema supports one viewer showing multiple
+ annotations for multiple sequences, though currently only one
+ annotation for one sequence (gapped or trimmed) is used
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="secondaryStructure" minOccurs="1"
+ maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:attribute name="title" type="xs:string" />
+ <xs:attribute name="annotationId" type="xs:string"
+ use="required">
+ <xs:annotation>
+ <xs:documentation>id attribute of Annotation in
+ vamsasModel for
+ the secondary structure annotation shown
+ in the viewer
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="gapped" type="xs:boolean">
+ <xs:annotation>
+ <xs:documentation>if true the RNA structure is shown with gaps, if false without
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="viewerState" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>name of the project jar entry that holds
+ the VARNA viewer state for the structure
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ <xs:attributeGroup ref="jv:swingwindow" />
+ <xs:attribute name="title" type="xs:string" />
+ <xs:attribute name="viewId" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>An id unique to the RNA viewer panel
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="dividerLocation" type="xs:int">
+ <xs:annotation>
+ <xs:documentation>horizontal position of split pane divider
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="selectedRna" type="xs:int">
+ <xs:annotation>
+ <xs:documentation>Index of the selected structure in the
+ viewer panel
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
</xs:sequence>
- <xs:attribute name="colour" type="xs:int"
- use="optional" />
- <xs:attribute name="start" type="xs:int"
- use="required" />
- <xs:attribute name="end" type="xs:int"
- use="required" />
- <xs:attribute name="id" type="xs:string"
- use="required" />
+ <xs:attribute name="colour" type="xs:int" use="optional" />
+ <xs:attribute name="start" type="xs:int" use="required" />
+ <xs:attribute name="end" type="xs:int" use="required" />
+ <xs:attribute name="id" type="xs:string" use="required" />
<xs:attribute name="hidden" type="xs:boolean" />
</xs:complexType>
</xs:element>
- <xs:element name="JGroup" minOccurs="0"
- maxOccurs="unbounded">
+ <xs:element name="JGroup" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
- <xs:sequence>
+ <xs:sequence>
<xs:element name="seq" type="xs:string" maxOccurs="unbounded" />
<xs:element name="annotationColours" type="jv:AnnotationColourScheme"
minOccurs="0" maxOccurs="1" />
<xs:attribute name="end" type="xs:int" />
<xs:attribute name="name" type="xs:string" />
<xs:attribute name="colour" type="xs:string" />
- <xs:attribute name="consThreshold"
- type="xs:int" />
+ <xs:attribute name="consThreshold" type="xs:int" />
<xs:attribute name="pidThreshold" type="xs:int" />
- <xs:attribute name="outlineColour"
- type="xs:int" />
- <xs:attribute name="displayBoxes"
- type="xs:boolean" />
- <xs:attribute name="displayText"
- type="xs:boolean" />
- <xs:attribute name="colourText"
- type="xs:boolean" />
+ <xs:attribute name="outlineColour" type="xs:int" />
+ <xs:attribute name="displayBoxes" type="xs:boolean" />
+ <xs:attribute name="displayText" type="xs:boolean" />
+ <xs:attribute name="colourText" type="xs:boolean" />
<xs:attribute name="textCol1" type="xs:int" />
<xs:attribute name="textCol2" type="xs:int" />
- <xs:attribute name="textColThreshold"
- type="xs:int" />
- <xs:attribute name="showUnconserved"
- type="xs:boolean" use="optional" />
- <xs:attribute name="ignoreGapsinConsensus"
- type="xs:boolean" use="optional" default="true" />
- <xs:attribute name="showConsensusHistogram"
- type="xs:boolean" use="optional" default="true" />
- <xs:attribute name="showSequenceLogo"
- type="xs:boolean" use="optional" default="false" />
- <xs:attribute name="normaliseSequenceLogo"
- type="xs:boolean" use="optional" default="false" />
- <xs:attribute name="id" type="xs:string"
- use="optional">
+ <xs:attribute name="textColThreshold" type="xs:int" />
+ <xs:attribute name="showUnconserved" type="xs:boolean"
+ use="optional" />
+ <xs:attribute name="ignoreGapsinConsensus" type="xs:boolean"
+ use="optional" default="true" />
+ <xs:attribute name="showConsensusHistogram" type="xs:boolean"
+ use="optional" default="true" />
+ <xs:attribute name="showSequenceLogo" type="xs:boolean"
+ use="optional" default="false" />
+ <xs:attribute name="normaliseSequenceLogo" type="xs:boolean"
+ use="optional" default="false" />
+ <xs:attribute name="id" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>
Optional sequence group ID (only
- needs to be unique for this
+ needs to be
+ unique for this
alignment)
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
- <xs:element name="Viewport" maxOccurs="unbounded" minOccurs="0">
+ <xs:element name="Viewport" maxOccurs="unbounded"
+ minOccurs="0">
<xs:complexType>
<xs:sequence>
- <xs:element name="AnnotationColours" type="jv:AnnotationColourScheme"
+ <xs:element name="AnnotationColours" type="jv:AnnotationColourScheme"
minOccurs="0" maxOccurs="1">
</xs:element>
- <xs:element name="hiddenColumns"
- minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="hiddenColumns" minOccurs="0"
+ maxOccurs="unbounded">
<xs:complexType>
- <xs:attribute name="start"
- type="xs:int" />
- <xs:attribute name="end"
- type="xs:int" />
+ <xs:attribute name="start" type="xs:int" />
+ <xs:attribute name="end" type="xs:int" />
</xs:complexType>
</xs:element>
- <xs:element name="calcIdParam"
-
- minOccurs="0" maxOccurs="unbounded">
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="jvws:WebServiceParameterSet">
- <xs:attribute name="calcId" type="xs:string" use="required">
- <xs:annotation>
- <xs:documentation>handle for the calculation which uses this parameter set</xs:documentation></xs:annotation>
- </xs:attribute>
- <xs:attribute name="needsUpdate" type="xs:boolean" use="optional" default="false">
- <xs:annotation><xs:documentation>should the calculation be performed immediately after loading in order to refresh results</xs:documentation></xs:annotation>
- </xs:attribute>
- <xs:attribute name="autoUpdate" type="xs:boolean" use="required">
- <xs:annotation><xs:documentation>should the calculation be automatically performed on edits</xs:documentation></xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
+ <xs:element name="calcIdParam" minOccurs="0"
+ maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="jvws:WebServiceParameterSet">
+ <xs:attribute name="calcId" type="xs:string"
+ use="required">
+ <xs:annotation>
+ <xs:documentation>handle for the calculation which uses
+ this parameter set
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="needsUpdate" type="xs:boolean"
+ use="optional" default="false">
+ <xs:annotation>
+ <xs:documentation>should the calculation be performed
+ immediately after loading in order to refresh results
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="autoUpdate" type="xs:boolean"
+ use="required">
+ <xs:annotation>
+ <xs:documentation>should the calculation be automatically
+ performed on edits
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
</xs:element>
</xs:sequence>
<xs:attributeGroup ref="jv:swingwindow" />
- <xs:attribute name="conservationSelected"
- type="xs:boolean" />
- <xs:attribute name="pidSelected"
- type="xs:boolean" />
+ <xs:attribute name="conservationSelected" type="xs:boolean" />
+ <xs:attribute name="pidSelected" type="xs:boolean" />
<xs:attribute name="bgColour" type="xs:string" />
- <xs:attribute name="consThreshold"
- type="xs:int" />
+ <xs:attribute name="consThreshold" type="xs:int" />
<xs:attribute name="pidThreshold" type="xs:int" />
<xs:attribute name="title" type="xs:string" />
- <xs:attribute name="showFullId"
- type="xs:boolean" />
- <xs:attribute name="rightAlignIds"
- type="xs:boolean" />
+ <xs:attribute name="showFullId" type="xs:boolean" />
+ <xs:attribute name="rightAlignIds" type="xs:boolean" />
<xs:attribute name="showText" type="xs:boolean" />
- <xs:attribute name="showColourText"
- type="xs:boolean" />
- <xs:attribute name="showUnconserved"
- type="xs:boolean" use="optional" default="false" />
- <xs:attribute name="showBoxes"
- type="xs:boolean" />
- <xs:attribute name="wrapAlignment"
- type="xs:boolean" />
- <xs:attribute name="renderGaps"
- type="xs:boolean" />
- <xs:attribute name="showSequenceFeatures"
- type="xs:boolean" />
- <xs:attribute name="showNPfeatureTooltip"
- type="xs:boolean" use="optional" />
- <xs:attribute name="showDbRefTooltip"
- type="xs:boolean" use="optional" />
- <xs:attribute name="followHighlight"
- type="xs:boolean" use="optional" default="true" />
- <xs:attribute name="followSelection"
- type="xs:boolean" use="optional" default="true" />
- <xs:attribute name="showAnnotation"
- type="xs:boolean" />
- <xs:attribute name="centreColumnLabels"
- type="xs:boolean" use="optional" default="false" />
- <xs:attribute name="showGroupConservation"
- type="xs:boolean" use="optional" default="false" />
- <xs:attribute name="showGroupConsensus"
- type="xs:boolean" use="optional" default="false" />
- <xs:attribute name="showConsensusHistogram"
- type="xs:boolean" use="optional" default="true" />
- <xs:attribute name="showSequenceLogo"
- type="xs:boolean" use="optional" default="false" />
- <xs:attribute name="normaliseSequenceLogo"
- type="xs:boolean" use="optional" default="false" />
- <xs:attribute name="ignoreGapsinConsensus"
- type="xs:boolean" use="optional" default="true" />
- <xs:attribute name="startRes" type="xs:int" />
+ <xs:attribute name="showColourText" type="xs:boolean" />
+ <xs:attribute name="showUnconserved" type="xs:boolean"
+ use="optional" default="false" />
+ <xs:attribute name="showBoxes" type="xs:boolean" />
+ <xs:attribute name="wrapAlignment" type="xs:boolean" />
+ <xs:attribute name="renderGaps" type="xs:boolean" />
+ <xs:attribute name="showSequenceFeatures" type="xs:boolean" />
+ <xs:attribute name="showNPfeatureTooltip" type="xs:boolean"
+ use="optional" />
+ <xs:attribute name="showDbRefTooltip" type="xs:boolean"
+ use="optional" />
+ <xs:attribute name="followHighlight" type="xs:boolean"
+ use="optional" default="true" />
+ <xs:attribute name="followSelection" type="xs:boolean"
+ use="optional" default="true" />
+ <xs:attribute name="showAnnotation" type="xs:boolean" />
+ <xs:attribute name="centreColumnLabels" type="xs:boolean"
+ use="optional" default="false" />
+ <xs:attribute name="showGroupConservation" type="xs:boolean"
+ use="optional" default="false" />
+ <xs:attribute name="showGroupConsensus" type="xs:boolean"
+ use="optional" default="false" />
+ <xs:attribute name="showConsensusHistogram" type="xs:boolean"
+ use="optional" default="true" />
+ <xs:attribute name="showSequenceLogo" type="xs:boolean"
+ use="optional" default="false" />
+ <xs:attribute name="normaliseSequenceLogo" type="xs:boolean"
+ use="optional" default="false" />
+ <xs:attribute name="ignoreGapsinConsensus" type="xs:boolean"
+ use="optional" default="true" />
+ <xs:attribute name="startRes" type="xs:int" />
<xs:attribute name="startSeq" type="xs:int" />
<xs:attribute name="fontName" type="xs:string" />
<xs:attribute name="fontSize" type="xs:int" />
<xs:attribute name="fontStyle" type="xs:int" />
<xs:attribute name="viewName" type="xs:string" />
- <xs:attribute name="sequenceSetId"
- type="xs:string" />
- <xs:attribute name="gatheredViews"
- type="xs:boolean" />
+ <xs:attribute name="sequenceSetId" type="xs:string" />
+ <xs:attribute name="gatheredViews" type="xs:boolean" />
<xs:attribute name="textCol1" type="xs:int" />
<xs:attribute name="textCol2" type="xs:int" />
- <xs:attribute name="textColThreshold"
- type="xs:int" />
- <xs:attribute name="id" type="xs:ID"
- use="optional">
+ <xs:attribute name="textColThreshold" type="xs:int" />
+ <xs:attribute name="id" type="xs:ID" use="optional">
<xs:annotation>
<xs:documentation>
unique id used by jalview to
- synchronize between stored and
+ synchronize
+ between stored and
instantiated views
</xs:documentation>
</xs:annotation>
use="optional">
<xs:annotation>
<xs:documentation>
- The viewport id of this viewport's (cdna/protein) coding complement, if any
+ The viewport id of this viewport's
+ (cdna/protein) coding complement, if any
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
- <xs:element name="UserColours" minOccurs="0"
- maxOccurs="unbounded">
+ <xs:element name="UserColours" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
- <xs:element name="UserColourScheme"
- type="jalview:JalviewUserColours" />
+ <xs:element name="UserColourScheme" type="jalview:JalviewUserColours" />
</xs:sequence>
<xs:attribute name="id" type="xs:string" />
</xs:complexType>
</xs:element>
- <xs:element name="tree" minOccurs="0"
- maxOccurs="unbounded">
+ <xs:element name="tree" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence minOccurs="0">
<xs:element name="title" type="xs:string" />
<xs:attribute name="fontSize" type="xs:int" />
<xs:attribute name="fontStyle" type="xs:int" />
<xs:attribute name="threshold" type="xs:float" />
- <xs:attribute name="showBootstrap"
- type="xs:boolean" />
- <xs:attribute name="showDistances"
- type="xs:boolean" />
- <xs:attribute name="markUnlinked"
- type="xs:boolean" />
- <xs:attribute name="fitToWindow"
- type="xs:boolean" />
- <xs:attribute name="currentTree"
- type="xs:boolean" />
- <xs:attribute name="id" type="xs:ID"
- use="optional">
+ <xs:attribute name="showBootstrap" type="xs:boolean" />
+ <xs:attribute name="showDistances" type="xs:boolean" />
+ <xs:attribute name="markUnlinked" type="xs:boolean" />
+ <xs:attribute name="fitToWindow" type="xs:boolean" />
+ <xs:attribute name="currentTree" type="xs:boolean" />
+ <xs:attribute name="id" type="xs:ID" use="optional">
<xs:annotation>
<xs:documentation>
Tree ID added for binding tree
- visualization settings to vamsas
+ visualization
+ settings to vamsas
document trees in jalview 2.4.1
</xs:documentation>
</xs:annotation>
<xs:element name="FeatureSettings" minOccurs="0">
<xs:complexType>
<xs:sequence>
- <xs:element name="setting" minOccurs="0"
- maxOccurs="unbounded">
+ <xs:element name="setting" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
- <xs:attribute name="type"
- type="xs:string" use="required" />
- <xs:attribute name="colour"
- type="xs:int" use="required" />
- <xs:attribute name="display"
- type="xs:boolean" use="required" />
- <xs:attribute name="order"
- type="xs:float" use="optional" />
- <xs:attribute name="mincolour"
- type="xs:int" use="optional">
+ <xs:attribute name="type" type="xs:string" use="required" />
+ <xs:attribute name="colour" type="xs:int" use="required" />
+ <xs:attribute name="display" type="xs:boolean"
+ use="required" />
+ <xs:attribute name="order" type="xs:float" use="optional" />
+ <xs:attribute name="mincolour" type="xs:int" use="optional">
<xs:annotation>
<xs:documentation>
Optional minimum colour
- for graduated feature
+ for graduated
+ feature
colour
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="threshold"
- type="xs:float" use="optional">
+ <xs:attribute name="threshold" type="xs:float"
+ use="optional">
<xs:annotation>
<xs:documentation>
threshold value for
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="threshstate"
- type="xs:int" use="optional">
+ <xs:attribute name="threshstate" type="xs:int"
+ use="optional">
<xs:annotation>
<xs:documentation>
threshold type for
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="max"
- type="xs:float" use="optional" />
- <xs:attribute name="min"
- type="xs:float" use="optional" />
- <xs:attribute name="colourByLabel"
- type="xs:boolean" use="optional" />
- <xs:attribute name="autoScale"
- type="xs:boolean" use="optional" />
+ <xs:attribute name="max" type="xs:float" use="optional" />
+ <xs:attribute name="min" type="xs:float" use="optional" />
+ <xs:attribute name="colourByLabel" type="xs:boolean"
+ use="optional" />
+ <xs:attribute name="autoScale" type="xs:boolean"
+ use="optional" />
</xs:complexType>
</xs:element>
- <xs:element name="group" minOccurs="0"
- maxOccurs="unbounded">
+ <xs:element name="group" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
- <xs:attribute name="name"
- type="xs:string" use="required" />
- <xs:attribute name="display"
- type="xs:boolean" use="required" />
+ <xs:attribute name="name" type="xs:string" use="required" />
+ <xs:attribute name="display" type="xs:boolean"
+ use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:sequence>
<xs:element name="otherData" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
- <xs:attribute name="key" type="xs:string" use="required"/>
- <xs:attribute name="value" type="xs:string" use="required"/>
+ <xs:attribute name="key" type="xs:string" use="required" />
+ <xs:attribute name="value" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
- <xs:attribute name="begin" type="xs:int" use="required"/>
- <xs:attribute name="end" type="xs:int" use="required"/>
- <xs:attribute name="type" type="xs:string" use="required"/>
- <xs:attribute name="description" type="xs:string" use="optional"/>
- <xs:attribute name="status" type="xs:string" use="optional"/>
- <xs:attribute name="featureGroup" type="xs:string" use="optional"/>
- <xs:attribute name="score" type="xs:float" use="optional"/>
+ <xs:attribute name="begin" type="xs:int" use="required" />
+ <xs:attribute name="end" type="xs:int" use="required" />
+ <xs:attribute name="type" type="xs:string" use="required" />
+ <xs:attribute name="description" type="xs:string" use="optional" />
+ <xs:attribute name="status" type="xs:string" use="optional" />
+ <xs:attribute name="featureGroup" type="xs:string" use="optional" />
+ <xs:attribute name="score" type="xs:float" use="optional" />
</xs:complexType>
<xs:complexType name="pdbentry">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="property" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
- <xs:attribute name="name" type="xs:string" use="required"/>
- <xs:attribute name="value" type="xs:string" use="required"/>
+ <xs:attribute name="name" type="xs:string" use="required" />
+ <xs:attribute name="value" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
- <xs:attribute name="id" type="xs:string" use="required"/>
- <xs:attribute name="type" type="xs:string" use="optional"/>
- <xs:attribute name="file" type="xs:string"/>
+ <xs:attribute name="id" type="xs:string" use="required" />
+ <xs:attribute name="type" type="xs:string" use="optional" />
+ <xs:attribute name="file" type="xs:string" />
</xs:complexType>
- <!--
- <xs:complexType name="reportWindow">
- <xs:annotation>
- <xs:documentation>Generic type for windows containing mime-typed data associated with other jalview windows</xs:documentation>
- </xs:annotation>
- <xs:sequence>
- </xs:sequence>
- <xs:attribute name="id" type="xs:string" use="required"/>
- <xs:attribute name="type" type="xs:string" use="optional"/>
- <xs:attribute name="file" type="xs:string" use="optional"/>
+ <!-- <xs:complexType name="reportWindow"> <xs:annotation> <xs:documentation>Generic
+ type for windows containing mime-typed data associated with other jalview
+ windows</xs:documentation> </xs:annotation> <xs:sequence> </xs:sequence>
+ <xs:attribute name="id" type="xs:string" use="required"/> <xs:attribute name="type"
+ type="xs:string" use="optional"/> <xs:attribute name="file" type="xs:string"
+ use="optional"/> </xs:complexType> -->
+ <xs:attributeGroup name="swingwindow">
+ <xs:annotation>
+ <xs:documentation>
+ base attributes for windows displayed in Jalview
+ desktop.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:attribute name="width" type="xs:int" />
+ <xs:attribute name="height" type="xs:int" />
+ <xs:attribute name="xpos" type="xs:int" />
+ <xs:attribute name="ypos" type="xs:int" />
+ </xs:attributeGroup>
+ <xs:complexType name="AnnotationColourScheme">
+ <xs:attribute name="aboveThreshold" type="xs:int" />
+ <xs:attribute name="annotation" type="xs:string" />
+ <xs:attribute name="minColour" type="xs:int" />
+ <xs:attribute name="maxColour" type="xs:int" />
+ <xs:attribute name="colourScheme" type="xs:string" />
+ <xs:attribute name="threshold" type="xs:float" />
+ <xs:attribute name="perSequence" type="xs:boolean" use="optional" />
+ <xs:attribute name="predefinedColours" type="xs:boolean"
+ use="optional" />
</xs:complexType>
- -->
- <xs:attributeGroup name="swingwindow">
- <xs:annotation>
- <xs:documentation>
- base attributes for windows displayed in Jalview desktop.
- </xs:documentation>
- </xs:annotation>
- <xs:attribute name="width" type="xs:int"/>
- <xs:attribute name="height" type="xs:int"/>
- <xs:attribute name="xpos" type="xs:int"/>
- <xs:attribute name="ypos" type="xs:int"/>
- </xs:attributeGroup>
- <xs:complexType name="AnnotationColourScheme">
- <xs:attribute name="aboveThreshold" type="xs:int" />
- <xs:attribute name="annotation" type="xs:string" />
- <xs:attribute name="minColour" type="xs:int" />
- <xs:attribute name="maxColour" type="xs:int" />
- <xs:attribute name="colourScheme" type="xs:string" />
- <xs:attribute name="threshold" type="xs:float" />
- <xs:attribute name="perSequence" type="xs:boolean" use="optional" />
- <xs:attribute name="predefinedColours" type="xs:boolean"
- use="optional" />
- </xs:complexType>
-
+
</xs:schema>
import java.util.StringTokenizer;
import java.util.Vector;
+import org.jmol.viewer.Viewer;
+
public class AlignFrame extends EmbmenuFrame implements ActionListener,
ItemListener, KeyListener, AlignViewControllerGuiI
{
public SequenceStructureBinding addStructureViewInstance(
Object jmolviewer, String[] sequenceIds)
{
- org.jmol.api.JmolViewer viewer = null;
+ Viewer viewer = null;
try
{
- viewer = (org.jmol.api.JmolViewer) jmolviewer;
+ viewer = (Viewer) jmolviewer;
} catch (ClassCastException ex)
{
System.err.println("Unsupported viewer object :"
import jalview.api.AlignmentViewPanel;
import jalview.datamodel.PDBEntry;
import jalview.datamodel.SequenceI;
+import jalview.ext.jmol.JalviewJmolBinding;
import jalview.structure.StructureSelectionManager;
import java.awt.Container;
-import java.util.BitSet;
+import java.util.Map;
+
+import javajs.awt.Dimension;
import org.jmol.api.JmolAppConsoleInterface;
-import org.jmol.api.JmolViewer;
-import org.jmol.popup.JmolPopup;
+import org.jmol.console.AppletConsole;
+import org.jmol.java.BS;
+import org.jmol.popup.JmolAwtPopup;
-class AppletJmolBinding extends jalview.ext.jmol.JalviewJmolBinding
+class AppletJmolBinding extends JalviewJmolBinding
{
/**
appletJmolBinding = appletJmol;
}
+ @Override
public jalview.api.FeatureRenderer getFeatureRenderer(
AlignmentViewPanel alignment)
{
return appletJmolBinding.fr;
}
+ @Override
public jalview.api.SequenceRenderer getSequenceRenderer(
AlignmentViewPanel alignment)
{
return new SequenceRenderer(((AlignmentPanel) alignment).av);
}
+ @Override
public void sendConsoleEcho(String strEcho)
{
if (appletJmolBinding.scriptWindow == null)
appletJmolBinding.history.append("\n" + strEcho);
}
+ @Override
public void sendConsoleMessage(String strStatus)
{
if (appletJmolBinding.history != null && strStatus != null
}
}
+ @Override
public void showUrl(String url, String target)
{
appletJmolBinding.ap.alignFrame.showURL(url, target);
}
+ @Override
public void refreshGUI()
{
appletJmolBinding.updateTitleAndMenus();
public void newJmolPopup(boolean translateLocale, String menuName,
boolean asPopup)
{
+ jmolpopup = new JmolAwtPopup(); // is this used?
+ jmolpopup.jpiInitialize((viewer), menuName);
- jmolpopup = new JmolPopup();
- jmolpopup.initialize(viewer, translateLocale, menuName, asPopup);
}
+ @Override
public void notifyScriptTermination(String strStatus, int msWalltime)
{
// do nothing.
}
- public void selectionChanged(BitSet arg0)
+ public void selectionChanged(BS arg0)
{
// TODO Auto-generated method stub
}
@Override
- protected JmolAppConsoleInterface createJmolConsole(JmolViewer viewer2,
+ protected JmolAppConsoleInterface createJmolConsole(
Container consolePanel, String buttonsToShow)
{
- // return new org.jmol.console.AppletConsole(viewer2, consolePanel);
- JmolAppConsoleInterface appc = new org.jmol.console.AppletConsole()
- .getAppConsole(viewer2);
+ JmolAppConsoleInterface appc = new AppletConsole();
+ appc.start(viewer);
return appc;
}
}
@Override
- public void resizeInnerPanel(String data)
+ public Dimension resizeInnerPanel(String data)
{
// TODO Auto-generated method stub
+ return null;
+ }
+ @Override
+ public Map<String, Object> getJSpecViewProperty(String arg0)
+ {
+ // TODO Auto-generated method stub
+ return null;
}
}
import java.awt.Container;
import java.util.ArrayList;
-import java.util.BitSet;
import java.util.List;
+import java.util.Map;
import java.util.Vector;
import org.jmol.api.JmolAppConsoleInterface;
-import org.jmol.api.JmolViewer;
+import org.jmol.java.BS;
+import org.jmol.viewer.Viewer;
/**
* bind an alignment view to an external Jmol instance.
chains, protocol);
}
- public ExtJmol(JmolViewer viewer, AlignmentPanel alignPanel,
+ public ExtJmol(Viewer viewer, AlignmentPanel alignPanel,
SequenceI[][] seqs)
{
super(alignPanel.getStructureSelectionManager(), seqs, viewer);
showUrl(arg0, "jmol");
}
+ @Override
public FeatureRenderer getFeatureRenderer(AlignmentViewPanel alignment)
{
AlignmentPanel ap = (AlignmentPanel) alignment;
}
}
+ @Override
public SequenceRenderer getSequenceRenderer(AlignmentViewPanel alignment)
{
return ((AlignmentPanel) alignment).getSequenceRenderer();
}
+ @Override
public void notifyScriptTermination(String strStatus, int msWalltime)
{
// ignore
}
+ @Override
public void sendConsoleEcho(String strEcho)
{
// ignore
}
+ @Override
public void sendConsoleMessage(String strStatus)
{
// ignore
}
+ @Override
public void showUrl(String url, String target)
{
ap.alignFrame.showURL(url, target);
}
+ @Override
public void refreshGUI()
{
// ignore
}
- public void selectionChanged(BitSet arg0)
+ public void selectionChanged(BS arg0)
{
System.out.println(arg0);
}
+ @Override
public void refreshPdbEntries()
{
List<PDBEntry> pdbe = new ArrayList<PDBEntry>();
SequenceI[] sq = ap.av.getAlignment().getSequencesArray();
for (int s = 0; s < sq.length; s++)
{
- Vector pdbids = sq[s].getPDBId();
+ Vector<PDBEntry> pdbids = sq[s].getPDBId();
if (pdbids != null)
{
for (int pe = 0, peSize = pdbids.size(); pe < peSize; pe++)
{
- PDBEntry pentry = (PDBEntry) pdbids.elementAt(pe);
+ PDBEntry pentry = pdbids.elementAt(pe);
if (!fileids.contains(pentry.getId()))
{
pdbe.add(pentry);
}
@Override
- protected JmolAppConsoleInterface createJmolConsole(JmolViewer viewer2,
+ protected JmolAppConsoleInterface createJmolConsole(
Container consolePanel, String buttonsToShow)
{
// TODO Auto-generated method stub
}
+ @Override
+ public Map<String, Object> getJSpecViewProperty(String arg0)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
}
/*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
- *
- * This file is part of Jalview.
- *
- * Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3
- * of the License, or (at your option) any later version.
- *
- * Jalview is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with 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.binding;
-//---------------------------------/
-//- Imported classes and packages -/
+ //---------------------------------/
+ //- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class Alignment implements java.io.Serializable
-{
-
- // --------------------------/
- // - Class/Member Variables -/
- // --------------------------/
-
- /**
- * Field _annotation.
- */
- private jalview.binding.Annotation _annotation;
-
- /**
- * Field _sequenceSet.
- */
- private jalview.binding.SequenceSet _sequenceSet;
-
- // ----------------/
- // - Constructors -/
- // ----------------/
-
- public Alignment()
- {
- super();
- }
-
- // -----------/
- // - Methods -/
- // -----------/
-
- /**
- * Returns the value of field 'annotation'.
- *
- * @return the value of field 'Annotation'.
- */
- public jalview.binding.Annotation getAnnotation()
- {
- return this._annotation;
- }
-
- /**
- * Returns the value of field 'sequenceSet'.
- *
- * @return the value of field 'SequenceSet'.
- */
- public jalview.binding.SequenceSet getSequenceSet()
- {
- return this._sequenceSet;
- }
-
- /**
- * 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;
+public class Alignment implements java.io.Serializable {
+
+
+ //--------------------------/
+ //- Class/Member Variables -/
+ //--------------------------/
+
+ /**
+ * Field _annotation.
+ */
+ private jalview.binding.Annotation _annotation;
+
+ /**
+ * Field _sequenceSet.
+ */
+ private jalview.binding.SequenceSet _sequenceSet;
+
+
+ //----------------/
+ //- Constructors -/
+ //----------------/
+
+ public Alignment() {
+ super();
+ }
+
+
+ //-----------/
+ //- Methods -/
+ //-----------/
+
+ /**
+ * Returns the value of field 'annotation'.
+ *
+ * @return the value of field 'Annotation'.
+ */
+ public jalview.binding.Annotation getAnnotation(
+ ) {
+ return this._annotation;
+ }
+
+ /**
+ * Returns the value of field 'sequenceSet'.
+ *
+ * @return the value of field 'SequenceSet'.
+ */
+ public jalview.binding.SequenceSet getSequenceSet(
+ ) {
+ return this._sequenceSet;
+ }
+
+ /**
+ * 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 'annotation'.
+ *
+ * @param annotation the value of field 'annotation'.
+ */
+ public void setAnnotation(
+ final jalview.binding.Annotation annotation) {
+ this._annotation = annotation;
+ }
+
+ /**
+ * Sets the value of field 'sequenceSet'.
+ *
+ * @param sequenceSet the value of field 'sequenceSet'.
+ */
+ public void setSequenceSet(
+ final jalview.binding.SequenceSet sequenceSet) {
+ this._sequenceSet = sequenceSet;
+ }
+
+ /**
+ * 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.binding.Alignment
+ */
+ public static jalview.binding.Alignment unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ return (jalview.binding.Alignment) Unmarshaller.unmarshal(jalview.binding.Alignment.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);
}
- 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 'annotation'.
- *
- * @param annotation
- * the value of field 'annotation'.
- */
- public void setAnnotation(final jalview.binding.Annotation annotation)
- {
- this._annotation = annotation;
- }
-
- /**
- * Sets the value of field 'sequenceSet'.
- *
- * @param sequenceSet
- * the value of field 'sequenceSet'.
- */
- public void setSequenceSet(final jalview.binding.SequenceSet sequenceSet)
- {
- this._sequenceSet = sequenceSet;
- }
-
- /**
- * 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.binding.Alignment
- */
- public static jalview.binding.Alignment unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException,
- org.exolab.castor.xml.ValidationException
- {
- return (jalview.binding.Alignment) Unmarshaller.unmarshal(
- jalview.binding.Alignment.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);
- }
}
/*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
- *
- * This file is part of Jalview.
- *
- * Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3
- * of the License, or (at your option) any later version.
- *
- * Jalview is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with 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.binding;
+ //---------------------------------/
+ //- Imported classes and packages -/
//---------------------------------/
-//- Imported classes and packages -/
-//---------------------------------/
-
-import jalview.util.MessageManager;
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
*
* @version $Revision$ $Date$
*/
-public class Annotation implements java.io.Serializable
-{
-
- // --------------------------/
- // - Class/Member Variables -/
- // --------------------------/
-
- /**
- * Field _graph.
- */
- private boolean _graph;
-
- /**
- * keeps track of state for field: _graph
- */
- private boolean _has_graph;
-
- /**
- * Field _graphType.
- */
- private int _graphType;
-
- /**
- * keeps track of state for field: _graphType
- */
- private boolean _has_graphType;
-
- /**
- * Field _annotationElementList.
- */
- private java.util.Vector _annotationElementList;
-
- /**
- * Field _label.
- */
- private java.lang.String _label;
-
- /**
- * Field _description.
- */
- private java.lang.String _description;
-
- // ----------------/
- // - Constructors -/
- // ----------------/
-
- public Annotation()
- {
- super();
- this._annotationElementList = new java.util.Vector();
- }
-
- // -----------/
- // - Methods -/
- // -----------/
-
- /**
- *
- *
- * @param vAnnotationElement
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void addAnnotationElement(
- final jalview.binding.AnnotationElement vAnnotationElement)
- throws java.lang.IndexOutOfBoundsException
- {
- this._annotationElementList.addElement(vAnnotationElement);
- }
-
- /**
- *
- *
- * @param index
- * @param vAnnotationElement
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void addAnnotationElement(final int index,
- final jalview.binding.AnnotationElement vAnnotationElement)
- throws java.lang.IndexOutOfBoundsException
- {
- this._annotationElementList.add(index, vAnnotationElement);
- }
-
- /**
- */
- public void deleteGraph()
- {
- this._has_graph = false;
- }
-
- /**
- */
- public void deleteGraphType()
- {
- this._has_graphType = false;
- }
-
- /**
- * Method enumerateAnnotationElement.
- *
- * @return an Enumeration over all jalview.binding.AnnotationElement elements
- */
- public java.util.Enumeration enumerateAnnotationElement()
- {
- return this._annotationElementList.elements();
- }
-
- /**
- * Method getAnnotationElement.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- * @return the value of the jalview.binding.AnnotationElement at the given
- * index
- */
- public jalview.binding.AnnotationElement getAnnotationElement(
- final int index) throws java.lang.IndexOutOfBoundsException
- {
- // check bounds for index
- if (index < 0 || index >= this._annotationElementList.size())
- {
- throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
- "getAnnotationElement",
- Integer.valueOf(index).toString(),
- Integer.valueOf((this._annotationElementList.size() - 1)).toString()
- }));
+public class Annotation implements java.io.Serializable {
+
+
+ //--------------------------/
+ //- Class/Member Variables -/
+ //--------------------------/
+
+ /**
+ * Field _graph.
+ */
+ private boolean _graph;
+
+ /**
+ * keeps track of state for field: _graph
+ */
+ private boolean _has_graph;
+
+ /**
+ * Field _graphType.
+ */
+ private int _graphType;
+
+ /**
+ * keeps track of state for field: _graphType
+ */
+ private boolean _has_graphType;
+
+ /**
+ * Field _annotationElementList.
+ */
+ private java.util.Vector _annotationElementList;
+
+ /**
+ * Field _label.
+ */
+ private java.lang.String _label;
+
+ /**
+ * Field _description.
+ */
+ private java.lang.String _description;
+
+
+ //----------------/
+ //- Constructors -/
+ //----------------/
+
+ public Annotation() {
+ super();
+ this._annotationElementList = new java.util.Vector();
}
- return (jalview.binding.AnnotationElement) _annotationElementList
- .get(index);
- }
-
- /**
- * Method getAnnotationElement.Returns the contents of the collection in an
- * Array.
- * <p>
- * Note: Just in case the collection contents are changing in another thread,
- * we pass a 0-length Array of the correct type into the API call. This way we
- * <i>know</i> that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public jalview.binding.AnnotationElement[] getAnnotationElement()
- {
- jalview.binding.AnnotationElement[] array = new jalview.binding.AnnotationElement[0];
- return (jalview.binding.AnnotationElement[]) this._annotationElementList
- .toArray(array);
- }
-
- /**
- * Method getAnnotationElementCount.
- *
- * @return the size of this collection
- */
- public int getAnnotationElementCount()
- {
- return this._annotationElementList.size();
- }
-
- /**
- * Returns the value of field 'description'.
- *
- * @return the value of field 'Description'.
- */
- public java.lang.String getDescription()
- {
- return this._description;
- }
-
- /**
- * Returns the value of field 'graph'.
- *
- * @return the value of field 'Graph'.
- */
- public boolean getGraph()
- {
- return this._graph;
- }
-
- /**
- * Returns the value of field 'graphType'.
- *
- * @return the value of field 'GraphType'.
- */
- public int getGraphType()
- {
- return this._graphType;
- }
-
- /**
- * Returns the value of field 'label'.
- *
- * @return the value of field 'Label'.
- */
- public java.lang.String getLabel()
- {
- return this._label;
- }
-
- /**
- * Method hasGraph.
- *
- * @return true if at least one Graph has been added
- */
- public boolean hasGraph()
- {
- return this._has_graph;
- }
-
- /**
- * Method hasGraphType.
- *
- * @return true if at least one GraphType has been added
- */
- public boolean hasGraphType()
- {
- return this._has_graphType;
- }
-
- /**
- * Returns the value of field 'graph'.
- *
- * @return the value of field 'Graph'.
- */
- public boolean isGraph()
- {
- return this._graph;
- }
-
- /**
- * 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;
+
+ //-----------/
+ //- Methods -/
+ //-----------/
+
+ /**
+ *
+ *
+ * @param vAnnotationElement
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addAnnotationElement(
+ final jalview.binding.AnnotationElement vAnnotationElement)
+ throws java.lang.IndexOutOfBoundsException {
+ this._annotationElementList.addElement(vAnnotationElement);
}
- 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);
- }
-
- /**
- */
- public void removeAllAnnotationElement()
- {
- this._annotationElementList.clear();
- }
-
- /**
- * Method removeAnnotationElement.
- *
- * @param vAnnotationElement
- * @return true if the object was removed from the collection.
- */
- public boolean removeAnnotationElement(
- final jalview.binding.AnnotationElement vAnnotationElement)
- {
- boolean removed = _annotationElementList.remove(vAnnotationElement);
- return removed;
- }
-
- /**
- * Method removeAnnotationElementAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public jalview.binding.AnnotationElement removeAnnotationElementAt(
- final int index)
- {
- java.lang.Object obj = this._annotationElementList.remove(index);
- return (jalview.binding.AnnotationElement) obj;
- }
-
- /**
- *
- *
- * @param index
- * @param vAnnotationElement
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void setAnnotationElement(final int index,
- final jalview.binding.AnnotationElement vAnnotationElement)
- throws java.lang.IndexOutOfBoundsException
- {
- // check bounds for index
- if (index < 0 || index >= this._annotationElementList.size())
- {
- throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
- "setAnnotationElement",
- Integer.valueOf(index).toString(),
- Integer.valueOf((this._annotationElementList.size() - 1)).toString()
- }));
+
+ /**
+ *
+ *
+ * @param index
+ * @param vAnnotationElement
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addAnnotationElement(
+ final int index,
+ final jalview.binding.AnnotationElement vAnnotationElement)
+ throws java.lang.IndexOutOfBoundsException {
+ this._annotationElementList.add(index, vAnnotationElement);
+ }
+
+ /**
+ */
+ public void deleteGraph(
+ ) {
+ this._has_graph= false;
+ }
+
+ /**
+ */
+ public void deleteGraphType(
+ ) {
+ this._has_graphType= false;
+ }
+
+ /**
+ * Method enumerateAnnotationElement.
+ *
+ * @return an Enumeration over all
+ * jalview.binding.AnnotationElement elements
+ */
+ public java.util.Enumeration enumerateAnnotationElement(
+ ) {
+ return this._annotationElementList.elements();
+ }
+
+ /**
+ * Method getAnnotationElement.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ * @return the value of the jalview.binding.AnnotationElement
+ * at the given index
+ */
+ public jalview.binding.AnnotationElement getAnnotationElement(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._annotationElementList.size()) {
+ throw new IndexOutOfBoundsException("getAnnotationElement: Index value '" + index + "' not in range [0.." + (this._annotationElementList.size() - 1) + "]");
+ }
+
+ return (jalview.binding.AnnotationElement) _annotationElementList.get(index);
}
- this._annotationElementList.set(index, vAnnotationElement);
- }
-
- /**
- *
- *
- * @param vAnnotationElementArray
- */
- public void setAnnotationElement(
- final jalview.binding.AnnotationElement[] vAnnotationElementArray)
- {
- // -- copy array
- _annotationElementList.clear();
-
- for (int i = 0; i < vAnnotationElementArray.length; i++)
- {
- this._annotationElementList.add(vAnnotationElementArray[i]);
+ /**
+ * Method getAnnotationElement.Returns the contents of the
+ * collection in an Array. <p>Note: Just in case the
+ * collection contents are changing in another thread, we pass
+ * a 0-length Array of the correct type into the API call.
+ * This way we <i>know</i> that the Array returned is of
+ * exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public jalview.binding.AnnotationElement[] getAnnotationElement(
+ ) {
+ jalview.binding.AnnotationElement[] array = new jalview.binding.AnnotationElement[0];
+ return (jalview.binding.AnnotationElement[]) this._annotationElementList.toArray(array);
+ }
+
+ /**
+ * Method getAnnotationElementCount.
+ *
+ * @return the size of this collection
+ */
+ public int getAnnotationElementCount(
+ ) {
+ return this._annotationElementList.size();
+ }
+
+ /**
+ * Returns the value of field 'description'.
+ *
+ * @return the value of field 'Description'.
+ */
+ public java.lang.String getDescription(
+ ) {
+ return this._description;
+ }
+
+ /**
+ * Returns the value of field 'graph'.
+ *
+ * @return the value of field 'Graph'.
+ */
+ public boolean getGraph(
+ ) {
+ return this._graph;
+ }
+
+ /**
+ * Returns the value of field 'graphType'.
+ *
+ * @return the value of field 'GraphType'.
+ */
+ public int getGraphType(
+ ) {
+ return this._graphType;
+ }
+
+ /**
+ * Returns the value of field 'label'.
+ *
+ * @return the value of field 'Label'.
+ */
+ public java.lang.String getLabel(
+ ) {
+ return this._label;
+ }
+
+ /**
+ * Method hasGraph.
+ *
+ * @return true if at least one Graph has been added
+ */
+ public boolean hasGraph(
+ ) {
+ return this._has_graph;
+ }
+
+ /**
+ * Method hasGraphType.
+ *
+ * @return true if at least one GraphType has been added
+ */
+ public boolean hasGraphType(
+ ) {
+ return this._has_graphType;
+ }
+
+ /**
+ * Returns the value of field 'graph'.
+ *
+ * @return the value of field 'Graph'.
+ */
+ public boolean isGraph(
+ ) {
+ return this._graph;
+ }
+
+ /**
+ * 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);
+ }
+
+ /**
+ */
+ public void removeAllAnnotationElement(
+ ) {
+ this._annotationElementList.clear();
+ }
+
+ /**
+ * Method removeAnnotationElement.
+ *
+ * @param vAnnotationElement
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeAnnotationElement(
+ final jalview.binding.AnnotationElement vAnnotationElement) {
+ boolean removed = _annotationElementList.remove(vAnnotationElement);
+ return removed;
+ }
+
+ /**
+ * Method removeAnnotationElementAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public jalview.binding.AnnotationElement removeAnnotationElementAt(
+ final int index) {
+ java.lang.Object obj = this._annotationElementList.remove(index);
+ return (jalview.binding.AnnotationElement) obj;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vAnnotationElement
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setAnnotationElement(
+ final int index,
+ final jalview.binding.AnnotationElement vAnnotationElement)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._annotationElementList.size()) {
+ throw new IndexOutOfBoundsException("setAnnotationElement: Index value '" + index + "' not in range [0.." + (this._annotationElementList.size() - 1) + "]");
+ }
+
+ this._annotationElementList.set(index, vAnnotationElement);
+ }
+
+ /**
+ *
+ *
+ * @param vAnnotationElementArray
+ */
+ public void setAnnotationElement(
+ final jalview.binding.AnnotationElement[] vAnnotationElementArray) {
+ //-- copy array
+ _annotationElementList.clear();
+
+ for (int i = 0; i < vAnnotationElementArray.length; i++) {
+ this._annotationElementList.add(vAnnotationElementArray[i]);
+ }
+ }
+
+ /**
+ * Sets the value of field 'description'.
+ *
+ * @param description the value of field 'description'.
+ */
+ public void setDescription(
+ final java.lang.String description) {
+ this._description = description;
+ }
+
+ /**
+ * Sets the value of field 'graph'.
+ *
+ * @param graph the value of field 'graph'.
+ */
+ public void setGraph(
+ final boolean graph) {
+ this._graph = graph;
+ this._has_graph = true;
+ }
+
+ /**
+ * Sets the value of field 'graphType'.
+ *
+ * @param graphType the value of field 'graphType'.
+ */
+ public void setGraphType(
+ final int graphType) {
+ this._graphType = graphType;
+ this._has_graphType = true;
+ }
+
+ /**
+ * Sets the value of field 'label'.
+ *
+ * @param label the value of field 'label'.
+ */
+ public void setLabel(
+ final java.lang.String label) {
+ this._label = label;
+ }
+
+ /**
+ * 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.binding.Annotation
+ */
+ public static jalview.binding.Annotation unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ return (jalview.binding.Annotation) Unmarshaller.unmarshal(jalview.binding.Annotation.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);
}
- }
-
- /**
- * Sets the value of field 'description'.
- *
- * @param description
- * the value of field 'description'.
- */
- public void setDescription(final java.lang.String description)
- {
- this._description = description;
- }
-
- /**
- * Sets the value of field 'graph'.
- *
- * @param graph
- * the value of field 'graph'.
- */
- public void setGraph(final boolean graph)
- {
- this._graph = graph;
- this._has_graph = true;
- }
-
- /**
- * Sets the value of field 'graphType'.
- *
- * @param graphType
- * the value of field 'graphType'.
- */
- public void setGraphType(final int graphType)
- {
- this._graphType = graphType;
- this._has_graphType = true;
- }
-
- /**
- * Sets the value of field 'label'.
- *
- * @param label
- * the value of field 'label'.
- */
- public void setLabel(final java.lang.String label)
- {
- this._label = label;
- }
-
- /**
- * 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.binding.Annotation
- */
- public static jalview.binding.Annotation unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException,
- org.exolab.castor.xml.ValidationException
- {
- return (jalview.binding.Annotation) Unmarshaller.unmarshal(
- jalview.binding.Annotation.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);
- }
}
/*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
- *
- * This file is part of Jalview.
- *
- * Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3
- * of the License, or (at your option) any later version.
- *
- * Jalview is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with 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.binding;
-//---------------------------------/
-//- Imported classes and packages -/
+ //---------------------------------/
+ //- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class AnnotationElement implements java.io.Serializable
-{
-
- // --------------------------/
- // - Class/Member Variables -/
- // --------------------------/
-
- /**
- * Field _position.
- */
- private int _position;
-
- /**
- * keeps track of state for field: _position
- */
- private boolean _has_position;
-
- /**
- * Field _displayCharacter.
- */
- private java.lang.String _displayCharacter;
-
- /**
- * Field _description.
- */
- private java.lang.String _description;
-
- /**
- * Field _secondaryStructure.
- */
- private java.lang.String _secondaryStructure;
-
- /**
- * Field _value.
- */
- private float _value;
-
- /**
- * keeps track of state for field: _value
- */
- private boolean _has_value;
-
- // ----------------/
- // - Constructors -/
- // ----------------/
-
- public AnnotationElement()
- {
- super();
- }
-
- // -----------/
- // - Methods -/
- // -----------/
-
- /**
+public class AnnotationElement implements java.io.Serializable {
+
+
+ //--------------------------/
+ //- Class/Member Variables -/
+ //--------------------------/
+
+ /**
+ * Field _position.
+ */
+ private int _position;
+
+ /**
+ * keeps track of state for field: _position
+ */
+ private boolean _has_position;
+
+ /**
+ * Field _displayCharacter.
+ */
+ private java.lang.String _displayCharacter;
+
+ /**
+ * Field _description.
+ */
+ private java.lang.String _description;
+
+ /**
+ * Field _secondaryStructure.
+ */
+ private java.lang.String _secondaryStructure;
+
+ /**
+ * Field _value.
+ */
+ private float _value;
+
+ /**
+ * keeps track of state for field: _value
+ */
+ private boolean _has_value;
+
+
+ //----------------/
+ //- Constructors -/
+ //----------------/
+
+ public AnnotationElement() {
+ super();
+ }
+
+
+ //-----------/
+ //- Methods -/
+ //-----------/
+
+ /**
+ */
+ public void deletePosition(
+ ) {
+ this._has_position= false;
+ }
+
+ /**
+ */
+ public void deleteValue(
+ ) {
+ this._has_value= false;
+ }
+
+ /**
+ * Returns the value of field 'description'.
+ *
+ * @return the value of field 'Description'.
+ */
+ public java.lang.String getDescription(
+ ) {
+ return this._description;
+ }
+
+ /**
+ * Returns the value of field 'displayCharacter'.
+ *
+ * @return the value of field 'DisplayCharacter'.
+ */
+ public java.lang.String getDisplayCharacter(
+ ) {
+ return this._displayCharacter;
+ }
+
+ /**
+ * Returns the value of field 'position'.
+ *
+ * @return the value of field 'Position'.
*/
- public void deletePosition()
- {
- this._has_position = false;
- }
+ public int getPosition(
+ ) {
+ return this._position;
+ }
+
+ /**
+ * Returns the value of field 'secondaryStructure'.
+ *
+ * @return the value of field 'SecondaryStructure'.
+ */
+ public java.lang.String getSecondaryStructure(
+ ) {
+ return this._secondaryStructure;
+ }
+
+ /**
+ * Returns the value of field 'value'.
+ *
+ * @return the value of field 'Value'.
+ */
+ public float getValue(
+ ) {
+ return this._value;
+ }
+
+ /**
+ * Method hasPosition.
+ *
+ * @return true if at least one Position has been added
+ */
+ public boolean hasPosition(
+ ) {
+ return this._has_position;
+ }
+
+ /**
+ * Method hasValue.
+ *
+ * @return true if at least one Value has been added
+ */
+ public boolean hasValue(
+ ) {
+ return this._has_value;
+ }
+
+ /**
+ * 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 'description'.
+ *
+ * @param description the value of field 'description'.
+ */
+ public void setDescription(
+ final java.lang.String description) {
+ this._description = description;
+ }
+
+ /**
+ * Sets the value of field 'displayCharacter'.
+ *
+ * @param displayCharacter the value of field 'displayCharacter'
+ */
+ public void setDisplayCharacter(
+ final java.lang.String displayCharacter) {
+ this._displayCharacter = displayCharacter;
+ }
+
+ /**
+ * Sets the value of field 'position'.
+ *
+ * @param position the value of field 'position'.
+ */
+ public void setPosition(
+ final int position) {
+ this._position = position;
+ this._has_position = true;
+ }
+
+ /**
+ * Sets the value of field 'secondaryStructure'.
+ *
+ * @param secondaryStructure the value of field
+ * 'secondaryStructure'.
+ */
+ public void setSecondaryStructure(
+ final java.lang.String secondaryStructure) {
+ this._secondaryStructure = secondaryStructure;
+ }
+
+ /**
+ * Sets the value of field 'value'.
+ *
+ * @param value the value of field 'value'.
+ */
+ public void setValue(
+ final float value) {
+ this._value = value;
+ this._has_value = 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.binding.AnnotationElement
+ */
+ public static jalview.binding.AnnotationElement unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ return (jalview.binding.AnnotationElement) Unmarshaller.unmarshal(jalview.binding.AnnotationElement.class, reader);
+ }
- /**
+ /**
+ *
+ *
+ * @throws org.exolab.castor.xml.ValidationException if this
+ * object is an invalid instance according to the schema
*/
- public void deleteValue()
- {
- this._has_value = false;
- }
-
- /**
- * Returns the value of field 'description'.
- *
- * @return the value of field 'Description'.
- */
- public java.lang.String getDescription()
- {
- return this._description;
- }
-
- /**
- * Returns the value of field 'displayCharacter'.
- *
- * @return the value of field 'DisplayCharacter'.
- */
- public java.lang.String getDisplayCharacter()
- {
- return this._displayCharacter;
- }
-
- /**
- * Returns the value of field 'position'.
- *
- * @return the value of field 'Position'.
- */
- public int getPosition()
- {
- return this._position;
- }
-
- /**
- * Returns the value of field 'secondaryStructure'.
- *
- * @return the value of field 'SecondaryStructure'.
- */
- public java.lang.String getSecondaryStructure()
- {
- return this._secondaryStructure;
- }
-
- /**
- * Returns the value of field 'value'.
- *
- * @return the value of field 'Value'.
- */
- public float getValue()
- {
- return this._value;
- }
-
- /**
- * Method hasPosition.
- *
- * @return true if at least one Position has been added
- */
- public boolean hasPosition()
- {
- return this._has_position;
- }
-
- /**
- * Method hasValue.
- *
- * @return true if at least one Value has been added
- */
- public boolean hasValue()
- {
- return this._has_value;
- }
-
- /**
- * 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;
+ public void validate(
+ )
+ throws org.exolab.castor.xml.ValidationException {
+ org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
+ validator.validate(this);
}
- 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 'description'.
- *
- * @param description
- * the value of field 'description'.
- */
- public void setDescription(final java.lang.String description)
- {
- this._description = description;
- }
-
- /**
- * Sets the value of field 'displayCharacter'.
- *
- * @param displayCharacter
- * the value of field 'displayCharacter'
- */
- public void setDisplayCharacter(final java.lang.String displayCharacter)
- {
- this._displayCharacter = displayCharacter;
- }
-
- /**
- * Sets the value of field 'position'.
- *
- * @param position
- * the value of field 'position'.
- */
- public void setPosition(final int position)
- {
- this._position = position;
- this._has_position = true;
- }
-
- /**
- * Sets the value of field 'secondaryStructure'.
- *
- * @param secondaryStructure
- * the value of field 'secondaryStructure'.
- */
- public void setSecondaryStructure(
- final java.lang.String secondaryStructure)
- {
- this._secondaryStructure = secondaryStructure;
- }
-
- /**
- * Sets the value of field 'value'.
- *
- * @param value
- * the value of field 'value'.
- */
- public void setValue(final float value)
- {
- this._value = value;
- this._has_value = 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.binding.AnnotationElement
- */
- public static jalview.binding.AnnotationElement unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException,
- org.exolab.castor.xml.ValidationException
- {
- return (jalview.binding.AnnotationElement) Unmarshaller.unmarshal(
- jalview.binding.AnnotationElement.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);
- }
}
/*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
- *
- * This file is part of Jalview.
- *
- * Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3
- * of the License, or (at your option) any later version.
- *
- * Jalview is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with 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.binding;
-//---------------------------------/
-//- Imported classes and packages -/
+ //---------------------------------/
+ //- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class Colour implements java.io.Serializable
-{
-
- // --------------------------/
- // - Class/Member Variables -/
- // --------------------------/
-
- /**
- * Field _name.
- */
- private java.lang.String _name;
-
- /**
- * Field _RGB.
- */
- private java.lang.String _RGB;
-
- /**
- * Field _minRGB.
- */
- private java.lang.String _minRGB;
-
- /**
- * loosely specified enumeration: NONE,ABOVE, or BELOW
- */
- private java.lang.String _threshType;
-
- /**
- * Field _threshold.
- */
- private float _threshold;
-
- /**
- * keeps track of state for field: _threshold
- */
- private boolean _has_threshold;
-
- /**
- * Field _max.
- */
- private float _max;
-
- /**
- * keeps track of state for field: _max
- */
- private boolean _has_max;
-
- /**
- * Field _min.
- */
- private float _min;
-
- /**
- * keeps track of state for field: _min
- */
- private boolean _has_min;
-
- /**
- * Field _colourByLabel.
- */
- private boolean _colourByLabel;
-
- /**
- * keeps track of state for field: _colourByLabel
- */
- private boolean _has_colourByLabel;
-
- /**
- * Field _autoScale.
- */
- private boolean _autoScale;
-
- /**
- * keeps track of state for field: _autoScale
- */
- private boolean _has_autoScale;
-
- // ----------------/
- // - Constructors -/
- // ----------------/
-
- public Colour()
- {
- super();
- }
-
- // -----------/
- // - Methods -/
- // -----------/
-
- /**
- */
- public void deleteAutoScale()
- {
- this._has_autoScale = false;
- }
-
- /**
- */
- public void deleteColourByLabel()
- {
- this._has_colourByLabel = false;
- }
-
- /**
- */
- public void deleteMax()
- {
- this._has_max = false;
- }
-
- /**
- */
- public void deleteMin()
- {
- this._has_min = false;
- }
-
- /**
- */
- public void deleteThreshold()
- {
- this._has_threshold = false;
- }
-
- /**
- * Returns the value of field 'autoScale'.
- *
- * @return the value of field 'AutoScale'.
- */
- public boolean getAutoScale()
- {
- return this._autoScale;
- }
-
- /**
- * Returns the value of field 'colourByLabel'.
- *
- * @return the value of field 'ColourByLabel'.
- */
- public boolean getColourByLabel()
- {
- return this._colourByLabel;
- }
-
- /**
- * Returns the value of field 'max'.
- *
- * @return the value of field 'Max'.
- */
- public float getMax()
- {
- return this._max;
- }
-
- /**
- * Returns the value of field 'min'.
- *
- * @return the value of field 'Min'.
- */
- public float getMin()
- {
- return this._min;
- }
-
- /**
- * Returns the value of field 'minRGB'.
- *
- * @return the value of field 'MinRGB'.
- */
- public java.lang.String getMinRGB()
- {
- return this._minRGB;
- }
-
- /**
- * Returns the value of field 'name'.
- *
- * @return the value of field 'Name'.
- */
- public java.lang.String getName()
- {
- return this._name;
- }
-
- /**
- * Returns the value of field 'RGB'.
- *
- * @return the value of field 'RGB'.
- */
- public java.lang.String getRGB()
- {
- return this._RGB;
- }
-
- /**
- * Returns the value of field 'threshType'. The field 'threshType' has the
- * following description: loosely specified enumeration: NONE,ABOVE, or BELOW
- *
- * @return the value of field 'ThreshType'.
- */
- public java.lang.String getThreshType()
- {
- return this._threshType;
- }
-
- /**
- * Returns the value of field 'threshold'.
- *
- * @return the value of field 'Threshold'.
- */
- public float getThreshold()
- {
- return this._threshold;
- }
-
- /**
- * Method hasAutoScale.
- *
- * @return true if at least one AutoScale has been added
- */
- public boolean hasAutoScale()
- {
- return this._has_autoScale;
- }
-
- /**
- * Method hasColourByLabel.
- *
- * @return true if at least one ColourByLabel has been added
- */
- public boolean hasColourByLabel()
- {
- return this._has_colourByLabel;
- }
-
- /**
- * Method hasMax.
- *
- * @return true if at least one Max has been added
- */
- public boolean hasMax()
- {
- return this._has_max;
- }
-
- /**
- * Method hasMin.
- *
- * @return true if at least one Min has been added
- */
- public boolean hasMin()
- {
- return this._has_min;
- }
-
- /**
- * Method hasThreshold.
- *
- * @return true if at least one Threshold has been added
- */
- public boolean hasThreshold()
- {
- return this._has_threshold;
- }
-
- /**
- * Returns the value of field 'autoScale'.
- *
- * @return the value of field 'AutoScale'.
- */
- public boolean isAutoScale()
- {
- return this._autoScale;
- }
-
- /**
- * Returns the value of field 'colourByLabel'.
- *
- * @return the value of field 'ColourByLabel'.
- */
- public boolean isColourByLabel()
- {
- return this._colourByLabel;
- }
-
- /**
- * 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 'autoScale'.
- *
- * @param autoScale
- * the value of field 'autoScale'.
- */
- public void setAutoScale(final boolean autoScale)
- {
- this._autoScale = autoScale;
- this._has_autoScale = true;
- }
-
- /**
- * Sets the value of field 'colourByLabel'.
- *
- * @param colourByLabel
- * the value of field 'colourByLabel'.
- */
- public void setColourByLabel(final boolean colourByLabel)
- {
- this._colourByLabel = colourByLabel;
- this._has_colourByLabel = true;
- }
-
- /**
- * Sets the value of field 'max'.
- *
- * @param max
- * the value of field 'max'.
- */
- public void setMax(final float max)
- {
- this._max = max;
- this._has_max = true;
- }
-
- /**
- * Sets the value of field 'min'.
- *
- * @param min
- * the value of field 'min'.
- */
- public void setMin(final float min)
- {
- this._min = min;
- this._has_min = true;
- }
-
- /**
- * Sets the value of field 'minRGB'.
- *
- * @param minRGB
- * the value of field 'minRGB'.
- */
- public void setMinRGB(final java.lang.String minRGB)
- {
- this._minRGB = minRGB;
- }
-
- /**
- * Sets the value of field 'name'.
- *
- * @param name
- * the value of field 'name'.
- */
- public void setName(final java.lang.String name)
- {
- this._name = name;
- }
-
- /**
- * Sets the value of field 'RGB'.
- *
- * @param RGB
- * the value of field 'RGB'.
- */
- public void setRGB(final java.lang.String RGB)
- {
- this._RGB = RGB;
- }
-
- /**
- * Sets the value of field 'threshType'. The field 'threshType' has the
- * following description: loosely specified enumeration: NONE,ABOVE, or BELOW
- *
- * @param threshType
- * the value of field 'threshType'.
- */
- public void setThreshType(final java.lang.String threshType)
- {
- this._threshType = threshType;
- }
-
- /**
- * 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.binding.Colour
- */
- public static jalview.binding.Colour unmarshal(final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException,
- org.exolab.castor.xml.ValidationException
- {
- return (jalview.binding.Colour) Unmarshaller.unmarshal(
- jalview.binding.Colour.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 Colour implements java.io.Serializable {
+
+
+ //--------------------------/
+ //- Class/Member Variables -/
+ //--------------------------/
+
+ /**
+ * Field _name.
+ */
+ private java.lang.String _name;
+
+ /**
+ * Field _RGB.
+ */
+ private java.lang.String _RGB;
+
+ /**
+ * Field _minRGB.
+ */
+ private java.lang.String _minRGB;
+
+ /**
+ * loosely specified enumeration: NONE,ABOVE, or BELOW
+ */
+ private java.lang.String _threshType;
+
+ /**
+ * Field _threshold.
+ */
+ private float _threshold;
+
+ /**
+ * keeps track of state for field: _threshold
+ */
+ private boolean _has_threshold;
+
+ /**
+ * Field _max.
+ */
+ private float _max;
+
+ /**
+ * keeps track of state for field: _max
+ */
+ private boolean _has_max;
+
+ /**
+ * Field _min.
+ */
+ private float _min;
+
+ /**
+ * keeps track of state for field: _min
+ */
+ private boolean _has_min;
+
+ /**
+ * Field _colourByLabel.
+ */
+ private boolean _colourByLabel;
+
+ /**
+ * keeps track of state for field: _colourByLabel
+ */
+ private boolean _has_colourByLabel;
+
+ /**
+ * Field _autoScale.
+ */
+ private boolean _autoScale;
+
+ /**
+ * keeps track of state for field: _autoScale
+ */
+ private boolean _has_autoScale;
+
+
+ //----------------/
+ //- Constructors -/
+ //----------------/
+
+ public Colour() {
+ super();
+ }
+
+
+ //-----------/
+ //- Methods -/
+ //-----------/
+
+ /**
+ */
+ public void deleteAutoScale(
+ ) {
+ this._has_autoScale= false;
+ }
+
+ /**
+ */
+ public void deleteColourByLabel(
+ ) {
+ this._has_colourByLabel= false;
+ }
+
+ /**
+ */
+ public void deleteMax(
+ ) {
+ this._has_max= false;
+ }
+
+ /**
+ */
+ public void deleteMin(
+ ) {
+ this._has_min= false;
+ }
+
+ /**
+ */
+ public void deleteThreshold(
+ ) {
+ this._has_threshold= false;
+ }
+
+ /**
+ * Returns the value of field 'autoScale'.
+ *
+ * @return the value of field 'AutoScale'.
+ */
+ public boolean getAutoScale(
+ ) {
+ return this._autoScale;
+ }
+
+ /**
+ * Returns the value of field 'colourByLabel'.
+ *
+ * @return the value of field 'ColourByLabel'.
+ */
+ public boolean getColourByLabel(
+ ) {
+ return this._colourByLabel;
+ }
+
+ /**
+ * Returns the value of field 'max'.
+ *
+ * @return the value of field 'Max'.
+ */
+ public float getMax(
+ ) {
+ return this._max;
+ }
+
+ /**
+ * Returns the value of field 'min'.
+ *
+ * @return the value of field 'Min'.
+ */
+ public float getMin(
+ ) {
+ return this._min;
+ }
+
+ /**
+ * Returns the value of field 'minRGB'.
+ *
+ * @return the value of field 'MinRGB'.
+ */
+ public java.lang.String getMinRGB(
+ ) {
+ return this._minRGB;
+ }
+
+ /**
+ * Returns the value of field 'name'.
+ *
+ * @return the value of field 'Name'.
+ */
+ public java.lang.String getName(
+ ) {
+ return this._name;
+ }
+
+ /**
+ * Returns the value of field 'RGB'.
+ *
+ * @return the value of field 'RGB'.
+ */
+ public java.lang.String getRGB(
+ ) {
+ return this._RGB;
+ }
+
+ /**
+ * Returns the value of field 'threshType'. The field
+ * 'threshType' has the following description: loosely
+ * specified enumeration: NONE,ABOVE, or BELOW
+ *
+ * @return the value of field 'ThreshType'.
+ */
+ public java.lang.String getThreshType(
+ ) {
+ return this._threshType;
+ }
+
+ /**
+ * Returns the value of field 'threshold'.
+ *
+ * @return the value of field 'Threshold'.
+ */
+ public float getThreshold(
+ ) {
+ return this._threshold;
+ }
+
+ /**
+ * Method hasAutoScale.
+ *
+ * @return true if at least one AutoScale has been added
+ */
+ public boolean hasAutoScale(
+ ) {
+ return this._has_autoScale;
+ }
+
+ /**
+ * Method hasColourByLabel.
+ *
+ * @return true if at least one ColourByLabel has been added
+ */
+ public boolean hasColourByLabel(
+ ) {
+ return this._has_colourByLabel;
+ }
+
+ /**
+ * Method hasMax.
+ *
+ * @return true if at least one Max has been added
+ */
+ public boolean hasMax(
+ ) {
+ return this._has_max;
+ }
+
+ /**
+ * Method hasMin.
+ *
+ * @return true if at least one Min has been added
+ */
+ public boolean hasMin(
+ ) {
+ return this._has_min;
+ }
+
+ /**
+ * Method hasThreshold.
+ *
+ * @return true if at least one Threshold has been added
+ */
+ public boolean hasThreshold(
+ ) {
+ return this._has_threshold;
+ }
+
+ /**
+ * Returns the value of field 'autoScale'.
+ *
+ * @return the value of field 'AutoScale'.
+ */
+ public boolean isAutoScale(
+ ) {
+ return this._autoScale;
+ }
+
+ /**
+ * Returns the value of field 'colourByLabel'.
+ *
+ * @return the value of field 'ColourByLabel'.
+ */
+ public boolean isColourByLabel(
+ ) {
+ return this._colourByLabel;
+ }
+
+ /**
+ * 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 'autoScale'.
+ *
+ * @param autoScale the value of field 'autoScale'.
+ */
+ public void setAutoScale(
+ final boolean autoScale) {
+ this._autoScale = autoScale;
+ this._has_autoScale = true;
+ }
+
+ /**
+ * Sets the value of field 'colourByLabel'.
+ *
+ * @param colourByLabel the value of field 'colourByLabel'.
+ */
+ public void setColourByLabel(
+ final boolean colourByLabel) {
+ this._colourByLabel = colourByLabel;
+ this._has_colourByLabel = true;
+ }
+
+ /**
+ * Sets the value of field 'max'.
+ *
+ * @param max the value of field 'max'.
+ */
+ public void setMax(
+ final float max) {
+ this._max = max;
+ this._has_max = true;
+ }
+
+ /**
+ * Sets the value of field 'min'.
+ *
+ * @param min the value of field 'min'.
+ */
+ public void setMin(
+ final float min) {
+ this._min = min;
+ this._has_min = true;
+ }
+
+ /**
+ * Sets the value of field 'minRGB'.
+ *
+ * @param minRGB the value of field 'minRGB'.
+ */
+ public void setMinRGB(
+ final java.lang.String minRGB) {
+ this._minRGB = minRGB;
+ }
+
+ /**
+ * Sets the value of field 'name'.
+ *
+ * @param name the value of field 'name'.
+ */
+ public void setName(
+ final java.lang.String name) {
+ this._name = name;
+ }
+
+ /**
+ * Sets the value of field 'RGB'.
+ *
+ * @param RGB the value of field 'RGB'.
+ */
+ public void setRGB(
+ final java.lang.String RGB) {
+ this._RGB = RGB;
+ }
+
+ /**
+ * Sets the value of field 'threshType'. The field 'threshType'
+ * has the following description: loosely specified
+ * enumeration: NONE,ABOVE, or BELOW
+ *
+ * @param threshType the value of field 'threshType'.
+ */
+ public void setThreshType(
+ final java.lang.String threshType) {
+ this._threshType = threshType;
+ }
+
+ /**
+ * 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.binding.Colour
+ */
+ public static jalview.binding.Colour unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ return (jalview.binding.Colour) Unmarshaller.unmarshal(jalview.binding.Colour.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);
+ }
}
/*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
- *
- * This file is part of Jalview.
- *
- * Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3
- * of the License, or (at your option) any later version.
- *
- * Jalview is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with 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.binding;
-//---------------------------------/
-//- Imported classes and packages -/
+ //---------------------------------/
+ //- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class Feature implements java.io.Serializable
-{
-
- // --------------------------/
- // - Class/Member Variables -/
- // --------------------------/
-
- /**
- * Field _begin.
- */
- private int _begin;
-
- /**
- * keeps track of state for field: _begin
- */
- private boolean _has_begin;
-
- /**
- * Field _end.
- */
- private int _end;
-
- /**
- * keeps track of state for field: _end
- */
- private boolean _has_end;
-
- /**
- * Field _type.
- */
- private java.lang.String _type;
-
- /**
- * Field _description.
- */
- private java.lang.String _description;
-
- /**
- * Field _status.
- */
- private java.lang.String _status;
-
- // ----------------/
- // - Constructors -/
- // ----------------/
-
- public Feature()
- {
- super();
- }
-
- // -----------/
- // - Methods -/
- // -----------/
-
- /**
+public class Feature implements java.io.Serializable {
+
+
+ //--------------------------/
+ //- Class/Member Variables -/
+ //--------------------------/
+
+ /**
+ * Field _begin.
+ */
+ private int _begin;
+
+ /**
+ * keeps track of state for field: _begin
+ */
+ private boolean _has_begin;
+
+ /**
+ * Field _end.
+ */
+ private int _end;
+
+ /**
+ * keeps track of state for field: _end
+ */
+ private boolean _has_end;
+
+ /**
+ * Field _type.
+ */
+ private java.lang.String _type;
+
+ /**
+ * Field _description.
+ */
+ private java.lang.String _description;
+
+ /**
+ * Field _status.
+ */
+ private java.lang.String _status;
+
+
+ //----------------/
+ //- Constructors -/
+ //----------------/
+
+ public Feature() {
+ super();
+ }
+
+
+ //-----------/
+ //- Methods -/
+ //-----------/
+
+ /**
+ */
+ public void deleteBegin(
+ ) {
+ this._has_begin= false;
+ }
+
+ /**
+ */
+ public void deleteEnd(
+ ) {
+ this._has_end= false;
+ }
+
+ /**
+ * Returns the value of field 'begin'.
+ *
+ * @return the value of field 'Begin'.
+ */
+ public int getBegin(
+ ) {
+ return this._begin;
+ }
+
+ /**
+ * Returns the value of field 'description'.
+ *
+ * @return the value of field 'Description'.
+ */
+ public java.lang.String getDescription(
+ ) {
+ return this._description;
+ }
+
+ /**
+ * Returns the value of field 'end'.
+ *
+ * @return the value of field 'End'.
*/
- public void deleteBegin()
- {
- this._has_begin = false;
- }
+ public int getEnd(
+ ) {
+ return this._end;
+ }
+
+ /**
+ * Returns the value of field 'status'.
+ *
+ * @return the value of field 'Status'.
+ */
+ public java.lang.String getStatus(
+ ) {
+ return this._status;
+ }
+
+ /**
+ * Returns the value of field 'type'.
+ *
+ * @return the value of field 'Type'.
+ */
+ public java.lang.String getType(
+ ) {
+ return this._type;
+ }
+
+ /**
+ * Method hasBegin.
+ *
+ * @return true if at least one Begin has been added
+ */
+ public boolean hasBegin(
+ ) {
+ return this._has_begin;
+ }
+
+ /**
+ * Method hasEnd.
+ *
+ * @return true if at least one End has been added
+ */
+ public boolean hasEnd(
+ ) {
+ return this._has_end;
+ }
+
+ /**
+ * 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 'begin'.
+ *
+ * @param begin the value of field 'begin'.
+ */
+ public void setBegin(
+ final int begin) {
+ this._begin = begin;
+ this._has_begin = true;
+ }
+
+ /**
+ * Sets the value of field 'description'.
+ *
+ * @param description the value of field 'description'.
+ */
+ public void setDescription(
+ final java.lang.String description) {
+ this._description = description;
+ }
+
+ /**
+ * Sets the value of field 'end'.
+ *
+ * @param end the value of field 'end'.
+ */
+ public void setEnd(
+ final int end) {
+ this._end = end;
+ this._has_end = true;
+ }
+
+ /**
+ * Sets the value of field 'status'.
+ *
+ * @param status the value of field 'status'.
+ */
+ public void setStatus(
+ final java.lang.String status) {
+ this._status = status;
+ }
+
+ /**
+ * Sets the value of field 'type'.
+ *
+ * @param type the value of field 'type'.
+ */
+ public void setType(
+ final java.lang.String type) {
+ this._type = type;
+ }
+
+ /**
+ * 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.binding.Feature
+ */
+ public static jalview.binding.Feature unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ return (jalview.binding.Feature) Unmarshaller.unmarshal(jalview.binding.Feature.class, reader);
+ }
- /**
+ /**
+ *
+ *
+ * @throws org.exolab.castor.xml.ValidationException if this
+ * object is an invalid instance according to the schema
*/
- public void deleteEnd()
- {
- this._has_end = false;
- }
-
- /**
- * Returns the value of field 'begin'.
- *
- * @return the value of field 'Begin'.
- */
- public int getBegin()
- {
- return this._begin;
- }
-
- /**
- * Returns the value of field 'description'.
- *
- * @return the value of field 'Description'.
- */
- public java.lang.String getDescription()
- {
- return this._description;
- }
-
- /**
- * Returns the value of field 'end'.
- *
- * @return the value of field 'End'.
- */
- public int getEnd()
- {
- return this._end;
- }
-
- /**
- * Returns the value of field 'status'.
- *
- * @return the value of field 'Status'.
- */
- public java.lang.String getStatus()
- {
- return this._status;
- }
-
- /**
- * Returns the value of field 'type'.
- *
- * @return the value of field 'Type'.
- */
- public java.lang.String getType()
- {
- return this._type;
- }
-
- /**
- * Method hasBegin.
- *
- * @return true if at least one Begin has been added
- */
- public boolean hasBegin()
- {
- return this._has_begin;
- }
-
- /**
- * Method hasEnd.
- *
- * @return true if at least one End has been added
- */
- public boolean hasEnd()
- {
- return this._has_end;
- }
-
- /**
- * 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;
+ public void validate(
+ )
+ throws org.exolab.castor.xml.ValidationException {
+ org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
+ validator.validate(this);
}
- 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 'begin'.
- *
- * @param begin
- * the value of field 'begin'.
- */
- public void setBegin(final int begin)
- {
- this._begin = begin;
- this._has_begin = true;
- }
-
- /**
- * Sets the value of field 'description'.
- *
- * @param description
- * the value of field 'description'.
- */
- public void setDescription(final java.lang.String description)
- {
- this._description = description;
- }
-
- /**
- * Sets the value of field 'end'.
- *
- * @param end
- * the value of field 'end'.
- */
- public void setEnd(final int end)
- {
- this._end = end;
- this._has_end = true;
- }
-
- /**
- * Sets the value of field 'status'.
- *
- * @param status
- * the value of field 'status'.
- */
- public void setStatus(final java.lang.String status)
- {
- this._status = status;
- }
-
- /**
- * Sets the value of field 'type'.
- *
- * @param type
- * the value of field 'type'.
- */
- public void setType(final java.lang.String type)
- {
- this._type = type;
- }
-
- /**
- * 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.binding.Feature
- */
- public static jalview.binding.Feature unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException,
- org.exolab.castor.xml.ValidationException
- {
- return (jalview.binding.Feature) Unmarshaller.unmarshal(
- jalview.binding.Feature.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);
- }
}
/*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
- *
- * This file is part of Jalview.
- *
- * Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3
- * of the License, or (at your option) any later version.
- *
- * Jalview is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with 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.binding;
-//---------------------------------/
-//- Imported classes and packages -/
+ //---------------------------------/
+ //- Imported classes and packages -/
//---------------------------------/
-import jalview.util.MessageManager;
-
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
*
* @version $Revision$ $Date$
*/
-public class FeatureSettings implements java.io.Serializable
-{
+public class FeatureSettings implements java.io.Serializable {
- // --------------------------/
- // - Class/Member Variables -/
- // --------------------------/
- /**
- * Field _settingList.
- */
- private java.util.Vector _settingList;
+ //--------------------------/
+ //- Class/Member Variables -/
+ //--------------------------/
- // ----------------/
- // - Constructors -/
- // ----------------/
+ /**
+ * Field _settingList.
+ */
+ private java.util.Vector _settingList;
- public FeatureSettings()
- {
- super();
- this._settingList = new java.util.Vector();
- }
- // -----------/
- // - Methods -/
- // -----------/
+ //----------------/
+ //- Constructors -/
+ //----------------/
- /**
- *
- *
- * @param vSetting
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void addSetting(final jalview.binding.Setting vSetting)
- throws java.lang.IndexOutOfBoundsException
- {
- this._settingList.addElement(vSetting);
- }
+ public FeatureSettings() {
+ super();
+ this._settingList = new java.util.Vector();
+ }
- /**
- *
- *
- * @param index
- * @param vSetting
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void addSetting(final int index,
- final jalview.binding.Setting vSetting)
- throws java.lang.IndexOutOfBoundsException
- {
- this._settingList.add(index, vSetting);
- }
- /**
- * Method enumerateSetting.
- *
- * @return an Enumeration over all jalview.binding.Setting elements
- */
- public java.util.Enumeration enumerateSetting()
- {
- return this._settingList.elements();
- }
+ //-----------/
+ //- Methods -/
+ //-----------/
- /**
- * Method getSetting.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- * @return the value of the jalview.binding.Setting at the given index
- */
- public jalview.binding.Setting getSetting(final int index)
- throws java.lang.IndexOutOfBoundsException
- {
- // check bounds for index
- if (index < 0 || index >= this._settingList.size())
- {
- throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
- "getSetting",
- Integer.valueOf(index).toString(),
- Integer.valueOf((this._settingList.size() - 1)).toString()
- }));
+ /**
+ *
+ *
+ * @param vSetting
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addSetting(
+ final jalview.binding.Setting vSetting)
+ throws java.lang.IndexOutOfBoundsException {
+ this._settingList.addElement(vSetting);
}
- return (jalview.binding.Setting) _settingList.get(index);
- }
+ /**
+ *
+ *
+ * @param index
+ * @param vSetting
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addSetting(
+ final int index,
+ final jalview.binding.Setting vSetting)
+ throws java.lang.IndexOutOfBoundsException {
+ this._settingList.add(index, vSetting);
+ }
- /**
- * Method getSetting.Returns the contents of the collection in an Array.
- * <p>
- * Note: Just in case the collection contents are changing in another thread,
- * we pass a 0-length Array of the correct type into the API call. This way we
- * <i>know</i> that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public jalview.binding.Setting[] getSetting()
- {
- jalview.binding.Setting[] array = new jalview.binding.Setting[0];
- return (jalview.binding.Setting[]) this._settingList.toArray(array);
- }
+ /**
+ * Method enumerateSetting.
+ *
+ * @return an Enumeration over all jalview.binding.Setting
+ * elements
+ */
+ public java.util.Enumeration enumerateSetting(
+ ) {
+ return this._settingList.elements();
+ }
- /**
- * Method getSettingCount.
- *
- * @return the size of this collection
- */
- public int getSettingCount()
- {
- return this._settingList.size();
- }
+ /**
+ * Method getSetting.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ * @return the value of the jalview.binding.Setting at the
+ * given index
+ */
+ public jalview.binding.Setting getSetting(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._settingList.size()) {
+ throw new IndexOutOfBoundsException("getSetting: Index value '" + index + "' not in range [0.." + (this._settingList.size() - 1) + "]");
+ }
+
+ return (jalview.binding.Setting) _settingList.get(index);
+ }
- /**
- * 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;
+ /**
+ * Method getSetting.Returns the contents of the collection in
+ * an Array. <p>Note: Just in case the collection contents
+ * are changing in another thread, we pass a 0-length Array of
+ * the correct type into the API call. This way we <i>know</i>
+ * that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public jalview.binding.Setting[] getSetting(
+ ) {
+ jalview.binding.Setting[] array = new jalview.binding.Setting[0];
+ return (jalview.binding.Setting[]) this._settingList.toArray(array);
}
- 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);
- }
+ /**
+ * Method getSettingCount.
+ *
+ * @return the size of this collection
+ */
+ public int getSettingCount(
+ ) {
+ return this._settingList.size();
+ }
- /**
- *
- *
- * @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);
- }
+ /**
+ * 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 removeAllSetting()
- {
- this._settingList.clear();
- }
+ public void marshal(
+ final java.io.Writer out)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ Marshaller.marshal(this, out);
+ }
- /**
- * Method removeSetting.
- *
- * @param vSetting
- * @return true if the object was removed from the collection.
- */
- public boolean removeSetting(final jalview.binding.Setting vSetting)
- {
- boolean removed = _settingList.remove(vSetting);
- return removed;
- }
+ /**
+ *
+ *
+ * @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);
+ }
- /**
- * Method removeSettingAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public jalview.binding.Setting removeSettingAt(final int index)
- {
- java.lang.Object obj = this._settingList.remove(index);
- return (jalview.binding.Setting) obj;
- }
+ /**
+ */
+ public void removeAllSetting(
+ ) {
+ this._settingList.clear();
+ }
- /**
- *
- *
- * @param index
- * @param vSetting
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void setSetting(final int index,
- final jalview.binding.Setting vSetting)
- throws java.lang.IndexOutOfBoundsException
- {
- // check bounds for index
- if (index < 0 || index >= this._settingList.size())
- {
- throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
- "setSetting",
- Integer.valueOf(index).toString(),
- Integer.valueOf((this._settingList.size() - 1)).toString()
- }));
+ /**
+ * Method removeSetting.
+ *
+ * @param vSetting
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeSetting(
+ final jalview.binding.Setting vSetting) {
+ boolean removed = _settingList.remove(vSetting);
+ return removed;
}
- this._settingList.set(index, vSetting);
- }
+ /**
+ * Method removeSettingAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public jalview.binding.Setting removeSettingAt(
+ final int index) {
+ java.lang.Object obj = this._settingList.remove(index);
+ return (jalview.binding.Setting) obj;
+ }
- /**
- *
- *
- * @param vSettingArray
- */
- public void setSetting(final jalview.binding.Setting[] vSettingArray)
- {
- // -- copy array
- _settingList.clear();
+ /**
+ *
+ *
+ * @param index
+ * @param vSetting
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setSetting(
+ final int index,
+ final jalview.binding.Setting vSetting)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._settingList.size()) {
+ throw new IndexOutOfBoundsException("setSetting: Index value '" + index + "' not in range [0.." + (this._settingList.size() - 1) + "]");
+ }
+
+ this._settingList.set(index, vSetting);
+ }
- for (int i = 0; i < vSettingArray.length; i++)
- {
- this._settingList.add(vSettingArray[i]);
+ /**
+ *
+ *
+ * @param vSettingArray
+ */
+ public void setSetting(
+ final jalview.binding.Setting[] vSettingArray) {
+ //-- copy array
+ _settingList.clear();
+
+ for (int i = 0; i < vSettingArray.length; i++) {
+ this._settingList.add(vSettingArray[i]);
+ }
}
- }
- /**
- * 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.binding.FeatureSettings
- */
- public static jalview.binding.FeatureSettings unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException,
- org.exolab.castor.xml.ValidationException
- {
- return (jalview.binding.FeatureSettings) Unmarshaller.unmarshal(
- jalview.binding.FeatureSettings.class, reader);
- }
+ /**
+ * 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.binding.FeatureSettings
+ */
+ public static jalview.binding.FeatureSettings unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ return (jalview.binding.FeatureSettings) Unmarshaller.unmarshal(jalview.binding.FeatureSettings.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);
- }
+ /**
+ *
+ *
+ * @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);
+ }
}
/*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
- *
- * This file is part of Jalview.
- *
- * Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3
- * of the License, or (at your option) any later version.
- *
- * Jalview is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with 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.binding;
-//---------------------------------/
-//- Imported classes and packages -/
+ //---------------------------------/
+ //- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class Features extends Feature implements java.io.Serializable
+public class Features extends Feature
+implements java.io.Serializable
{
- // ----------------/
- // - Constructors -/
- // ----------------/
- public Features()
- {
- super();
- }
+ //----------------/
+ //- Constructors -/
+ //----------------/
+
+ public Features() {
+ super();
+ }
+
- // -----------/
- // - Methods -/
- // -----------/
+ //-----------/
+ //- Methods -/
+ //-----------/
- /**
- * 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;
+ /**
+ * 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;
}
- 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 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);
- }
+ /**
+ *
+ *
+ * @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);
+ }
- /**
- * 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.binding.Feature
- */
- public static jalview.binding.Feature unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException,
- org.exolab.castor.xml.ValidationException
- {
- return (jalview.binding.Feature) Unmarshaller.unmarshal(
- jalview.binding.Features.class, reader);
- }
+ /**
+ * 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.binding.Feature
+ */
+ public static jalview.binding.Feature unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ return (jalview.binding.Feature) Unmarshaller.unmarshal(jalview.binding.Features.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);
- }
+ /**
+ *
+ *
+ * @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);
+ }
}
/*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
- *
- * This file is part of Jalview.
- *
- * Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3
- * of the License, or (at your option) any later version.
- *
- * Jalview is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with 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.binding;
+ //---------------------------------/
+ //- Imported classes and packages -/
//---------------------------------/
-//- Imported classes and packages -/
-//---------------------------------/
-
-import jalview.util.MessageManager;
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
*
* @version $Revision$ $Date$
*/
-public class JGroup implements java.io.Serializable
-{
-
- // --------------------------/
- // - Class/Member Variables -/
- // --------------------------/
-
- /**
- * Field _start.
- */
- private int _start;
-
- /**
- * keeps track of state for field: _start
- */
- private boolean _has_start;
-
- /**
- * Field _end.
- */
- private int _end;
-
- /**
- * keeps track of state for field: _end
- */
- private boolean _has_end;
-
- /**
- * Field _name.
- */
- private java.lang.String _name;
-
- /**
- * Field _colour.
- */
- private java.lang.String _colour;
-
- /**
- * Field _consThreshold.
- */
- private int _consThreshold;
-
- /**
- * keeps track of state for field: _consThreshold
- */
- private boolean _has_consThreshold;
-
- /**
- * Field _pidThreshold.
- */
- private int _pidThreshold;
-
- /**
- * keeps track of state for field: _pidThreshold
- */
- private boolean _has_pidThreshold;
-
- /**
- * Field _outlineColour.
- */
- private int _outlineColour;
-
- /**
- * keeps track of state for field: _outlineColour
- */
- private boolean _has_outlineColour;
-
- /**
- * Field _displayBoxes.
- */
- private boolean _displayBoxes;
-
- /**
- * keeps track of state for field: _displayBoxes
- */
- private boolean _has_displayBoxes;
-
- /**
- * Field _displayText.
- */
- private boolean _displayText;
-
- /**
- * keeps track of state for field: _displayText
- */
- private boolean _has_displayText;
-
- /**
- * Field _colourText.
- */
- private boolean _colourText;
-
- /**
- * keeps track of state for field: _colourText
- */
- private boolean _has_colourText;
-
- /**
- * Field _seqList.
- */
- private java.util.Vector _seqList;
-
- // ----------------/
- // - Constructors -/
- // ----------------/
-
- public JGroup()
- {
- super();
- this._seqList = new java.util.Vector();
- }
-
- // -----------/
- // - Methods -/
- // -----------/
-
- /**
- *
- *
- * @param vSeq
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void addSeq(final int vSeq)
- throws java.lang.IndexOutOfBoundsException
- {
- this._seqList.addElement(new java.lang.Integer(vSeq));
- }
-
- /**
- *
- *
- * @param index
- * @param vSeq
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void addSeq(final int index, final int vSeq)
- throws java.lang.IndexOutOfBoundsException
- {
- this._seqList.add(index, new java.lang.Integer(vSeq));
- }
-
- /**
- */
- public void deleteColourText()
- {
- this._has_colourText = false;
- }
-
- /**
- */
- public void deleteConsThreshold()
- {
- this._has_consThreshold = false;
- }
-
- /**
- */
- public void deleteDisplayBoxes()
- {
- this._has_displayBoxes = false;
- }
-
- /**
- */
- public void deleteDisplayText()
- {
- this._has_displayText = false;
- }
-
- /**
- */
- public void deleteEnd()
- {
- this._has_end = false;
- }
-
- /**
- */
- public void deleteOutlineColour()
- {
- this._has_outlineColour = false;
- }
-
- /**
- */
- public void deletePidThreshold()
- {
- this._has_pidThreshold = false;
- }
-
- /**
- */
- public void deleteStart()
- {
- this._has_start = false;
- }
-
- /**
- * Method enumerateSeq.
- *
- * @return an Enumeration over all int elements
- */
- public java.util.Enumeration enumerateSeq()
- {
- return this._seqList.elements();
- }
-
- /**
- * Returns the value of field 'colour'.
- *
- * @return the value of field 'Colour'.
- */
- public java.lang.String getColour()
- {
- return this._colour;
- }
-
- /**
- * Returns the value of field 'colourText'.
- *
- * @return the value of field 'ColourText'.
- */
- public boolean getColourText()
- {
- return this._colourText;
- }
-
- /**
- * Returns the value of field 'consThreshold'.
- *
- * @return the value of field 'ConsThreshold'.
- */
- public int getConsThreshold()
- {
- return this._consThreshold;
- }
-
- /**
- * Returns the value of field 'displayBoxes'.
- *
- * @return the value of field 'DisplayBoxes'.
- */
- public boolean getDisplayBoxes()
- {
- return this._displayBoxes;
- }
-
- /**
- * Returns the value of field 'displayText'.
- *
- * @return the value of field 'DisplayText'.
- */
- public boolean getDisplayText()
- {
- return this._displayText;
- }
-
- /**
- * Returns the value of field 'end'.
- *
- * @return the value of field 'End'.
- */
- public int getEnd()
- {
- return this._end;
- }
-
- /**
- * Returns the value of field 'name'.
- *
- * @return the value of field 'Name'.
- */
- public java.lang.String getName()
- {
- return this._name;
- }
-
- /**
- * Returns the value of field 'outlineColour'.
- *
- * @return the value of field 'OutlineColour'.
- */
- public int getOutlineColour()
- {
- return this._outlineColour;
- }
-
- /**
- * Returns the value of field 'pidThreshold'.
- *
- * @return the value of field 'PidThreshold'.
- */
- public int getPidThreshold()
- {
- return this._pidThreshold;
- }
-
- /**
- * Method getSeq.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- * @return the value of the int at the given index
- */
- public int getSeq(final int index)
- throws java.lang.IndexOutOfBoundsException
- {
- // check bounds for index
- if (index < 0 || index >= this._seqList.size())
- {
- throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
- "getSeq",
- Integer.valueOf(index).toString(),
- Integer.valueOf((this._seqList.size() - 1)).toString()
- }));
- }
-
- return ((java.lang.Integer) _seqList.get(index)).intValue();
- }
-
- /**
- * Method getSeq.Returns the contents of the collection in an Array.
- *
- * @return this collection as an Array
- */
- public int[] getSeq()
- {
- int size = this._seqList.size();
- int[] array = new int[size];
- java.util.Iterator iter = _seqList.iterator();
- for (int index = 0; index < size; index++)
- {
- array[index] = ((java.lang.Integer) iter.next()).intValue();
- }
- return array;
- }
-
- /**
- * Method getSeqCount.
- *
- * @return the size of this collection
- */
- public int getSeqCount()
- {
- return this._seqList.size();
- }
-
- /**
- * Returns the value of field 'start'.
- *
- * @return the value of field 'Start'.
- */
- public int getStart()
- {
- return this._start;
- }
-
- /**
- * Method hasColourText.
- *
- * @return true if at least one ColourText has been added
- */
- public boolean hasColourText()
- {
- return this._has_colourText;
- }
-
- /**
- * Method hasConsThreshold.
- *
- * @return true if at least one ConsThreshold has been added
- */
- public boolean hasConsThreshold()
- {
- return this._has_consThreshold;
- }
-
- /**
- * Method hasDisplayBoxes.
- *
- * @return true if at least one DisplayBoxes has been added
- */
- public boolean hasDisplayBoxes()
- {
- return this._has_displayBoxes;
- }
-
- /**
- * Method hasDisplayText.
- *
- * @return true if at least one DisplayText has been added
- */
- public boolean hasDisplayText()
- {
- return this._has_displayText;
- }
-
- /**
- * Method hasEnd.
- *
- * @return true if at least one End has been added
- */
- public boolean hasEnd()
- {
- return this._has_end;
- }
-
- /**
- * Method hasOutlineColour.
- *
- * @return true if at least one OutlineColour has been added
- */
- public boolean hasOutlineColour()
- {
- return this._has_outlineColour;
- }
-
- /**
- * Method hasPidThreshold.
- *
- * @return true if at least one PidThreshold has been added
- */
- public boolean hasPidThreshold()
- {
- return this._has_pidThreshold;
- }
-
- /**
- * Method hasStart.
- *
- * @return true if at least one Start has been added
- */
- public boolean hasStart()
- {
- return this._has_start;
- }
-
- /**
- * Returns the value of field 'colourText'.
- *
- * @return the value of field 'ColourText'.
- */
- public boolean isColourText()
- {
- return this._colourText;
- }
-
- /**
- * Returns the value of field 'displayBoxes'.
- *
- * @return the value of field 'DisplayBoxes'.
- */
- public boolean isDisplayBoxes()
- {
- return this._displayBoxes;
- }
-
- /**
- * Returns the value of field 'displayText'.
- *
- * @return the value of field 'DisplayText'.
- */
- public boolean isDisplayText()
- {
- return this._displayText;
- }
-
- /**
- * 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);
- }
-
- /**
- */
- public void removeAllSeq()
- {
- this._seqList.clear();
- }
-
- /**
- * Method removeSeq.
- *
- * @param vSeq
- * @return true if the object was removed from the collection.
- */
- public boolean removeSeq(final int vSeq)
- {
- boolean removed = _seqList.remove(new java.lang.Integer(vSeq));
- return removed;
- }
-
- /**
- * Method removeSeqAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public int removeSeqAt(final int index)
- {
- java.lang.Object obj = this._seqList.remove(index);
- return ((java.lang.Integer) obj).intValue();
- }
-
- /**
- * Sets the value of field 'colour'.
- *
- * @param colour
- * the value of field 'colour'.
- */
- public void setColour(final java.lang.String colour)
- {
- this._colour = colour;
- }
-
- /**
- * Sets the value of field 'colourText'.
- *
- * @param colourText
- * the value of field 'colourText'.
- */
- public void setColourText(final boolean colourText)
- {
- this._colourText = colourText;
- this._has_colourText = true;
- }
-
- /**
- * Sets the value of field 'consThreshold'.
- *
- * @param consThreshold
- * the value of field 'consThreshold'.
- */
- public void setConsThreshold(final int consThreshold)
- {
- this._consThreshold = consThreshold;
- this._has_consThreshold = true;
- }
-
- /**
- * Sets the value of field 'displayBoxes'.
- *
- * @param displayBoxes
- * the value of field 'displayBoxes'.
- */
- public void setDisplayBoxes(final boolean displayBoxes)
- {
- this._displayBoxes = displayBoxes;
- this._has_displayBoxes = true;
- }
-
- /**
- * Sets the value of field 'displayText'.
- *
- * @param displayText
- * the value of field 'displayText'.
- */
- public void setDisplayText(final boolean displayText)
- {
- this._displayText = displayText;
- this._has_displayText = true;
- }
-
- /**
- * Sets the value of field 'end'.
- *
- * @param end
- * the value of field 'end'.
- */
- public void setEnd(final int end)
- {
- this._end = end;
- this._has_end = true;
- }
-
- /**
- * Sets the value of field 'name'.
- *
- * @param name
- * the value of field 'name'.
- */
- public void setName(final java.lang.String name)
- {
- this._name = name;
- }
-
- /**
- * Sets the value of field 'outlineColour'.
- *
- * @param outlineColour
- * the value of field 'outlineColour'.
- */
- public void setOutlineColour(final int outlineColour)
- {
- this._outlineColour = outlineColour;
- this._has_outlineColour = true;
- }
-
- /**
- * Sets the value of field 'pidThreshold'.
- *
- * @param pidThreshold
- * the value of field 'pidThreshold'.
- */
- public void setPidThreshold(final int pidThreshold)
- {
- this._pidThreshold = pidThreshold;
- this._has_pidThreshold = true;
- }
-
- /**
- *
- *
- * @param index
- * @param vSeq
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void setSeq(final int index, final int vSeq)
- throws java.lang.IndexOutOfBoundsException
- {
- // check bounds for index
- if (index < 0 || index >= this._seqList.size())
- {
- throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
- "setSeq",
- Integer.valueOf(index).toString(),
- Integer.valueOf((this._seqList.size() - 1)).toString()
- }));
- }
-
- this._seqList.set(index, new java.lang.Integer(vSeq));
- }
-
- /**
- *
- *
- * @param vSeqArray
- */
- public void setSeq(final int[] vSeqArray)
- {
- // -- copy array
- _seqList.clear();
-
- for (int i = 0; i < vSeqArray.length; i++)
- {
- this._seqList.add(new java.lang.Integer(vSeqArray[i]));
- }
- }
-
- /**
- * Sets the value of field 'start'.
- *
- * @param start
- * the value of field 'start'.
- */
- public void setStart(final int start)
- {
- this._start = start;
- this._has_start = 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.binding.JGroup
- */
- public static jalview.binding.JGroup unmarshal(final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException,
- org.exolab.castor.xml.ValidationException
- {
- return (jalview.binding.JGroup) Unmarshaller.unmarshal(
- jalview.binding.JGroup.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 JGroup implements java.io.Serializable {
+
+
+ //--------------------------/
+ //- Class/Member Variables -/
+ //--------------------------/
+
+ /**
+ * Field _start.
+ */
+ private int _start;
+
+ /**
+ * keeps track of state for field: _start
+ */
+ private boolean _has_start;
+
+ /**
+ * Field _end.
+ */
+ private int _end;
+
+ /**
+ * keeps track of state for field: _end
+ */
+ private boolean _has_end;
+
+ /**
+ * Field _name.
+ */
+ private java.lang.String _name;
+
+ /**
+ * Field _colour.
+ */
+ private java.lang.String _colour;
+
+ /**
+ * Field _consThreshold.
+ */
+ private int _consThreshold;
+
+ /**
+ * keeps track of state for field: _consThreshold
+ */
+ private boolean _has_consThreshold;
+
+ /**
+ * Field _pidThreshold.
+ */
+ private int _pidThreshold;
+
+ /**
+ * keeps track of state for field: _pidThreshold
+ */
+ private boolean _has_pidThreshold;
+
+ /**
+ * Field _outlineColour.
+ */
+ private int _outlineColour;
+
+ /**
+ * keeps track of state for field: _outlineColour
+ */
+ private boolean _has_outlineColour;
+
+ /**
+ * Field _displayBoxes.
+ */
+ private boolean _displayBoxes;
+
+ /**
+ * keeps track of state for field: _displayBoxes
+ */
+ private boolean _has_displayBoxes;
+
+ /**
+ * Field _displayText.
+ */
+ private boolean _displayText;
+
+ /**
+ * keeps track of state for field: _displayText
+ */
+ private boolean _has_displayText;
+
+ /**
+ * Field _colourText.
+ */
+ private boolean _colourText;
+
+ /**
+ * keeps track of state for field: _colourText
+ */
+ private boolean _has_colourText;
+
+ /**
+ * Field _seqList.
+ */
+ private java.util.Vector _seqList;
+
+
+ //----------------/
+ //- Constructors -/
+ //----------------/
+
+ public JGroup() {
+ super();
+ this._seqList = new java.util.Vector();
+ }
+
+
+ //-----------/
+ //- Methods -/
+ //-----------/
+
+ /**
+ *
+ *
+ * @param vSeq
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addSeq(
+ final int vSeq)
+ throws java.lang.IndexOutOfBoundsException {
+ this._seqList.addElement(new java.lang.Integer(vSeq));
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vSeq
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addSeq(
+ final int index,
+ final int vSeq)
+ throws java.lang.IndexOutOfBoundsException {
+ this._seqList.add(index, new java.lang.Integer(vSeq));
+ }
+
+ /**
+ */
+ public void deleteColourText(
+ ) {
+ this._has_colourText= false;
+ }
+
+ /**
+ */
+ public void deleteConsThreshold(
+ ) {
+ this._has_consThreshold= false;
+ }
+
+ /**
+ */
+ public void deleteDisplayBoxes(
+ ) {
+ this._has_displayBoxes= false;
+ }
+
+ /**
+ */
+ public void deleteDisplayText(
+ ) {
+ this._has_displayText= false;
+ }
+
+ /**
+ */
+ public void deleteEnd(
+ ) {
+ this._has_end= false;
+ }
+
+ /**
+ */
+ public void deleteOutlineColour(
+ ) {
+ this._has_outlineColour= false;
+ }
+
+ /**
+ */
+ public void deletePidThreshold(
+ ) {
+ this._has_pidThreshold= false;
+ }
+
+ /**
+ */
+ public void deleteStart(
+ ) {
+ this._has_start= false;
+ }
+
+ /**
+ * Method enumerateSeq.
+ *
+ * @return an Enumeration over all int elements
+ */
+ public java.util.Enumeration enumerateSeq(
+ ) {
+ return this._seqList.elements();
+ }
+
+ /**
+ * Returns the value of field 'colour'.
+ *
+ * @return the value of field 'Colour'.
+ */
+ public java.lang.String getColour(
+ ) {
+ return this._colour;
+ }
+
+ /**
+ * Returns the value of field 'colourText'.
+ *
+ * @return the value of field 'ColourText'.
+ */
+ public boolean getColourText(
+ ) {
+ return this._colourText;
+ }
+
+ /**
+ * Returns the value of field 'consThreshold'.
+ *
+ * @return the value of field 'ConsThreshold'.
+ */
+ public int getConsThreshold(
+ ) {
+ return this._consThreshold;
+ }
+
+ /**
+ * Returns the value of field 'displayBoxes'.
+ *
+ * @return the value of field 'DisplayBoxes'.
+ */
+ public boolean getDisplayBoxes(
+ ) {
+ return this._displayBoxes;
+ }
+
+ /**
+ * Returns the value of field 'displayText'.
+ *
+ * @return the value of field 'DisplayText'.
+ */
+ public boolean getDisplayText(
+ ) {
+ return this._displayText;
+ }
+
+ /**
+ * Returns the value of field 'end'.
+ *
+ * @return the value of field 'End'.
+ */
+ public int getEnd(
+ ) {
+ return this._end;
+ }
+
+ /**
+ * Returns the value of field 'name'.
+ *
+ * @return the value of field 'Name'.
+ */
+ public java.lang.String getName(
+ ) {
+ return this._name;
+ }
+
+ /**
+ * Returns the value of field 'outlineColour'.
+ *
+ * @return the value of field 'OutlineColour'.
+ */
+ public int getOutlineColour(
+ ) {
+ return this._outlineColour;
+ }
+
+ /**
+ * Returns the value of field 'pidThreshold'.
+ *
+ * @return the value of field 'PidThreshold'.
+ */
+ public int getPidThreshold(
+ ) {
+ return this._pidThreshold;
+ }
+
+ /**
+ * Method getSeq.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ * @return the value of the int at the given index
+ */
+ public int getSeq(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._seqList.size()) {
+ throw new IndexOutOfBoundsException("getSeq: Index value '" + index + "' not in range [0.." + (this._seqList.size() - 1) + "]");
+ }
+
+ return ((java.lang.Integer) _seqList.get(index)).intValue();
+ }
+
+ /**
+ * Method getSeq.Returns the contents of the collection in an
+ * Array.
+ *
+ * @return this collection as an Array
+ */
+ public int[] getSeq(
+ ) {
+ int size = this._seqList.size();
+ int[] array = new int[size];
+ java.util.Iterator iter = _seqList.iterator();
+ for (int index = 0; index < size; index++) {
+ array[index] = ((java.lang.Integer) iter.next()).intValue();
+ }
+ return array;
+ }
+
+ /**
+ * Method getSeqCount.
+ *
+ * @return the size of this collection
+ */
+ public int getSeqCount(
+ ) {
+ return this._seqList.size();
+ }
+
+ /**
+ * Returns the value of field 'start'.
+ *
+ * @return the value of field 'Start'.
+ */
+ public int getStart(
+ ) {
+ return this._start;
+ }
+
+ /**
+ * Method hasColourText.
+ *
+ * @return true if at least one ColourText has been added
+ */
+ public boolean hasColourText(
+ ) {
+ return this._has_colourText;
+ }
+
+ /**
+ * Method hasConsThreshold.
+ *
+ * @return true if at least one ConsThreshold has been added
+ */
+ public boolean hasConsThreshold(
+ ) {
+ return this._has_consThreshold;
+ }
+
+ /**
+ * Method hasDisplayBoxes.
+ *
+ * @return true if at least one DisplayBoxes has been added
+ */
+ public boolean hasDisplayBoxes(
+ ) {
+ return this._has_displayBoxes;
+ }
+
+ /**
+ * Method hasDisplayText.
+ *
+ * @return true if at least one DisplayText has been added
+ */
+ public boolean hasDisplayText(
+ ) {
+ return this._has_displayText;
+ }
+
+ /**
+ * Method hasEnd.
+ *
+ * @return true if at least one End has been added
+ */
+ public boolean hasEnd(
+ ) {
+ return this._has_end;
+ }
+
+ /**
+ * Method hasOutlineColour.
+ *
+ * @return true if at least one OutlineColour has been added
+ */
+ public boolean hasOutlineColour(
+ ) {
+ return this._has_outlineColour;
+ }
+
+ /**
+ * Method hasPidThreshold.
+ *
+ * @return true if at least one PidThreshold has been added
+ */
+ public boolean hasPidThreshold(
+ ) {
+ return this._has_pidThreshold;
+ }
+
+ /**
+ * Method hasStart.
+ *
+ * @return true if at least one Start has been added
+ */
+ public boolean hasStart(
+ ) {
+ return this._has_start;
+ }
+
+ /**
+ * Returns the value of field 'colourText'.
+ *
+ * @return the value of field 'ColourText'.
+ */
+ public boolean isColourText(
+ ) {
+ return this._colourText;
+ }
+
+ /**
+ * Returns the value of field 'displayBoxes'.
+ *
+ * @return the value of field 'DisplayBoxes'.
+ */
+ public boolean isDisplayBoxes(
+ ) {
+ return this._displayBoxes;
+ }
+
+ /**
+ * Returns the value of field 'displayText'.
+ *
+ * @return the value of field 'DisplayText'.
+ */
+ public boolean isDisplayText(
+ ) {
+ return this._displayText;
+ }
+
+ /**
+ * 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);
+ }
+
+ /**
+ */
+ public void removeAllSeq(
+ ) {
+ this._seqList.clear();
+ }
+
+ /**
+ * Method removeSeq.
+ *
+ * @param vSeq
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeSeq(
+ final int vSeq) {
+ boolean removed = _seqList.remove(new java.lang.Integer(vSeq));
+ return removed;
+ }
+
+ /**
+ * Method removeSeqAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public int removeSeqAt(
+ final int index) {
+ java.lang.Object obj = this._seqList.remove(index);
+ return ((java.lang.Integer) obj).intValue();
+ }
+
+ /**
+ * Sets the value of field 'colour'.
+ *
+ * @param colour the value of field 'colour'.
+ */
+ public void setColour(
+ final java.lang.String colour) {
+ this._colour = colour;
+ }
+
+ /**
+ * Sets the value of field 'colourText'.
+ *
+ * @param colourText the value of field 'colourText'.
+ */
+ public void setColourText(
+ final boolean colourText) {
+ this._colourText = colourText;
+ this._has_colourText = true;
+ }
+
+ /**
+ * Sets the value of field 'consThreshold'.
+ *
+ * @param consThreshold the value of field 'consThreshold'.
+ */
+ public void setConsThreshold(
+ final int consThreshold) {
+ this._consThreshold = consThreshold;
+ this._has_consThreshold = true;
+ }
+
+ /**
+ * Sets the value of field 'displayBoxes'.
+ *
+ * @param displayBoxes the value of field 'displayBoxes'.
+ */
+ public void setDisplayBoxes(
+ final boolean displayBoxes) {
+ this._displayBoxes = displayBoxes;
+ this._has_displayBoxes = true;
+ }
+
+ /**
+ * Sets the value of field 'displayText'.
+ *
+ * @param displayText the value of field 'displayText'.
+ */
+ public void setDisplayText(
+ final boolean displayText) {
+ this._displayText = displayText;
+ this._has_displayText = true;
+ }
+
+ /**
+ * Sets the value of field 'end'.
+ *
+ * @param end the value of field 'end'.
+ */
+ public void setEnd(
+ final int end) {
+ this._end = end;
+ this._has_end = true;
+ }
+
+ /**
+ * Sets the value of field 'name'.
+ *
+ * @param name the value of field 'name'.
+ */
+ public void setName(
+ final java.lang.String name) {
+ this._name = name;
+ }
+
+ /**
+ * Sets the value of field 'outlineColour'.
+ *
+ * @param outlineColour the value of field 'outlineColour'.
+ */
+ public void setOutlineColour(
+ final int outlineColour) {
+ this._outlineColour = outlineColour;
+ this._has_outlineColour = true;
+ }
+
+ /**
+ * Sets the value of field 'pidThreshold'.
+ *
+ * @param pidThreshold the value of field 'pidThreshold'.
+ */
+ public void setPidThreshold(
+ final int pidThreshold) {
+ this._pidThreshold = pidThreshold;
+ this._has_pidThreshold = true;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vSeq
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setSeq(
+ final int index,
+ final int vSeq)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._seqList.size()) {
+ throw new IndexOutOfBoundsException("setSeq: Index value '" + index + "' not in range [0.." + (this._seqList.size() - 1) + "]");
+ }
+
+ this._seqList.set(index, new java.lang.Integer(vSeq));
+ }
+
+ /**
+ *
+ *
+ * @param vSeqArray
+ */
+ public void setSeq(
+ final int[] vSeqArray) {
+ //-- copy array
+ _seqList.clear();
+
+ for (int i = 0; i < vSeqArray.length; i++) {
+ this._seqList.add(new java.lang.Integer(vSeqArray[i]));
+ }
+ }
+
+ /**
+ * Sets the value of field 'start'.
+ *
+ * @param start the value of field 'start'.
+ */
+ public void setStart(
+ final int start) {
+ this._start = start;
+ this._has_start = 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.binding.JGroup
+ */
+ public static jalview.binding.JGroup unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ return (jalview.binding.JGroup) Unmarshaller.unmarshal(jalview.binding.JGroup.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);
+ }
}
/*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
- *
- * This file is part of Jalview.
- *
- * Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3
- * of the License, or (at your option) any later version.
- *
- * Jalview is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with 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.binding;
+ //---------------------------------/
+ //- Imported classes and packages -/
//---------------------------------/
-//- Imported classes and packages -/
-//---------------------------------/
-
-import jalview.util.MessageManager;
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
*
* @version $Revision$ $Date$
*/
-public class JSeq implements java.io.Serializable
-{
-
- // --------------------------/
- // - Class/Member Variables -/
- // --------------------------/
-
- /**
- * Field _colour.
- */
- private int _colour;
-
- /**
- * keeps track of state for field: _colour
- */
- private boolean _has_colour;
-
- /**
- * Field _start.
- */
- private int _start;
-
- /**
- * keeps track of state for field: _start
- */
- private boolean _has_start;
-
- /**
- * Field _end.
- */
- private int _end;
-
- /**
- * keeps track of state for field: _end
- */
- private boolean _has_end;
-
- /**
- * Field _id.
- */
- private int _id;
-
- /**
- * keeps track of state for field: _id
- */
- private boolean _has_id;
-
- /**
- * Field _featuresList.
- */
- private java.util.Vector _featuresList;
-
- /**
- * Field _pdbidsList.
- */
- private java.util.Vector _pdbidsList;
-
- // ----------------/
- // - Constructors -/
- // ----------------/
-
- public JSeq()
- {
- super();
- this._featuresList = new java.util.Vector();
- this._pdbidsList = new java.util.Vector();
- }
-
- // -----------/
- // - Methods -/
- // -----------/
-
- /**
- *
- *
- * @param vFeatures
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void addFeatures(final jalview.binding.Features vFeatures)
- throws java.lang.IndexOutOfBoundsException
- {
- this._featuresList.addElement(vFeatures);
- }
-
- /**
- *
- *
- * @param index
- * @param vFeatures
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void addFeatures(final int index,
- final jalview.binding.Features vFeatures)
- throws java.lang.IndexOutOfBoundsException
- {
- this._featuresList.add(index, vFeatures);
- }
-
- /**
- *
- *
- * @param vPdbids
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void addPdbids(final jalview.binding.Pdbids vPdbids)
- throws java.lang.IndexOutOfBoundsException
- {
- this._pdbidsList.addElement(vPdbids);
- }
-
- /**
- *
- *
- * @param index
- * @param vPdbids
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void addPdbids(final int index,
- final jalview.binding.Pdbids vPdbids)
- throws java.lang.IndexOutOfBoundsException
- {
- this._pdbidsList.add(index, vPdbids);
- }
-
- /**
- */
- public void deleteColour()
- {
- this._has_colour = false;
- }
-
- /**
- */
- public void deleteEnd()
- {
- this._has_end = false;
- }
-
- /**
- */
- public void deleteId()
- {
- this._has_id = false;
- }
-
- /**
- */
- public void deleteStart()
- {
- this._has_start = false;
- }
-
- /**
- * Method enumerateFeatures.
- *
- * @return an Enumeration over all jalview.binding.Features elements
- */
- public java.util.Enumeration enumerateFeatures()
- {
- return this._featuresList.elements();
- }
-
- /**
- * Method enumeratePdbids.
- *
- * @return an Enumeration over all jalview.binding.Pdbids elements
- */
- public java.util.Enumeration enumeratePdbids()
- {
- return this._pdbidsList.elements();
- }
-
- /**
- * Returns the value of field 'colour'.
- *
- * @return the value of field 'Colour'.
- */
- public int getColour()
- {
- return this._colour;
- }
-
- /**
- * Returns the value of field 'end'.
- *
- * @return the value of field 'End'.
- */
- public int getEnd()
- {
- return this._end;
- }
-
- /**
- * Method getFeatures.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- * @return the value of the jalview.binding.Features at the given index
- */
- public jalview.binding.Features getFeatures(final int index)
- throws java.lang.IndexOutOfBoundsException
- {
- // check bounds for index
- if (index < 0 || index >= this._featuresList.size())
- {
- throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
- "getFeatures",
- Integer.valueOf(index).toString(),
- Integer.valueOf((this._featuresList.size() - 1)).toString()
- }));
- }
-
- return (jalview.binding.Features) _featuresList.get(index);
- }
-
- /**
- * Method getFeatures.Returns the contents of the collection in an Array.
- * <p>
- * Note: Just in case the collection contents are changing in another thread,
- * we pass a 0-length Array of the correct type into the API call. This way we
- * <i>know</i> that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public jalview.binding.Features[] getFeatures()
- {
- jalview.binding.Features[] array = new jalview.binding.Features[0];
- return (jalview.binding.Features[]) this._featuresList.toArray(array);
- }
-
- /**
- * Method getFeaturesCount.
- *
- * @return the size of this collection
- */
- public int getFeaturesCount()
- {
- return this._featuresList.size();
- }
-
- /**
- * Returns the value of field 'id'.
- *
- * @return the value of field 'Id'.
- */
- public int getId()
- {
- return this._id;
- }
-
- /**
- * Method getPdbids.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- * @return the value of the jalview.binding.Pdbids at the given index
- */
- public jalview.binding.Pdbids getPdbids(final int index)
- throws java.lang.IndexOutOfBoundsException
- {
- // check bounds for index
- if (index < 0 || index >= this._pdbidsList.size())
- {
- throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
- "getPdbids",
- Integer.valueOf(index).toString(),
- Integer.valueOf((this._pdbidsList.size() - 1)).toString()
- }));
- }
-
- return (jalview.binding.Pdbids) _pdbidsList.get(index);
- }
-
- /**
- * Method getPdbids.Returns the contents of the collection in an Array.
- * <p>
- * Note: Just in case the collection contents are changing in another thread,
- * we pass a 0-length Array of the correct type into the API call. This way we
- * <i>know</i> that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public jalview.binding.Pdbids[] getPdbids()
- {
- jalview.binding.Pdbids[] array = new jalview.binding.Pdbids[0];
- return (jalview.binding.Pdbids[]) this._pdbidsList.toArray(array);
- }
-
- /**
- * Method getPdbidsCount.
- *
- * @return the size of this collection
- */
- public int getPdbidsCount()
- {
- return this._pdbidsList.size();
- }
-
- /**
- * Returns the value of field 'start'.
- *
- * @return the value of field 'Start'.
- */
- public int getStart()
- {
- return this._start;
- }
-
- /**
- * Method hasColour.
- *
- * @return true if at least one Colour has been added
- */
- public boolean hasColour()
- {
- return this._has_colour;
- }
-
- /**
- * Method hasEnd.
- *
- * @return true if at least one End has been added
- */
- public boolean hasEnd()
- {
- return this._has_end;
- }
-
- /**
- * Method hasId.
- *
- * @return true if at least one Id has been added
- */
- public boolean hasId()
- {
- return this._has_id;
- }
-
- /**
- * Method hasStart.
- *
- * @return true if at least one Start has been added
- */
- public boolean hasStart()
- {
- return this._has_start;
- }
-
- /**
- * 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);
- }
-
- /**
- */
- public void removeAllFeatures()
- {
- this._featuresList.clear();
- }
-
- /**
- */
- public void removeAllPdbids()
- {
- this._pdbidsList.clear();
- }
-
- /**
- * Method removeFeatures.
- *
- * @param vFeatures
- * @return true if the object was removed from the collection.
- */
- public boolean removeFeatures(final jalview.binding.Features vFeatures)
- {
- boolean removed = _featuresList.remove(vFeatures);
- return removed;
- }
-
- /**
- * Method removeFeaturesAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public jalview.binding.Features removeFeaturesAt(final int index)
- {
- java.lang.Object obj = this._featuresList.remove(index);
- return (jalview.binding.Features) obj;
- }
-
- /**
- * Method removePdbids.
- *
- * @param vPdbids
- * @return true if the object was removed from the collection.
- */
- public boolean removePdbids(final jalview.binding.Pdbids vPdbids)
- {
- boolean removed = _pdbidsList.remove(vPdbids);
- return removed;
- }
-
- /**
- * Method removePdbidsAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public jalview.binding.Pdbids removePdbidsAt(final int index)
- {
- java.lang.Object obj = this._pdbidsList.remove(index);
- return (jalview.binding.Pdbids) obj;
- }
-
- /**
- * Sets the value of field 'colour'.
- *
- * @param colour
- * the value of field 'colour'.
- */
- public void setColour(final int colour)
- {
- this._colour = colour;
- this._has_colour = true;
- }
-
- /**
- * Sets the value of field 'end'.
- *
- * @param end
- * the value of field 'end'.
- */
- public void setEnd(final int end)
- {
- this._end = end;
- this._has_end = true;
- }
-
- /**
- *
- *
- * @param index
- * @param vFeatures
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void setFeatures(final int index,
- final jalview.binding.Features vFeatures)
- throws java.lang.IndexOutOfBoundsException
- {
- // check bounds for index
- if (index < 0 || index >= this._featuresList.size())
- {
- throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
- "setFeatures",
- Integer.valueOf(index).toString(),
- Integer.valueOf((this._featuresList.size() - 1)).toString()
- }));
- }
-
- this._featuresList.set(index, vFeatures);
- }
-
- /**
- *
- *
- * @param vFeaturesArray
- */
- public void setFeatures(final jalview.binding.Features[] vFeaturesArray)
- {
- // -- copy array
- _featuresList.clear();
-
- for (int i = 0; i < vFeaturesArray.length; i++)
- {
- this._featuresList.add(vFeaturesArray[i]);
- }
- }
-
- /**
- * Sets the value of field 'id'.
- *
- * @param id
- * the value of field 'id'.
- */
- public void setId(final int id)
- {
- this._id = id;
- this._has_id = true;
- }
-
- /**
- *
- *
- * @param index
- * @param vPdbids
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void setPdbids(final int index,
- final jalview.binding.Pdbids vPdbids)
- throws java.lang.IndexOutOfBoundsException
- {
- // check bounds for index
- if (index < 0 || index >= this._pdbidsList.size())
- {
- throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
- "setPdbids",
- Integer.valueOf(index).toString(),
- Integer.valueOf((this._pdbidsList.size() - 1)).toString()
- }));
- }
-
- this._pdbidsList.set(index, vPdbids);
- }
-
- /**
- *
- *
- * @param vPdbidsArray
- */
- public void setPdbids(final jalview.binding.Pdbids[] vPdbidsArray)
- {
- // -- copy array
- _pdbidsList.clear();
-
- for (int i = 0; i < vPdbidsArray.length; i++)
- {
- this._pdbidsList.add(vPdbidsArray[i]);
- }
- }
-
- /**
- * Sets the value of field 'start'.
- *
- * @param start
- * the value of field 'start'.
- */
- public void setStart(final int start)
- {
- this._start = start;
- this._has_start = 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.binding.JSeq
- */
- public static jalview.binding.JSeq unmarshal(final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException,
- org.exolab.castor.xml.ValidationException
- {
- return (jalview.binding.JSeq) Unmarshaller.unmarshal(
- jalview.binding.JSeq.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 JSeq implements java.io.Serializable {
+
+
+ //--------------------------/
+ //- Class/Member Variables -/
+ //--------------------------/
+
+ /**
+ * Field _colour.
+ */
+ private int _colour;
+
+ /**
+ * keeps track of state for field: _colour
+ */
+ private boolean _has_colour;
+
+ /**
+ * Field _start.
+ */
+ private int _start;
+
+ /**
+ * keeps track of state for field: _start
+ */
+ private boolean _has_start;
+
+ /**
+ * Field _end.
+ */
+ private int _end;
+
+ /**
+ * keeps track of state for field: _end
+ */
+ private boolean _has_end;
+
+ /**
+ * Field _id.
+ */
+ private int _id;
+
+ /**
+ * keeps track of state for field: _id
+ */
+ private boolean _has_id;
+
+ /**
+ * Field _featuresList.
+ */
+ private java.util.Vector _featuresList;
+
+ /**
+ * Field _pdbidsList.
+ */
+ private java.util.Vector _pdbidsList;
+
+
+ //----------------/
+ //- Constructors -/
+ //----------------/
+
+ public JSeq() {
+ super();
+ this._featuresList = new java.util.Vector();
+ this._pdbidsList = new java.util.Vector();
+ }
+
+
+ //-----------/
+ //- Methods -/
+ //-----------/
+
+ /**
+ *
+ *
+ * @param vFeatures
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addFeatures(
+ final jalview.binding.Features vFeatures)
+ throws java.lang.IndexOutOfBoundsException {
+ this._featuresList.addElement(vFeatures);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vFeatures
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addFeatures(
+ final int index,
+ final jalview.binding.Features vFeatures)
+ throws java.lang.IndexOutOfBoundsException {
+ this._featuresList.add(index, vFeatures);
+ }
+
+ /**
+ *
+ *
+ * @param vPdbids
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addPdbids(
+ final jalview.binding.Pdbids vPdbids)
+ throws java.lang.IndexOutOfBoundsException {
+ this._pdbidsList.addElement(vPdbids);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vPdbids
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addPdbids(
+ final int index,
+ final jalview.binding.Pdbids vPdbids)
+ throws java.lang.IndexOutOfBoundsException {
+ this._pdbidsList.add(index, vPdbids);
+ }
+
+ /**
+ */
+ public void deleteColour(
+ ) {
+ this._has_colour= false;
+ }
+
+ /**
+ */
+ public void deleteEnd(
+ ) {
+ this._has_end= false;
+ }
+
+ /**
+ */
+ public void deleteId(
+ ) {
+ this._has_id= false;
+ }
+
+ /**
+ */
+ public void deleteStart(
+ ) {
+ this._has_start= false;
+ }
+
+ /**
+ * Method enumerateFeatures.
+ *
+ * @return an Enumeration over all jalview.binding.Features
+ * elements
+ */
+ public java.util.Enumeration enumerateFeatures(
+ ) {
+ return this._featuresList.elements();
+ }
+
+ /**
+ * Method enumeratePdbids.
+ *
+ * @return an Enumeration over all jalview.binding.Pdbids
+ * elements
+ */
+ public java.util.Enumeration enumeratePdbids(
+ ) {
+ return this._pdbidsList.elements();
+ }
+
+ /**
+ * Returns the value of field 'colour'.
+ *
+ * @return the value of field 'Colour'.
+ */
+ public int getColour(
+ ) {
+ return this._colour;
+ }
+
+ /**
+ * Returns the value of field 'end'.
+ *
+ * @return the value of field 'End'.
+ */
+ public int getEnd(
+ ) {
+ return this._end;
+ }
+
+ /**
+ * Method getFeatures.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ * @return the value of the jalview.binding.Features at the
+ * given index
+ */
+ public jalview.binding.Features getFeatures(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._featuresList.size()) {
+ throw new IndexOutOfBoundsException("getFeatures: Index value '" + index + "' not in range [0.." + (this._featuresList.size() - 1) + "]");
+ }
+
+ return (jalview.binding.Features) _featuresList.get(index);
+ }
+
+ /**
+ * Method getFeatures.Returns the contents of the collection in
+ * an Array. <p>Note: Just in case the collection contents
+ * are changing in another thread, we pass a 0-length Array of
+ * the correct type into the API call. This way we <i>know</i>
+ * that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public jalview.binding.Features[] getFeatures(
+ ) {
+ jalview.binding.Features[] array = new jalview.binding.Features[0];
+ return (jalview.binding.Features[]) this._featuresList.toArray(array);
+ }
+
+ /**
+ * Method getFeaturesCount.
+ *
+ * @return the size of this collection
+ */
+ public int getFeaturesCount(
+ ) {
+ return this._featuresList.size();
+ }
+
+ /**
+ * Returns the value of field 'id'.
+ *
+ * @return the value of field 'Id'.
+ */
+ public int getId(
+ ) {
+ return this._id;
+ }
+
+ /**
+ * Method getPdbids.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ * @return the value of the jalview.binding.Pdbids at the given
+ * index
+ */
+ public jalview.binding.Pdbids getPdbids(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._pdbidsList.size()) {
+ throw new IndexOutOfBoundsException("getPdbids: Index value '" + index + "' not in range [0.." + (this._pdbidsList.size() - 1) + "]");
+ }
+
+ return (jalview.binding.Pdbids) _pdbidsList.get(index);
+ }
+
+ /**
+ * Method getPdbids.Returns the contents of the collection in
+ * an Array. <p>Note: Just in case the collection contents
+ * are changing in another thread, we pass a 0-length Array of
+ * the correct type into the API call. This way we <i>know</i>
+ * that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public jalview.binding.Pdbids[] getPdbids(
+ ) {
+ jalview.binding.Pdbids[] array = new jalview.binding.Pdbids[0];
+ return (jalview.binding.Pdbids[]) this._pdbidsList.toArray(array);
+ }
+
+ /**
+ * Method getPdbidsCount.
+ *
+ * @return the size of this collection
+ */
+ public int getPdbidsCount(
+ ) {
+ return this._pdbidsList.size();
+ }
+
+ /**
+ * Returns the value of field 'start'.
+ *
+ * @return the value of field 'Start'.
+ */
+ public int getStart(
+ ) {
+ return this._start;
+ }
+
+ /**
+ * Method hasColour.
+ *
+ * @return true if at least one Colour has been added
+ */
+ public boolean hasColour(
+ ) {
+ return this._has_colour;
+ }
+
+ /**
+ * Method hasEnd.
+ *
+ * @return true if at least one End has been added
+ */
+ public boolean hasEnd(
+ ) {
+ return this._has_end;
+ }
+
+ /**
+ * Method hasId.
+ *
+ * @return true if at least one Id has been added
+ */
+ public boolean hasId(
+ ) {
+ return this._has_id;
+ }
+
+ /**
+ * Method hasStart.
+ *
+ * @return true if at least one Start has been added
+ */
+ public boolean hasStart(
+ ) {
+ return this._has_start;
+ }
+
+ /**
+ * 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);
+ }
+
+ /**
+ */
+ public void removeAllFeatures(
+ ) {
+ this._featuresList.clear();
+ }
+
+ /**
+ */
+ public void removeAllPdbids(
+ ) {
+ this._pdbidsList.clear();
+ }
+
+ /**
+ * Method removeFeatures.
+ *
+ * @param vFeatures
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeFeatures(
+ final jalview.binding.Features vFeatures) {
+ boolean removed = _featuresList.remove(vFeatures);
+ return removed;
+ }
+
+ /**
+ * Method removeFeaturesAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public jalview.binding.Features removeFeaturesAt(
+ final int index) {
+ java.lang.Object obj = this._featuresList.remove(index);
+ return (jalview.binding.Features) obj;
+ }
+
+ /**
+ * Method removePdbids.
+ *
+ * @param vPdbids
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removePdbids(
+ final jalview.binding.Pdbids vPdbids) {
+ boolean removed = _pdbidsList.remove(vPdbids);
+ return removed;
+ }
+
+ /**
+ * Method removePdbidsAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public jalview.binding.Pdbids removePdbidsAt(
+ final int index) {
+ java.lang.Object obj = this._pdbidsList.remove(index);
+ return (jalview.binding.Pdbids) obj;
+ }
+
+ /**
+ * Sets the value of field 'colour'.
+ *
+ * @param colour the value of field 'colour'.
+ */
+ public void setColour(
+ final int colour) {
+ this._colour = colour;
+ this._has_colour = true;
+ }
+
+ /**
+ * Sets the value of field 'end'.
+ *
+ * @param end the value of field 'end'.
+ */
+ public void setEnd(
+ final int end) {
+ this._end = end;
+ this._has_end = true;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vFeatures
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setFeatures(
+ final int index,
+ final jalview.binding.Features vFeatures)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._featuresList.size()) {
+ throw new IndexOutOfBoundsException("setFeatures: Index value '" + index + "' not in range [0.." + (this._featuresList.size() - 1) + "]");
+ }
+
+ this._featuresList.set(index, vFeatures);
+ }
+
+ /**
+ *
+ *
+ * @param vFeaturesArray
+ */
+ public void setFeatures(
+ final jalview.binding.Features[] vFeaturesArray) {
+ //-- copy array
+ _featuresList.clear();
+
+ for (int i = 0; i < vFeaturesArray.length; i++) {
+ this._featuresList.add(vFeaturesArray[i]);
+ }
+ }
+
+ /**
+ * Sets the value of field 'id'.
+ *
+ * @param id the value of field 'id'.
+ */
+ public void setId(
+ final int id) {
+ this._id = id;
+ this._has_id = true;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vPdbids
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setPdbids(
+ final int index,
+ final jalview.binding.Pdbids vPdbids)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._pdbidsList.size()) {
+ throw new IndexOutOfBoundsException("setPdbids: Index value '" + index + "' not in range [0.." + (this._pdbidsList.size() - 1) + "]");
+ }
+
+ this._pdbidsList.set(index, vPdbids);
+ }
+
+ /**
+ *
+ *
+ * @param vPdbidsArray
+ */
+ public void setPdbids(
+ final jalview.binding.Pdbids[] vPdbidsArray) {
+ //-- copy array
+ _pdbidsList.clear();
+
+ for (int i = 0; i < vPdbidsArray.length; i++) {
+ this._pdbidsList.add(vPdbidsArray[i]);
+ }
+ }
+
+ /**
+ * Sets the value of field 'start'.
+ *
+ * @param start the value of field 'start'.
+ */
+ public void setStart(
+ final int start) {
+ this._start = start;
+ this._has_start = 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.binding.JSeq
+ */
+ public static jalview.binding.JSeq unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ return (jalview.binding.JSeq) Unmarshaller.unmarshal(jalview.binding.JSeq.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);
+ }
}
/*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
- *
- * This file is part of Jalview.
- *
- * Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3
- * of the License, or (at your option) any later version.
- *
- * Jalview is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with 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.binding;
-//---------------------------------/
-//- Imported classes and packages -/
+ //---------------------------------/
+ //- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class JalviewModel implements java.io.Serializable
-{
-
- // --------------------------/
- // - Class/Member Variables -/
- // --------------------------/
-
- /**
- * Field _creationDate.
- */
- private java.util.Date _creationDate;
-
- /**
- * Field _version.
- */
- private java.lang.String _version;
-
- /**
- * Field _vamsasModel.
- */
- private jalview.binding.VamsasModel _vamsasModel;
-
- /**
- * Field _jalviewModelSequence.
- */
- private jalview.binding.JalviewModelSequence _jalviewModelSequence;
-
- // ----------------/
- // - Constructors -/
- // ----------------/
-
- public JalviewModel()
- {
- super();
- }
-
- // -----------/
- // - Methods -/
- // -----------/
-
- /**
- * Returns the value of field 'creationDate'.
- *
- * @return the value of field 'CreationDate'.
- */
- public java.util.Date getCreationDate()
- {
- return this._creationDate;
- }
-
- /**
- * Returns the value of field 'jalviewModelSequence'.
- *
- * @return the value of field 'JalviewModelSequence'.
- */
- public jalview.binding.JalviewModelSequence getJalviewModelSequence()
- {
- return this._jalviewModelSequence;
- }
-
- /**
- * Returns the value of field 'vamsasModel'.
- *
- * @return the value of field 'VamsasModel'.
- */
- public jalview.binding.VamsasModel getVamsasModel()
- {
- return this._vamsasModel;
- }
-
- /**
- * Returns the value of field 'version'.
- *
- * @return the value of field 'Version'.
- */
- public java.lang.String getVersion()
- {
- return this._version;
- }
-
- /**
- * 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;
+public class JalviewModel implements java.io.Serializable {
+
+
+ //--------------------------/
+ //- Class/Member Variables -/
+ //--------------------------/
+
+ /**
+ * Field _creationDate.
+ */
+ private java.util.Date _creationDate;
+
+ /**
+ * Field _version.
+ */
+ private java.lang.String _version;
+
+ /**
+ * Field _vamsasModel.
+ */
+ private jalview.binding.VamsasModel _vamsasModel;
+
+ /**
+ * Field _jalviewModelSequence.
+ */
+ private jalview.binding.JalviewModelSequence _jalviewModelSequence;
+
+
+ //----------------/
+ //- Constructors -/
+ //----------------/
+
+ public JalviewModel() {
+ super();
+ }
+
+
+ //-----------/
+ //- Methods -/
+ //-----------/
+
+ /**
+ * Returns the value of field 'creationDate'.
+ *
+ * @return the value of field 'CreationDate'.
+ */
+ public java.util.Date getCreationDate(
+ ) {
+ return this._creationDate;
+ }
+
+ /**
+ * Returns the value of field 'jalviewModelSequence'.
+ *
+ * @return the value of field 'JalviewModelSequence'.
+ */
+ public jalview.binding.JalviewModelSequence getJalviewModelSequence(
+ ) {
+ return this._jalviewModelSequence;
+ }
+
+ /**
+ * Returns the value of field 'vamsasModel'.
+ *
+ * @return the value of field 'VamsasModel'.
+ */
+ public jalview.binding.VamsasModel getVamsasModel(
+ ) {
+ return this._vamsasModel;
+ }
+
+ /**
+ * Returns the value of field 'version'.
+ *
+ * @return the value of field 'Version'.
+ */
+ public java.lang.String getVersion(
+ ) {
+ return this._version;
+ }
+
+ /**
+ * 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 'creationDate'.
+ *
+ * @param creationDate the value of field 'creationDate'.
+ */
+ public void setCreationDate(
+ final java.util.Date creationDate) {
+ this._creationDate = creationDate;
+ }
+
+ /**
+ * Sets the value of field 'jalviewModelSequence'.
+ *
+ * @param jalviewModelSequence the value of field
+ * 'jalviewModelSequence'.
+ */
+ public void setJalviewModelSequence(
+ final jalview.binding.JalviewModelSequence jalviewModelSequence) {
+ this._jalviewModelSequence = jalviewModelSequence;
+ }
+
+ /**
+ * Sets the value of field 'vamsasModel'.
+ *
+ * @param vamsasModel the value of field 'vamsasModel'.
+ */
+ public void setVamsasModel(
+ final jalview.binding.VamsasModel vamsasModel) {
+ this._vamsasModel = vamsasModel;
+ }
+
+ /**
+ * Sets the value of field 'version'.
+ *
+ * @param version the value of field 'version'.
+ */
+ public void setVersion(
+ final java.lang.String version) {
+ this._version = version;
+ }
+
+ /**
+ * 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.binding.JalviewModel
+ */
+ public static jalview.binding.JalviewModel unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ return (jalview.binding.JalviewModel) Unmarshaller.unmarshal(jalview.binding.JalviewModel.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);
}
- 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 'creationDate'.
- *
- * @param creationDate
- * the value of field 'creationDate'.
- */
- public void setCreationDate(final java.util.Date creationDate)
- {
- this._creationDate = creationDate;
- }
-
- /**
- * Sets the value of field 'jalviewModelSequence'.
- *
- * @param jalviewModelSequence
- * the value of field 'jalviewModelSequence'.
- */
- public void setJalviewModelSequence(
- final jalview.binding.JalviewModelSequence jalviewModelSequence)
- {
- this._jalviewModelSequence = jalviewModelSequence;
- }
-
- /**
- * Sets the value of field 'vamsasModel'.
- *
- * @param vamsasModel
- * the value of field 'vamsasModel'.
- */
- public void setVamsasModel(final jalview.binding.VamsasModel vamsasModel)
- {
- this._vamsasModel = vamsasModel;
- }
-
- /**
- * Sets the value of field 'version'.
- *
- * @param version
- * the value of field 'version'.
- */
- public void setVersion(final java.lang.String version)
- {
- this._version = version;
- }
-
- /**
- * 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.binding.JalviewModel
- */
- public static jalview.binding.JalviewModel unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException,
- org.exolab.castor.xml.ValidationException
- {
- return (jalview.binding.JalviewModel) Unmarshaller.unmarshal(
- jalview.binding.JalviewModel.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);
- }
}
/*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
- *
- * This file is part of Jalview.
- *
- * Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3
- * of the License, or (at your option) any later version.
- *
- * Jalview is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with 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.binding;
+ //---------------------------------/
+ //- Imported classes and packages -/
//---------------------------------/
-//- Imported classes and packages -/
-//---------------------------------/
-
-import jalview.util.MessageManager;
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
*
* @version $Revision$ $Date$
*/
-public class JalviewModelSequence implements java.io.Serializable
-{
-
- // --------------------------/
- // - Class/Member Variables -/
- // --------------------------/
-
- /**
- * Field _JSeqList.
- */
- private java.util.Vector _JSeqList;
-
- /**
- * Field _JGroupList.
- */
- private java.util.Vector _JGroupList;
-
- /**
- * Field _viewportList.
- */
- private java.util.Vector _viewportList;
-
- /**
- * Field _userColoursList.
- */
- private java.util.Vector _userColoursList;
-
- /**
- * Field _treeList.
- */
- private java.util.Vector _treeList;
-
- /**
- * Field _featureSettings.
- */
- private jalview.binding.FeatureSettings _featureSettings;
-
- // ----------------/
- // - Constructors -/
- // ----------------/
-
- public JalviewModelSequence()
- {
- super();
- this._JSeqList = new java.util.Vector();
- this._JGroupList = new java.util.Vector();
- this._viewportList = new java.util.Vector();
- this._userColoursList = new java.util.Vector();
- this._treeList = new java.util.Vector();
- }
-
- // -----------/
- // - Methods -/
- // -----------/
-
- /**
- *
- *
- * @param vJGroup
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void addJGroup(final jalview.binding.JGroup vJGroup)
- throws java.lang.IndexOutOfBoundsException
- {
- this._JGroupList.addElement(vJGroup);
- }
-
- /**
- *
- *
- * @param index
- * @param vJGroup
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void addJGroup(final int index,
- final jalview.binding.JGroup vJGroup)
- throws java.lang.IndexOutOfBoundsException
- {
- this._JGroupList.add(index, vJGroup);
- }
-
- /**
- *
- *
- * @param vJSeq
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void addJSeq(final jalview.binding.JSeq vJSeq)
- throws java.lang.IndexOutOfBoundsException
- {
- this._JSeqList.addElement(vJSeq);
- }
-
- /**
- *
- *
- * @param index
- * @param vJSeq
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void addJSeq(final int index, final jalview.binding.JSeq vJSeq)
- throws java.lang.IndexOutOfBoundsException
- {
- this._JSeqList.add(index, vJSeq);
- }
-
- /**
- *
- *
- * @param vTree
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void addTree(final jalview.binding.Tree vTree)
- throws java.lang.IndexOutOfBoundsException
- {
- this._treeList.addElement(vTree);
- }
-
- /**
- *
- *
- * @param index
- * @param vTree
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void addTree(final int index, final jalview.binding.Tree vTree)
- throws java.lang.IndexOutOfBoundsException
- {
- this._treeList.add(index, vTree);
- }
-
- /**
- *
- *
- * @param vUserColours
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void addUserColours(final jalview.binding.UserColours vUserColours)
- throws java.lang.IndexOutOfBoundsException
- {
- this._userColoursList.addElement(vUserColours);
- }
-
- /**
- *
- *
- * @param index
- * @param vUserColours
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void addUserColours(final int index,
- final jalview.binding.UserColours vUserColours)
- throws java.lang.IndexOutOfBoundsException
- {
- this._userColoursList.add(index, vUserColours);
- }
-
- /**
- *
- *
- * @param vViewport
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void addViewport(final jalview.binding.Viewport vViewport)
- throws java.lang.IndexOutOfBoundsException
- {
- this._viewportList.addElement(vViewport);
- }
-
- /**
- *
- *
- * @param index
- * @param vViewport
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void addViewport(final int index,
- final jalview.binding.Viewport vViewport)
- throws java.lang.IndexOutOfBoundsException
- {
- this._viewportList.add(index, vViewport);
- }
-
- /**
- * Method enumerateJGroup.
- *
- * @return an Enumeration over all jalview.binding.JGroup elements
- */
- public java.util.Enumeration enumerateJGroup()
- {
- return this._JGroupList.elements();
- }
-
- /**
- * Method enumerateJSeq.
- *
- * @return an Enumeration over all jalview.binding.JSeq elements
- */
- public java.util.Enumeration enumerateJSeq()
- {
- return this._JSeqList.elements();
- }
-
- /**
- * Method enumerateTree.
- *
- * @return an Enumeration over all jalview.binding.Tree elements
- */
- public java.util.Enumeration enumerateTree()
- {
- return this._treeList.elements();
- }
-
- /**
- * Method enumerateUserColours.
- *
- * @return an Enumeration over all jalview.binding.UserColours elements
- */
- public java.util.Enumeration enumerateUserColours()
- {
- return this._userColoursList.elements();
- }
-
- /**
- * Method enumerateViewport.
- *
- * @return an Enumeration over all jalview.binding.Viewport elements
- */
- public java.util.Enumeration enumerateViewport()
- {
- return this._viewportList.elements();
- }
-
- /**
- * Returns the value of field 'featureSettings'.
- *
- * @return the value of field 'FeatureSettings'.
- */
- public jalview.binding.FeatureSettings getFeatureSettings()
- {
- return this._featureSettings;
- }
-
- /**
- * Method getJGroup.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- * @return the value of the jalview.binding.JGroup at the given index
- */
- public jalview.binding.JGroup getJGroup(final int index)
- throws java.lang.IndexOutOfBoundsException
- {
- // check bounds for index
- if (index < 0 || index >= this._JGroupList.size())
- {
- throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
- "getJGroup",
- Integer.valueOf(index).toString(),
- Integer.valueOf((this._JGroupList.size() - 1)).toString()
- }));
- }
-
- return (jalview.binding.JGroup) _JGroupList.get(index);
- }
-
- /**
- * Method getJGroup.Returns the contents of the collection in an Array.
- * <p>
- * Note: Just in case the collection contents are changing in another thread,
- * we pass a 0-length Array of the correct type into the API call. This way we
- * <i>know</i> that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public jalview.binding.JGroup[] getJGroup()
- {
- jalview.binding.JGroup[] array = new jalview.binding.JGroup[0];
- return (jalview.binding.JGroup[]) this._JGroupList.toArray(array);
- }
-
- /**
- * Method getJGroupCount.
- *
- * @return the size of this collection
- */
- public int getJGroupCount()
- {
- return this._JGroupList.size();
- }
-
- /**
- * Method getJSeq.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- * @return the value of the jalview.binding.JSeq at the given index
- */
- public jalview.binding.JSeq getJSeq(final int index)
- throws java.lang.IndexOutOfBoundsException
- {
- // check bounds for index
- if (index < 0 || index >= this._JSeqList.size())
- {
- throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
- "getJSeq",
- Integer.valueOf(index).toString(),
- Integer.valueOf((this._JSeqList.size() - 1)).toString()
- }));
- }
-
- return (jalview.binding.JSeq) _JSeqList.get(index);
- }
-
- /**
- * Method getJSeq.Returns the contents of the collection in an Array.
- * <p>
- * Note: Just in case the collection contents are changing in another thread,
- * we pass a 0-length Array of the correct type into the API call. This way we
- * <i>know</i> that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public jalview.binding.JSeq[] getJSeq()
- {
- jalview.binding.JSeq[] array = new jalview.binding.JSeq[0];
- return (jalview.binding.JSeq[]) this._JSeqList.toArray(array);
- }
-
- /**
- * Method getJSeqCount.
- *
- * @return the size of this collection
- */
- public int getJSeqCount()
- {
- return this._JSeqList.size();
- }
-
- /**
- * Method getTree.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- * @return the value of the jalview.binding.Tree at the given index
- */
- public jalview.binding.Tree getTree(final int index)
- throws java.lang.IndexOutOfBoundsException
- {
- // check bounds for index
- if (index < 0 || index >= this._treeList.size())
- {
- throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
- "getJgetTreeSeq",
- Integer.valueOf(index).toString(),
- Integer.valueOf((this._treeList.size() - 1)).toString()
- }));
- }
-
- return (jalview.binding.Tree) _treeList.get(index);
- }
-
- /**
- * Method getTree.Returns the contents of the collection in an Array.
- * <p>
- * Note: Just in case the collection contents are changing in another thread,
- * we pass a 0-length Array of the correct type into the API call. This way we
- * <i>know</i> that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public jalview.binding.Tree[] getTree()
- {
- jalview.binding.Tree[] array = new jalview.binding.Tree[0];
- return (jalview.binding.Tree[]) this._treeList.toArray(array);
- }
-
- /**
- * Method getTreeCount.
- *
- * @return the size of this collection
- */
- public int getTreeCount()
- {
- return this._treeList.size();
- }
-
- /**
- * Method getUserColours.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- * @return the value of the jalview.binding.UserColours at the given index
- */
- public jalview.binding.UserColours getUserColours(final int index)
- throws java.lang.IndexOutOfBoundsException
- {
- // check bounds for index
- if (index < 0 || index >= this._userColoursList.size())
- {
- throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
- "getUserColours",
- Integer.valueOf(index).toString(),
- Integer.valueOf((this._userColoursList.size() - 1)).toString()
- }));
- }
-
- return (jalview.binding.UserColours) _userColoursList.get(index);
- }
-
- /**
- * Method getUserColours.Returns the contents of the collection in an Array.
- * <p>
- * Note: Just in case the collection contents are changing in another thread,
- * we pass a 0-length Array of the correct type into the API call. This way we
- * <i>know</i> that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public jalview.binding.UserColours[] getUserColours()
- {
- jalview.binding.UserColours[] array = new jalview.binding.UserColours[0];
- return (jalview.binding.UserColours[]) this._userColoursList
- .toArray(array);
- }
-
- /**
- * Method getUserColoursCount.
- *
- * @return the size of this collection
- */
- public int getUserColoursCount()
- {
- return this._userColoursList.size();
- }
-
- /**
- * Method getViewport.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- * @return the value of the jalview.binding.Viewport at the given index
- */
- public jalview.binding.Viewport getViewport(final int index)
- throws java.lang.IndexOutOfBoundsException
- {
- // check bounds for index
- if (index < 0 || index >= this._viewportList.size())
- {
- throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
- "getViewport",
- Integer.valueOf(index).toString(),
- Integer.valueOf((this._viewportList.size() - 1)).toString()
- }));
- }
-
- return (jalview.binding.Viewport) _viewportList.get(index);
- }
-
- /**
- * Method getViewport.Returns the contents of the collection in an Array.
- * <p>
- * Note: Just in case the collection contents are changing in another thread,
- * we pass a 0-length Array of the correct type into the API call. This way we
- * <i>know</i> that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public jalview.binding.Viewport[] getViewport()
- {
- jalview.binding.Viewport[] array = new jalview.binding.Viewport[0];
- return (jalview.binding.Viewport[]) this._viewportList.toArray(array);
- }
-
- /**
- * Method getViewportCount.
- *
- * @return the size of this collection
- */
- public int getViewportCount()
- {
- return this._viewportList.size();
- }
-
- /**
- * 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);
- }
-
- /**
- */
- public void removeAllJGroup()
- {
- this._JGroupList.clear();
- }
-
- /**
- */
- public void removeAllJSeq()
- {
- this._JSeqList.clear();
- }
-
- /**
- */
- public void removeAllTree()
- {
- this._treeList.clear();
- }
-
- /**
- */
- public void removeAllUserColours()
- {
- this._userColoursList.clear();
- }
-
- /**
- */
- public void removeAllViewport()
- {
- this._viewportList.clear();
- }
-
- /**
- * Method removeJGroup.
- *
- * @param vJGroup
- * @return true if the object was removed from the collection.
- */
- public boolean removeJGroup(final jalview.binding.JGroup vJGroup)
- {
- boolean removed = _JGroupList.remove(vJGroup);
- return removed;
- }
-
- /**
- * Method removeJGroupAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public jalview.binding.JGroup removeJGroupAt(final int index)
- {
- java.lang.Object obj = this._JGroupList.remove(index);
- return (jalview.binding.JGroup) obj;
- }
-
- /**
- * Method removeJSeq.
- *
- * @param vJSeq
- * @return true if the object was removed from the collection.
- */
- public boolean removeJSeq(final jalview.binding.JSeq vJSeq)
- {
- boolean removed = _JSeqList.remove(vJSeq);
- return removed;
- }
-
- /**
- * Method removeJSeqAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public jalview.binding.JSeq removeJSeqAt(final int index)
- {
- java.lang.Object obj = this._JSeqList.remove(index);
- return (jalview.binding.JSeq) obj;
- }
-
- /**
- * Method removeTree.
- *
- * @param vTree
- * @return true if the object was removed from the collection.
- */
- public boolean removeTree(final jalview.binding.Tree vTree)
- {
- boolean removed = _treeList.remove(vTree);
- return removed;
- }
-
- /**
- * Method removeTreeAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public jalview.binding.Tree removeTreeAt(final int index)
- {
- java.lang.Object obj = this._treeList.remove(index);
- return (jalview.binding.Tree) obj;
- }
-
- /**
- * Method removeUserColours.
- *
- * @param vUserColours
- * @return true if the object was removed from the collection.
- */
- public boolean removeUserColours(
- final jalview.binding.UserColours vUserColours)
- {
- boolean removed = _userColoursList.remove(vUserColours);
- return removed;
- }
-
- /**
- * Method removeUserColoursAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public jalview.binding.UserColours removeUserColoursAt(final int index)
- {
- java.lang.Object obj = this._userColoursList.remove(index);
- return (jalview.binding.UserColours) obj;
- }
-
- /**
- * Method removeViewport.
- *
- * @param vViewport
- * @return true if the object was removed from the collection.
- */
- public boolean removeViewport(final jalview.binding.Viewport vViewport)
- {
- boolean removed = _viewportList.remove(vViewport);
- return removed;
- }
-
- /**
- * Method removeViewportAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public jalview.binding.Viewport removeViewportAt(final int index)
- {
- java.lang.Object obj = this._viewportList.remove(index);
- return (jalview.binding.Viewport) obj;
- }
-
- /**
- * Sets the value of field 'featureSettings'.
- *
- * @param featureSettings
- * the value of field 'featureSettings'.
- */
- public void setFeatureSettings(
- final jalview.binding.FeatureSettings featureSettings)
- {
- this._featureSettings = featureSettings;
- }
-
- /**
- *
- *
- * @param index
- * @param vJGroup
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void setJGroup(final int index,
- final jalview.binding.JGroup vJGroup)
- throws java.lang.IndexOutOfBoundsException
- {
- // check bounds for index
- if (index < 0 || index >= this._JGroupList.size())
- {
- throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
- "setJGroup",
- Integer.valueOf(index).toString(),
- Integer.valueOf((this._JGroupList.size() - 1)).toString()
- }));
- }
-
- this._JGroupList.set(index, vJGroup);
- }
-
- /**
- *
- *
- * @param vJGroupArray
- */
- public void setJGroup(final jalview.binding.JGroup[] vJGroupArray)
- {
- // -- copy array
- _JGroupList.clear();
-
- for (int i = 0; i < vJGroupArray.length; i++)
- {
- this._JGroupList.add(vJGroupArray[i]);
- }
- }
-
- /**
- *
- *
- * @param index
- * @param vJSeq
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void setJSeq(final int index, final jalview.binding.JSeq vJSeq)
- throws java.lang.IndexOutOfBoundsException
- {
- // check bounds for index
- if (index < 0 || index >= this._JSeqList.size())
- {
- throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
- "setJSeq",
- Integer.valueOf(index).toString(),
- Integer.valueOf((this._JSeqList.size() - 1)).toString()
- }));
- }
-
- this._JSeqList.set(index, vJSeq);
- }
-
- /**
- *
- *
- * @param vJSeqArray
- */
- public void setJSeq(final jalview.binding.JSeq[] vJSeqArray)
- {
- // -- copy array
- _JSeqList.clear();
-
- for (int i = 0; i < vJSeqArray.length; i++)
- {
- this._JSeqList.add(vJSeqArray[i]);
- }
- }
-
- /**
- *
- *
- * @param index
- * @param vTree
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void setTree(final int index, final jalview.binding.Tree vTree)
- throws java.lang.IndexOutOfBoundsException
- {
- // check bounds for index
- if (index < 0 || index >= this._treeList.size())
- {
- throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
- "setTree",
- Integer.valueOf(index).toString(),
- Integer.valueOf((this._treeList.size() - 1)).toString()
- }));
- }
-
- this._treeList.set(index, vTree);
- }
-
- /**
- *
- *
- * @param vTreeArray
- */
- public void setTree(final jalview.binding.Tree[] vTreeArray)
- {
- // -- copy array
- _treeList.clear();
-
- for (int i = 0; i < vTreeArray.length; i++)
- {
- this._treeList.add(vTreeArray[i]);
- }
- }
-
- /**
- *
- *
- * @param index
- * @param vUserColours
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void setUserColours(final int index,
- final jalview.binding.UserColours vUserColours)
- throws java.lang.IndexOutOfBoundsException
- {
- // check bounds for index
- if (index < 0 || index >= this._userColoursList.size())
- {
- throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
- "setUserColours",
- Integer.valueOf(index).toString(),
- Integer.valueOf((this._userColoursList.size() - 1)).toString()
- }));
- }
-
- this._userColoursList.set(index, vUserColours);
- }
-
- /**
- *
- *
- * @param vUserColoursArray
- */
- public void setUserColours(
- final jalview.binding.UserColours[] vUserColoursArray)
- {
- // -- copy array
- _userColoursList.clear();
-
- for (int i = 0; i < vUserColoursArray.length; i++)
- {
- this._userColoursList.add(vUserColoursArray[i]);
- }
- }
-
- /**
- *
- *
- * @param index
- * @param vViewport
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void setViewport(final int index,
- final jalview.binding.Viewport vViewport)
- throws java.lang.IndexOutOfBoundsException
- {
- // check bounds for index
- if (index < 0 || index >= this._viewportList.size())
- {
- throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
- "setViewport",
- Integer.valueOf(index).toString(),
- Integer.valueOf((this._viewportList.size() - 1)).toString()
- }));
- }
-
- this._viewportList.set(index, vViewport);
- }
-
- /**
- *
- *
- * @param vViewportArray
- */
- public void setViewport(final jalview.binding.Viewport[] vViewportArray)
- {
- // -- copy array
- _viewportList.clear();
-
- for (int i = 0; i < vViewportArray.length; i++)
- {
- this._viewportList.add(vViewportArray[i]);
- }
- }
-
- /**
- * 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.binding.JalviewModelSequence
- */
- public static jalview.binding.JalviewModelSequence unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException,
- org.exolab.castor.xml.ValidationException
- {
- return (jalview.binding.JalviewModelSequence) Unmarshaller.unmarshal(
- jalview.binding.JalviewModelSequence.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 JalviewModelSequence implements java.io.Serializable {
+
+
+ //--------------------------/
+ //- Class/Member Variables -/
+ //--------------------------/
+
+ /**
+ * Field _JSeqList.
+ */
+ private java.util.Vector _JSeqList;
+
+ /**
+ * Field _JGroupList.
+ */
+ private java.util.Vector _JGroupList;
+
+ /**
+ * Field _viewportList.
+ */
+ private java.util.Vector _viewportList;
+
+ /**
+ * Field _userColoursList.
+ */
+ private java.util.Vector _userColoursList;
+
+ /**
+ * Field _treeList.
+ */
+ private java.util.Vector _treeList;
+
+ /**
+ * Field _featureSettings.
+ */
+ private jalview.binding.FeatureSettings _featureSettings;
+
+
+ //----------------/
+ //- Constructors -/
+ //----------------/
+
+ public JalviewModelSequence() {
+ super();
+ this._JSeqList = new java.util.Vector();
+ this._JGroupList = new java.util.Vector();
+ this._viewportList = new java.util.Vector();
+ this._userColoursList = new java.util.Vector();
+ this._treeList = new java.util.Vector();
+ }
+
+
+ //-----------/
+ //- Methods -/
+ //-----------/
+
+ /**
+ *
+ *
+ * @param vJGroup
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addJGroup(
+ final jalview.binding.JGroup vJGroup)
+ throws java.lang.IndexOutOfBoundsException {
+ this._JGroupList.addElement(vJGroup);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vJGroup
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addJGroup(
+ final int index,
+ final jalview.binding.JGroup vJGroup)
+ throws java.lang.IndexOutOfBoundsException {
+ this._JGroupList.add(index, vJGroup);
+ }
+
+ /**
+ *
+ *
+ * @param vJSeq
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addJSeq(
+ final jalview.binding.JSeq vJSeq)
+ throws java.lang.IndexOutOfBoundsException {
+ this._JSeqList.addElement(vJSeq);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vJSeq
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addJSeq(
+ final int index,
+ final jalview.binding.JSeq vJSeq)
+ throws java.lang.IndexOutOfBoundsException {
+ this._JSeqList.add(index, vJSeq);
+ }
+
+ /**
+ *
+ *
+ * @param vTree
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addTree(
+ final jalview.binding.Tree vTree)
+ throws java.lang.IndexOutOfBoundsException {
+ this._treeList.addElement(vTree);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vTree
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addTree(
+ final int index,
+ final jalview.binding.Tree vTree)
+ throws java.lang.IndexOutOfBoundsException {
+ this._treeList.add(index, vTree);
+ }
+
+ /**
+ *
+ *
+ * @param vUserColours
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addUserColours(
+ final jalview.binding.UserColours vUserColours)
+ throws java.lang.IndexOutOfBoundsException {
+ this._userColoursList.addElement(vUserColours);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vUserColours
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addUserColours(
+ final int index,
+ final jalview.binding.UserColours vUserColours)
+ throws java.lang.IndexOutOfBoundsException {
+ this._userColoursList.add(index, vUserColours);
+ }
+
+ /**
+ *
+ *
+ * @param vViewport
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addViewport(
+ final jalview.binding.Viewport vViewport)
+ throws java.lang.IndexOutOfBoundsException {
+ this._viewportList.addElement(vViewport);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vViewport
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addViewport(
+ final int index,
+ final jalview.binding.Viewport vViewport)
+ throws java.lang.IndexOutOfBoundsException {
+ this._viewportList.add(index, vViewport);
+ }
+
+ /**
+ * Method enumerateJGroup.
+ *
+ * @return an Enumeration over all jalview.binding.JGroup
+ * elements
+ */
+ public java.util.Enumeration enumerateJGroup(
+ ) {
+ return this._JGroupList.elements();
+ }
+
+ /**
+ * Method enumerateJSeq.
+ *
+ * @return an Enumeration over all jalview.binding.JSeq elements
+ */
+ public java.util.Enumeration enumerateJSeq(
+ ) {
+ return this._JSeqList.elements();
+ }
+
+ /**
+ * Method enumerateTree.
+ *
+ * @return an Enumeration over all jalview.binding.Tree elements
+ */
+ public java.util.Enumeration enumerateTree(
+ ) {
+ return this._treeList.elements();
+ }
+
+ /**
+ * Method enumerateUserColours.
+ *
+ * @return an Enumeration over all jalview.binding.UserColours
+ * elements
+ */
+ public java.util.Enumeration enumerateUserColours(
+ ) {
+ return this._userColoursList.elements();
+ }
+
+ /**
+ * Method enumerateViewport.
+ *
+ * @return an Enumeration over all jalview.binding.Viewport
+ * elements
+ */
+ public java.util.Enumeration enumerateViewport(
+ ) {
+ return this._viewportList.elements();
+ }
+
+ /**
+ * Returns the value of field 'featureSettings'.
+ *
+ * @return the value of field 'FeatureSettings'.
+ */
+ public jalview.binding.FeatureSettings getFeatureSettings(
+ ) {
+ return this._featureSettings;
+ }
+
+ /**
+ * Method getJGroup.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ * @return the value of the jalview.binding.JGroup at the given
+ * index
+ */
+ public jalview.binding.JGroup getJGroup(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._JGroupList.size()) {
+ throw new IndexOutOfBoundsException("getJGroup: Index value '" + index + "' not in range [0.." + (this._JGroupList.size() - 1) + "]");
+ }
+
+ return (jalview.binding.JGroup) _JGroupList.get(index);
+ }
+
+ /**
+ * Method getJGroup.Returns the contents of the collection in
+ * an Array. <p>Note: Just in case the collection contents
+ * are changing in another thread, we pass a 0-length Array of
+ * the correct type into the API call. This way we <i>know</i>
+ * that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public jalview.binding.JGroup[] getJGroup(
+ ) {
+ jalview.binding.JGroup[] array = new jalview.binding.JGroup[0];
+ return (jalview.binding.JGroup[]) this._JGroupList.toArray(array);
+ }
+
+ /**
+ * Method getJGroupCount.
+ *
+ * @return the size of this collection
+ */
+ public int getJGroupCount(
+ ) {
+ return this._JGroupList.size();
+ }
+
+ /**
+ * Method getJSeq.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ * @return the value of the jalview.binding.JSeq at the given
+ * index
+ */
+ public jalview.binding.JSeq getJSeq(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._JSeqList.size()) {
+ throw new IndexOutOfBoundsException("getJSeq: Index value '" + index + "' not in range [0.." + (this._JSeqList.size() - 1) + "]");
+ }
+
+ return (jalview.binding.JSeq) _JSeqList.get(index);
+ }
+
+ /**
+ * Method getJSeq.Returns the contents of the collection in an
+ * Array. <p>Note: Just in case the collection contents are
+ * changing in another thread, we pass a 0-length Array of the
+ * correct type into the API call. This way we <i>know</i>
+ * that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public jalview.binding.JSeq[] getJSeq(
+ ) {
+ jalview.binding.JSeq[] array = new jalview.binding.JSeq[0];
+ return (jalview.binding.JSeq[]) this._JSeqList.toArray(array);
+ }
+
+ /**
+ * Method getJSeqCount.
+ *
+ * @return the size of this collection
+ */
+ public int getJSeqCount(
+ ) {
+ return this._JSeqList.size();
+ }
+
+ /**
+ * Method getTree.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ * @return the value of the jalview.binding.Tree at the given
+ * index
+ */
+ public jalview.binding.Tree getTree(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._treeList.size()) {
+ throw new IndexOutOfBoundsException("getTree: Index value '" + index + "' not in range [0.." + (this._treeList.size() - 1) + "]");
+ }
+
+ return (jalview.binding.Tree) _treeList.get(index);
+ }
+
+ /**
+ * Method getTree.Returns the contents of the collection in an
+ * Array. <p>Note: Just in case the collection contents are
+ * changing in another thread, we pass a 0-length Array of the
+ * correct type into the API call. This way we <i>know</i>
+ * that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public jalview.binding.Tree[] getTree(
+ ) {
+ jalview.binding.Tree[] array = new jalview.binding.Tree[0];
+ return (jalview.binding.Tree[]) this._treeList.toArray(array);
+ }
+
+ /**
+ * Method getTreeCount.
+ *
+ * @return the size of this collection
+ */
+ public int getTreeCount(
+ ) {
+ return this._treeList.size();
+ }
+
+ /**
+ * Method getUserColours.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ * @return the value of the jalview.binding.UserColours at the
+ * given index
+ */
+ public jalview.binding.UserColours getUserColours(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._userColoursList.size()) {
+ throw new IndexOutOfBoundsException("getUserColours: Index value '" + index + "' not in range [0.." + (this._userColoursList.size() - 1) + "]");
+ }
+
+ return (jalview.binding.UserColours) _userColoursList.get(index);
+ }
+
+ /**
+ * Method getUserColours.Returns the contents of the collection
+ * in an Array. <p>Note: Just in case the collection contents
+ * are changing in another thread, we pass a 0-length Array of
+ * the correct type into the API call. This way we <i>know</i>
+ * that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public jalview.binding.UserColours[] getUserColours(
+ ) {
+ jalview.binding.UserColours[] array = new jalview.binding.UserColours[0];
+ return (jalview.binding.UserColours[]) this._userColoursList.toArray(array);
+ }
+
+ /**
+ * Method getUserColoursCount.
+ *
+ * @return the size of this collection
+ */
+ public int getUserColoursCount(
+ ) {
+ return this._userColoursList.size();
+ }
+
+ /**
+ * Method getViewport.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ * @return the value of the jalview.binding.Viewport at the
+ * given index
+ */
+ public jalview.binding.Viewport getViewport(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._viewportList.size()) {
+ throw new IndexOutOfBoundsException("getViewport: Index value '" + index + "' not in range [0.." + (this._viewportList.size() - 1) + "]");
+ }
+
+ return (jalview.binding.Viewport) _viewportList.get(index);
+ }
+
+ /**
+ * Method getViewport.Returns the contents of the collection in
+ * an Array. <p>Note: Just in case the collection contents
+ * are changing in another thread, we pass a 0-length Array of
+ * the correct type into the API call. This way we <i>know</i>
+ * that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public jalview.binding.Viewport[] getViewport(
+ ) {
+ jalview.binding.Viewport[] array = new jalview.binding.Viewport[0];
+ return (jalview.binding.Viewport[]) this._viewportList.toArray(array);
+ }
+
+ /**
+ * Method getViewportCount.
+ *
+ * @return the size of this collection
+ */
+ public int getViewportCount(
+ ) {
+ return this._viewportList.size();
+ }
+
+ /**
+ * 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);
+ }
+
+ /**
+ */
+ public void removeAllJGroup(
+ ) {
+ this._JGroupList.clear();
+ }
+
+ /**
+ */
+ public void removeAllJSeq(
+ ) {
+ this._JSeqList.clear();
+ }
+
+ /**
+ */
+ public void removeAllTree(
+ ) {
+ this._treeList.clear();
+ }
+
+ /**
+ */
+ public void removeAllUserColours(
+ ) {
+ this._userColoursList.clear();
+ }
+
+ /**
+ */
+ public void removeAllViewport(
+ ) {
+ this._viewportList.clear();
+ }
+
+ /**
+ * Method removeJGroup.
+ *
+ * @param vJGroup
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeJGroup(
+ final jalview.binding.JGroup vJGroup) {
+ boolean removed = _JGroupList.remove(vJGroup);
+ return removed;
+ }
+
+ /**
+ * Method removeJGroupAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public jalview.binding.JGroup removeJGroupAt(
+ final int index) {
+ java.lang.Object obj = this._JGroupList.remove(index);
+ return (jalview.binding.JGroup) obj;
+ }
+
+ /**
+ * Method removeJSeq.
+ *
+ * @param vJSeq
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeJSeq(
+ final jalview.binding.JSeq vJSeq) {
+ boolean removed = _JSeqList.remove(vJSeq);
+ return removed;
+ }
+
+ /**
+ * Method removeJSeqAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public jalview.binding.JSeq removeJSeqAt(
+ final int index) {
+ java.lang.Object obj = this._JSeqList.remove(index);
+ return (jalview.binding.JSeq) obj;
+ }
+
+ /**
+ * Method removeTree.
+ *
+ * @param vTree
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeTree(
+ final jalview.binding.Tree vTree) {
+ boolean removed = _treeList.remove(vTree);
+ return removed;
+ }
+
+ /**
+ * Method removeTreeAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public jalview.binding.Tree removeTreeAt(
+ final int index) {
+ java.lang.Object obj = this._treeList.remove(index);
+ return (jalview.binding.Tree) obj;
+ }
+
+ /**
+ * Method removeUserColours.
+ *
+ * @param vUserColours
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeUserColours(
+ final jalview.binding.UserColours vUserColours) {
+ boolean removed = _userColoursList.remove(vUserColours);
+ return removed;
+ }
+
+ /**
+ * Method removeUserColoursAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public jalview.binding.UserColours removeUserColoursAt(
+ final int index) {
+ java.lang.Object obj = this._userColoursList.remove(index);
+ return (jalview.binding.UserColours) obj;
+ }
+
+ /**
+ * Method removeViewport.
+ *
+ * @param vViewport
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeViewport(
+ final jalview.binding.Viewport vViewport) {
+ boolean removed = _viewportList.remove(vViewport);
+ return removed;
+ }
+
+ /**
+ * Method removeViewportAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public jalview.binding.Viewport removeViewportAt(
+ final int index) {
+ java.lang.Object obj = this._viewportList.remove(index);
+ return (jalview.binding.Viewport) obj;
+ }
+
+ /**
+ * Sets the value of field 'featureSettings'.
+ *
+ * @param featureSettings the value of field 'featureSettings'.
+ */
+ public void setFeatureSettings(
+ final jalview.binding.FeatureSettings featureSettings) {
+ this._featureSettings = featureSettings;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vJGroup
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setJGroup(
+ final int index,
+ final jalview.binding.JGroup vJGroup)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._JGroupList.size()) {
+ throw new IndexOutOfBoundsException("setJGroup: Index value '" + index + "' not in range [0.." + (this._JGroupList.size() - 1) + "]");
+ }
+
+ this._JGroupList.set(index, vJGroup);
+ }
+
+ /**
+ *
+ *
+ * @param vJGroupArray
+ */
+ public void setJGroup(
+ final jalview.binding.JGroup[] vJGroupArray) {
+ //-- copy array
+ _JGroupList.clear();
+
+ for (int i = 0; i < vJGroupArray.length; i++) {
+ this._JGroupList.add(vJGroupArray[i]);
+ }
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vJSeq
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setJSeq(
+ final int index,
+ final jalview.binding.JSeq vJSeq)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._JSeqList.size()) {
+ throw new IndexOutOfBoundsException("setJSeq: Index value '" + index + "' not in range [0.." + (this._JSeqList.size() - 1) + "]");
+ }
+
+ this._JSeqList.set(index, vJSeq);
+ }
+
+ /**
+ *
+ *
+ * @param vJSeqArray
+ */
+ public void setJSeq(
+ final jalview.binding.JSeq[] vJSeqArray) {
+ //-- copy array
+ _JSeqList.clear();
+
+ for (int i = 0; i < vJSeqArray.length; i++) {
+ this._JSeqList.add(vJSeqArray[i]);
+ }
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vTree
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setTree(
+ final int index,
+ final jalview.binding.Tree vTree)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._treeList.size()) {
+ throw new IndexOutOfBoundsException("setTree: Index value '" + index + "' not in range [0.." + (this._treeList.size() - 1) + "]");
+ }
+
+ this._treeList.set(index, vTree);
+ }
+
+ /**
+ *
+ *
+ * @param vTreeArray
+ */
+ public void setTree(
+ final jalview.binding.Tree[] vTreeArray) {
+ //-- copy array
+ _treeList.clear();
+
+ for (int i = 0; i < vTreeArray.length; i++) {
+ this._treeList.add(vTreeArray[i]);
+ }
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vUserColours
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setUserColours(
+ final int index,
+ final jalview.binding.UserColours vUserColours)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._userColoursList.size()) {
+ throw new IndexOutOfBoundsException("setUserColours: Index value '" + index + "' not in range [0.." + (this._userColoursList.size() - 1) + "]");
+ }
+
+ this._userColoursList.set(index, vUserColours);
+ }
+
+ /**
+ *
+ *
+ * @param vUserColoursArray
+ */
+ public void setUserColours(
+ final jalview.binding.UserColours[] vUserColoursArray) {
+ //-- copy array
+ _userColoursList.clear();
+
+ for (int i = 0; i < vUserColoursArray.length; i++) {
+ this._userColoursList.add(vUserColoursArray[i]);
+ }
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vViewport
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setViewport(
+ final int index,
+ final jalview.binding.Viewport vViewport)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._viewportList.size()) {
+ throw new IndexOutOfBoundsException("setViewport: Index value '" + index + "' not in range [0.." + (this._viewportList.size() - 1) + "]");
+ }
+
+ this._viewportList.set(index, vViewport);
+ }
+
+ /**
+ *
+ *
+ * @param vViewportArray
+ */
+ public void setViewport(
+ final jalview.binding.Viewport[] vViewportArray) {
+ //-- copy array
+ _viewportList.clear();
+
+ for (int i = 0; i < vViewportArray.length; i++) {
+ this._viewportList.add(vViewportArray[i]);
+ }
+ }
+
+ /**
+ * 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.binding.JalviewModelSequence
+ */
+ public static jalview.binding.JalviewModelSequence unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ return (jalview.binding.JalviewModelSequence) Unmarshaller.unmarshal(jalview.binding.JalviewModelSequence.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);
+ }
}
/*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
- *
- * This file is part of Jalview.
- *
- * Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3
- * of the License, or (at your option) any later version.
- *
- * Jalview is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with 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.binding;
-//---------------------------------/
-//- Imported classes and packages -/
+ //---------------------------------/
+ //- Imported classes and packages -/
//---------------------------------/
-import jalview.util.MessageManager;
-
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
*
* @version $Revision$ $Date$
*/
-public class JalviewUserColours implements java.io.Serializable
-{
-
- // --------------------------/
- // - Class/Member Variables -/
- // --------------------------/
-
- /**
- * Field _schemeName.
- */
- private java.lang.String _schemeName;
-
- /**
- * Jalview colour scheme document version.
- *
- */
- private java.lang.String _version;
-
- /**
- * Field _colourList.
- */
- private java.util.Vector _colourList;
-
- // ----------------/
- // - Constructors -/
- // ----------------/
-
- public JalviewUserColours()
- {
- super();
- this._colourList = new java.util.Vector();
- }
-
- // -----------/
- // - Methods -/
- // -----------/
-
- /**
- *
- *
- * @param vColour
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void addColour(final Colour vColour)
- throws java.lang.IndexOutOfBoundsException
- {
- this._colourList.addElement(vColour);
- }
-
- /**
- *
- *
- * @param index
- * @param vColour
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void addColour(final int index, final Colour vColour)
- throws java.lang.IndexOutOfBoundsException
- {
- this._colourList.add(index, vColour);
- }
-
- /**
- * Method enumerateColour.
- *
- * @return an Enumeration over all Colour elements
- */
- public java.util.Enumeration enumerateColour()
- {
- return this._colourList.elements();
- }
-
- /**
- * Method getColour.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- * @return the value of the Colour at the given index
- */
- public Colour getColour(final int index)
- throws java.lang.IndexOutOfBoundsException
- {
- // check bounds for index
- if (index < 0 || index >= this._colourList.size())
- {
- throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
- "getColour",
- Integer.valueOf(index).toString(),
- Integer.valueOf((this._colourList.size() - 1)).toString()
- }));
+public class JalviewUserColours implements java.io.Serializable {
+
+
+ //--------------------------/
+ //- Class/Member Variables -/
+ //--------------------------/
+
+ /**
+ * Field _schemeName.
+ */
+ private java.lang.String _schemeName;
+
+ /**
+ * Jalview colour scheme document version.
+ *
+ */
+ private java.lang.String _version;
+
+ /**
+ * Field _colourList.
+ */
+ private java.util.Vector _colourList;
+
+
+ //----------------/
+ //- Constructors -/
+ //----------------/
+
+ public JalviewUserColours() {
+ super();
+ this._colourList = new java.util.Vector();
}
- return (Colour) _colourList.get(index);
- }
-
- /**
- * Method getColour.Returns the contents of the collection in an Array.
- * <p>
- * Note: Just in case the collection contents are changing in another thread,
- * we pass a 0-length Array of the correct type into the API call. This way we
- * <i>know</i> that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public Colour[] getColour()
- {
- Colour[] array = new Colour[0];
- return (Colour[]) this._colourList.toArray(array);
- }
-
- /**
- * Method getColourCount.
- *
- * @return the size of this collection
- */
- public int getColourCount()
- {
- return this._colourList.size();
- }
-
- /**
- * Returns the value of field 'schemeName'.
- *
- * @return the value of field 'SchemeName'.
- */
- public java.lang.String getSchemeName()
- {
- return this._schemeName;
- }
-
- /**
- * Returns the value of field 'version'. The field 'version' has the following
- * description: Jalview colour scheme document version.
- *
- *
- * @return the value of field 'Version'.
- */
- public java.lang.String getVersion()
- {
- return this._version;
- }
-
- /**
- * 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;
+
+ //-----------/
+ //- Methods -/
+ //-----------/
+
+ /**
+ *
+ *
+ * @param vColour
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addColour(
+ final Colour vColour)
+ throws java.lang.IndexOutOfBoundsException {
+ this._colourList.addElement(vColour);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vColour
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addColour(
+ final int index,
+ final Colour vColour)
+ throws java.lang.IndexOutOfBoundsException {
+ this._colourList.add(index, vColour);
+ }
+
+ /**
+ * Method enumerateColour.
+ *
+ * @return an Enumeration over all Colour elements
+ */
+ public java.util.Enumeration enumerateColour(
+ ) {
+ return this._colourList.elements();
+ }
+
+ /**
+ * Method getColour.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ * @return the value of the Colour at the given index
+ */
+ public Colour getColour(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._colourList.size()) {
+ throw new IndexOutOfBoundsException("getColour: Index value '" + index + "' not in range [0.." + (this._colourList.size() - 1) + "]");
+ }
+
+ return (Colour) _colourList.get(index);
}
- 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);
- }
-
- /**
+
+ /**
+ * Method getColour.Returns the contents of the collection in
+ * an Array. <p>Note: Just in case the collection contents
+ * are changing in another thread, we pass a 0-length Array of
+ * the correct type into the API call. This way we <i>know</i>
+ * that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public Colour[] getColour(
+ ) {
+ Colour[] array = new Colour[0];
+ return (Colour[]) this._colourList.toArray(array);
+ }
+
+ /**
+ * Method getColourCount.
+ *
+ * @return the size of this collection
*/
- public void removeAllColour()
- {
- this._colourList.clear();
- }
-
- /**
- * Method removeColour.
- *
- * @param vColour
- * @return true if the object was removed from the collection.
- */
- public boolean removeColour(final Colour vColour)
- {
- boolean removed = _colourList.remove(vColour);
- return removed;
- }
-
- /**
- * Method removeColourAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public Colour removeColourAt(final int index)
- {
- java.lang.Object obj = this._colourList.remove(index);
- return (Colour) obj;
- }
-
- /**
- *
- *
- * @param index
- * @param vColour
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void setColour(final int index, final Colour vColour)
- throws java.lang.IndexOutOfBoundsException
- {
- // check bounds for index
- if (index < 0 || index >= this._colourList.size())
- {
- throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
- "setColour",
- Integer.valueOf(index).toString(),
- Integer.valueOf((this._colourList.size() - 1)).toString()
- }));
+ public int getColourCount(
+ ) {
+ return this._colourList.size();
}
- this._colourList.set(index, vColour);
- }
-
- /**
- *
- *
- * @param vColourArray
- */
- public void setColour(final Colour[] vColourArray)
- {
- // -- copy array
- _colourList.clear();
-
- for (int i = 0; i < vColourArray.length; i++)
- {
- this._colourList.add(vColourArray[i]);
+ /**
+ * Returns the value of field 'schemeName'.
+ *
+ * @return the value of field 'SchemeName'.
+ */
+ public java.lang.String getSchemeName(
+ ) {
+ return this._schemeName;
+ }
+
+ /**
+ * Returns the value of field 'version'. The field 'version'
+ * has the following description: Jalview colour scheme
+ * document version.
+ *
+ *
+ * @return the value of field 'Version'.
+ */
+ public java.lang.String getVersion(
+ ) {
+ return this._version;
+ }
+
+ /**
+ * 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);
+ }
+
+ /**
+ */
+ public void removeAllColour(
+ ) {
+ this._colourList.clear();
+ }
+
+ /**
+ * Method removeColour.
+ *
+ * @param vColour
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeColour(
+ final Colour vColour) {
+ boolean removed = _colourList.remove(vColour);
+ return removed;
+ }
+
+ /**
+ * Method removeColourAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public Colour removeColourAt(
+ final int index) {
+ java.lang.Object obj = this._colourList.remove(index);
+ return (Colour) obj;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vColour
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setColour(
+ final int index,
+ final Colour vColour)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._colourList.size()) {
+ throw new IndexOutOfBoundsException("setColour: Index value '" + index + "' not in range [0.." + (this._colourList.size() - 1) + "]");
+ }
+
+ this._colourList.set(index, vColour);
+ }
+
+ /**
+ *
+ *
+ * @param vColourArray
+ */
+ public void setColour(
+ final Colour[] vColourArray) {
+ //-- copy array
+ _colourList.clear();
+
+ for (int i = 0; i < vColourArray.length; i++) {
+ this._colourList.add(vColourArray[i]);
+ }
+ }
+
+ /**
+ * Sets the value of field 'schemeName'.
+ *
+ * @param schemeName the value of field 'schemeName'.
+ */
+ public void setSchemeName(
+ final java.lang.String schemeName) {
+ this._schemeName = schemeName;
+ }
+
+ /**
+ * Sets the value of field 'version'. The field 'version' has
+ * the following description: Jalview colour scheme document
+ * version.
+ *
+ *
+ * @param version the value of field 'version'.
+ */
+ public void setVersion(
+ final java.lang.String version) {
+ this._version = version;
+ }
+
+ /**
+ * 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.binding.JalviewUserColours
+ */
+ public static jalview.binding.JalviewUserColours unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ return (jalview.binding.JalviewUserColours) Unmarshaller.unmarshal(jalview.binding.JalviewUserColours.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);
}
- }
-
- /**
- * Sets the value of field 'schemeName'.
- *
- * @param schemeName
- * the value of field 'schemeName'.
- */
- public void setSchemeName(final java.lang.String schemeName)
- {
- this._schemeName = schemeName;
- }
-
- /**
- * Sets the value of field 'version'. The field 'version' has the following
- * description: Jalview colour scheme document version.
- *
- *
- * @param version
- * the value of field 'version'.
- */
- public void setVersion(final java.lang.String version)
- {
- this._version = version;
- }
-
- /**
- * 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.binding.JalviewUserColours
- */
- public static jalview.binding.JalviewUserColours unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException,
- org.exolab.castor.xml.ValidationException
- {
- return (jalview.binding.JalviewUserColours) Unmarshaller.unmarshal(
- jalview.binding.JalviewUserColours.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);
- }
}
/*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
- *
- * This file is part of Jalview.
- *
- * Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3
- * of the License, or (at your option) any later version.
- *
- * Jalview is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with 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.binding;
-//---------------------------------/
-//- Imported classes and packages -/
+ //---------------------------------/
+ //- Imported classes and packages -/
//---------------------------------/
-import jalview.util.MessageManager;
-
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
*
* @version $Revision$ $Date$
*/
-public class Pdbentry implements java.io.Serializable
-{
-
- // --------------------------/
- // - Class/Member Variables -/
- // --------------------------/
-
- /**
- * Field _id.
- */
- private java.lang.String _id;
-
- /**
- * Field _type.
- */
- private java.lang.String _type;
-
- /**
- * Field _items.
- */
- private java.util.Vector _items;
-
- // ----------------/
- // - Constructors -/
- // ----------------/
-
- public Pdbentry()
- {
- super();
- this._items = new java.util.Vector();
- }
-
- // -----------/
- // - Methods -/
- // -----------/
-
- /**
- *
- *
- * @param vPdbentryItem
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void addPdbentryItem(
- final jalview.binding.PdbentryItem vPdbentryItem)
- throws java.lang.IndexOutOfBoundsException
- {
- this._items.addElement(vPdbentryItem);
- }
-
- /**
- *
- *
- * @param index
- * @param vPdbentryItem
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void addPdbentryItem(final int index,
- final jalview.binding.PdbentryItem vPdbentryItem)
- throws java.lang.IndexOutOfBoundsException
- {
- this._items.add(index, vPdbentryItem);
- }
-
- /**
- * Method enumeratePdbentryItem.
- *
- * @return an Enumeration over all jalview.binding.PdbentryItem elements
- */
- public java.util.Enumeration enumeratePdbentryItem()
- {
- return this._items.elements();
- }
-
- /**
- * Returns the value of field 'id'.
- *
- * @return the value of field 'Id'.
- */
- public java.lang.String getId()
- {
- return this._id;
- }
-
- /**
- * Method getPdbentryItem.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- * @return the value of the jalview.binding.PdbentryItem at the given index
- */
- public jalview.binding.PdbentryItem getPdbentryItem(final int index)
- throws java.lang.IndexOutOfBoundsException
- {
- // check bounds for index
- if (index < 0 || index >= this._items.size())
- {
- throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
- "getPdbentryItem",
- Integer.valueOf(index).toString(),
- Integer.valueOf((this._items.size() - 1)).toString()
- }));
+public class Pdbentry implements java.io.Serializable {
+
+
+ //--------------------------/
+ //- Class/Member Variables -/
+ //--------------------------/
+
+ /**
+ * Field _id.
+ */
+ private java.lang.String _id;
+
+ /**
+ * Field _type.
+ */
+ private java.lang.String _type;
+
+ /**
+ * Field _items.
+ */
+ private java.util.Vector _items;
+
+
+ //----------------/
+ //- Constructors -/
+ //----------------/
+
+ public Pdbentry() {
+ super();
+ this._items = new java.util.Vector();
}
- return (jalview.binding.PdbentryItem) _items.get(index);
- }
-
- /**
- * Method getPdbentryItem.Returns the contents of the collection in an Array.
- * <p>
- * Note: Just in case the collection contents are changing in another thread,
- * we pass a 0-length Array of the correct type into the API call. This way we
- * <i>know</i> that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public jalview.binding.PdbentryItem[] getPdbentryItem()
- {
- jalview.binding.PdbentryItem[] array = new jalview.binding.PdbentryItem[0];
- return (jalview.binding.PdbentryItem[]) this._items.toArray(array);
- }
-
- /**
- * Method getPdbentryItemCount.
- *
- * @return the size of this collection
- */
- public int getPdbentryItemCount()
- {
- return this._items.size();
- }
-
- /**
- * Returns the value of field 'type'.
- *
- * @return the value of field 'Type'.
- */
- public java.lang.String getType()
- {
- return this._type;
- }
-
- /**
- * 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;
+
+ //-----------/
+ //- Methods -/
+ //-----------/
+
+ /**
+ *
+ *
+ * @param vPdbentryItem
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addPdbentryItem(
+ final jalview.binding.PdbentryItem vPdbentryItem)
+ throws java.lang.IndexOutOfBoundsException {
+ this._items.addElement(vPdbentryItem);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vPdbentryItem
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addPdbentryItem(
+ final int index,
+ final jalview.binding.PdbentryItem vPdbentryItem)
+ throws java.lang.IndexOutOfBoundsException {
+ this._items.add(index, vPdbentryItem);
+ }
+
+ /**
+ * Method enumeratePdbentryItem.
+ *
+ * @return an Enumeration over all jalview.binding.PdbentryItem
+ * elements
+ */
+ public java.util.Enumeration enumeratePdbentryItem(
+ ) {
+ return this._items.elements();
+ }
+
+ /**
+ * Returns the value of field 'id'.
+ *
+ * @return the value of field 'Id'.
+ */
+ public java.lang.String getId(
+ ) {
+ return this._id;
}
- 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);
- }
-
- /**
+
+ /**
+ * Method getPdbentryItem.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ * @return the value of the jalview.binding.PdbentryItem at the
+ * given index
+ */
+ public jalview.binding.PdbentryItem getPdbentryItem(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._items.size()) {
+ throw new IndexOutOfBoundsException("getPdbentryItem: Index value '" + index + "' not in range [0.." + (this._items.size() - 1) + "]");
+ }
+
+ return (jalview.binding.PdbentryItem) _items.get(index);
+ }
+
+ /**
+ * Method getPdbentryItem.Returns the contents of the
+ * collection in an Array. <p>Note: Just in case the
+ * collection contents are changing in another thread, we pass
+ * a 0-length Array of the correct type into the API call.
+ * This way we <i>know</i> that the Array returned is of
+ * exactly the correct length.
+ *
+ * @return this collection as an Array
*/
- public void removeAllPdbentryItem()
- {
- this._items.clear();
- }
-
- /**
- * Method removePdbentryItem.
- *
- * @param vPdbentryItem
- * @return true if the object was removed from the collection.
- */
- public boolean removePdbentryItem(
- final jalview.binding.PdbentryItem vPdbentryItem)
- {
- boolean removed = _items.remove(vPdbentryItem);
- return removed;
- }
-
- /**
- * Method removePdbentryItemAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public jalview.binding.PdbentryItem removePdbentryItemAt(final int index)
- {
- java.lang.Object obj = this._items.remove(index);
- return (jalview.binding.PdbentryItem) obj;
- }
-
- /**
- * Sets the value of field 'id'.
- *
- * @param id
- * the value of field 'id'.
- */
- public void setId(final java.lang.String id)
- {
- this._id = id;
- }
-
- /**
- *
- *
- * @param index
- * @param vPdbentryItem
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void setPdbentryItem(final int index,
- final jalview.binding.PdbentryItem vPdbentryItem)
- throws java.lang.IndexOutOfBoundsException
- {
- // check bounds for index
- if (index < 0 || index >= this._items.size())
- {
- throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
- "setPdbentryItem",
- Integer.valueOf(index).toString(),
- Integer.valueOf((this._items.size() - 1)).toString()
- }));
+ public jalview.binding.PdbentryItem[] getPdbentryItem(
+ ) {
+ jalview.binding.PdbentryItem[] array = new jalview.binding.PdbentryItem[0];
+ return (jalview.binding.PdbentryItem[]) this._items.toArray(array);
}
- this._items.set(index, vPdbentryItem);
- }
-
- /**
- *
- *
- * @param vPdbentryItemArray
- */
- public void setPdbentryItem(
- final jalview.binding.PdbentryItem[] vPdbentryItemArray)
- {
- // -- copy array
- _items.clear();
-
- for (int i = 0; i < vPdbentryItemArray.length; i++)
- {
- this._items.add(vPdbentryItemArray[i]);
+ /**
+ * Method getPdbentryItemCount.
+ *
+ * @return the size of this collection
+ */
+ public int getPdbentryItemCount(
+ ) {
+ return this._items.size();
+ }
+
+ /**
+ * Returns the value of field 'type'.
+ *
+ * @return the value of field 'Type'.
+ */
+ public java.lang.String getType(
+ ) {
+ return this._type;
+ }
+
+ /**
+ * 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);
+ }
+
+ /**
+ */
+ public void removeAllPdbentryItem(
+ ) {
+ this._items.clear();
+ }
+
+ /**
+ * Method removePdbentryItem.
+ *
+ * @param vPdbentryItem
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removePdbentryItem(
+ final jalview.binding.PdbentryItem vPdbentryItem) {
+ boolean removed = _items.remove(vPdbentryItem);
+ return removed;
+ }
+
+ /**
+ * Method removePdbentryItemAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public jalview.binding.PdbentryItem removePdbentryItemAt(
+ final int index) {
+ java.lang.Object obj = this._items.remove(index);
+ return (jalview.binding.PdbentryItem) obj;
+ }
+
+ /**
+ * Sets the value of field 'id'.
+ *
+ * @param id the value of field 'id'.
+ */
+ public void setId(
+ final java.lang.String id) {
+ this._id = id;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vPdbentryItem
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setPdbentryItem(
+ final int index,
+ final jalview.binding.PdbentryItem vPdbentryItem)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._items.size()) {
+ throw new IndexOutOfBoundsException("setPdbentryItem: Index value '" + index + "' not in range [0.." + (this._items.size() - 1) + "]");
+ }
+
+ this._items.set(index, vPdbentryItem);
+ }
+
+ /**
+ *
+ *
+ * @param vPdbentryItemArray
+ */
+ public void setPdbentryItem(
+ final jalview.binding.PdbentryItem[] vPdbentryItemArray) {
+ //-- copy array
+ _items.clear();
+
+ for (int i = 0; i < vPdbentryItemArray.length; i++) {
+ this._items.add(vPdbentryItemArray[i]);
+ }
+ }
+
+ /**
+ * Sets the value of field 'type'.
+ *
+ * @param type the value of field 'type'.
+ */
+ public void setType(
+ final java.lang.String type) {
+ this._type = type;
+ }
+
+ /**
+ * 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.binding.Pdbentry
+ */
+ public static jalview.binding.Pdbentry unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ return (jalview.binding.Pdbentry) Unmarshaller.unmarshal(jalview.binding.Pdbentry.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);
}
- }
-
- /**
- * Sets the value of field 'type'.
- *
- * @param type
- * the value of field 'type'.
- */
- public void setType(final java.lang.String type)
- {
- this._type = type;
- }
-
- /**
- * 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.binding.Pdbentry
- */
- public static jalview.binding.Pdbentry unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException,
- org.exolab.castor.xml.ValidationException
- {
- return (jalview.binding.Pdbentry) Unmarshaller.unmarshal(
- jalview.binding.Pdbentry.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);
- }
}
/*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
- *
- * This file is part of Jalview.
- *
- * Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3
- * of the License, or (at your option) any later version.
- *
- * Jalview is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with 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.binding;
-import jalview.util.MessageManager;
+package jalview.binding;
/**
* Class PdbentryItem.
*
* @version $Revision$ $Date$
*/
-public class PdbentryItem implements java.io.Serializable
-{
-
- // --------------------------/
- // - Class/Member Variables -/
- // --------------------------/
-
- /**
- * Field _propertyList.
- */
- private java.util.Vector _propertyList;
-
- // ----------------/
- // - Constructors -/
- // ----------------/
-
- public PdbentryItem()
- {
- super();
- this._propertyList = new java.util.Vector();
- }
-
- // -----------/
- // - Methods -/
- // -----------/
-
- /**
- *
- *
- * @param vProperty
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void addProperty(final jalview.binding.Property vProperty)
- throws java.lang.IndexOutOfBoundsException
- {
- this._propertyList.addElement(vProperty);
- }
-
- /**
- *
- *
- * @param index
- * @param vProperty
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void addProperty(final int index,
- final jalview.binding.Property vProperty)
- throws java.lang.IndexOutOfBoundsException
- {
- this._propertyList.add(index, vProperty);
- }
-
- /**
- * Method enumerateProperty.
- *
- * @return an Enumeration over all jalview.binding.Property elements
- */
- public java.util.Enumeration enumerateProperty()
- {
- return this._propertyList.elements();
- }
-
- /**
- * Method getProperty.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- * @return the value of the jalview.binding.Property at the given index
- */
- public jalview.binding.Property getProperty(final int index)
- throws java.lang.IndexOutOfBoundsException
- {
- // check bounds for index
- if (index < 0 || index >= this._propertyList.size())
- {
- throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
- "getProperty",
- Integer.valueOf(index).toString(),
- Integer.valueOf((this._propertyList.size() - 1)).toString()
- }));
+public class PdbentryItem implements java.io.Serializable {
+
+
+ //--------------------------/
+ //- Class/Member Variables -/
+ //--------------------------/
+
+ /**
+ * Field _propertyList.
+ */
+ private java.util.Vector _propertyList;
+
+
+ //----------------/
+ //- Constructors -/
+ //----------------/
+
+ public PdbentryItem() {
+ super();
+ this._propertyList = new java.util.Vector();
+ }
+
+
+ //-----------/
+ //- Methods -/
+ //-----------/
+
+ /**
+ *
+ *
+ * @param vProperty
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addProperty(
+ final jalview.binding.Property vProperty)
+ throws java.lang.IndexOutOfBoundsException {
+ this._propertyList.addElement(vProperty);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vProperty
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addProperty(
+ final int index,
+ final jalview.binding.Property vProperty)
+ throws java.lang.IndexOutOfBoundsException {
+ this._propertyList.add(index, vProperty);
+ }
+
+ /**
+ * Method enumerateProperty.
+ *
+ * @return an Enumeration over all jalview.binding.Property
+ * elements
+ */
+ public java.util.Enumeration enumerateProperty(
+ ) {
+ return this._propertyList.elements();
+ }
+
+ /**
+ * Method getProperty.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ * @return the value of the jalview.binding.Property at the
+ * given index
+ */
+ public jalview.binding.Property getProperty(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._propertyList.size()) {
+ throw new IndexOutOfBoundsException("getProperty: Index value '" + index + "' not in range [0.." + (this._propertyList.size() - 1) + "]");
+ }
+
+ return (jalview.binding.Property) _propertyList.get(index);
+ }
+
+ /**
+ * Method getProperty.Returns the contents of the collection in
+ * an Array. <p>Note: Just in case the collection contents
+ * are changing in another thread, we pass a 0-length Array of
+ * the correct type into the API call. This way we <i>know</i>
+ * that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public jalview.binding.Property[] getProperty(
+ ) {
+ jalview.binding.Property[] array = new jalview.binding.Property[0];
+ return (jalview.binding.Property[]) this._propertyList.toArray(array);
+ }
+
+ /**
+ * Method getPropertyCount.
+ *
+ * @return the size of this collection
+ */
+ public int getPropertyCount(
+ ) {
+ return this._propertyList.size();
}
- return (jalview.binding.Property) _propertyList.get(index);
- }
-
- /**
- * Method getProperty.Returns the contents of the collection in an Array.
- * <p>
- * Note: Just in case the collection contents are changing in another thread,
- * we pass a 0-length Array of the correct type into the API call. This way we
- * <i>know</i> that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public jalview.binding.Property[] getProperty()
- {
- jalview.binding.Property[] array = new jalview.binding.Property[0];
- return (jalview.binding.Property[]) this._propertyList.toArray(array);
- }
-
- /**
- * Method getPropertyCount.
- *
- * @return the size of this collection
- */
- public int getPropertyCount()
- {
- return this._propertyList.size();
- }
-
- /**
+ /**
*/
- public void removeAllProperty()
- {
- this._propertyList.clear();
- }
-
- /**
- * Method removeProperty.
- *
- * @param vProperty
- * @return true if the object was removed from the collection.
- */
- public boolean removeProperty(final jalview.binding.Property vProperty)
- {
- boolean removed = _propertyList.remove(vProperty);
- return removed;
- }
-
- /**
- * Method removePropertyAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public jalview.binding.Property removePropertyAt(final int index)
- {
- java.lang.Object obj = this._propertyList.remove(index);
- return (jalview.binding.Property) obj;
- }
-
- /**
- *
- *
- * @param index
- * @param vProperty
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void setProperty(final int index,
- final jalview.binding.Property vProperty)
- throws java.lang.IndexOutOfBoundsException
- {
- // check bounds for index
- if (index < 0 || index >= this._propertyList.size())
- {
- throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
- "setProperty",
- Integer.valueOf(index).toString(),
- Integer.valueOf((this._propertyList.size() - 1)).toString()
- }));
+ public void removeAllProperty(
+ ) {
+ this._propertyList.clear();
}
- this._propertyList.set(index, vProperty);
- }
-
- /**
- *
- *
- * @param vPropertyArray
- */
- public void setProperty(final jalview.binding.Property[] vPropertyArray)
- {
- // -- copy array
- _propertyList.clear();
-
- for (int i = 0; i < vPropertyArray.length; i++)
- {
- this._propertyList.add(vPropertyArray[i]);
+ /**
+ * Method removeProperty.
+ *
+ * @param vProperty
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeProperty(
+ final jalview.binding.Property vProperty) {
+ boolean removed = _propertyList.remove(vProperty);
+ return removed;
+ }
+
+ /**
+ * Method removePropertyAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public jalview.binding.Property removePropertyAt(
+ final int index) {
+ java.lang.Object obj = this._propertyList.remove(index);
+ return (jalview.binding.Property) obj;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vProperty
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setProperty(
+ final int index,
+ final jalview.binding.Property vProperty)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._propertyList.size()) {
+ throw new IndexOutOfBoundsException("setProperty: Index value '" + index + "' not in range [0.." + (this._propertyList.size() - 1) + "]");
+ }
+
+ this._propertyList.set(index, vProperty);
+ }
+
+ /**
+ *
+ *
+ * @param vPropertyArray
+ */
+ public void setProperty(
+ final jalview.binding.Property[] vPropertyArray) {
+ //-- copy array
+ _propertyList.clear();
+
+ for (int i = 0; i < vPropertyArray.length; i++) {
+ this._propertyList.add(vPropertyArray[i]);
+ }
}
- }
}
/*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
- *
- * This file is part of Jalview.
- *
- * Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3
- * of the License, or (at your option) any later version.
- *
- * Jalview is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with 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.binding;
-//---------------------------------/
-//- Imported classes and packages -/
+ //---------------------------------/
+ //- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class Pdbids extends Pdbentry implements java.io.Serializable
+public class Pdbids extends Pdbentry
+implements java.io.Serializable
{
- // ----------------/
- // - Constructors -/
- // ----------------/
- public Pdbids()
- {
- super();
- }
+ //----------------/
+ //- Constructors -/
+ //----------------/
+
+ public Pdbids() {
+ super();
+ }
+
- // -----------/
- // - Methods -/
- // -----------/
+ //-----------/
+ //- Methods -/
+ //-----------/
- /**
- * 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;
+ /**
+ * 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;
}
- 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 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);
- }
+ /**
+ *
+ *
+ * @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);
+ }
- /**
- * 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.binding.Pdbentry
- */
- public static jalview.binding.Pdbentry unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException,
- org.exolab.castor.xml.ValidationException
- {
- return (jalview.binding.Pdbentry) Unmarshaller.unmarshal(
- jalview.binding.Pdbids.class, reader);
- }
+ /**
+ * 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.binding.Pdbentry
+ */
+ public static jalview.binding.Pdbentry unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ return (jalview.binding.Pdbentry) Unmarshaller.unmarshal(jalview.binding.Pdbids.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);
- }
+ /**
+ *
+ *
+ * @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);
+ }
}
/*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
- *
- * This file is part of Jalview.
- *
- * Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3
- * of the License, or (at your option) any later version.
- *
- * Jalview is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with 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.binding;
-//---------------------------------/
-//- Imported classes and packages -/
+ //---------------------------------/
+ //- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class Property implements java.io.Serializable
-{
-
- // --------------------------/
- // - Class/Member Variables -/
- // --------------------------/
-
- /**
- * Field _name.
- */
- private java.lang.String _name;
-
- /**
- * Field _value.
- */
- private java.lang.String _value;
-
- // ----------------/
- // - Constructors -/
- // ----------------/
-
- public Property()
- {
- super();
- }
-
- // -----------/
- // - Methods -/
- // -----------/
-
- /**
- * Returns the value of field 'name'.
- *
- * @return the value of field 'Name'.
- */
- public java.lang.String getName()
- {
- return this._name;
- }
-
- /**
- * Returns the value of field 'value'.
- *
- * @return the value of field 'Value'.
- */
- public java.lang.String getValue()
- {
- return this._value;
- }
-
- /**
- * 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;
+public class Property implements java.io.Serializable {
+
+
+ //--------------------------/
+ //- Class/Member Variables -/
+ //--------------------------/
+
+ /**
+ * Field _name.
+ */
+ private java.lang.String _name;
+
+ /**
+ * Field _value.
+ */
+ private java.lang.String _value;
+
+
+ //----------------/
+ //- Constructors -/
+ //----------------/
+
+ public Property() {
+ super();
+ }
+
+
+ //-----------/
+ //- Methods -/
+ //-----------/
+
+ /**
+ * Returns the value of field 'name'.
+ *
+ * @return the value of field 'Name'.
+ */
+ public java.lang.String getName(
+ ) {
+ return this._name;
+ }
+
+ /**
+ * Returns the value of field 'value'.
+ *
+ * @return the value of field 'Value'.
+ */
+ public java.lang.String getValue(
+ ) {
+ return this._value;
+ }
+
+ /**
+ * 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 'name'.
+ *
+ * @param name the value of field 'name'.
+ */
+ public void setName(
+ final java.lang.String name) {
+ this._name = name;
+ }
+
+ /**
+ * Sets the value of field 'value'.
+ *
+ * @param value the value of field 'value'.
+ */
+ public void setValue(
+ final java.lang.String value) {
+ this._value = value;
+ }
+
+ /**
+ * 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.binding.Property
+ */
+ public static jalview.binding.Property unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ return (jalview.binding.Property) Unmarshaller.unmarshal(jalview.binding.Property.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);
}
- 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 'name'.
- *
- * @param name
- * the value of field 'name'.
- */
- public void setName(final java.lang.String name)
- {
- this._name = name;
- }
-
- /**
- * Sets the value of field 'value'.
- *
- * @param value
- * the value of field 'value'.
- */
- public void setValue(final java.lang.String value)
- {
- this._value = value;
- }
-
- /**
- * 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.binding.Property
- */
- public static jalview.binding.Property unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException,
- org.exolab.castor.xml.ValidationException
- {
- return (jalview.binding.Property) Unmarshaller.unmarshal(
- jalview.binding.Property.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);
- }
}
/*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
- *
- * This file is part of Jalview.
- *
- * Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3
- * of the License, or (at your option) any later version.
- *
- * Jalview is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with 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.binding;
-//---------------------------------/
-//- Imported classes and packages -/
+ //---------------------------------/
+ //- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class Sequence extends SequenceType implements java.io.Serializable
+public class Sequence extends SequenceType
+implements java.io.Serializable
{
- // ----------------/
- // - Constructors -/
- // ----------------/
- public Sequence()
- {
- super();
- }
+ //----------------/
+ //- Constructors -/
+ //----------------/
+
+ public Sequence() {
+ super();
+ }
+
- // -----------/
- // - Methods -/
- // -----------/
+ //-----------/
+ //- Methods -/
+ //-----------/
- /**
- * 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;
+ /**
+ * 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;
}
- 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 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);
- }
+ /**
+ *
+ *
+ * @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);
+ }
- /**
- * 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.binding.SequenceType
- */
- public static jalview.binding.SequenceType unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException,
- org.exolab.castor.xml.ValidationException
- {
- return (jalview.binding.SequenceType) Unmarshaller.unmarshal(
- jalview.binding.Sequence.class, reader);
- }
+ /**
+ * 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.binding.SequenceType
+ */
+ public static jalview.binding.SequenceType unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ return (jalview.binding.SequenceType) Unmarshaller.unmarshal(jalview.binding.Sequence.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);
- }
+ /**
+ *
+ *
+ * @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);
+ }
}
/*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
- *
- * This file is part of Jalview.
- *
- * Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3
- * of the License, or (at your option) any later version.
- *
- * Jalview is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with 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.binding;
+ //---------------------------------/
+ //- Imported classes and packages -/
//---------------------------------/
-//- Imported classes and packages -/
-//---------------------------------/
-
-import jalview.util.MessageManager;
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
*
* @version $Revision$ $Date$
*/
-public class SequenceSet implements java.io.Serializable
-{
-
- // --------------------------/
- // - Class/Member Variables -/
- // --------------------------/
-
- /**
- * Field _gapChar.
- */
- private java.lang.String _gapChar;
-
- /**
- * Field _aligned.
- */
- private boolean _aligned;
-
- /**
- * keeps track of state for field: _aligned
- */
- private boolean _has_aligned;
-
- /**
- * Field _sequenceList.
- */
- private java.util.Vector _sequenceList;
-
- /**
- * Field _annotationList.
- */
- private java.util.Vector _annotationList;
-
- // ----------------/
- // - Constructors -/
- // ----------------/
-
- public SequenceSet()
- {
- super();
- this._sequenceList = new java.util.Vector();
- this._annotationList = new java.util.Vector();
- }
-
- // -----------/
- // - Methods -/
- // -----------/
-
- /**
- *
- *
- * @param vAnnotation
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void addAnnotation(final jalview.binding.Annotation vAnnotation)
- throws java.lang.IndexOutOfBoundsException
- {
- this._annotationList.addElement(vAnnotation);
- }
-
- /**
- *
- *
- * @param index
- * @param vAnnotation
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void addAnnotation(final int index,
- final jalview.binding.Annotation vAnnotation)
- throws java.lang.IndexOutOfBoundsException
- {
- this._annotationList.add(index, vAnnotation);
- }
-
- /**
- *
- *
- * @param vSequence
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void addSequence(final jalview.binding.Sequence vSequence)
- throws java.lang.IndexOutOfBoundsException
- {
- this._sequenceList.addElement(vSequence);
- }
-
- /**
- *
- *
- * @param index
- * @param vSequence
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void addSequence(final int index,
- final jalview.binding.Sequence vSequence)
- throws java.lang.IndexOutOfBoundsException
- {
- this._sequenceList.add(index, vSequence);
- }
-
- /**
- */
- public void deleteAligned()
- {
- this._has_aligned = false;
- }
-
- /**
- * Method enumerateAnnotation.
- *
- * @return an Enumeration over all jalview.binding.Annotation elements
- */
- public java.util.Enumeration enumerateAnnotation()
- {
- return this._annotationList.elements();
- }
-
- /**
- * Method enumerateSequence.
- *
- * @return an Enumeration over all jalview.binding.Sequence elements
- */
- public java.util.Enumeration enumerateSequence()
- {
- return this._sequenceList.elements();
- }
-
- /**
- * Returns the value of field 'aligned'.
- *
- * @return the value of field 'Aligned'.
- */
- public boolean getAligned()
- {
- return this._aligned;
- }
-
- /**
- * Method getAnnotation.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- * @return the value of the jalview.binding.Annotation at the given index
- */
- public jalview.binding.Annotation getAnnotation(final int index)
- throws java.lang.IndexOutOfBoundsException
- {
- // check bounds for index
- if (index < 0 || index >= this._annotationList.size())
- {
- throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
- "getAnnotation",
- Integer.valueOf(index).toString(),
- Integer.valueOf((this._annotationList.size() - 1)).toString()
- }));
- }
-
- return (jalview.binding.Annotation) _annotationList.get(index);
- }
-
- /**
- * Method getAnnotation.Returns the contents of the collection in an Array.
- * <p>
- * Note: Just in case the collection contents are changing in another thread,
- * we pass a 0-length Array of the correct type into the API call. This way we
- * <i>know</i> that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public jalview.binding.Annotation[] getAnnotation()
- {
- jalview.binding.Annotation[] array = new jalview.binding.Annotation[0];
- return (jalview.binding.Annotation[]) this._annotationList
- .toArray(array);
- }
-
- /**
- * Method getAnnotationCount.
- *
- * @return the size of this collection
- */
- public int getAnnotationCount()
- {
- return this._annotationList.size();
- }
-
- /**
- * Returns the value of field 'gapChar'.
- *
- * @return the value of field 'GapChar'.
- */
- public java.lang.String getGapChar()
- {
- return this._gapChar;
- }
-
- /**
- * Method getSequence.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- * @return the value of the jalview.binding.Sequence at the given index
- */
- public jalview.binding.Sequence getSequence(final int index)
- throws java.lang.IndexOutOfBoundsException
- {
- // check bounds for index
- if (index < 0 || index >= this._sequenceList.size())
- {
- throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
- "getSequence",
- Integer.valueOf(index).toString(),
- Integer.valueOf((this._sequenceList.size() - 1)).toString()
- }));
- }
-
- return (jalview.binding.Sequence) _sequenceList.get(index);
- }
-
- /**
- * Method getSequence.Returns the contents of the collection in an Array.
- * <p>
- * Note: Just in case the collection contents are changing in another thread,
- * we pass a 0-length Array of the correct type into the API call. This way we
- * <i>know</i> that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public jalview.binding.Sequence[] getSequence()
- {
- jalview.binding.Sequence[] array = new jalview.binding.Sequence[0];
- return (jalview.binding.Sequence[]) this._sequenceList.toArray(array);
- }
-
- /**
- * Method getSequenceCount.
- *
- * @return the size of this collection
- */
- public int getSequenceCount()
- {
- return this._sequenceList.size();
- }
-
- /**
- * Method hasAligned.
- *
- * @return true if at least one Aligned has been added
- */
- public boolean hasAligned()
- {
- return this._has_aligned;
- }
-
- /**
- * Returns the value of field 'aligned'.
- *
- * @return the value of field 'Aligned'.
- */
- public boolean isAligned()
- {
- return this._aligned;
- }
-
- /**
- * 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);
- }
-
- /**
- */
- public void removeAllAnnotation()
- {
- this._annotationList.clear();
- }
-
- /**
- */
- public void removeAllSequence()
- {
- this._sequenceList.clear();
- }
-
- /**
- * Method removeAnnotation.
- *
- * @param vAnnotation
- * @return true if the object was removed from the collection.
- */
- public boolean removeAnnotation(
- final jalview.binding.Annotation vAnnotation)
- {
- boolean removed = _annotationList.remove(vAnnotation);
- return removed;
- }
-
- /**
- * Method removeAnnotationAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public jalview.binding.Annotation removeAnnotationAt(final int index)
- {
- java.lang.Object obj = this._annotationList.remove(index);
- return (jalview.binding.Annotation) obj;
- }
-
- /**
- * Method removeSequence.
- *
- * @param vSequence
- * @return true if the object was removed from the collection.
- */
- public boolean removeSequence(final jalview.binding.Sequence vSequence)
- {
- boolean removed = _sequenceList.remove(vSequence);
- return removed;
- }
-
- /**
- * Method removeSequenceAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public jalview.binding.Sequence removeSequenceAt(final int index)
- {
- java.lang.Object obj = this._sequenceList.remove(index);
- return (jalview.binding.Sequence) obj;
- }
-
- /**
- * Sets the value of field 'aligned'.
- *
- * @param aligned
- * the value of field 'aligned'.
- */
- public void setAligned(final boolean aligned)
- {
- this._aligned = aligned;
- this._has_aligned = true;
- }
-
- /**
- *
- *
- * @param index
- * @param vAnnotation
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void setAnnotation(final int index,
- final jalview.binding.Annotation vAnnotation)
- throws java.lang.IndexOutOfBoundsException
- {
- // check bounds for index
- if (index < 0 || index >= this._annotationList.size())
- {
- throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
- "setAnnotation",
- Integer.valueOf(index).toString(),
- Integer.valueOf((this._annotationList.size() - 1)).toString()
- }));
- }
-
- this._annotationList.set(index, vAnnotation);
- }
-
- /**
- *
- *
- * @param vAnnotationArray
- */
- public void setAnnotation(
- final jalview.binding.Annotation[] vAnnotationArray)
- {
- // -- copy array
- _annotationList.clear();
-
- for (int i = 0; i < vAnnotationArray.length; i++)
- {
- this._annotationList.add(vAnnotationArray[i]);
- }
- }
-
- /**
- * Sets the value of field 'gapChar'.
- *
- * @param gapChar
- * the value of field 'gapChar'.
- */
- public void setGapChar(final java.lang.String gapChar)
- {
- this._gapChar = gapChar;
- }
-
- /**
- *
- *
- * @param index
- * @param vSequence
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void setSequence(final int index,
- final jalview.binding.Sequence vSequence)
- throws java.lang.IndexOutOfBoundsException
- {
- // check bounds for index
- if (index < 0 || index >= this._sequenceList.size())
- {
- throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
- "setSequence",
- Integer.valueOf(index).toString(),
- Integer.valueOf((this._sequenceList.size() - 1)).toString()
- }));
- }
-
- this._sequenceList.set(index, vSequence);
- }
-
- /**
- *
- *
- * @param vSequenceArray
- */
- public void setSequence(final jalview.binding.Sequence[] vSequenceArray)
- {
- // -- copy array
- _sequenceList.clear();
-
- for (int i = 0; i < vSequenceArray.length; i++)
- {
- this._sequenceList.add(vSequenceArray[i]);
- }
- }
-
- /**
- * 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.binding.SequenceSet
- */
- public static jalview.binding.SequenceSet unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException,
- org.exolab.castor.xml.ValidationException
- {
- return (jalview.binding.SequenceSet) Unmarshaller.unmarshal(
- jalview.binding.SequenceSet.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 SequenceSet implements java.io.Serializable {
+
+
+ //--------------------------/
+ //- Class/Member Variables -/
+ //--------------------------/
+
+ /**
+ * Field _gapChar.
+ */
+ private java.lang.String _gapChar;
+
+ /**
+ * Field _aligned.
+ */
+ private boolean _aligned;
+
+ /**
+ * keeps track of state for field: _aligned
+ */
+ private boolean _has_aligned;
+
+ /**
+ * Field _sequenceList.
+ */
+ private java.util.Vector _sequenceList;
+
+ /**
+ * Field _annotationList.
+ */
+ private java.util.Vector _annotationList;
+
+
+ //----------------/
+ //- Constructors -/
+ //----------------/
+
+ public SequenceSet() {
+ super();
+ this._sequenceList = new java.util.Vector();
+ this._annotationList = new java.util.Vector();
+ }
+
+
+ //-----------/
+ //- Methods -/
+ //-----------/
+
+ /**
+ *
+ *
+ * @param vAnnotation
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addAnnotation(
+ final jalview.binding.Annotation vAnnotation)
+ throws java.lang.IndexOutOfBoundsException {
+ this._annotationList.addElement(vAnnotation);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vAnnotation
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addAnnotation(
+ final int index,
+ final jalview.binding.Annotation vAnnotation)
+ throws java.lang.IndexOutOfBoundsException {
+ this._annotationList.add(index, vAnnotation);
+ }
+
+ /**
+ *
+ *
+ * @param vSequence
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addSequence(
+ final jalview.binding.Sequence vSequence)
+ throws java.lang.IndexOutOfBoundsException {
+ this._sequenceList.addElement(vSequence);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vSequence
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addSequence(
+ final int index,
+ final jalview.binding.Sequence vSequence)
+ throws java.lang.IndexOutOfBoundsException {
+ this._sequenceList.add(index, vSequence);
+ }
+
+ /**
+ */
+ public void deleteAligned(
+ ) {
+ this._has_aligned= false;
+ }
+
+ /**
+ * Method enumerateAnnotation.
+ *
+ * @return an Enumeration over all jalview.binding.Annotation
+ * elements
+ */
+ public java.util.Enumeration enumerateAnnotation(
+ ) {
+ return this._annotationList.elements();
+ }
+
+ /**
+ * Method enumerateSequence.
+ *
+ * @return an Enumeration over all jalview.binding.Sequence
+ * elements
+ */
+ public java.util.Enumeration enumerateSequence(
+ ) {
+ return this._sequenceList.elements();
+ }
+
+ /**
+ * Returns the value of field 'aligned'.
+ *
+ * @return the value of field 'Aligned'.
+ */
+ public boolean getAligned(
+ ) {
+ return this._aligned;
+ }
+
+ /**
+ * Method getAnnotation.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ * @return the value of the jalview.binding.Annotation at the
+ * given index
+ */
+ public jalview.binding.Annotation getAnnotation(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._annotationList.size()) {
+ throw new IndexOutOfBoundsException("getAnnotation: Index value '" + index + "' not in range [0.." + (this._annotationList.size() - 1) + "]");
+ }
+
+ return (jalview.binding.Annotation) _annotationList.get(index);
+ }
+
+ /**
+ * Method getAnnotation.Returns the contents of the collection
+ * in an Array. <p>Note: Just in case the collection contents
+ * are changing in another thread, we pass a 0-length Array of
+ * the correct type into the API call. This way we <i>know</i>
+ * that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public jalview.binding.Annotation[] getAnnotation(
+ ) {
+ jalview.binding.Annotation[] array = new jalview.binding.Annotation[0];
+ return (jalview.binding.Annotation[]) this._annotationList.toArray(array);
+ }
+
+ /**
+ * Method getAnnotationCount.
+ *
+ * @return the size of this collection
+ */
+ public int getAnnotationCount(
+ ) {
+ return this._annotationList.size();
+ }
+
+ /**
+ * Returns the value of field 'gapChar'.
+ *
+ * @return the value of field 'GapChar'.
+ */
+ public java.lang.String getGapChar(
+ ) {
+ return this._gapChar;
+ }
+
+ /**
+ * Method getSequence.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ * @return the value of the jalview.binding.Sequence at the
+ * given index
+ */
+ public jalview.binding.Sequence getSequence(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._sequenceList.size()) {
+ throw new IndexOutOfBoundsException("getSequence: Index value '" + index + "' not in range [0.." + (this._sequenceList.size() - 1) + "]");
+ }
+
+ return (jalview.binding.Sequence) _sequenceList.get(index);
+ }
+
+ /**
+ * Method getSequence.Returns the contents of the collection in
+ * an Array. <p>Note: Just in case the collection contents
+ * are changing in another thread, we pass a 0-length Array of
+ * the correct type into the API call. This way we <i>know</i>
+ * that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public jalview.binding.Sequence[] getSequence(
+ ) {
+ jalview.binding.Sequence[] array = new jalview.binding.Sequence[0];
+ return (jalview.binding.Sequence[]) this._sequenceList.toArray(array);
+ }
+
+ /**
+ * Method getSequenceCount.
+ *
+ * @return the size of this collection
+ */
+ public int getSequenceCount(
+ ) {
+ return this._sequenceList.size();
+ }
+
+ /**
+ * Method hasAligned.
+ *
+ * @return true if at least one Aligned has been added
+ */
+ public boolean hasAligned(
+ ) {
+ return this._has_aligned;
+ }
+
+ /**
+ * Returns the value of field 'aligned'.
+ *
+ * @return the value of field 'Aligned'.
+ */
+ public boolean isAligned(
+ ) {
+ return this._aligned;
+ }
+
+ /**
+ * 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);
+ }
+
+ /**
+ */
+ public void removeAllAnnotation(
+ ) {
+ this._annotationList.clear();
+ }
+
+ /**
+ */
+ public void removeAllSequence(
+ ) {
+ this._sequenceList.clear();
+ }
+
+ /**
+ * Method removeAnnotation.
+ *
+ * @param vAnnotation
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeAnnotation(
+ final jalview.binding.Annotation vAnnotation) {
+ boolean removed = _annotationList.remove(vAnnotation);
+ return removed;
+ }
+
+ /**
+ * Method removeAnnotationAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public jalview.binding.Annotation removeAnnotationAt(
+ final int index) {
+ java.lang.Object obj = this._annotationList.remove(index);
+ return (jalview.binding.Annotation) obj;
+ }
+
+ /**
+ * Method removeSequence.
+ *
+ * @param vSequence
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeSequence(
+ final jalview.binding.Sequence vSequence) {
+ boolean removed = _sequenceList.remove(vSequence);
+ return removed;
+ }
+
+ /**
+ * Method removeSequenceAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public jalview.binding.Sequence removeSequenceAt(
+ final int index) {
+ java.lang.Object obj = this._sequenceList.remove(index);
+ return (jalview.binding.Sequence) obj;
+ }
+
+ /**
+ * Sets the value of field 'aligned'.
+ *
+ * @param aligned the value of field 'aligned'.
+ */
+ public void setAligned(
+ final boolean aligned) {
+ this._aligned = aligned;
+ this._has_aligned = true;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vAnnotation
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setAnnotation(
+ final int index,
+ final jalview.binding.Annotation vAnnotation)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._annotationList.size()) {
+ throw new IndexOutOfBoundsException("setAnnotation: Index value '" + index + "' not in range [0.." + (this._annotationList.size() - 1) + "]");
+ }
+
+ this._annotationList.set(index, vAnnotation);
+ }
+
+ /**
+ *
+ *
+ * @param vAnnotationArray
+ */
+ public void setAnnotation(
+ final jalview.binding.Annotation[] vAnnotationArray) {
+ //-- copy array
+ _annotationList.clear();
+
+ for (int i = 0; i < vAnnotationArray.length; i++) {
+ this._annotationList.add(vAnnotationArray[i]);
+ }
+ }
+
+ /**
+ * Sets the value of field 'gapChar'.
+ *
+ * @param gapChar the value of field 'gapChar'.
+ */
+ public void setGapChar(
+ final java.lang.String gapChar) {
+ this._gapChar = gapChar;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vSequence
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setSequence(
+ final int index,
+ final jalview.binding.Sequence vSequence)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._sequenceList.size()) {
+ throw new IndexOutOfBoundsException("setSequence: Index value '" + index + "' not in range [0.." + (this._sequenceList.size() - 1) + "]");
+ }
+
+ this._sequenceList.set(index, vSequence);
+ }
+
+ /**
+ *
+ *
+ * @param vSequenceArray
+ */
+ public void setSequence(
+ final jalview.binding.Sequence[] vSequenceArray) {
+ //-- copy array
+ _sequenceList.clear();
+
+ for (int i = 0; i < vSequenceArray.length; i++) {
+ this._sequenceList.add(vSequenceArray[i]);
+ }
+ }
+
+ /**
+ * 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.binding.SequenceSet
+ */
+ public static jalview.binding.SequenceSet unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ return (jalview.binding.SequenceSet) Unmarshaller.unmarshal(jalview.binding.SequenceSet.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);
+ }
}
/*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
- *
- * This file is part of Jalview.
- *
- * Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3
- * of the License, or (at your option) any later version.
- *
- * Jalview is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with 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.binding;
-//---------------------------------/
-//- Imported classes and packages -/
+ //---------------------------------/
+ //- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class SequenceType implements java.io.Serializable
-{
-
- // --------------------------/
- // - Class/Member Variables -/
- // --------------------------/
-
- /**
- * Field _id.
- */
- private java.lang.String _id;
-
- /**
- * Field _sequence.
- */
- private java.lang.String _sequence;
-
- /**
- * Field _name.
- */
- private java.lang.String _name;
-
- // ----------------/
- // - Constructors -/
- // ----------------/
-
- public SequenceType()
- {
- super();
- }
-
- // -----------/
- // - Methods -/
- // -----------/
-
- /**
- * Returns the value of field 'id'.
- *
- * @return the value of field 'Id'.
- */
- public java.lang.String getId()
- {
- return this._id;
- }
-
- /**
- * Returns the value of field 'name'.
- *
- * @return the value of field 'Name'.
- */
- public java.lang.String getName()
- {
- return this._name;
- }
-
- /**
- * Returns the value of field 'sequence'.
- *
- * @return the value of field 'Sequence'.
- */
- public java.lang.String getSequence()
- {
- return this._sequence;
- }
-
- /**
- * 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;
+public class SequenceType implements java.io.Serializable {
+
+
+ //--------------------------/
+ //- Class/Member Variables -/
+ //--------------------------/
+
+ /**
+ * Field _id.
+ */
+ private java.lang.String _id;
+
+ /**
+ * Field _sequence.
+ */
+ private java.lang.String _sequence;
+
+ /**
+ * Field _name.
+ */
+ private java.lang.String _name;
+
+
+ //----------------/
+ //- Constructors -/
+ //----------------/
+
+ public SequenceType() {
+ super();
+ }
+
+
+ //-----------/
+ //- Methods -/
+ //-----------/
+
+ /**
+ * Returns the value of field 'id'.
+ *
+ * @return the value of field 'Id'.
+ */
+ public java.lang.String getId(
+ ) {
+ return this._id;
+ }
+
+ /**
+ * Returns the value of field 'name'.
+ *
+ * @return the value of field 'Name'.
+ */
+ public java.lang.String getName(
+ ) {
+ return this._name;
+ }
+
+ /**
+ * Returns the value of field 'sequence'.
+ *
+ * @return the value of field 'Sequence'.
+ */
+ public java.lang.String getSequence(
+ ) {
+ return this._sequence;
+ }
+
+ /**
+ * 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 'id'.
+ *
+ * @param id the value of field 'id'.
+ */
+ public void setId(
+ final java.lang.String id) {
+ this._id = id;
+ }
+
+ /**
+ * Sets the value of field 'name'.
+ *
+ * @param name the value of field 'name'.
+ */
+ public void setName(
+ final java.lang.String name) {
+ this._name = name;
+ }
+
+ /**
+ * Sets the value of field 'sequence'.
+ *
+ * @param sequence the value of field 'sequence'.
+ */
+ public void setSequence(
+ final java.lang.String sequence) {
+ this._sequence = sequence;
+ }
+
+ /**
+ * 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.binding.SequenceType
+ */
+ public static jalview.binding.SequenceType unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ return (jalview.binding.SequenceType) Unmarshaller.unmarshal(jalview.binding.SequenceType.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);
}
- 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 'id'.
- *
- * @param id
- * the value of field 'id'.
- */
- public void setId(final java.lang.String id)
- {
- this._id = id;
- }
-
- /**
- * Sets the value of field 'name'.
- *
- * @param name
- * the value of field 'name'.
- */
- public void setName(final java.lang.String name)
- {
- this._name = name;
- }
-
- /**
- * Sets the value of field 'sequence'.
- *
- * @param sequence
- * the value of field 'sequence'.
- */
- public void setSequence(final java.lang.String sequence)
- {
- this._sequence = sequence;
- }
-
- /**
- * 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.binding.SequenceType
- */
- public static jalview.binding.SequenceType unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException,
- org.exolab.castor.xml.ValidationException
- {
- return (jalview.binding.SequenceType) Unmarshaller.unmarshal(
- jalview.binding.SequenceType.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);
- }
}
/*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
- *
- * This file is part of Jalview.
- *
- * Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3
- * of the License, or (at your option) any later version.
- *
- * Jalview is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with 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.binding;
-//---------------------------------/
-//- Imported classes and packages -/
+ //---------------------------------/
+ //- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class Setting implements java.io.Serializable
-{
-
- // --------------------------/
- // - Class/Member Variables -/
- // --------------------------/
-
- /**
- * Field _type.
- */
- private java.lang.String _type;
-
- /**
- * Field _colour.
- */
- private int _colour;
-
- /**
- * keeps track of state for field: _colour
- */
- private boolean _has_colour;
-
- /**
- * Field _display.
- */
- private boolean _display;
-
- /**
- * keeps track of state for field: _display
- */
- private boolean _has_display;
-
- // ----------------/
- // - Constructors -/
- // ----------------/
-
- public Setting()
- {
- super();
- }
-
- // -----------/
- // - Methods -/
- // -----------/
-
- /**
+public class Setting implements java.io.Serializable {
+
+
+ //--------------------------/
+ //- Class/Member Variables -/
+ //--------------------------/
+
+ /**
+ * Field _type.
+ */
+ private java.lang.String _type;
+
+ /**
+ * Field _colour.
+ */
+ private int _colour;
+
+ /**
+ * keeps track of state for field: _colour
+ */
+ private boolean _has_colour;
+
+ /**
+ * Field _display.
+ */
+ private boolean _display;
+
+ /**
+ * keeps track of state for field: _display
+ */
+ private boolean _has_display;
+
+
+ //----------------/
+ //- Constructors -/
+ //----------------/
+
+ public Setting() {
+ super();
+ }
+
+
+ //-----------/
+ //- Methods -/
+ //-----------/
+
+ /**
*/
- public void deleteColour()
- {
- this._has_colour = false;
- }
+ public void deleteColour(
+ ) {
+ this._has_colour= false;
+ }
+
+ /**
+ */
+ public void deleteDisplay(
+ ) {
+ this._has_display= false;
+ }
+
+ /**
+ * Returns the value of field 'colour'.
+ *
+ * @return the value of field 'Colour'.
+ */
+ public int getColour(
+ ) {
+ return this._colour;
+ }
+
+ /**
+ * Returns the value of field 'display'.
+ *
+ * @return the value of field 'Display'.
+ */
+ public boolean getDisplay(
+ ) {
+ return this._display;
+ }
+
+ /**
+ * Returns the value of field 'type'.
+ *
+ * @return the value of field 'Type'.
+ */
+ public java.lang.String getType(
+ ) {
+ return this._type;
+ }
+
+ /**
+ * Method hasColour.
+ *
+ * @return true if at least one Colour has been added
+ */
+ public boolean hasColour(
+ ) {
+ return this._has_colour;
+ }
+
+ /**
+ * Method hasDisplay.
+ *
+ * @return true if at least one Display has been added
+ */
+ public boolean hasDisplay(
+ ) {
+ return this._has_display;
+ }
+
+ /**
+ * Returns the value of field 'display'.
+ *
+ * @return the value of field 'Display'.
+ */
+ public boolean isDisplay(
+ ) {
+ return this._display;
+ }
+
+ /**
+ * 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 'colour'.
+ *
+ * @param colour the value of field 'colour'.
+ */
+ public void setColour(
+ final int colour) {
+ this._colour = colour;
+ this._has_colour = true;
+ }
+
+ /**
+ * Sets the value of field 'display'.
+ *
+ * @param display the value of field 'display'.
+ */
+ public void setDisplay(
+ final boolean display) {
+ this._display = display;
+ this._has_display = true;
+ }
+
+ /**
+ * Sets the value of field 'type'.
+ *
+ * @param type the value of field 'type'.
+ */
+ public void setType(
+ final java.lang.String type) {
+ this._type = type;
+ }
+
+ /**
+ * 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.binding.Setting
+ */
+ public static jalview.binding.Setting unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ return (jalview.binding.Setting) Unmarshaller.unmarshal(jalview.binding.Setting.class, reader);
+ }
- /**
+ /**
+ *
+ *
+ * @throws org.exolab.castor.xml.ValidationException if this
+ * object is an invalid instance according to the schema
*/
- public void deleteDisplay()
- {
- this._has_display = false;
- }
-
- /**
- * Returns the value of field 'colour'.
- *
- * @return the value of field 'Colour'.
- */
- public int getColour()
- {
- return this._colour;
- }
-
- /**
- * Returns the value of field 'display'.
- *
- * @return the value of field 'Display'.
- */
- public boolean getDisplay()
- {
- return this._display;
- }
-
- /**
- * Returns the value of field 'type'.
- *
- * @return the value of field 'Type'.
- */
- public java.lang.String getType()
- {
- return this._type;
- }
-
- /**
- * Method hasColour.
- *
- * @return true if at least one Colour has been added
- */
- public boolean hasColour()
- {
- return this._has_colour;
- }
-
- /**
- * Method hasDisplay.
- *
- * @return true if at least one Display has been added
- */
- public boolean hasDisplay()
- {
- return this._has_display;
- }
-
- /**
- * Returns the value of field 'display'.
- *
- * @return the value of field 'Display'.
- */
- public boolean isDisplay()
- {
- return this._display;
- }
-
- /**
- * 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;
+ public void validate(
+ )
+ throws org.exolab.castor.xml.ValidationException {
+ org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
+ validator.validate(this);
}
- 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 'colour'.
- *
- * @param colour
- * the value of field 'colour'.
- */
- public void setColour(final int colour)
- {
- this._colour = colour;
- this._has_colour = true;
- }
-
- /**
- * Sets the value of field 'display'.
- *
- * @param display
- * the value of field 'display'.
- */
- public void setDisplay(final boolean display)
- {
- this._display = display;
- this._has_display = true;
- }
-
- /**
- * Sets the value of field 'type'.
- *
- * @param type
- * the value of field 'type'.
- */
- public void setType(final java.lang.String type)
- {
- this._type = type;
- }
-
- /**
- * 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.binding.Setting
- */
- public static jalview.binding.Setting unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException,
- org.exolab.castor.xml.ValidationException
- {
- return (jalview.binding.Setting) Unmarshaller.unmarshal(
- jalview.binding.Setting.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);
- }
}
/*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
- *
- * This file is part of Jalview.
- *
- * Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3
- * of the License, or (at your option) any later version.
- *
- * Jalview is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with 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.binding;
-//---------------------------------/
-//- Imported classes and packages -/
+ //---------------------------------/
+ //- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class Tree implements java.io.Serializable
-{
-
- // --------------------------/
- // - Class/Member Variables -/
- // --------------------------/
-
- /**
- * Field _width.
- */
- private int _width;
-
- /**
- * keeps track of state for field: _width
- */
- private boolean _has_width;
-
- /**
- * Field _height.
- */
- private int _height;
-
- /**
- * keeps track of state for field: _height
- */
- private boolean _has_height;
-
- /**
- * Field _xpos.
- */
- private int _xpos;
-
- /**
- * keeps track of state for field: _xpos
- */
- private boolean _has_xpos;
-
- /**
- * Field _ypos.
- */
- private int _ypos;
-
- /**
- * keeps track of state for field: _ypos
- */
- private boolean _has_ypos;
-
- /**
- * Field _fontName.
- */
- private java.lang.String _fontName;
-
- /**
- * Field _fontSize.
- */
- private int _fontSize;
-
- /**
- * keeps track of state for field: _fontSize
- */
- private boolean _has_fontSize;
-
- /**
- * Field _fontStyle.
- */
- private int _fontStyle;
-
- /**
- * keeps track of state for field: _fontStyle
- */
- private boolean _has_fontStyle;
-
- /**
- * Field _threshold.
- */
- private float _threshold;
-
- /**
- * keeps track of state for field: _threshold
- */
- private boolean _has_threshold;
-
- /**
- * Field _showBootstrap.
- */
- private boolean _showBootstrap;
-
- /**
- * keeps track of state for field: _showBootstrap
- */
- private boolean _has_showBootstrap;
-
- /**
- * Field _showDistances.
- */
- private boolean _showDistances;
-
- /**
- * keeps track of state for field: _showDistances
- */
- private boolean _has_showDistances;
-
- /**
- * Field _markUnlinked.
- */
- private boolean _markUnlinked;
-
- /**
- * keeps track of state for field: _markUnlinked
- */
- private boolean _has_markUnlinked;
-
- /**
- * Field _fitToWindow.
- */
- private boolean _fitToWindow;
-
- /**
- * keeps track of state for field: _fitToWindow
- */
- private boolean _has_fitToWindow;
-
- /**
- * Field _currentTree.
- */
- private boolean _currentTree;
-
- /**
- * keeps track of state for field: _currentTree
- */
- private boolean _has_currentTree;
-
- /**
- * Field _title.
- */
- private java.lang.String _title;
-
- /**
- * Field _newick.
- */
- private java.lang.String _newick;
-
- // ----------------/
- // - Constructors -/
- // ----------------/
-
- public Tree()
- {
- super();
- }
-
- // -----------/
- // - Methods -/
- // -----------/
-
- /**
- */
- public void deleteCurrentTree()
- {
- this._has_currentTree = false;
- }
-
- /**
- */
- public void deleteFitToWindow()
- {
- this._has_fitToWindow = false;
- }
-
- /**
- */
- public void deleteFontSize()
- {
- this._has_fontSize = false;
- }
-
- /**
- */
- public void deleteFontStyle()
- {
- this._has_fontStyle = false;
- }
-
- /**
- */
- public void deleteHeight()
- {
- this._has_height = false;
- }
-
- /**
- */
- public void deleteMarkUnlinked()
- {
- this._has_markUnlinked = false;
- }
-
- /**
- */
- public void deleteShowBootstrap()
- {
- this._has_showBootstrap = false;
- }
-
- /**
- */
- public void deleteShowDistances()
- {
- this._has_showDistances = false;
- }
-
- /**
- */
- public void deleteThreshold()
- {
- this._has_threshold = false;
- }
-
- /**
- */
- public void deleteWidth()
- {
- this._has_width = false;
- }
-
- /**
- */
- public void deleteXpos()
- {
- this._has_xpos = false;
- }
-
- /**
- */
- public void deleteYpos()
- {
- this._has_ypos = false;
- }
-
- /**
- * Returns the value of field 'currentTree'.
- *
- * @return the value of field 'CurrentTree'.
- */
- public boolean getCurrentTree()
- {
- return this._currentTree;
- }
-
- /**
- * Returns the value of field 'fitToWindow'.
- *
- * @return the value of field 'FitToWindow'.
- */
- public boolean getFitToWindow()
- {
- return this._fitToWindow;
- }
-
- /**
- * Returns the value of field 'fontName'.
- *
- * @return the value of field 'FontName'.
- */
- public java.lang.String getFontName()
- {
- return this._fontName;
- }
-
- /**
- * Returns the value of field 'fontSize'.
- *
- * @return the value of field 'FontSize'.
- */
- public int getFontSize()
- {
- return this._fontSize;
- }
-
- /**
- * Returns the value of field 'fontStyle'.
- *
- * @return the value of field 'FontStyle'.
- */
- public int getFontStyle()
- {
- return this._fontStyle;
- }
-
- /**
- * Returns the value of field 'height'.
- *
- * @return the value of field 'Height'.
- */
- public int getHeight()
- {
- return this._height;
- }
-
- /**
- * Returns the value of field 'markUnlinked'.
- *
- * @return the value of field 'MarkUnlinked'.
- */
- public boolean getMarkUnlinked()
- {
- return this._markUnlinked;
- }
-
- /**
- * Returns the value of field 'newick'.
- *
- * @return the value of field 'Newick'.
- */
- public java.lang.String getNewick()
- {
- return this._newick;
- }
-
- /**
- * Returns the value of field 'showBootstrap'.
- *
- * @return the value of field 'ShowBootstrap'.
- */
- public boolean getShowBootstrap()
- {
- return this._showBootstrap;
- }
-
- /**
- * Returns the value of field 'showDistances'.
- *
- * @return the value of field 'ShowDistances'.
- */
- public boolean getShowDistances()
- {
- return this._showDistances;
- }
-
- /**
- * Returns the value of field 'threshold'.
- *
- * @return the value of field 'Threshold'.
- */
- public float getThreshold()
- {
- return this._threshold;
- }
-
- /**
- * Returns the value of field 'title'.
- *
- * @return the value of field 'Title'.
- */
- public java.lang.String getTitle()
- {
- return this._title;
- }
-
- /**
- * Returns the value of field 'width'.
- *
- * @return the value of field 'Width'.
- */
- public int getWidth()
- {
- return this._width;
- }
-
- /**
- * Returns the value of field 'xpos'.
- *
- * @return the value of field 'Xpos'.
- */
- public int getXpos()
- {
- return this._xpos;
- }
-
- /**
- * Returns the value of field 'ypos'.
- *
- * @return the value of field 'Ypos'.
- */
- public int getYpos()
- {
- return this._ypos;
- }
-
- /**
- * Method hasCurrentTree.
- *
- * @return true if at least one CurrentTree has been added
- */
- public boolean hasCurrentTree()
- {
- return this._has_currentTree;
- }
-
- /**
- * Method hasFitToWindow.
- *
- * @return true if at least one FitToWindow has been added
- */
- public boolean hasFitToWindow()
- {
- return this._has_fitToWindow;
- }
-
- /**
- * Method hasFontSize.
- *
- * @return true if at least one FontSize has been added
- */
- public boolean hasFontSize()
- {
- return this._has_fontSize;
- }
-
- /**
- * Method hasFontStyle.
- *
- * @return true if at least one FontStyle has been added
- */
- public boolean hasFontStyle()
- {
- return this._has_fontStyle;
- }
-
- /**
- * Method hasHeight.
- *
- * @return true if at least one Height has been added
- */
- public boolean hasHeight()
- {
- return this._has_height;
- }
-
- /**
- * Method hasMarkUnlinked.
- *
- * @return true if at least one MarkUnlinked has been added
- */
- public boolean hasMarkUnlinked()
- {
- return this._has_markUnlinked;
- }
-
- /**
- * Method hasShowBootstrap.
- *
- * @return true if at least one ShowBootstrap has been added
- */
- public boolean hasShowBootstrap()
- {
- return this._has_showBootstrap;
- }
-
- /**
- * Method hasShowDistances.
- *
- * @return true if at least one ShowDistances has been added
- */
- public boolean hasShowDistances()
- {
- return this._has_showDistances;
- }
-
- /**
- * Method hasThreshold.
- *
- * @return true if at least one Threshold has been added
- */
- public boolean hasThreshold()
- {
- return this._has_threshold;
- }
-
- /**
- * Method hasWidth.
- *
- * @return true if at least one Width has been added
- */
- public boolean hasWidth()
- {
- return this._has_width;
- }
-
- /**
- * Method hasXpos.
- *
- * @return true if at least one Xpos has been added
- */
- public boolean hasXpos()
- {
- return this._has_xpos;
- }
-
- /**
- * Method hasYpos.
- *
- * @return true if at least one Ypos has been added
- */
- public boolean hasYpos()
- {
- return this._has_ypos;
- }
-
- /**
- * Returns the value of field 'currentTree'.
- *
- * @return the value of field 'CurrentTree'.
- */
- public boolean isCurrentTree()
- {
- return this._currentTree;
- }
-
- /**
- * Returns the value of field 'fitToWindow'.
- *
- * @return the value of field 'FitToWindow'.
- */
- public boolean isFitToWindow()
- {
- return this._fitToWindow;
- }
-
- /**
- * Returns the value of field 'markUnlinked'.
- *
- * @return the value of field 'MarkUnlinked'.
- */
- public boolean isMarkUnlinked()
- {
- return this._markUnlinked;
- }
-
- /**
- * Returns the value of field 'showBootstrap'.
- *
- * @return the value of field 'ShowBootstrap'.
- */
- public boolean isShowBootstrap()
- {
- return this._showBootstrap;
- }
-
- /**
- * Returns the value of field 'showDistances'.
- *
- * @return the value of field 'ShowDistances'.
- */
- public boolean isShowDistances()
- {
- return this._showDistances;
- }
-
- /**
- * 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 'currentTree'.
- *
- * @param currentTree
- * the value of field 'currentTree'.
- */
- public void setCurrentTree(final boolean currentTree)
- {
- this._currentTree = currentTree;
- this._has_currentTree = true;
- }
-
- /**
- * Sets the value of field 'fitToWindow'.
- *
- * @param fitToWindow
- * the value of field 'fitToWindow'.
- */
- public void setFitToWindow(final boolean fitToWindow)
- {
- this._fitToWindow = fitToWindow;
- this._has_fitToWindow = true;
- }
-
- /**
- * Sets the value of field 'fontName'.
- *
- * @param fontName
- * the value of field 'fontName'.
- */
- public void setFontName(final java.lang.String fontName)
- {
- this._fontName = fontName;
- }
-
- /**
- * Sets the value of field 'fontSize'.
- *
- * @param fontSize
- * the value of field 'fontSize'.
- */
- public void setFontSize(final int fontSize)
- {
- this._fontSize = fontSize;
- this._has_fontSize = true;
- }
-
- /**
- * Sets the value of field 'fontStyle'.
- *
- * @param fontStyle
- * the value of field 'fontStyle'.
- */
- public void setFontStyle(final int fontStyle)
- {
- this._fontStyle = fontStyle;
- this._has_fontStyle = true;
- }
-
- /**
- * Sets the value of field 'height'.
- *
- * @param height
- * the value of field 'height'.
- */
- public void setHeight(final int height)
- {
- this._height = height;
- this._has_height = true;
- }
-
- /**
- * Sets the value of field 'markUnlinked'.
- *
- * @param markUnlinked
- * the value of field 'markUnlinked'.
- */
- public void setMarkUnlinked(final boolean markUnlinked)
- {
- this._markUnlinked = markUnlinked;
- this._has_markUnlinked = true;
- }
-
- /**
- * Sets the value of field 'newick'.
- *
- * @param newick
- * the value of field 'newick'.
- */
- public void setNewick(final java.lang.String newick)
- {
- this._newick = newick;
- }
-
- /**
- * Sets the value of field 'showBootstrap'.
- *
- * @param showBootstrap
- * the value of field 'showBootstrap'.
- */
- public void setShowBootstrap(final boolean showBootstrap)
- {
- this._showBootstrap = showBootstrap;
- this._has_showBootstrap = true;
- }
-
- /**
- * Sets the value of field 'showDistances'.
- *
- * @param showDistances
- * the value of field 'showDistances'.
- */
- public void setShowDistances(final boolean showDistances)
- {
- this._showDistances = showDistances;
- this._has_showDistances = 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;
- }
-
- /**
- * Sets the value of field 'title'.
- *
- * @param title
- * the value of field 'title'.
- */
- public void setTitle(final java.lang.String title)
- {
- this._title = title;
- }
-
- /**
- * Sets the value of field 'width'.
- *
- * @param width
- * the value of field 'width'.
- */
- public void setWidth(final int width)
- {
- this._width = width;
- this._has_width = true;
- }
-
- /**
- * Sets the value of field 'xpos'.
- *
- * @param xpos
- * the value of field 'xpos'.
- */
- public void setXpos(final int xpos)
- {
- this._xpos = xpos;
- this._has_xpos = true;
- }
-
- /**
- * Sets the value of field 'ypos'.
- *
- * @param ypos
- * the value of field 'ypos'.
- */
- public void setYpos(final int ypos)
- {
- this._ypos = ypos;
- this._has_ypos = 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.binding.Tree
- */
- public static jalview.binding.Tree unmarshal(final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException,
- org.exolab.castor.xml.ValidationException
- {
- return (jalview.binding.Tree) Unmarshaller.unmarshal(
- jalview.binding.Tree.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 Tree implements java.io.Serializable {
+
+
+ //--------------------------/
+ //- Class/Member Variables -/
+ //--------------------------/
+
+ /**
+ * Field _width.
+ */
+ private int _width;
+
+ /**
+ * keeps track of state for field: _width
+ */
+ private boolean _has_width;
+
+ /**
+ * Field _height.
+ */
+ private int _height;
+
+ /**
+ * keeps track of state for field: _height
+ */
+ private boolean _has_height;
+
+ /**
+ * Field _xpos.
+ */
+ private int _xpos;
+
+ /**
+ * keeps track of state for field: _xpos
+ */
+ private boolean _has_xpos;
+
+ /**
+ * Field _ypos.
+ */
+ private int _ypos;
+
+ /**
+ * keeps track of state for field: _ypos
+ */
+ private boolean _has_ypos;
+
+ /**
+ * Field _fontName.
+ */
+ private java.lang.String _fontName;
+
+ /**
+ * Field _fontSize.
+ */
+ private int _fontSize;
+
+ /**
+ * keeps track of state for field: _fontSize
+ */
+ private boolean _has_fontSize;
+
+ /**
+ * Field _fontStyle.
+ */
+ private int _fontStyle;
+
+ /**
+ * keeps track of state for field: _fontStyle
+ */
+ private boolean _has_fontStyle;
+
+ /**
+ * Field _threshold.
+ */
+ private float _threshold;
+
+ /**
+ * keeps track of state for field: _threshold
+ */
+ private boolean _has_threshold;
+
+ /**
+ * Field _showBootstrap.
+ */
+ private boolean _showBootstrap;
+
+ /**
+ * keeps track of state for field: _showBootstrap
+ */
+ private boolean _has_showBootstrap;
+
+ /**
+ * Field _showDistances.
+ */
+ private boolean _showDistances;
+
+ /**
+ * keeps track of state for field: _showDistances
+ */
+ private boolean _has_showDistances;
+
+ /**
+ * Field _markUnlinked.
+ */
+ private boolean _markUnlinked;
+
+ /**
+ * keeps track of state for field: _markUnlinked
+ */
+ private boolean _has_markUnlinked;
+
+ /**
+ * Field _fitToWindow.
+ */
+ private boolean _fitToWindow;
+
+ /**
+ * keeps track of state for field: _fitToWindow
+ */
+ private boolean _has_fitToWindow;
+
+ /**
+ * Field _currentTree.
+ */
+ private boolean _currentTree;
+
+ /**
+ * keeps track of state for field: _currentTree
+ */
+ private boolean _has_currentTree;
+
+ /**
+ * Field _title.
+ */
+ private java.lang.String _title;
+
+ /**
+ * Field _newick.
+ */
+ private java.lang.String _newick;
+
+
+ //----------------/
+ //- Constructors -/
+ //----------------/
+
+ public Tree() {
+ super();
+ }
+
+
+ //-----------/
+ //- Methods -/
+ //-----------/
+
+ /**
+ */
+ public void deleteCurrentTree(
+ ) {
+ this._has_currentTree= false;
+ }
+
+ /**
+ */
+ public void deleteFitToWindow(
+ ) {
+ this._has_fitToWindow= false;
+ }
+
+ /**
+ */
+ public void deleteFontSize(
+ ) {
+ this._has_fontSize= false;
+ }
+
+ /**
+ */
+ public void deleteFontStyle(
+ ) {
+ this._has_fontStyle= false;
+ }
+
+ /**
+ */
+ public void deleteHeight(
+ ) {
+ this._has_height= false;
+ }
+
+ /**
+ */
+ public void deleteMarkUnlinked(
+ ) {
+ this._has_markUnlinked= false;
+ }
+
+ /**
+ */
+ public void deleteShowBootstrap(
+ ) {
+ this._has_showBootstrap= false;
+ }
+
+ /**
+ */
+ public void deleteShowDistances(
+ ) {
+ this._has_showDistances= false;
+ }
+
+ /**
+ */
+ public void deleteThreshold(
+ ) {
+ this._has_threshold= false;
+ }
+
+ /**
+ */
+ public void deleteWidth(
+ ) {
+ this._has_width= false;
+ }
+
+ /**
+ */
+ public void deleteXpos(
+ ) {
+ this._has_xpos= false;
+ }
+
+ /**
+ */
+ public void deleteYpos(
+ ) {
+ this._has_ypos= false;
+ }
+
+ /**
+ * Returns the value of field 'currentTree'.
+ *
+ * @return the value of field 'CurrentTree'.
+ */
+ public boolean getCurrentTree(
+ ) {
+ return this._currentTree;
+ }
+
+ /**
+ * Returns the value of field 'fitToWindow'.
+ *
+ * @return the value of field 'FitToWindow'.
+ */
+ public boolean getFitToWindow(
+ ) {
+ return this._fitToWindow;
+ }
+
+ /**
+ * Returns the value of field 'fontName'.
+ *
+ * @return the value of field 'FontName'.
+ */
+ public java.lang.String getFontName(
+ ) {
+ return this._fontName;
+ }
+
+ /**
+ * Returns the value of field 'fontSize'.
+ *
+ * @return the value of field 'FontSize'.
+ */
+ public int getFontSize(
+ ) {
+ return this._fontSize;
+ }
+
+ /**
+ * Returns the value of field 'fontStyle'.
+ *
+ * @return the value of field 'FontStyle'.
+ */
+ public int getFontStyle(
+ ) {
+ return this._fontStyle;
+ }
+
+ /**
+ * Returns the value of field 'height'.
+ *
+ * @return the value of field 'Height'.
+ */
+ public int getHeight(
+ ) {
+ return this._height;
+ }
+
+ /**
+ * Returns the value of field 'markUnlinked'.
+ *
+ * @return the value of field 'MarkUnlinked'.
+ */
+ public boolean getMarkUnlinked(
+ ) {
+ return this._markUnlinked;
+ }
+
+ /**
+ * Returns the value of field 'newick'.
+ *
+ * @return the value of field 'Newick'.
+ */
+ public java.lang.String getNewick(
+ ) {
+ return this._newick;
+ }
+
+ /**
+ * Returns the value of field 'showBootstrap'.
+ *
+ * @return the value of field 'ShowBootstrap'.
+ */
+ public boolean getShowBootstrap(
+ ) {
+ return this._showBootstrap;
+ }
+
+ /**
+ * Returns the value of field 'showDistances'.
+ *
+ * @return the value of field 'ShowDistances'.
+ */
+ public boolean getShowDistances(
+ ) {
+ return this._showDistances;
+ }
+
+ /**
+ * Returns the value of field 'threshold'.
+ *
+ * @return the value of field 'Threshold'.
+ */
+ public float getThreshold(
+ ) {
+ return this._threshold;
+ }
+
+ /**
+ * Returns the value of field 'title'.
+ *
+ * @return the value of field 'Title'.
+ */
+ public java.lang.String getTitle(
+ ) {
+ return this._title;
+ }
+
+ /**
+ * Returns the value of field 'width'.
+ *
+ * @return the value of field 'Width'.
+ */
+ public int getWidth(
+ ) {
+ return this._width;
+ }
+
+ /**
+ * Returns the value of field 'xpos'.
+ *
+ * @return the value of field 'Xpos'.
+ */
+ public int getXpos(
+ ) {
+ return this._xpos;
+ }
+
+ /**
+ * Returns the value of field 'ypos'.
+ *
+ * @return the value of field 'Ypos'.
+ */
+ public int getYpos(
+ ) {
+ return this._ypos;
+ }
+
+ /**
+ * Method hasCurrentTree.
+ *
+ * @return true if at least one CurrentTree has been added
+ */
+ public boolean hasCurrentTree(
+ ) {
+ return this._has_currentTree;
+ }
+
+ /**
+ * Method hasFitToWindow.
+ *
+ * @return true if at least one FitToWindow has been added
+ */
+ public boolean hasFitToWindow(
+ ) {
+ return this._has_fitToWindow;
+ }
+
+ /**
+ * Method hasFontSize.
+ *
+ * @return true if at least one FontSize has been added
+ */
+ public boolean hasFontSize(
+ ) {
+ return this._has_fontSize;
+ }
+
+ /**
+ * Method hasFontStyle.
+ *
+ * @return true if at least one FontStyle has been added
+ */
+ public boolean hasFontStyle(
+ ) {
+ return this._has_fontStyle;
+ }
+
+ /**
+ * Method hasHeight.
+ *
+ * @return true if at least one Height has been added
+ */
+ public boolean hasHeight(
+ ) {
+ return this._has_height;
+ }
+
+ /**
+ * Method hasMarkUnlinked.
+ *
+ * @return true if at least one MarkUnlinked has been added
+ */
+ public boolean hasMarkUnlinked(
+ ) {
+ return this._has_markUnlinked;
+ }
+
+ /**
+ * Method hasShowBootstrap.
+ *
+ * @return true if at least one ShowBootstrap has been added
+ */
+ public boolean hasShowBootstrap(
+ ) {
+ return this._has_showBootstrap;
+ }
+
+ /**
+ * Method hasShowDistances.
+ *
+ * @return true if at least one ShowDistances has been added
+ */
+ public boolean hasShowDistances(
+ ) {
+ return this._has_showDistances;
+ }
+
+ /**
+ * Method hasThreshold.
+ *
+ * @return true if at least one Threshold has been added
+ */
+ public boolean hasThreshold(
+ ) {
+ return this._has_threshold;
+ }
+
+ /**
+ * Method hasWidth.
+ *
+ * @return true if at least one Width has been added
+ */
+ public boolean hasWidth(
+ ) {
+ return this._has_width;
+ }
+
+ /**
+ * Method hasXpos.
+ *
+ * @return true if at least one Xpos has been added
+ */
+ public boolean hasXpos(
+ ) {
+ return this._has_xpos;
+ }
+
+ /**
+ * Method hasYpos.
+ *
+ * @return true if at least one Ypos has been added
+ */
+ public boolean hasYpos(
+ ) {
+ return this._has_ypos;
+ }
+
+ /**
+ * Returns the value of field 'currentTree'.
+ *
+ * @return the value of field 'CurrentTree'.
+ */
+ public boolean isCurrentTree(
+ ) {
+ return this._currentTree;
+ }
+
+ /**
+ * Returns the value of field 'fitToWindow'.
+ *
+ * @return the value of field 'FitToWindow'.
+ */
+ public boolean isFitToWindow(
+ ) {
+ return this._fitToWindow;
+ }
+
+ /**
+ * Returns the value of field 'markUnlinked'.
+ *
+ * @return the value of field 'MarkUnlinked'.
+ */
+ public boolean isMarkUnlinked(
+ ) {
+ return this._markUnlinked;
+ }
+
+ /**
+ * Returns the value of field 'showBootstrap'.
+ *
+ * @return the value of field 'ShowBootstrap'.
+ */
+ public boolean isShowBootstrap(
+ ) {
+ return this._showBootstrap;
+ }
+
+ /**
+ * Returns the value of field 'showDistances'.
+ *
+ * @return the value of field 'ShowDistances'.
+ */
+ public boolean isShowDistances(
+ ) {
+ return this._showDistances;
+ }
+
+ /**
+ * 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 'currentTree'.
+ *
+ * @param currentTree the value of field 'currentTree'.
+ */
+ public void setCurrentTree(
+ final boolean currentTree) {
+ this._currentTree = currentTree;
+ this._has_currentTree = true;
+ }
+
+ /**
+ * Sets the value of field 'fitToWindow'.
+ *
+ * @param fitToWindow the value of field 'fitToWindow'.
+ */
+ public void setFitToWindow(
+ final boolean fitToWindow) {
+ this._fitToWindow = fitToWindow;
+ this._has_fitToWindow = true;
+ }
+
+ /**
+ * Sets the value of field 'fontName'.
+ *
+ * @param fontName the value of field 'fontName'.
+ */
+ public void setFontName(
+ final java.lang.String fontName) {
+ this._fontName = fontName;
+ }
+
+ /**
+ * Sets the value of field 'fontSize'.
+ *
+ * @param fontSize the value of field 'fontSize'.
+ */
+ public void setFontSize(
+ final int fontSize) {
+ this._fontSize = fontSize;
+ this._has_fontSize = true;
+ }
+
+ /**
+ * Sets the value of field 'fontStyle'.
+ *
+ * @param fontStyle the value of field 'fontStyle'.
+ */
+ public void setFontStyle(
+ final int fontStyle) {
+ this._fontStyle = fontStyle;
+ this._has_fontStyle = true;
+ }
+
+ /**
+ * Sets the value of field 'height'.
+ *
+ * @param height the value of field 'height'.
+ */
+ public void setHeight(
+ final int height) {
+ this._height = height;
+ this._has_height = true;
+ }
+
+ /**
+ * Sets the value of field 'markUnlinked'.
+ *
+ * @param markUnlinked the value of field 'markUnlinked'.
+ */
+ public void setMarkUnlinked(
+ final boolean markUnlinked) {
+ this._markUnlinked = markUnlinked;
+ this._has_markUnlinked = true;
+ }
+
+ /**
+ * Sets the value of field 'newick'.
+ *
+ * @param newick the value of field 'newick'.
+ */
+ public void setNewick(
+ final java.lang.String newick) {
+ this._newick = newick;
+ }
+
+ /**
+ * Sets the value of field 'showBootstrap'.
+ *
+ * @param showBootstrap the value of field 'showBootstrap'.
+ */
+ public void setShowBootstrap(
+ final boolean showBootstrap) {
+ this._showBootstrap = showBootstrap;
+ this._has_showBootstrap = true;
+ }
+
+ /**
+ * Sets the value of field 'showDistances'.
+ *
+ * @param showDistances the value of field 'showDistances'.
+ */
+ public void setShowDistances(
+ final boolean showDistances) {
+ this._showDistances = showDistances;
+ this._has_showDistances = 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;
+ }
+
+ /**
+ * Sets the value of field 'title'.
+ *
+ * @param title the value of field 'title'.
+ */
+ public void setTitle(
+ final java.lang.String title) {
+ this._title = title;
+ }
+
+ /**
+ * Sets the value of field 'width'.
+ *
+ * @param width the value of field 'width'.
+ */
+ public void setWidth(
+ final int width) {
+ this._width = width;
+ this._has_width = true;
+ }
+
+ /**
+ * Sets the value of field 'xpos'.
+ *
+ * @param xpos the value of field 'xpos'.
+ */
+ public void setXpos(
+ final int xpos) {
+ this._xpos = xpos;
+ this._has_xpos = true;
+ }
+
+ /**
+ * Sets the value of field 'ypos'.
+ *
+ * @param ypos the value of field 'ypos'.
+ */
+ public void setYpos(
+ final int ypos) {
+ this._ypos = ypos;
+ this._has_ypos = 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.binding.Tree
+ */
+ public static jalview.binding.Tree unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ return (jalview.binding.Tree) Unmarshaller.unmarshal(jalview.binding.Tree.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);
+ }
}
/*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
- *
- * This file is part of Jalview.
- *
- * Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3
- * of the License, or (at your option) any later version.
- *
- * Jalview is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with 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.binding;
-//---------------------------------/
-//- Imported classes and packages -/
+ //---------------------------------/
+ //- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class UserColourScheme extends JalviewUserColours implements
- java.io.Serializable
+public class UserColourScheme extends JalviewUserColours
+implements java.io.Serializable
{
- // ----------------/
- // - Constructors -/
- // ----------------/
- public UserColourScheme()
- {
- super();
- }
+ //----------------/
+ //- Constructors -/
+ //----------------/
+
+ public UserColourScheme() {
+ super();
+ }
+
- // -----------/
- // - Methods -/
- // -----------/
+ //-----------/
+ //- Methods -/
+ //-----------/
- /**
- * 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;
+ /**
+ * 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;
}
- 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 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);
- }
+ /**
+ *
+ *
+ * @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);
+ }
- /**
- * 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.binding.JalviewUserColours
- */
- public static jalview.binding.JalviewUserColours unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException,
- org.exolab.castor.xml.ValidationException
- {
- return (jalview.binding.JalviewUserColours) Unmarshaller.unmarshal(
- jalview.binding.UserColourScheme.class, reader);
- }
+ /**
+ * 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.binding.JalviewUserColours
+ */
+ public static jalview.binding.JalviewUserColours unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ return (jalview.binding.JalviewUserColours) Unmarshaller.unmarshal(jalview.binding.UserColourScheme.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);
- }
+ /**
+ *
+ *
+ * @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);
+ }
}
/*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
- *
- * This file is part of Jalview.
- *
- * Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3
- * of the License, or (at your option) any later version.
- *
- * Jalview is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with 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.binding;
-//---------------------------------/
-//- Imported classes and packages -/
+ //---------------------------------/
+ //- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class UserColours implements java.io.Serializable
-{
-
- // --------------------------/
- // - Class/Member Variables -/
- // --------------------------/
-
- /**
- * Field _id.
- */
- private java.lang.String _id;
-
- /**
- * Field _userColourScheme.
- */
- private jalview.binding.UserColourScheme _userColourScheme;
-
- // ----------------/
- // - Constructors -/
- // ----------------/
-
- public UserColours()
- {
- super();
- }
-
- // -----------/
- // - Methods -/
- // -----------/
-
- /**
- * Returns the value of field 'id'.
- *
- * @return the value of field 'Id'.
- */
- public java.lang.String getId()
- {
- return this._id;
- }
-
- /**
- * Returns the value of field 'userColourScheme'.
- *
- * @return the value of field 'UserColourScheme'.
- */
- public jalview.binding.UserColourScheme getUserColourScheme()
- {
- return this._userColourScheme;
- }
-
- /**
- * 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;
+public class UserColours implements java.io.Serializable {
+
+
+ //--------------------------/
+ //- Class/Member Variables -/
+ //--------------------------/
+
+ /**
+ * Field _id.
+ */
+ private java.lang.String _id;
+
+ /**
+ * Field _userColourScheme.
+ */
+ private jalview.binding.UserColourScheme _userColourScheme;
+
+
+ //----------------/
+ //- Constructors -/
+ //----------------/
+
+ public UserColours() {
+ super();
+ }
+
+
+ //-----------/
+ //- Methods -/
+ //-----------/
+
+ /**
+ * Returns the value of field 'id'.
+ *
+ * @return the value of field 'Id'.
+ */
+ public java.lang.String getId(
+ ) {
+ return this._id;
+ }
+
+ /**
+ * Returns the value of field 'userColourScheme'.
+ *
+ * @return the value of field 'UserColourScheme'.
+ */
+ public jalview.binding.UserColourScheme getUserColourScheme(
+ ) {
+ return this._userColourScheme;
+ }
+
+ /**
+ * 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 'id'.
+ *
+ * @param id the value of field 'id'.
+ */
+ public void setId(
+ final java.lang.String id) {
+ this._id = id;
+ }
+
+ /**
+ * Sets the value of field 'userColourScheme'.
+ *
+ * @param userColourScheme the value of field 'userColourScheme'
+ */
+ public void setUserColourScheme(
+ final jalview.binding.UserColourScheme userColourScheme) {
+ this._userColourScheme = userColourScheme;
+ }
+
+ /**
+ * 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.binding.UserColours
+ */
+ public static jalview.binding.UserColours unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ return (jalview.binding.UserColours) Unmarshaller.unmarshal(jalview.binding.UserColours.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);
}
- 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 'id'.
- *
- * @param id
- * the value of field 'id'.
- */
- public void setId(final java.lang.String id)
- {
- this._id = id;
- }
-
- /**
- * Sets the value of field 'userColourScheme'.
- *
- * @param userColourScheme
- * the value of field 'userColourScheme'
- */
- public void setUserColourScheme(
- final jalview.binding.UserColourScheme userColourScheme)
- {
- this._userColourScheme = userColourScheme;
- }
-
- /**
- * 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.binding.UserColours
- */
- public static jalview.binding.UserColours unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException,
- org.exolab.castor.xml.ValidationException
- {
- return (jalview.binding.UserColours) Unmarshaller.unmarshal(
- jalview.binding.UserColours.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);
- }
}
/*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
- *
- * This file is part of Jalview.
- *
- * Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3
- * of the License, or (at your option) any later version.
- *
- * Jalview is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with 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.binding;
-//---------------------------------/
-//- Imported classes and packages -/
+ //---------------------------------/
+ //- Imported classes and packages -/
//---------------------------------/
-import jalview.util.MessageManager;
-
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
*
* @version $Revision$ $Date$
*/
-public class VAMSAS implements java.io.Serializable
-{
-
- // --------------------------/
- // - Class/Member Variables -/
- // --------------------------/
-
- /**
- * Field _alignmentList.
- */
- private java.util.Vector _alignmentList;
-
- /**
- * Field _treeList.
- */
- private java.util.Vector _treeList;
-
- /**
- * Field _sequenceSetList.
- */
- private java.util.Vector _sequenceSetList;
-
- // ----------------/
- // - Constructors -/
- // ----------------/
-
- public VAMSAS()
- {
- super();
- this._alignmentList = new java.util.Vector();
- this._treeList = new java.util.Vector();
- this._sequenceSetList = new java.util.Vector();
- }
-
- // -----------/
- // - Methods -/
- // -----------/
-
- /**
- *
- *
- * @param vAlignment
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void addAlignment(final Alignment vAlignment)
- throws java.lang.IndexOutOfBoundsException
- {
- this._alignmentList.addElement(vAlignment);
- }
-
- /**
- *
- *
- * @param index
- * @param vAlignment
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void addAlignment(final int index, final Alignment vAlignment)
- throws java.lang.IndexOutOfBoundsException
- {
- this._alignmentList.add(index, vAlignment);
- }
-
- /**
- *
- *
- * @param vSequenceSet
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void addSequenceSet(final SequenceSet vSequenceSet)
- throws java.lang.IndexOutOfBoundsException
- {
- this._sequenceSetList.addElement(vSequenceSet);
- }
-
- /**
- *
- *
- * @param index
- * @param vSequenceSet
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void addSequenceSet(final int index, final SequenceSet vSequenceSet)
- throws java.lang.IndexOutOfBoundsException
- {
- this._sequenceSetList.add(index, vSequenceSet);
- }
-
- /**
- *
- *
- * @param vTree
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void addTree(final java.lang.String vTree)
- throws java.lang.IndexOutOfBoundsException
- {
- this._treeList.addElement(vTree);
- }
-
- /**
- *
- *
- * @param index
- * @param vTree
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void addTree(final int index, final java.lang.String vTree)
- throws java.lang.IndexOutOfBoundsException
- {
- this._treeList.add(index, vTree);
- }
-
- /**
- * Method enumerateAlignment.
- *
- * @return an Enumeration over all Alignment elements
- */
- public java.util.Enumeration enumerateAlignment()
- {
- return this._alignmentList.elements();
- }
-
- /**
- * Method enumerateSequenceSet.
- *
- * @return an Enumeration over all SequenceSet elements
- */
- public java.util.Enumeration enumerateSequenceSet()
- {
- return this._sequenceSetList.elements();
- }
-
- /**
- * Method enumerateTree.
- *
- * @return an Enumeration over all java.lang.String elements
- */
- public java.util.Enumeration enumerateTree()
- {
- return this._treeList.elements();
- }
-
- /**
- * Method getAlignment.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- * @return the value of the Alignment at the given index
- */
- public Alignment getAlignment(final int index)
- throws java.lang.IndexOutOfBoundsException
- {
- // check bounds for index
- if (index < 0 || index >= this._alignmentList.size())
- {
- throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
- "getAlignment",
- Integer.valueOf(index).toString(),
- Integer.valueOf((this._alignmentList.size() - 1)).toString()
- }));
- }
-
- return (Alignment) _alignmentList.get(index);
- }
-
- /**
- * Method getAlignment.Returns the contents of the collection in an Array.
- * <p>
- * Note: Just in case the collection contents are changing in another thread,
- * we pass a 0-length Array of the correct type into the API call. This way we
- * <i>know</i> that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public Alignment[] getAlignment()
- {
- Alignment[] array = new Alignment[0];
- return (Alignment[]) this._alignmentList.toArray(array);
- }
-
- /**
- * Method getAlignmentCount.
- *
- * @return the size of this collection
- */
- public int getAlignmentCount()
- {
- return this._alignmentList.size();
- }
-
- /**
- * Method getSequenceSet.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- * @return the value of the SequenceSet at the given index
- */
- public SequenceSet getSequenceSet(final int index)
- throws java.lang.IndexOutOfBoundsException
- {
- // check bounds for index
- if (index < 0 || index >= this._sequenceSetList.size())
- {
- throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
- "getSequenceSet",
- Integer.valueOf(index).toString(),
- Integer.valueOf((this._sequenceSetList.size() - 1)).toString()
- }));
- }
-
- return (SequenceSet) _sequenceSetList.get(index);
- }
-
- /**
- * Method getSequenceSet.Returns the contents of the collection in an Array.
- * <p>
- * Note: Just in case the collection contents are changing in another thread,
- * we pass a 0-length Array of the correct type into the API call. This way we
- * <i>know</i> that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public SequenceSet[] getSequenceSet()
- {
- SequenceSet[] array = new SequenceSet[0];
- return (SequenceSet[]) this._sequenceSetList.toArray(array);
- }
-
- /**
- * Method getSequenceSetCount.
- *
- * @return the size of this collection
- */
- public int getSequenceSetCount()
- {
- return this._sequenceSetList.size();
- }
-
- /**
- * Method getTree.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- * @return the value of the java.lang.String at the given index
- */
- public java.lang.String getTree(final int index)
- throws java.lang.IndexOutOfBoundsException
- {
- // check bounds for index
- if (index < 0 || index >= this._treeList.size())
- {
- throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
- "getTree",
- Integer.valueOf(index).toString(),
- Integer.valueOf((this._treeList.size() - 1)).toString()
- }));
- }
-
- return (java.lang.String) _treeList.get(index);
- }
-
- /**
- * Method getTree.Returns the contents of the collection in an Array.
- * <p>
- * Note: Just in case the collection contents are changing in another thread,
- * we pass a 0-length Array of the correct type into the API call. This way we
- * <i>know</i> that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public java.lang.String[] getTree()
- {
- java.lang.String[] array = new java.lang.String[0];
- return (java.lang.String[]) this._treeList.toArray(array);
- }
-
- /**
- * Method getTreeCount.
- *
- * @return the size of this collection
- */
- public int getTreeCount()
- {
- return this._treeList.size();
- }
-
- /**
- * 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);
- }
-
- /**
- * Method removeAlignment.
- *
- * @param vAlignment
- * @return true if the object was removed from the collection.
- */
- public boolean removeAlignment(final Alignment vAlignment)
- {
- boolean removed = _alignmentList.remove(vAlignment);
- return removed;
- }
-
- /**
- * Method removeAlignmentAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public Alignment removeAlignmentAt(final int index)
- {
- java.lang.Object obj = this._alignmentList.remove(index);
- return (Alignment) obj;
- }
-
- /**
- */
- public void removeAllAlignment()
- {
- this._alignmentList.clear();
- }
-
- /**
- */
- public void removeAllSequenceSet()
- {
- this._sequenceSetList.clear();
- }
-
- /**
- */
- public void removeAllTree()
- {
- this._treeList.clear();
- }
-
- /**
- * Method removeSequenceSet.
- *
- * @param vSequenceSet
- * @return true if the object was removed from the collection.
- */
- public boolean removeSequenceSet(final SequenceSet vSequenceSet)
- {
- boolean removed = _sequenceSetList.remove(vSequenceSet);
- return removed;
- }
-
- /**
- * Method removeSequenceSetAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public SequenceSet removeSequenceSetAt(final int index)
- {
- java.lang.Object obj = this._sequenceSetList.remove(index);
- return (SequenceSet) obj;
- }
-
- /**
- * Method removeTree.
- *
- * @param vTree
- * @return true if the object was removed from the collection.
- */
- public boolean removeTree(final java.lang.String vTree)
- {
- boolean removed = _treeList.remove(vTree);
- return removed;
- }
-
- /**
- * Method removeTreeAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public java.lang.String removeTreeAt(final int index)
- {
- java.lang.Object obj = this._treeList.remove(index);
- return (java.lang.String) obj;
- }
-
- /**
- *
- *
- * @param index
- * @param vAlignment
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void setAlignment(final int index, final Alignment vAlignment)
- throws java.lang.IndexOutOfBoundsException
- {
- // check bounds for index
- if (index < 0 || index >= this._alignmentList.size())
- {
- throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
- "setAlignment",
- Integer.valueOf(index).toString(),
- Integer.valueOf((this._alignmentList.size() - 1)).toString()
- }));
- }
-
- this._alignmentList.set(index, vAlignment);
- }
-
- /**
- *
- *
- * @param vAlignmentArray
- */
- public void setAlignment(final Alignment[] vAlignmentArray)
- {
- // -- copy array
- _alignmentList.clear();
-
- for (int i = 0; i < vAlignmentArray.length; i++)
- {
- this._alignmentList.add(vAlignmentArray[i]);
- }
- }
-
- /**
- *
- *
- * @param index
- * @param vSequenceSet
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void setSequenceSet(final int index, final SequenceSet vSequenceSet)
- throws java.lang.IndexOutOfBoundsException
- {
- // check bounds for index
- if (index < 0 || index >= this._sequenceSetList.size())
- {
- throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
- "setSequenceSet",
- Integer.valueOf(index).toString(),
- Integer.valueOf((this._sequenceSetList.size() - 1)).toString()
- }));
- }
-
- this._sequenceSetList.set(index, vSequenceSet);
- }
-
- /**
- *
- *
- * @param vSequenceSetArray
- */
- public void setSequenceSet(final SequenceSet[] vSequenceSetArray)
- {
- // -- copy array
- _sequenceSetList.clear();
-
- for (int i = 0; i < vSequenceSetArray.length; i++)
- {
- this._sequenceSetList.add(vSequenceSetArray[i]);
- }
- }
-
- /**
- *
- *
- * @param index
- * @param vTree
- * @throws java.lang.IndexOutOfBoundsException
- * if the index given is outside the bounds of the collection
- */
- public void setTree(final int index, final java.lang.String vTree)
- throws java.lang.IndexOutOfBoundsException
- {
- // check bounds for index
- if (index < 0 || index >= this._treeList.size())
- {
- throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
- "setTree",
- Integer.valueOf(index).toString(),
- Integer.valueOf((this._treeList.size() - 1)).toString()
- }));
- }
-
- this._treeList.set(index, vTree);
- }
-
- /**
- *
- *
- * @param vTreeArray
- */
- public void setTree(final java.lang.String[] vTreeArray)
- {
- // -- copy array
- _treeList.clear();
-
- for (int i = 0; i < vTreeArray.length; i++)
- {
- this._treeList.add(vTreeArray[i]);
- }
- }
-
- /**
- * 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.binding.VAMSAS
- */
- public static jalview.binding.VAMSAS unmarshal(final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException,
- org.exolab.castor.xml.ValidationException
- {
- return (jalview.binding.VAMSAS) Unmarshaller.unmarshal(
- jalview.binding.VAMSAS.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 VAMSAS implements java.io.Serializable {
+
+
+ //--------------------------/
+ //- Class/Member Variables -/
+ //--------------------------/
+
+ /**
+ * Field _alignmentList.
+ */
+ private java.util.Vector _alignmentList;
+
+ /**
+ * Field _treeList.
+ */
+ private java.util.Vector _treeList;
+
+ /**
+ * Field _sequenceSetList.
+ */
+ private java.util.Vector _sequenceSetList;
+
+
+ //----------------/
+ //- Constructors -/
+ //----------------/
+
+ public VAMSAS() {
+ super();
+ this._alignmentList = new java.util.Vector();
+ this._treeList = new java.util.Vector();
+ this._sequenceSetList = new java.util.Vector();
+ }
+
+
+ //-----------/
+ //- Methods -/
+ //-----------/
+
+ /**
+ *
+ *
+ * @param vAlignment
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addAlignment(
+ final Alignment vAlignment)
+ throws java.lang.IndexOutOfBoundsException {
+ this._alignmentList.addElement(vAlignment);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vAlignment
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addAlignment(
+ final int index,
+ final Alignment vAlignment)
+ throws java.lang.IndexOutOfBoundsException {
+ this._alignmentList.add(index, vAlignment);
+ }
+
+ /**
+ *
+ *
+ * @param vSequenceSet
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addSequenceSet(
+ final SequenceSet vSequenceSet)
+ throws java.lang.IndexOutOfBoundsException {
+ this._sequenceSetList.addElement(vSequenceSet);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vSequenceSet
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addSequenceSet(
+ final int index,
+ final SequenceSet vSequenceSet)
+ throws java.lang.IndexOutOfBoundsException {
+ this._sequenceSetList.add(index, vSequenceSet);
+ }
+
+ /**
+ *
+ *
+ * @param vTree
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addTree(
+ final java.lang.String vTree)
+ throws java.lang.IndexOutOfBoundsException {
+ this._treeList.addElement(vTree);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vTree
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addTree(
+ final int index,
+ final java.lang.String vTree)
+ throws java.lang.IndexOutOfBoundsException {
+ this._treeList.add(index, vTree);
+ }
+
+ /**
+ * Method enumerateAlignment.
+ *
+ * @return an Enumeration over all Alignment elements
+ */
+ public java.util.Enumeration enumerateAlignment(
+ ) {
+ return this._alignmentList.elements();
+ }
+
+ /**
+ * Method enumerateSequenceSet.
+ *
+ * @return an Enumeration over all SequenceSet elements
+ */
+ public java.util.Enumeration enumerateSequenceSet(
+ ) {
+ return this._sequenceSetList.elements();
+ }
+
+ /**
+ * Method enumerateTree.
+ *
+ * @return an Enumeration over all java.lang.String elements
+ */
+ public java.util.Enumeration enumerateTree(
+ ) {
+ return this._treeList.elements();
+ }
+
+ /**
+ * Method getAlignment.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ * @return the value of the Alignment at the given index
+ */
+ public Alignment getAlignment(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._alignmentList.size()) {
+ throw new IndexOutOfBoundsException("getAlignment: Index value '" + index + "' not in range [0.." + (this._alignmentList.size() - 1) + "]");
+ }
+
+ return (Alignment) _alignmentList.get(index);
+ }
+
+ /**
+ * Method getAlignment.Returns the contents of the collection
+ * in an Array. <p>Note: Just in case the collection contents
+ * are changing in another thread, we pass a 0-length Array of
+ * the correct type into the API call. This way we <i>know</i>
+ * that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public Alignment[] getAlignment(
+ ) {
+ Alignment[] array = new Alignment[0];
+ return (Alignment[]) this._alignmentList.toArray(array);
+ }
+
+ /**
+ * Method getAlignmentCount.
+ *
+ * @return the size of this collection
+ */
+ public int getAlignmentCount(
+ ) {
+ return this._alignmentList.size();
+ }
+
+ /**
+ * Method getSequenceSet.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ * @return the value of the SequenceSet at the given index
+ */
+ public SequenceSet getSequenceSet(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._sequenceSetList.size()) {
+ throw new IndexOutOfBoundsException("getSequenceSet: Index value '" + index + "' not in range [0.." + (this._sequenceSetList.size() - 1) + "]");
+ }
+
+ return (SequenceSet) _sequenceSetList.get(index);
+ }
+
+ /**
+ * Method getSequenceSet.Returns the contents of the collection
+ * in an Array. <p>Note: Just in case the collection contents
+ * are changing in another thread, we pass a 0-length Array of
+ * the correct type into the API call. This way we <i>know</i>
+ * that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public SequenceSet[] getSequenceSet(
+ ) {
+ SequenceSet[] array = new SequenceSet[0];
+ return (SequenceSet[]) this._sequenceSetList.toArray(array);
+ }
+
+ /**
+ * Method getSequenceSetCount.
+ *
+ * @return the size of this collection
+ */
+ public int getSequenceSetCount(
+ ) {
+ return this._sequenceSetList.size();
+ }
+
+ /**
+ * Method getTree.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ * @return the value of the java.lang.String at the given index
+ */
+ public java.lang.String getTree(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._treeList.size()) {
+ throw new IndexOutOfBoundsException("getTree: Index value '" + index + "' not in range [0.." + (this._treeList.size() - 1) + "]");
+ }
+
+ return (java.lang.String) _treeList.get(index);
+ }
+
+ /**
+ * Method getTree.Returns the contents of the collection in an
+ * Array. <p>Note: Just in case the collection contents are
+ * changing in another thread, we pass a 0-length Array of the
+ * correct type into the API call. This way we <i>know</i>
+ * that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public java.lang.String[] getTree(
+ ) {
+ java.lang.String[] array = new java.lang.String[0];
+ return (java.lang.String[]) this._treeList.toArray(array);
+ }
+
+ /**
+ * Method getTreeCount.
+ *
+ * @return the size of this collection
+ */
+ public int getTreeCount(
+ ) {
+ return this._treeList.size();
+ }
+
+ /**
+ * 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);
+ }
+
+ /**
+ * Method removeAlignment.
+ *
+ * @param vAlignment
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeAlignment(
+ final Alignment vAlignment) {
+ boolean removed = _alignmentList.remove(vAlignment);
+ return removed;
+ }
+
+ /**
+ * Method removeAlignmentAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public Alignment removeAlignmentAt(
+ final int index) {
+ java.lang.Object obj = this._alignmentList.remove(index);
+ return (Alignment) obj;
+ }
+
+ /**
+ */
+ public void removeAllAlignment(
+ ) {
+ this._alignmentList.clear();
+ }
+
+ /**
+ */
+ public void removeAllSequenceSet(
+ ) {
+ this._sequenceSetList.clear();
+ }
+
+ /**
+ */
+ public void removeAllTree(
+ ) {
+ this._treeList.clear();
+ }
+
+ /**
+ * Method removeSequenceSet.
+ *
+ * @param vSequenceSet
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeSequenceSet(
+ final SequenceSet vSequenceSet) {
+ boolean removed = _sequenceSetList.remove(vSequenceSet);
+ return removed;
+ }
+
+ /**
+ * Method removeSequenceSetAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public SequenceSet removeSequenceSetAt(
+ final int index) {
+ java.lang.Object obj = this._sequenceSetList.remove(index);
+ return (SequenceSet) obj;
+ }
+
+ /**
+ * Method removeTree.
+ *
+ * @param vTree
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeTree(
+ final java.lang.String vTree) {
+ boolean removed = _treeList.remove(vTree);
+ return removed;
+ }
+
+ /**
+ * Method removeTreeAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public java.lang.String removeTreeAt(
+ final int index) {
+ java.lang.Object obj = this._treeList.remove(index);
+ return (java.lang.String) obj;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vAlignment
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setAlignment(
+ final int index,
+ final Alignment vAlignment)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._alignmentList.size()) {
+ throw new IndexOutOfBoundsException("setAlignment: Index value '" + index + "' not in range [0.." + (this._alignmentList.size() - 1) + "]");
+ }
+
+ this._alignmentList.set(index, vAlignment);
+ }
+
+ /**
+ *
+ *
+ * @param vAlignmentArray
+ */
+ public void setAlignment(
+ final Alignment[] vAlignmentArray) {
+ //-- copy array
+ _alignmentList.clear();
+
+ for (int i = 0; i < vAlignmentArray.length; i++) {
+ this._alignmentList.add(vAlignmentArray[i]);
+ }
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vSequenceSet
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setSequenceSet(
+ final int index,
+ final SequenceSet vSequenceSet)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._sequenceSetList.size()) {
+ throw new IndexOutOfBoundsException("setSequenceSet: Index value '" + index + "' not in range [0.." + (this._sequenceSetList.size() - 1) + "]");
+ }
+
+ this._sequenceSetList.set(index, vSequenceSet);
+ }
+
+ /**
+ *
+ *
+ * @param vSequenceSetArray
+ */
+ public void setSequenceSet(
+ final SequenceSet[] vSequenceSetArray) {
+ //-- copy array
+ _sequenceSetList.clear();
+
+ for (int i = 0; i < vSequenceSetArray.length; i++) {
+ this._sequenceSetList.add(vSequenceSetArray[i]);
+ }
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vTree
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setTree(
+ final int index,
+ final java.lang.String vTree)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._treeList.size()) {
+ throw new IndexOutOfBoundsException("setTree: Index value '" + index + "' not in range [0.." + (this._treeList.size() - 1) + "]");
+ }
+
+ this._treeList.set(index, vTree);
+ }
+
+ /**
+ *
+ *
+ * @param vTreeArray
+ */
+ public void setTree(
+ final java.lang.String[] vTreeArray) {
+ //-- copy array
+ _treeList.clear();
+
+ for (int i = 0; i < vTreeArray.length; i++) {
+ this._treeList.add(vTreeArray[i]);
+ }
+ }
+
+ /**
+ * 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.binding.VAMSAS
+ */
+ public static jalview.binding.VAMSAS unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ return (jalview.binding.VAMSAS) Unmarshaller.unmarshal(jalview.binding.VAMSAS.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);
+ }
}
/*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
- *
- * This file is part of Jalview.
- *
- * Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3
- * of the License, or (at your option) any later version.
- *
- * Jalview is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with 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.binding;
-//---------------------------------/
-//- Imported classes and packages -/
+ //---------------------------------/
+ //- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class VamsasModel extends VAMSAS implements java.io.Serializable
+public class VamsasModel extends VAMSAS
+implements java.io.Serializable
{
- // ----------------/
- // - Constructors -/
- // ----------------/
- public VamsasModel()
- {
- super();
- }
+ //----------------/
+ //- Constructors -/
+ //----------------/
+
+ public VamsasModel() {
+ super();
+ }
+
- // -----------/
- // - Methods -/
- // -----------/
+ //-----------/
+ //- Methods -/
+ //-----------/
- /**
- * 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;
+ /**
+ * 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;
}
- 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 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);
- }
+ /**
+ *
+ *
+ * @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);
+ }
- /**
- * 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.binding.VAMSAS
- */
- public static jalview.binding.VAMSAS unmarshal(final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException,
- org.exolab.castor.xml.ValidationException
- {
- return (jalview.binding.VAMSAS) Unmarshaller.unmarshal(
- jalview.binding.VamsasModel.class, reader);
- }
+ /**
+ * 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.binding.VAMSAS
+ */
+ public static jalview.binding.VAMSAS unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ return (jalview.binding.VAMSAS) Unmarshaller.unmarshal(jalview.binding.VamsasModel.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);
- }
+ /**
+ *
+ *
+ * @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);
+ }
}
/*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
- *
- * This file is part of Jalview.
- *
- * Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3
- * of the License, or (at your option) any later version.
- *
- * Jalview is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with 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.binding;
-//---------------------------------/
-//- Imported classes and packages -/
+ //---------------------------------/
+ //- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class Viewport implements java.io.Serializable
-{
-
- // --------------------------/
- // - Class/Member Variables -/
- // --------------------------/
-
- /**
- * Field _conservationSelected.
- */
- private boolean _conservationSelected;
-
- /**
- * keeps track of state for field: _conservationSelected
- */
- private boolean _has_conservationSelected;
-
- /**
- * Field _pidSelected.
- */
- private boolean _pidSelected;
-
- /**
- * keeps track of state for field: _pidSelected
- */
- private boolean _has_pidSelected;
-
- /**
- * Field _bgColour.
- */
- private java.lang.String _bgColour;
-
- /**
- * Field _consThreshold.
- */
- private int _consThreshold;
-
- /**
- * keeps track of state for field: _consThreshold
- */
- private boolean _has_consThreshold;
-
- /**
- * Field _pidThreshold.
- */
- private int _pidThreshold;
-
- /**
- * keeps track of state for field: _pidThreshold
- */
- private boolean _has_pidThreshold;
-
- /**
- * Field _title.
- */
- private java.lang.String _title;
-
- /**
- * Field _showFullId.
- */
- private boolean _showFullId;
-
- /**
- * keeps track of state for field: _showFullId
- */
- private boolean _has_showFullId;
-
- /**
- * Field _showText.
- */
- private boolean _showText;
-
- /**
- * keeps track of state for field: _showText
- */
- private boolean _has_showText;
-
- /**
- * Field _showColourText.
- */
- private boolean _showColourText;
-
- /**
- * keeps track of state for field: _showColourText
- */
- private boolean _has_showColourText;
-
- /**
- * Field _showBoxes.
- */
- private boolean _showBoxes;
-
- /**
- * keeps track of state for field: _showBoxes
- */
- private boolean _has_showBoxes;
-
- /**
- * Field _wrapAlignment.
- */
- private boolean _wrapAlignment;
-
- /**
- * keeps track of state for field: _wrapAlignment
- */
- private boolean _has_wrapAlignment;
-
- /**
- * Field _renderGaps.
- */
- private boolean _renderGaps;
-
- /**
- * keeps track of state for field: _renderGaps
- */
- private boolean _has_renderGaps;
-
- /**
- * Field _showSequenceFeatures.
- */
- private boolean _showSequenceFeatures;
-
- /**
- * keeps track of state for field: _showSequenceFeatures
- */
- private boolean _has_showSequenceFeatures;
-
- /**
- * Field _showAnnotation.
- */
- private boolean _showAnnotation;
-
- /**
- * keeps track of state for field: _showAnnotation
- */
- private boolean _has_showAnnotation;
-
- /**
- * Field _showConservation.
- */
- private boolean _showConservation;
-
- /**
- * keeps track of state for field: _showConservation
- */
- private boolean _has_showConservation;
-
- /**
- * Field _showQuality.
- */
- private boolean _showQuality;
-
- /**
- * keeps track of state for field: _showQuality
- */
- private boolean _has_showQuality;
-
- /**
- * Field _showIdentity.
- */
- private boolean _showIdentity;
-
- /**
- * keeps track of state for field: _showIdentity
- */
- private boolean _has_showIdentity;
-
- /**
- * Field _xpos.
- */
- private int _xpos;
-
- /**
- * keeps track of state for field: _xpos
- */
- private boolean _has_xpos;
-
- /**
- * Field _ypos.
- */
- private int _ypos;
-
- /**
- * keeps track of state for field: _ypos
- */
- private boolean _has_ypos;
-
- /**
- * Field _width.
- */
- private int _width;
-
- /**
- * keeps track of state for field: _width
- */
- private boolean _has_width;
-
- /**
- * Field _height.
- */
- private int _height;
-
- /**
- * keeps track of state for field: _height
- */
- private boolean _has_height;
-
- /**
- * Field _startRes.
- */
- private int _startRes;
-
- /**
- * keeps track of state for field: _startRes
- */
- private boolean _has_startRes;
-
- /**
- * Field _startSeq.
- */
- private int _startSeq;
-
- /**
- * keeps track of state for field: _startSeq
- */
- private boolean _has_startSeq;
-
- /**
- * Field _fontName.
- */
- private java.lang.String _fontName;
-
- /**
- * Field _fontSize.
- */
- private int _fontSize;
-
- /**
- * keeps track of state for field: _fontSize
- */
- private boolean _has_fontSize;
-
- /**
- * Field _fontStyle.
- */
- private int _fontStyle;
-
- /**
- * keeps track of state for field: _fontStyle
- */
- private boolean _has_fontStyle;
-
- // ----------------/
- // - Constructors -/
- // ----------------/
-
- public Viewport()
- {
- super();
- }
-
- // -----------/
- // - Methods -/
- // -----------/
+public class Viewport implements java.io.Serializable {
+
+
+ //--------------------------/
+ //- Class/Member Variables -/
+ //--------------------------/
+
+ /**
+ * Field _conservationSelected.
+ */
+ private boolean _conservationSelected;
+
+ /**
+ * keeps track of state for field: _conservationSelected
+ */
+ private boolean _has_conservationSelected;
+
+ /**
+ * Field _pidSelected.
+ */
+ private boolean _pidSelected;
+
+ /**
+ * keeps track of state for field: _pidSelected
+ */
+ private boolean _has_pidSelected;
+
+ /**
+ * Field _bgColour.
+ */
+ private java.lang.String _bgColour;
+
+ /**
+ * Field _consThreshold.
+ */
+ private int _consThreshold;
+
+ /**
+ * keeps track of state for field: _consThreshold
+ */
+ private boolean _has_consThreshold;
+
+ /**
+ * Field _pidThreshold.
+ */
+ private int _pidThreshold;
+
+ /**
+ * keeps track of state for field: _pidThreshold
+ */
+ private boolean _has_pidThreshold;
+
+ /**
+ * Field _title.
+ */
+ private java.lang.String _title;
+
+ /**
+ * Field _showFullId.
+ */
+ private boolean _showFullId;
+
+ /**
+ * keeps track of state for field: _showFullId
+ */
+ private boolean _has_showFullId;
+
+ /**
+ * Field _showText.
+ */
+ private boolean _showText;
+
+ /**
+ * keeps track of state for field: _showText
+ */
+ private boolean _has_showText;
+
+ /**
+ * Field _showColourText.
+ */
+ private boolean _showColourText;
+
+ /**
+ * keeps track of state for field: _showColourText
+ */
+ private boolean _has_showColourText;
+
+ /**
+ * Field _showBoxes.
+ */
+ private boolean _showBoxes;
+
+ /**
+ * keeps track of state for field: _showBoxes
+ */
+ private boolean _has_showBoxes;
+
+ /**
+ * Field _wrapAlignment.
+ */
+ private boolean _wrapAlignment;
+
+ /**
+ * keeps track of state for field: _wrapAlignment
+ */
+ private boolean _has_wrapAlignment;
+
+ /**
+ * Field _renderGaps.
+ */
+ private boolean _renderGaps;
+
+ /**
+ * keeps track of state for field: _renderGaps
+ */
+ private boolean _has_renderGaps;
+
+ /**
+ * Field _showSequenceFeatures.
+ */
+ private boolean _showSequenceFeatures;
+
+ /**
+ * keeps track of state for field: _showSequenceFeatures
+ */
+ private boolean _has_showSequenceFeatures;
+
+ /**
+ * Field _showAnnotation.
+ */
+ private boolean _showAnnotation;
+
+ /**
+ * keeps track of state for field: _showAnnotation
+ */
+ private boolean _has_showAnnotation;
+
+ /**
+ * Field _showConservation.
+ */
+ private boolean _showConservation;
+
+ /**
+ * keeps track of state for field: _showConservation
+ */
+ private boolean _has_showConservation;
+
+ /**
+ * Field _showQuality.
+ */
+ private boolean _showQuality;
+
+ /**
+ * keeps track of state for field: _showQuality
+ */
+ private boolean _has_showQuality;
+
+ /**
+ * Field _showIdentity.
+ */
+ private boolean _showIdentity;
+
+ /**
+ * keeps track of state for field: _showIdentity
+ */
+ private boolean _has_showIdentity;
+
+ /**
+ * Field _xpos.
+ */
+ private int _xpos;
+
+ /**
+ * keeps track of state for field: _xpos
+ */
+ private boolean _has_xpos;
+
+ /**
+ * Field _ypos.
+ */
+ private int _ypos;
+
+ /**
+ * keeps track of state for field: _ypos
+ */
+ private boolean _has_ypos;
+
+ /**
+ * Field _width.
+ */
+ private int _width;
- /**
+ /**
+ * keeps track of state for field: _width
*/
- public void deleteConsThreshold()
- {
- this._has_consThreshold = false;
- }
+ private boolean _has_width;
- /**
+ /**
+ * Field _height.
*/
- public void deleteConservationSelected()
- {
- this._has_conservationSelected = false;
- }
+ private int _height;
- /**
+ /**
+ * keeps track of state for field: _height
*/
- public void deleteFontSize()
- {
- this._has_fontSize = false;
- }
+ private boolean _has_height;
- /**
+ /**
+ * Field _startRes.
*/
- public void deleteFontStyle()
- {
- this._has_fontStyle = false;
- }
+ private int _startRes;
- /**
+ /**
+ * keeps track of state for field: _startRes
*/
- public void deleteHeight()
- {
- this._has_height = false;
- }
+ private boolean _has_startRes;
- /**
+ /**
+ * Field _startSeq.
*/
- public void deletePidSelected()
- {
- this._has_pidSelected = false;
- }
+ private int _startSeq;
- /**
+ /**
+ * keeps track of state for field: _startSeq
*/
- public void deletePidThreshold()
- {
- this._has_pidThreshold = false;
- }
+ private boolean _has_startSeq;
- /**
+ /**
+ * Field _fontName.
*/
- public void deleteRenderGaps()
- {
- this._has_renderGaps = false;
- }
+ private java.lang.String _fontName;
- /**
+ /**
+ * Field _fontSize.
*/
- public void deleteShowAnnotation()
- {
- this._has_showAnnotation = false;
- }
+ private int _fontSize;
- /**
+ /**
+ * keeps track of state for field: _fontSize
*/
- public void deleteShowBoxes()
- {
- this._has_showBoxes = false;
- }
+ private boolean _has_fontSize;
- /**
+ /**
+ * Field _fontStyle.
*/
- public void deleteShowColourText()
- {
- this._has_showColourText = false;
- }
+ private int _fontStyle;
- /**
+ /**
+ * keeps track of state for field: _fontStyle
*/
- public void deleteShowConservation()
- {
- this._has_showConservation = false;
- }
+ private boolean _has_fontStyle;
- /**
+
+ //----------------/
+ //- Constructors -/
+ //----------------/
+
+ public Viewport() {
+ super();
+ }
+
+
+ //-----------/
+ //- Methods -/
+ //-----------/
+
+ /**
+ */
+ public void deleteConsThreshold(
+ ) {
+ this._has_consThreshold= false;
+ }
+
+ /**
*/
- public void deleteShowFullId()
- {
- this._has_showFullId = false;
- }
+ public void deleteConservationSelected(
+ ) {
+ this._has_conservationSelected= false;
+ }
- /**
+ /**
*/
- public void deleteShowIdentity()
- {
- this._has_showIdentity = false;
- }
+ public void deleteFontSize(
+ ) {
+ this._has_fontSize= false;
+ }
+
+ /**
+ */
+ public void deleteFontStyle(
+ ) {
+ this._has_fontStyle= false;
+ }
+
+ /**
+ */
+ public void deleteHeight(
+ ) {
+ this._has_height= false;
+ }
+
+ /**
+ */
+ public void deletePidSelected(
+ ) {
+ this._has_pidSelected= false;
+ }
+
+ /**
+ */
+ public void deletePidThreshold(
+ ) {
+ this._has_pidThreshold= false;
+ }
+
+ /**
+ */
+ public void deleteRenderGaps(
+ ) {
+ this._has_renderGaps= false;
+ }
+
+ /**
+ */
+ public void deleteShowAnnotation(
+ ) {
+ this._has_showAnnotation= false;
+ }
+
+ /**
+ */
+ public void deleteShowBoxes(
+ ) {
+ this._has_showBoxes= false;
+ }
+
+ /**
+ */
+ public void deleteShowColourText(
+ ) {
+ this._has_showColourText= false;
+ }
+
+ /**
+ */
+ public void deleteShowConservation(
+ ) {
+ this._has_showConservation= false;
+ }
+
+ /**
+ */
+ public void deleteShowFullId(
+ ) {
+ this._has_showFullId= false;
+ }
+
+ /**
+ */
+ public void deleteShowIdentity(
+ ) {
+ this._has_showIdentity= false;
+ }
+
+ /**
+ */
+ public void deleteShowQuality(
+ ) {
+ this._has_showQuality= false;
+ }
+
+ /**
+ */
+ public void deleteShowSequenceFeatures(
+ ) {
+ this._has_showSequenceFeatures= false;
+ }
+
+ /**
+ */
+ public void deleteShowText(
+ ) {
+ this._has_showText= false;
+ }
+
+ /**
+ */
+ public void deleteStartRes(
+ ) {
+ this._has_startRes= false;
+ }
+
+ /**
+ */
+ public void deleteStartSeq(
+ ) {
+ this._has_startSeq= false;
+ }
+
+ /**
+ */
+ public void deleteWidth(
+ ) {
+ this._has_width= false;
+ }
+
+ /**
+ */
+ public void deleteWrapAlignment(
+ ) {
+ this._has_wrapAlignment= false;
+ }
+
+ /**
+ */
+ public void deleteXpos(
+ ) {
+ this._has_xpos= false;
+ }
+
+ /**
+ */
+ public void deleteYpos(
+ ) {
+ this._has_ypos= false;
+ }
+
+ /**
+ * Returns the value of field 'bgColour'.
+ *
+ * @return the value of field 'BgColour'.
+ */
+ public java.lang.String getBgColour(
+ ) {
+ return this._bgColour;
+ }
+
+ /**
+ * Returns the value of field 'consThreshold'.
+ *
+ * @return the value of field 'ConsThreshold'.
+ */
+ public int getConsThreshold(
+ ) {
+ return this._consThreshold;
+ }
+
+ /**
+ * Returns the value of field 'conservationSelected'.
+ *
+ * @return the value of field 'ConservationSelected'.
+ */
+ public boolean getConservationSelected(
+ ) {
+ return this._conservationSelected;
+ }
+
+ /**
+ * Returns the value of field 'fontName'.
+ *
+ * @return the value of field 'FontName'.
+ */
+ public java.lang.String getFontName(
+ ) {
+ return this._fontName;
+ }
+
+ /**
+ * Returns the value of field 'fontSize'.
+ *
+ * @return the value of field 'FontSize'.
+ */
+ public int getFontSize(
+ ) {
+ return this._fontSize;
+ }
+
+ /**
+ * Returns the value of field 'fontStyle'.
+ *
+ * @return the value of field 'FontStyle'.
+ */
+ public int getFontStyle(
+ ) {
+ return this._fontStyle;
+ }
+
+ /**
+ * Returns the value of field 'height'.
+ *
+ * @return the value of field 'Height'.
+ */
+ public int getHeight(
+ ) {
+ return this._height;
+ }
+
+ /**
+ * Returns the value of field 'pidSelected'.
+ *
+ * @return the value of field 'PidSelected'.
+ */
+ public boolean getPidSelected(
+ ) {
+ return this._pidSelected;
+ }
+
+ /**
+ * Returns the value of field 'pidThreshold'.
+ *
+ * @return the value of field 'PidThreshold'.
+ */
+ public int getPidThreshold(
+ ) {
+ return this._pidThreshold;
+ }
+
+ /**
+ * Returns the value of field 'renderGaps'.
+ *
+ * @return the value of field 'RenderGaps'.
+ */
+ public boolean getRenderGaps(
+ ) {
+ return this._renderGaps;
+ }
+
+ /**
+ * Returns the value of field 'showAnnotation'.
+ *
+ * @return the value of field 'ShowAnnotation'.
+ */
+ public boolean getShowAnnotation(
+ ) {
+ return this._showAnnotation;
+ }
+
+ /**
+ * Returns the value of field 'showBoxes'.
+ *
+ * @return the value of field 'ShowBoxes'.
+ */
+ public boolean getShowBoxes(
+ ) {
+ return this._showBoxes;
+ }
+
+ /**
+ * Returns the value of field 'showColourText'.
+ *
+ * @return the value of field 'ShowColourText'.
+ */
+ public boolean getShowColourText(
+ ) {
+ return this._showColourText;
+ }
+
+ /**
+ * Returns the value of field 'showConservation'.
+ *
+ * @return the value of field 'ShowConservation'.
+ */
+ public boolean getShowConservation(
+ ) {
+ return this._showConservation;
+ }
+
+ /**
+ * Returns the value of field 'showFullId'.
+ *
+ * @return the value of field 'ShowFullId'.
+ */
+ public boolean getShowFullId(
+ ) {
+ return this._showFullId;
+ }
+
+ /**
+ * Returns the value of field 'showIdentity'.
+ *
+ * @return the value of field 'ShowIdentity'.
+ */
+ public boolean getShowIdentity(
+ ) {
+ return this._showIdentity;
+ }
+
+ /**
+ * Returns the value of field 'showQuality'.
+ *
+ * @return the value of field 'ShowQuality'.
+ */
+ public boolean getShowQuality(
+ ) {
+ return this._showQuality;
+ }
+
+ /**
+ * Returns the value of field 'showSequenceFeatures'.
+ *
+ * @return the value of field 'ShowSequenceFeatures'.
+ */
+ public boolean getShowSequenceFeatures(
+ ) {
+ return this._showSequenceFeatures;
+ }
+
+ /**
+ * Returns the value of field 'showText'.
+ *
+ * @return the value of field 'ShowText'.
+ */
+ public boolean getShowText(
+ ) {
+ return this._showText;
+ }
+
+ /**
+ * Returns the value of field 'startRes'.
+ *
+ * @return the value of field 'StartRes'.
+ */
+ public int getStartRes(
+ ) {
+ return this._startRes;
+ }
+
+ /**
+ * Returns the value of field 'startSeq'.
+ *
+ * @return the value of field 'StartSeq'.
+ */
+ public int getStartSeq(
+ ) {
+ return this._startSeq;
+ }
- /**
+ /**
+ * Returns the value of field 'title'.
+ *
+ * @return the value of field 'Title'.
*/
- public void deleteShowQuality()
- {
- this._has_showQuality = false;
- }
-
- /**
- */
- public void deleteShowSequenceFeatures()
- {
- this._has_showSequenceFeatures = false;
- }
-
- /**
- */
- public void deleteShowText()
- {
- this._has_showText = false;
- }
-
- /**
- */
- public void deleteStartRes()
- {
- this._has_startRes = false;
- }
-
- /**
- */
- public void deleteStartSeq()
- {
- this._has_startSeq = false;
- }
-
- /**
- */
- public void deleteWidth()
- {
- this._has_width = false;
- }
-
- /**
- */
- public void deleteWrapAlignment()
- {
- this._has_wrapAlignment = false;
- }
-
- /**
- */
- public void deleteXpos()
- {
- this._has_xpos = false;
- }
-
- /**
- */
- public void deleteYpos()
- {
- this._has_ypos = false;
- }
-
- /**
- * Returns the value of field 'bgColour'.
- *
- * @return the value of field 'BgColour'.
- */
- public java.lang.String getBgColour()
- {
- return this._bgColour;
- }
-
- /**
- * Returns the value of field 'consThreshold'.
- *
- * @return the value of field 'ConsThreshold'.
- */
- public int getConsThreshold()
- {
- return this._consThreshold;
- }
-
- /**
- * Returns the value of field 'conservationSelected'.
- *
- * @return the value of field 'ConservationSelected'.
- */
- public boolean getConservationSelected()
- {
- return this._conservationSelected;
- }
-
- /**
- * Returns the value of field 'fontName'.
- *
- * @return the value of field 'FontName'.
- */
- public java.lang.String getFontName()
- {
- return this._fontName;
- }
-
- /**
- * Returns the value of field 'fontSize'.
- *
- * @return the value of field 'FontSize'.
- */
- public int getFontSize()
- {
- return this._fontSize;
- }
-
- /**
- * Returns the value of field 'fontStyle'.
- *
- * @return the value of field 'FontStyle'.
- */
- public int getFontStyle()
- {
- return this._fontStyle;
- }
-
- /**
- * Returns the value of field 'height'.
- *
- * @return the value of field 'Height'.
- */
- public int getHeight()
- {
- return this._height;
- }
-
- /**
- * Returns the value of field 'pidSelected'.
- *
- * @return the value of field 'PidSelected'.
- */
- public boolean getPidSelected()
- {
- return this._pidSelected;
- }
-
- /**
- * Returns the value of field 'pidThreshold'.
- *
- * @return the value of field 'PidThreshold'.
- */
- public int getPidThreshold()
- {
- return this._pidThreshold;
- }
-
- /**
- * Returns the value of field 'renderGaps'.
- *
- * @return the value of field 'RenderGaps'.
- */
- public boolean getRenderGaps()
- {
- return this._renderGaps;
- }
-
- /**
- * Returns the value of field 'showAnnotation'.
- *
- * @return the value of field 'ShowAnnotation'.
- */
- public boolean getShowAnnotation()
- {
- return this._showAnnotation;
- }
-
- /**
- * Returns the value of field 'showBoxes'.
- *
- * @return the value of field 'ShowBoxes'.
- */
- public boolean getShowBoxes()
- {
- return this._showBoxes;
- }
-
- /**
- * Returns the value of field 'showColourText'.
- *
- * @return the value of field 'ShowColourText'.
- */
- public boolean getShowColourText()
- {
- return this._showColourText;
- }
-
- /**
- * Returns the value of field 'showConservation'.
- *
- * @return the value of field 'ShowConservation'.
- */
- public boolean getShowConservation()
- {
- return this._showConservation;
- }
-
- /**
- * Returns the value of field 'showFullId'.
- *
- * @return the value of field 'ShowFullId'.
- */
- public boolean getShowFullId()
- {
- return this._showFullId;
- }
-
- /**
- * Returns the value of field 'showIdentity'.
- *
- * @return the value of field 'ShowIdentity'.
- */
- public boolean getShowIdentity()
- {
- return this._showIdentity;
- }
-
- /**
- * Returns the value of field 'showQuality'.
- *
- * @return the value of field 'ShowQuality'.
- */
- public boolean getShowQuality()
- {
- return this._showQuality;
- }
-
- /**
- * Returns the value of field 'showSequenceFeatures'.
- *
- * @return the value of field 'ShowSequenceFeatures'.
- */
- public boolean getShowSequenceFeatures()
- {
- return this._showSequenceFeatures;
- }
-
- /**
- * Returns the value of field 'showText'.
- *
- * @return the value of field 'ShowText'.
- */
- public boolean getShowText()
- {
- return this._showText;
- }
-
- /**
- * Returns the value of field 'startRes'.
- *
- * @return the value of field 'StartRes'.
- */
- public int getStartRes()
- {
- return this._startRes;
- }
-
- /**
- * Returns the value of field 'startSeq'.
- *
- * @return the value of field 'StartSeq'.
- */
- public int getStartSeq()
- {
- return this._startSeq;
- }
-
- /**
- * Returns the value of field 'title'.
- *
- * @return the value of field 'Title'.
- */
- public java.lang.String getTitle()
- {
- return this._title;
- }
-
- /**
- * Returns the value of field 'width'.
- *
- * @return the value of field 'Width'.
- */
- public int getWidth()
- {
- return this._width;
- }
-
- /**
- * Returns the value of field 'wrapAlignment'.
- *
- * @return the value of field 'WrapAlignment'.
- */
- public boolean getWrapAlignment()
- {
- return this._wrapAlignment;
- }
-
- /**
- * Returns the value of field 'xpos'.
- *
- * @return the value of field 'Xpos'.
- */
- public int getXpos()
- {
- return this._xpos;
- }
-
- /**
- * Returns the value of field 'ypos'.
- *
- * @return the value of field 'Ypos'.
- */
- public int getYpos()
- {
- return this._ypos;
- }
-
- /**
- * Method hasConsThreshold.
- *
- * @return true if at least one ConsThreshold has been added
- */
- public boolean hasConsThreshold()
- {
- return this._has_consThreshold;
- }
-
- /**
- * Method hasConservationSelected.
- *
- * @return true if at least one ConservationSelected has been added
- */
- public boolean hasConservationSelected()
- {
- return this._has_conservationSelected;
- }
-
- /**
- * Method hasFontSize.
- *
- * @return true if at least one FontSize has been added
- */
- public boolean hasFontSize()
- {
- return this._has_fontSize;
- }
-
- /**
- * Method hasFontStyle.
- *
- * @return true if at least one FontStyle has been added
- */
- public boolean hasFontStyle()
- {
- return this._has_fontStyle;
- }
-
- /**
- * Method hasHeight.
- *
- * @return true if at least one Height has been added
- */
- public boolean hasHeight()
- {
- return this._has_height;
- }
-
- /**
- * Method hasPidSelected.
- *
- * @return true if at least one PidSelected has been added
- */
- public boolean hasPidSelected()
- {
- return this._has_pidSelected;
- }
-
- /**
- * Method hasPidThreshold.
- *
- * @return true if at least one PidThreshold has been added
- */
- public boolean hasPidThreshold()
- {
- return this._has_pidThreshold;
- }
-
- /**
- * Method hasRenderGaps.
- *
- * @return true if at least one RenderGaps has been added
- */
- public boolean hasRenderGaps()
- {
- return this._has_renderGaps;
- }
-
- /**
- * Method hasShowAnnotation.
- *
- * @return true if at least one ShowAnnotation has been added
- */
- public boolean hasShowAnnotation()
- {
- return this._has_showAnnotation;
- }
-
- /**
- * Method hasShowBoxes.
- *
- * @return true if at least one ShowBoxes has been added
- */
- public boolean hasShowBoxes()
- {
- return this._has_showBoxes;
- }
-
- /**
- * Method hasShowColourText.
- *
- * @return true if at least one ShowColourText has been added
- */
- public boolean hasShowColourText()
- {
- return this._has_showColourText;
- }
-
- /**
- * Method hasShowConservation.
- *
- * @return true if at least one ShowConservation has been added
- */
- public boolean hasShowConservation()
- {
- return this._has_showConservation;
- }
-
- /**
- * Method hasShowFullId.
- *
- * @return true if at least one ShowFullId has been added
- */
- public boolean hasShowFullId()
- {
- return this._has_showFullId;
- }
-
- /**
- * Method hasShowIdentity.
- *
- * @return true if at least one ShowIdentity has been added
- */
- public boolean hasShowIdentity()
- {
- return this._has_showIdentity;
- }
-
- /**
- * Method hasShowQuality.
- *
- * @return true if at least one ShowQuality has been added
- */
- public boolean hasShowQuality()
- {
- return this._has_showQuality;
- }
-
- /**
- * Method hasShowSequenceFeatures.
- *
- * @return true if at least one ShowSequenceFeatures has been added
- */
- public boolean hasShowSequenceFeatures()
- {
- return this._has_showSequenceFeatures;
- }
-
- /**
- * Method hasShowText.
- *
- * @return true if at least one ShowText has been added
- */
- public boolean hasShowText()
- {
- return this._has_showText;
- }
-
- /**
- * Method hasStartRes.
- *
- * @return true if at least one StartRes has been added
- */
- public boolean hasStartRes()
- {
- return this._has_startRes;
- }
-
- /**
- * Method hasStartSeq.
- *
- * @return true if at least one StartSeq has been added
- */
- public boolean hasStartSeq()
- {
- return this._has_startSeq;
- }
-
- /**
- * Method hasWidth.
- *
- * @return true if at least one Width has been added
- */
- public boolean hasWidth()
- {
- return this._has_width;
- }
-
- /**
- * Method hasWrapAlignment.
- *
- * @return true if at least one WrapAlignment has been added
- */
- public boolean hasWrapAlignment()
- {
- return this._has_wrapAlignment;
- }
-
- /**
- * Method hasXpos.
- *
- * @return true if at least one Xpos has been added
- */
- public boolean hasXpos()
- {
- return this._has_xpos;
- }
-
- /**
- * Method hasYpos.
- *
- * @return true if at least one Ypos has been added
- */
- public boolean hasYpos()
- {
- return this._has_ypos;
- }
-
- /**
- * Returns the value of field 'conservationSelected'.
- *
- * @return the value of field 'ConservationSelected'.
- */
- public boolean isConservationSelected()
- {
- return this._conservationSelected;
- }
-
- /**
- * Returns the value of field 'pidSelected'.
- *
- * @return the value of field 'PidSelected'.
- */
- public boolean isPidSelected()
- {
- return this._pidSelected;
- }
-
- /**
- * Returns the value of field 'renderGaps'.
- *
- * @return the value of field 'RenderGaps'.
- */
- public boolean isRenderGaps()
- {
- return this._renderGaps;
- }
-
- /**
- * Returns the value of field 'showAnnotation'.
- *
- * @return the value of field 'ShowAnnotation'.
- */
- public boolean isShowAnnotation()
- {
- return this._showAnnotation;
- }
-
- /**
- * Returns the value of field 'showBoxes'.
- *
- * @return the value of field 'ShowBoxes'.
- */
- public boolean isShowBoxes()
- {
- return this._showBoxes;
- }
-
- /**
- * Returns the value of field 'showColourText'.
- *
- * @return the value of field 'ShowColourText'.
- */
- public boolean isShowColourText()
- {
- return this._showColourText;
- }
-
- /**
- * Returns the value of field 'showConservation'.
- *
- * @return the value of field 'ShowConservation'.
- */
- public boolean isShowConservation()
- {
- return this._showConservation;
- }
-
- /**
- * Returns the value of field 'showFullId'.
- *
- * @return the value of field 'ShowFullId'.
- */
- public boolean isShowFullId()
- {
- return this._showFullId;
- }
-
- /**
- * Returns the value of field 'showIdentity'.
- *
- * @return the value of field 'ShowIdentity'.
- */
- public boolean isShowIdentity()
- {
- return this._showIdentity;
- }
-
- /**
- * Returns the value of field 'showQuality'.
- *
- * @return the value of field 'ShowQuality'.
- */
- public boolean isShowQuality()
- {
- return this._showQuality;
- }
-
- /**
- * Returns the value of field 'showSequenceFeatures'.
- *
- * @return the value of field 'ShowSequenceFeatures'.
- */
- public boolean isShowSequenceFeatures()
- {
- return this._showSequenceFeatures;
- }
-
- /**
- * Returns the value of field 'showText'.
- *
- * @return the value of field 'ShowText'.
- */
- public boolean isShowText()
- {
- return this._showText;
- }
-
- /**
- * 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;
- }
-
- /**
- * Returns the value of field 'wrapAlignment'.
- *
- * @return the value of field 'WrapAlignment'.
- */
- public boolean isWrapAlignment()
- {
- return this._wrapAlignment;
- }
-
- /**
- *
- *
- * @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 'bgColour'.
- *
- * @param bgColour
- * the value of field 'bgColour'.
- */
- public void setBgColour(final java.lang.String bgColour)
- {
- this._bgColour = bgColour;
- }
-
- /**
- * Sets the value of field 'consThreshold'.
- *
- * @param consThreshold
- * the value of field 'consThreshold'.
- */
- public void setConsThreshold(final int consThreshold)
- {
- this._consThreshold = consThreshold;
- this._has_consThreshold = true;
- }
-
- /**
- * Sets the value of field 'conservationSelected'.
- *
- * @param conservationSelected
- * the value of field 'conservationSelected'.
- */
- public void setConservationSelected(final boolean conservationSelected)
- {
- this._conservationSelected = conservationSelected;
- this._has_conservationSelected = true;
- }
-
- /**
- * Sets the value of field 'fontName'.
- *
- * @param fontName
- * the value of field 'fontName'.
- */
- public void setFontName(final java.lang.String fontName)
- {
- this._fontName = fontName;
- }
-
- /**
- * Sets the value of field 'fontSize'.
- *
- * @param fontSize
- * the value of field 'fontSize'.
- */
- public void setFontSize(final int fontSize)
- {
- this._fontSize = fontSize;
- this._has_fontSize = true;
- }
-
- /**
- * Sets the value of field 'fontStyle'.
- *
- * @param fontStyle
- * the value of field 'fontStyle'.
- */
- public void setFontStyle(final int fontStyle)
- {
- this._fontStyle = fontStyle;
- this._has_fontStyle = true;
- }
-
- /**
- * Sets the value of field 'height'.
- *
- * @param height
- * the value of field 'height'.
- */
- public void setHeight(final int height)
- {
- this._height = height;
- this._has_height = true;
- }
-
- /**
- * Sets the value of field 'pidSelected'.
- *
- * @param pidSelected
- * the value of field 'pidSelected'.
- */
- public void setPidSelected(final boolean pidSelected)
- {
- this._pidSelected = pidSelected;
- this._has_pidSelected = true;
- }
-
- /**
- * Sets the value of field 'pidThreshold'.
- *
- * @param pidThreshold
- * the value of field 'pidThreshold'.
- */
- public void setPidThreshold(final int pidThreshold)
- {
- this._pidThreshold = pidThreshold;
- this._has_pidThreshold = true;
- }
-
- /**
- * Sets the value of field 'renderGaps'.
- *
- * @param renderGaps
- * the value of field 'renderGaps'.
- */
- public void setRenderGaps(final boolean renderGaps)
- {
- this._renderGaps = renderGaps;
- this._has_renderGaps = true;
- }
-
- /**
- * Sets the value of field 'showAnnotation'.
- *
- * @param showAnnotation
- * the value of field 'showAnnotation'.
- */
- public void setShowAnnotation(final boolean showAnnotation)
- {
- this._showAnnotation = showAnnotation;
- this._has_showAnnotation = true;
- }
-
- /**
- * Sets the value of field 'showBoxes'.
- *
- * @param showBoxes
- * the value of field 'showBoxes'.
- */
- public void setShowBoxes(final boolean showBoxes)
- {
- this._showBoxes = showBoxes;
- this._has_showBoxes = true;
- }
-
- /**
- * Sets the value of field 'showColourText'.
- *
- * @param showColourText
- * the value of field 'showColourText'.
- */
- public void setShowColourText(final boolean showColourText)
- {
- this._showColourText = showColourText;
- this._has_showColourText = true;
- }
-
- /**
- * Sets the value of field 'showConservation'.
- *
- * @param showConservation
- * the value of field 'showConservation'
- */
- public void setShowConservation(final boolean showConservation)
- {
- this._showConservation = showConservation;
- this._has_showConservation = true;
- }
-
- /**
- * Sets the value of field 'showFullId'.
- *
- * @param showFullId
- * the value of field 'showFullId'.
- */
- public void setShowFullId(final boolean showFullId)
- {
- this._showFullId = showFullId;
- this._has_showFullId = true;
- }
-
- /**
- * Sets the value of field 'showIdentity'.
- *
- * @param showIdentity
- * the value of field 'showIdentity'.
- */
- public void setShowIdentity(final boolean showIdentity)
- {
- this._showIdentity = showIdentity;
- this._has_showIdentity = true;
- }
-
- /**
- * Sets the value of field 'showQuality'.
- *
- * @param showQuality
- * the value of field 'showQuality'.
- */
- public void setShowQuality(final boolean showQuality)
- {
- this._showQuality = showQuality;
- this._has_showQuality = true;
- }
-
- /**
- * Sets the value of field 'showSequenceFeatures'.
- *
- * @param showSequenceFeatures
- * the value of field 'showSequenceFeatures'.
- */
- public void setShowSequenceFeatures(final boolean showSequenceFeatures)
- {
- this._showSequenceFeatures = showSequenceFeatures;
- this._has_showSequenceFeatures = true;
- }
-
- /**
- * Sets the value of field 'showText'.
- *
- * @param showText
- * the value of field 'showText'.
- */
- public void setShowText(final boolean showText)
- {
- this._showText = showText;
- this._has_showText = true;
- }
-
- /**
- * Sets the value of field 'startRes'.
- *
- * @param startRes
- * the value of field 'startRes'.
- */
- public void setStartRes(final int startRes)
- {
- this._startRes = startRes;
- this._has_startRes = true;
- }
-
- /**
- * Sets the value of field 'startSeq'.
- *
- * @param startSeq
- * the value of field 'startSeq'.
- */
- public void setStartSeq(final int startSeq)
- {
- this._startSeq = startSeq;
- this._has_startSeq = true;
- }
-
- /**
- * Sets the value of field 'title'.
- *
- * @param title
- * the value of field 'title'.
- */
- public void setTitle(final java.lang.String title)
- {
- this._title = title;
- }
-
- /**
- * Sets the value of field 'width'.
- *
- * @param width
- * the value of field 'width'.
- */
- public void setWidth(final int width)
- {
- this._width = width;
- this._has_width = true;
- }
-
- /**
- * Sets the value of field 'wrapAlignment'.
- *
- * @param wrapAlignment
- * the value of field 'wrapAlignment'.
- */
- public void setWrapAlignment(final boolean wrapAlignment)
- {
- this._wrapAlignment = wrapAlignment;
- this._has_wrapAlignment = true;
- }
-
- /**
- * Sets the value of field 'xpos'.
- *
- * @param xpos
- * the value of field 'xpos'.
- */
- public void setXpos(final int xpos)
- {
- this._xpos = xpos;
- this._has_xpos = true;
- }
-
- /**
- * Sets the value of field 'ypos'.
- *
- * @param ypos
- * the value of field 'ypos'.
- */
- public void setYpos(final int ypos)
- {
- this._ypos = ypos;
- this._has_ypos = 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.binding.Viewport
- */
- public static jalview.binding.Viewport unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException,
- org.exolab.castor.xml.ValidationException
- {
- return (jalview.binding.Viewport) Unmarshaller.unmarshal(
- jalview.binding.Viewport.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 java.lang.String getTitle(
+ ) {
+ return this._title;
+ }
+
+ /**
+ * Returns the value of field 'width'.
+ *
+ * @return the value of field 'Width'.
+ */
+ public int getWidth(
+ ) {
+ return this._width;
+ }
+
+ /**
+ * Returns the value of field 'wrapAlignment'.
+ *
+ * @return the value of field 'WrapAlignment'.
+ */
+ public boolean getWrapAlignment(
+ ) {
+ return this._wrapAlignment;
+ }
+
+ /**
+ * Returns the value of field 'xpos'.
+ *
+ * @return the value of field 'Xpos'.
+ */
+ public int getXpos(
+ ) {
+ return this._xpos;
+ }
+
+ /**
+ * Returns the value of field 'ypos'.
+ *
+ * @return the value of field 'Ypos'.
+ */
+ public int getYpos(
+ ) {
+ return this._ypos;
+ }
+
+ /**
+ * Method hasConsThreshold.
+ *
+ * @return true if at least one ConsThreshold has been added
+ */
+ public boolean hasConsThreshold(
+ ) {
+ return this._has_consThreshold;
+ }
+
+ /**
+ * Method hasConservationSelected.
+ *
+ * @return true if at least one ConservationSelected has been
+ * added
+ */
+ public boolean hasConservationSelected(
+ ) {
+ return this._has_conservationSelected;
+ }
+
+ /**
+ * Method hasFontSize.
+ *
+ * @return true if at least one FontSize has been added
+ */
+ public boolean hasFontSize(
+ ) {
+ return this._has_fontSize;
+ }
+
+ /**
+ * Method hasFontStyle.
+ *
+ * @return true if at least one FontStyle has been added
+ */
+ public boolean hasFontStyle(
+ ) {
+ return this._has_fontStyle;
+ }
+
+ /**
+ * Method hasHeight.
+ *
+ * @return true if at least one Height has been added
+ */
+ public boolean hasHeight(
+ ) {
+ return this._has_height;
+ }
+
+ /**
+ * Method hasPidSelected.
+ *
+ * @return true if at least one PidSelected has been added
+ */
+ public boolean hasPidSelected(
+ ) {
+ return this._has_pidSelected;
+ }
+
+ /**
+ * Method hasPidThreshold.
+ *
+ * @return true if at least one PidThreshold has been added
+ */
+ public boolean hasPidThreshold(
+ ) {
+ return this._has_pidThreshold;
+ }
+
+ /**
+ * Method hasRenderGaps.
+ *
+ * @return true if at least one RenderGaps has been added
+ */
+ public boolean hasRenderGaps(
+ ) {
+ return this._has_renderGaps;
+ }
+
+ /**
+ * Method hasShowAnnotation.
+ *
+ * @return true if at least one ShowAnnotation has been added
+ */
+ public boolean hasShowAnnotation(
+ ) {
+ return this._has_showAnnotation;
+ }
+
+ /**
+ * Method hasShowBoxes.
+ *
+ * @return true if at least one ShowBoxes has been added
+ */
+ public boolean hasShowBoxes(
+ ) {
+ return this._has_showBoxes;
+ }
+
+ /**
+ * Method hasShowColourText.
+ *
+ * @return true if at least one ShowColourText has been added
+ */
+ public boolean hasShowColourText(
+ ) {
+ return this._has_showColourText;
+ }
+
+ /**
+ * Method hasShowConservation.
+ *
+ * @return true if at least one ShowConservation has been added
+ */
+ public boolean hasShowConservation(
+ ) {
+ return this._has_showConservation;
+ }
+
+ /**
+ * Method hasShowFullId.
+ *
+ * @return true if at least one ShowFullId has been added
+ */
+ public boolean hasShowFullId(
+ ) {
+ return this._has_showFullId;
+ }
+
+ /**
+ * Method hasShowIdentity.
+ *
+ * @return true if at least one ShowIdentity has been added
+ */
+ public boolean hasShowIdentity(
+ ) {
+ return this._has_showIdentity;
+ }
+
+ /**
+ * Method hasShowQuality.
+ *
+ * @return true if at least one ShowQuality has been added
+ */
+ public boolean hasShowQuality(
+ ) {
+ return this._has_showQuality;
+ }
+
+ /**
+ * Method hasShowSequenceFeatures.
+ *
+ * @return true if at least one ShowSequenceFeatures has been
+ * added
+ */
+ public boolean hasShowSequenceFeatures(
+ ) {
+ return this._has_showSequenceFeatures;
+ }
+
+ /**
+ * Method hasShowText.
+ *
+ * @return true if at least one ShowText has been added
+ */
+ public boolean hasShowText(
+ ) {
+ return this._has_showText;
+ }
+
+ /**
+ * Method hasStartRes.
+ *
+ * @return true if at least one StartRes has been added
+ */
+ public boolean hasStartRes(
+ ) {
+ return this._has_startRes;
+ }
+
+ /**
+ * Method hasStartSeq.
+ *
+ * @return true if at least one StartSeq has been added
+ */
+ public boolean hasStartSeq(
+ ) {
+ return this._has_startSeq;
+ }
+
+ /**
+ * Method hasWidth.
+ *
+ * @return true if at least one Width has been added
+ */
+ public boolean hasWidth(
+ ) {
+ return this._has_width;
+ }
+
+ /**
+ * Method hasWrapAlignment.
+ *
+ * @return true if at least one WrapAlignment has been added
+ */
+ public boolean hasWrapAlignment(
+ ) {
+ return this._has_wrapAlignment;
+ }
+
+ /**
+ * Method hasXpos.
+ *
+ * @return true if at least one Xpos has been added
+ */
+ public boolean hasXpos(
+ ) {
+ return this._has_xpos;
+ }
+
+ /**
+ * Method hasYpos.
+ *
+ * @return true if at least one Ypos has been added
+ */
+ public boolean hasYpos(
+ ) {
+ return this._has_ypos;
+ }
+
+ /**
+ * Returns the value of field 'conservationSelected'.
+ *
+ * @return the value of field 'ConservationSelected'.
+ */
+ public boolean isConservationSelected(
+ ) {
+ return this._conservationSelected;
+ }
+
+ /**
+ * Returns the value of field 'pidSelected'.
+ *
+ * @return the value of field 'PidSelected'.
+ */
+ public boolean isPidSelected(
+ ) {
+ return this._pidSelected;
+ }
+
+ /**
+ * Returns the value of field 'renderGaps'.
+ *
+ * @return the value of field 'RenderGaps'.
+ */
+ public boolean isRenderGaps(
+ ) {
+ return this._renderGaps;
+ }
+
+ /**
+ * Returns the value of field 'showAnnotation'.
+ *
+ * @return the value of field 'ShowAnnotation'.
+ */
+ public boolean isShowAnnotation(
+ ) {
+ return this._showAnnotation;
+ }
+
+ /**
+ * Returns the value of field 'showBoxes'.
+ *
+ * @return the value of field 'ShowBoxes'.
+ */
+ public boolean isShowBoxes(
+ ) {
+ return this._showBoxes;
+ }
+
+ /**
+ * Returns the value of field 'showColourText'.
+ *
+ * @return the value of field 'ShowColourText'.
+ */
+ public boolean isShowColourText(
+ ) {
+ return this._showColourText;
+ }
+
+ /**
+ * Returns the value of field 'showConservation'.
+ *
+ * @return the value of field 'ShowConservation'.
+ */
+ public boolean isShowConservation(
+ ) {
+ return this._showConservation;
+ }
+
+ /**
+ * Returns the value of field 'showFullId'.
+ *
+ * @return the value of field 'ShowFullId'.
+ */
+ public boolean isShowFullId(
+ ) {
+ return this._showFullId;
+ }
+
+ /**
+ * Returns the value of field 'showIdentity'.
+ *
+ * @return the value of field 'ShowIdentity'.
+ */
+ public boolean isShowIdentity(
+ ) {
+ return this._showIdentity;
+ }
+
+ /**
+ * Returns the value of field 'showQuality'.
+ *
+ * @return the value of field 'ShowQuality'.
+ */
+ public boolean isShowQuality(
+ ) {
+ return this._showQuality;
+ }
+
+ /**
+ * Returns the value of field 'showSequenceFeatures'.
+ *
+ * @return the value of field 'ShowSequenceFeatures'.
+ */
+ public boolean isShowSequenceFeatures(
+ ) {
+ return this._showSequenceFeatures;
+ }
+
+ /**
+ * Returns the value of field 'showText'.
+ *
+ * @return the value of field 'ShowText'.
+ */
+ public boolean isShowText(
+ ) {
+ return this._showText;
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * Returns the value of field 'wrapAlignment'.
+ *
+ * @return the value of field 'WrapAlignment'.
+ */
+ public boolean isWrapAlignment(
+ ) {
+ return this._wrapAlignment;
+ }
+
+ /**
+ *
+ *
+ * @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 'bgColour'.
+ *
+ * @param bgColour the value of field 'bgColour'.
+ */
+ public void setBgColour(
+ final java.lang.String bgColour) {
+ this._bgColour = bgColour;
+ }
+
+ /**
+ * Sets the value of field 'consThreshold'.
+ *
+ * @param consThreshold the value of field 'consThreshold'.
+ */
+ public void setConsThreshold(
+ final int consThreshold) {
+ this._consThreshold = consThreshold;
+ this._has_consThreshold = true;
+ }
+
+ /**
+ * Sets the value of field 'conservationSelected'.
+ *
+ * @param conservationSelected the value of field
+ * 'conservationSelected'.
+ */
+ public void setConservationSelected(
+ final boolean conservationSelected) {
+ this._conservationSelected = conservationSelected;
+ this._has_conservationSelected = true;
+ }
+
+ /**
+ * Sets the value of field 'fontName'.
+ *
+ * @param fontName the value of field 'fontName'.
+ */
+ public void setFontName(
+ final java.lang.String fontName) {
+ this._fontName = fontName;
+ }
+
+ /**
+ * Sets the value of field 'fontSize'.
+ *
+ * @param fontSize the value of field 'fontSize'.
+ */
+ public void setFontSize(
+ final int fontSize) {
+ this._fontSize = fontSize;
+ this._has_fontSize = true;
+ }
+
+ /**
+ * Sets the value of field 'fontStyle'.
+ *
+ * @param fontStyle the value of field 'fontStyle'.
+ */
+ public void setFontStyle(
+ final int fontStyle) {
+ this._fontStyle = fontStyle;
+ this._has_fontStyle = true;
+ }
+
+ /**
+ * Sets the value of field 'height'.
+ *
+ * @param height the value of field 'height'.
+ */
+ public void setHeight(
+ final int height) {
+ this._height = height;
+ this._has_height = true;
+ }
+
+ /**
+ * Sets the value of field 'pidSelected'.
+ *
+ * @param pidSelected the value of field 'pidSelected'.
+ */
+ public void setPidSelected(
+ final boolean pidSelected) {
+ this._pidSelected = pidSelected;
+ this._has_pidSelected = true;
+ }
+
+ /**
+ * Sets the value of field 'pidThreshold'.
+ *
+ * @param pidThreshold the value of field 'pidThreshold'.
+ */
+ public void setPidThreshold(
+ final int pidThreshold) {
+ this._pidThreshold = pidThreshold;
+ this._has_pidThreshold = true;
+ }
+
+ /**
+ * Sets the value of field 'renderGaps'.
+ *
+ * @param renderGaps the value of field 'renderGaps'.
+ */
+ public void setRenderGaps(
+ final boolean renderGaps) {
+ this._renderGaps = renderGaps;
+ this._has_renderGaps = true;
+ }
+
+ /**
+ * Sets the value of field 'showAnnotation'.
+ *
+ * @param showAnnotation the value of field 'showAnnotation'.
+ */
+ public void setShowAnnotation(
+ final boolean showAnnotation) {
+ this._showAnnotation = showAnnotation;
+ this._has_showAnnotation = true;
+ }
+
+ /**
+ * Sets the value of field 'showBoxes'.
+ *
+ * @param showBoxes the value of field 'showBoxes'.
+ */
+ public void setShowBoxes(
+ final boolean showBoxes) {
+ this._showBoxes = showBoxes;
+ this._has_showBoxes = true;
+ }
+
+ /**
+ * Sets the value of field 'showColourText'.
+ *
+ * @param showColourText the value of field 'showColourText'.
+ */
+ public void setShowColourText(
+ final boolean showColourText) {
+ this._showColourText = showColourText;
+ this._has_showColourText = true;
+ }
+
+ /**
+ * Sets the value of field 'showConservation'.
+ *
+ * @param showConservation the value of field 'showConservation'
+ */
+ public void setShowConservation(
+ final boolean showConservation) {
+ this._showConservation = showConservation;
+ this._has_showConservation = true;
+ }
+
+ /**
+ * Sets the value of field 'showFullId'.
+ *
+ * @param showFullId the value of field 'showFullId'.
+ */
+ public void setShowFullId(
+ final boolean showFullId) {
+ this._showFullId = showFullId;
+ this._has_showFullId = true;
+ }
+
+ /**
+ * Sets the value of field 'showIdentity'.
+ *
+ * @param showIdentity the value of field 'showIdentity'.
+ */
+ public void setShowIdentity(
+ final boolean showIdentity) {
+ this._showIdentity = showIdentity;
+ this._has_showIdentity = true;
+ }
+
+ /**
+ * Sets the value of field 'showQuality'.
+ *
+ * @param showQuality the value of field 'showQuality'.
+ */
+ public void setShowQuality(
+ final boolean showQuality) {
+ this._showQuality = showQuality;
+ this._has_showQuality = true;
+ }
+
+ /**
+ * Sets the value of field 'showSequenceFeatures'.
+ *
+ * @param showSequenceFeatures the value of field
+ * 'showSequenceFeatures'.
+ */
+ public void setShowSequenceFeatures(
+ final boolean showSequenceFeatures) {
+ this._showSequenceFeatures = showSequenceFeatures;
+ this._has_showSequenceFeatures = true;
+ }
+
+ /**
+ * Sets the value of field 'showText'.
+ *
+ * @param showText the value of field 'showText'.
+ */
+ public void setShowText(
+ final boolean showText) {
+ this._showText = showText;
+ this._has_showText = true;
+ }
+
+ /**
+ * Sets the value of field 'startRes'.
+ *
+ * @param startRes the value of field 'startRes'.
+ */
+ public void setStartRes(
+ final int startRes) {
+ this._startRes = startRes;
+ this._has_startRes = true;
+ }
+
+ /**
+ * Sets the value of field 'startSeq'.
+ *
+ * @param startSeq the value of field 'startSeq'.
+ */
+ public void setStartSeq(
+ final int startSeq) {
+ this._startSeq = startSeq;
+ this._has_startSeq = true;
+ }
+
+ /**
+ * Sets the value of field 'title'.
+ *
+ * @param title the value of field 'title'.
+ */
+ public void setTitle(
+ final java.lang.String title) {
+ this._title = title;
+ }
+
+ /**
+ * Sets the value of field 'width'.
+ *
+ * @param width the value of field 'width'.
+ */
+ public void setWidth(
+ final int width) {
+ this._width = width;
+ this._has_width = true;
+ }
+
+ /**
+ * Sets the value of field 'wrapAlignment'.
+ *
+ * @param wrapAlignment the value of field 'wrapAlignment'.
+ */
+ public void setWrapAlignment(
+ final boolean wrapAlignment) {
+ this._wrapAlignment = wrapAlignment;
+ this._has_wrapAlignment = true;
+ }
+
+ /**
+ * Sets the value of field 'xpos'.
+ *
+ * @param xpos the value of field 'xpos'.
+ */
+ public void setXpos(
+ final int xpos) {
+ this._xpos = xpos;
+ this._has_xpos = true;
+ }
+
+ /**
+ * Sets the value of field 'ypos'.
+ *
+ * @param ypos the value of field 'ypos'.
+ */
+ public void setYpos(
+ final int ypos) {
+ this._ypos = ypos;
+ this._has_ypos = 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.binding.Viewport
+ */
+ public static jalview.binding.Viewport unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ return (jalview.binding.Viewport) Unmarshaller.unmarshal(jalview.binding.Viewport.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);
+ }
}
*/
package jalview.datamodel;
-import jalview.analysis.Rna;
-import jalview.analysis.SecStrConsensus.SimpleBP;
-import jalview.analysis.WUSSParseException;
-
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
import java.util.Map.Entry;
+import jalview.analysis.Rna;
+import jalview.analysis.SecStrConsensus.SimpleBP;
+import jalview.analysis.WUSSParseException;
+
/**
* DOCUMENT ME!
*
*/
public class AlignmentAnnotation
{
+ private static final String ANNOTATION_ID_PREFIX = "ann";
+
/*
* Identifers for different types of profile data
*/
public static final int CDNA_PROFILE = 2;
+ private static long counter = 0;
+
/**
* If true, this annotations is calculated every edit, eg consensus, quality
* or conservation graphs
public AlignmentAnnotation(String label, String description,
Annotation[] annotations)
{
+ setAnnotationId();
// always editable?
editable = true;
this.label = label;
_updateRnaSecStr(new AnnotCharSequence());
}
}
-
- annotationId = this.hashCode() + "";
}
/**
public AlignmentAnnotation(String label, String description,
Annotation[] annotations, float min, float max, int graphType)
{
+ setAnnotationId();
// graphs are not editable
editable = graphType == 0;
*/
public AlignmentAnnotation(AlignmentAnnotation annotation)
{
+ setAnnotationId();
this.label = new String(annotation.label);
if (annotation.description != null)
{
return sequenceMapping == null ? null : sequenceMapping.get(position);
}
+
+ /**
+ * Set the id to "ann" followed by a counter that increments so as to be
+ * unique for the lifetime of the JVM
+ */
+ protected final void setAnnotationId()
+ {
+ this.annotationId = ANNOTATION_ID_PREFIX + Long.toString(nextId());
+ }
+
+ protected static synchronized long nextId()
+ {
+ return counter++;
+ }
}
--- /dev/null
+package jalview.datamodel;
+
+
+/**
+ * A data bean class to hold properties of an RNA viewer
+ */
+public class RnaViewerModel
+{
+ public final String viewId;
+
+ public final String title;
+
+ public final int x;
+
+ public final int y;
+
+ public final int width;
+
+ public final int height;
+
+ public final int dividerLocation;
+
+ /**
+ * Constructor
+ *
+ * @param viewId
+ * @param title
+ * @param xpos
+ * @param ypos
+ * @param width
+ * @param height
+ * @param dividerLocation
+ */
+ public RnaViewerModel(String viewId, String title, int xpos, int ypos,
+ int width,
+ int height, int dividerLocation)
+ {
+ this.viewId = viewId;
+ this.title = title;
+ this.x = xpos;
+ this.y = ypos;
+ this.width = width;
+ this.height = height;
+ this.dividerLocation = dividerLocation;
+ }
+}
*/
package jalview.ext.jmol;
+import jalview.api.AlignmentViewPanel;
+import jalview.api.FeatureRenderer;
+import jalview.api.SequenceRenderer;
+import jalview.datamodel.AlignmentI;
+import jalview.datamodel.ColumnSelection;
+import jalview.datamodel.PDBEntry;
+import jalview.datamodel.SequenceI;
+import jalview.io.AppletFormatAdapter;
+import jalview.schemes.ColourSchemeI;
+import jalview.schemes.ResidueProperties;
+import jalview.structure.AtomSpec;
+import jalview.structure.StructureMappingcommandSet;
+import jalview.structure.StructureSelectionManager;
+import jalview.structures.models.AAStructureBindingModel;
+
import java.awt.Color;
import java.awt.Container;
import java.awt.event.ComponentEvent;
import java.util.Map;
import java.util.Vector;
+import javajs.awt.Dimension;
+
import org.jmol.adapter.smarter.SmarterJmolAdapter;
import org.jmol.api.JmolAppConsoleInterface;
import org.jmol.api.JmolSelectionListener;
import org.jmol.api.JmolStatusListener;
import org.jmol.api.JmolViewer;
-import org.jmol.constant.EnumCallback;
-import org.jmol.popup.JmolPopup;
-
-import jalview.api.AlignmentViewPanel;
-import jalview.api.FeatureRenderer;
-import jalview.api.SequenceRenderer;
-import jalview.datamodel.AlignmentI;
-import jalview.datamodel.ColumnSelection;
-import jalview.datamodel.PDBEntry;
-import jalview.datamodel.SequenceI;
-import jalview.io.AppletFormatAdapter;
-import jalview.schemes.ColourSchemeI;
-import jalview.schemes.ResidueProperties;
-import jalview.structure.AtomSpec;
-import jalview.structure.StructureMappingcommandSet;
-import jalview.structure.StructureSelectionManager;
-import jalview.structures.models.AAStructureBindingModel;
+import org.jmol.c.CBK;
+import org.jmol.popup.JmolGenericPopup;
+import org.jmol.script.T;
+import org.jmol.viewer.JC;
+import org.jmol.viewer.Viewer;
public abstract class JalviewJmolBinding extends AAStructureBindingModel
implements JmolStatusListener, JmolSelectionListener,
*/
int frameNo = 0;
- protected JmolPopup jmolpopup;
+ protected JmolGenericPopup jmolpopup;
String lastCommand;
StringBuffer resetLastRes = new StringBuffer();
- public JmolViewer viewer;
+ public Viewer viewer;
public JalviewJmolBinding(StructureSelectionManager ssm,
PDBEntry[] pdbentry, SequenceI[][] sequenceIs, String[][] chains,
}
public JalviewJmolBinding(StructureSelectionManager ssm,
- SequenceI[][] seqs, JmolViewer theViewer)
+ SequenceI[][] seqs, Viewer theViewer)
{
super(ssm, seqs);
public void closeViewer()
{
- viewer.setModeMouse(org.jmol.viewer.JmolConstants.MOUSE_NONE);
+ viewer.acm.setModeMouse(JC.MOUSE_NONE);
// remove listeners for all structures in viewer
getSsm().removeStructureViewerListener(this, this.getPdbFile());
// and shut down jmol
return null;
}
// TODO: verify atomIndex is selecting correct model.
- return new Color(viewer.getAtomArgb(atomIndex));
+ // return new Color(viewer.getAtomArgb(atomIndex)); Jmol 12.2.4
+ int colour = viewer.ms.at[atomIndex]
+ .atomPropertyInt(T.color);
+ return new Color(colour);
}
/**
}
if (modelFileNames == null)
{
-
- String mset[] = new String[viewer.getModelCount()];
+ String mset[] = new String[viewer.ms.mc];
_modelFileNameMap = new int[mset.length];
- int j = 1;
- String m = viewer.getModelFileName(0);
+ String m = viewer.ms.getModelFileName(0);
if (m != null)
{
+ mset[0] = m;
try
{
mset[0] = new File(m).getAbsolutePath();
} catch (AccessControlException x)
{
- // usually not allowed to do this in applet, so keep raw handle
+ // usually not allowed to do this in applet
+ System.err
+ .println("jmolBinding: Using local file string from Jmol: "
+ + m);
+ }
+ if (mset[0].indexOf("/file:") != -1)
+ {
+ // applet path with docroot - discard as format won't match pdbfile
mset[0] = m;
- // System.err.println("jmolBinding: Using local file string from Jmol: "+m);
}
}
+ int j = 1;
for (int i = 1; i < mset.length; i++)
{
- m = viewer.getModelFileName(i);
+ m = viewer.ms.getModelFileName(i);
+ mset[j] = m;
if (m != null)
{
try
} catch (AccessControlException x)
{
// usually not allowed to do this in applet, so keep raw handle
- mset[j] = m;
// System.err.println("jmolBinding: Using local file string from Jmol: "+m);
}
}
public void handlePopupMenu(int x, int y)
{
- jmolpopup.show(x, y);
+ // jmolpopup.show(x, y);
+ jmolpopup.jpiShow(x, y);
}
/**
pdbfilename = modelFileNames[_mp];
if (pdbfilename == null)
{
- pdbfilename = new File(viewer.getModelFileName(mnumber))
+ pdbfilename = new File(
+ viewer.ms.getModelFileName(mnumber))
.getAbsolutePath();
}
}
@Override
- public void notifyCallback(EnumCallback type, Object[] data)
+ public void notifyCallback(CBK type, Object[] data)
{
try
{
}
@Override
- public boolean notifyEnabled(EnumCallback callbackPick)
+ public boolean notifyEnabled(CBK callbackPick)
{
switch (callbackPick)
{
case HOVER:
case ERROR:
return true;
- case RESIZE:
- case SYNC:
- case CLICK:
- case ANIMFRAME:
- case MINIMIZATION:
+ default:
+ return false;
}
- return false;
}
// incremented every time a load notification is successfully handled -
}
else
{
- File fl;
- if (matches = (fl = new File(getPdbEntry(pe).getFile()))
- .equals(new File(fileName)))
+ File fl = new File(getPdbEntry(pe).getFile());
+ matches = fl.equals(new File(fileName));
+ if (matches)
{
foundEntry = true;
// TODO: Jmol can in principle retrieve from CLASSLOADER but
{
commandOptions = "";
}
- viewer = JmolViewer.allocateViewer(renderPanel,
+ viewer = (Viewer) JmolViewer.allocateViewer(renderPanel,
(jmolfileio ? new SmarterJmolAdapter() : null), htmlName
+ ((Object) this).toString(), documentBase, codeBase,
commandOptions, this);
- console = createJmolConsole(viewer, consolePanel, buttonsToShow);
+ viewer.setJmolStatusListener(this); // extends JmolCallbackListener
+
+ console = createJmolConsole(consolePanel, buttonsToShow);
if (consolePanel != null)
{
consolePanel.addComponentListener(this);
}
protected abstract JmolAppConsoleInterface createJmolConsole(
- JmolViewer viewer2, Container consolePanel, String buttonsToShow);
+ Container consolePanel, String buttonsToShow);
protected org.jmol.api.JmolAppConsoleInterface console = null;
}
@Override
- public void resizeInnerPanel(String data)
+ public Dimension resizeInnerPanel(String data)
{
// Jalview doesn't honour resize panel requests
-
+ return null;
}
public boolean isFinishedInit()
showConsole(false);
}
}
+
import java.util.Hashtable;
import java.util.Map;
+import javajs.awt.Dimension;
+
import org.jmol.api.JmolStatusListener;
import org.jmol.api.JmolViewer;
-import org.jmol.constant.EnumCallback;
+import org.jmol.c.CBK;
import org.jmol.modelset.Group;
import org.jmol.modelset.Model;
import org.jmol.modelset.ModelSet;
-import org.jmol.modelset.Polymer;
+import org.jmol.modelsetbio.BioModel;
import org.jmol.modelsetbio.BioPolymer;
import org.jmol.viewer.Viewer;
import org.openscience.jmol.app.JmolApp;
private Viewer getJmolData()
{
if (viewer == null)
- { // note that -o -n -x are all implied
+ { // note that -o -n -x are all implied // TODO check for Jmol 14.2
jmolApp = new JmolApp();
jmolApp.isDataOnly = true;
jmolApp.haveConsole = false;
jmolApp.haveDisplay = false;
- jmolApp.exitUponCompletion = true;
try
{
viewer = (Viewer) JmolViewer.allocateViewer(null, null, null, null,
- null, jmolApp.commandOptions, this);
+ null, "-x -o -n", this);
viewer.setScreenDimension(jmolApp.startupWidth,
jmolApp.startupHeight);
- jmolApp.startViewer(viewer, null);
+ jmolApp.startViewer(viewer, null, false);
} catch (ClassCastException x)
{
throw new Error(MessageManager.formatMessage("error.jmol_version_not_compatible_with_jalview_version", new String[]{JmolViewer.getJmolVersion()}),
Viewer jmd = getJmolData();
jmd.openReader(getDataName(), getDataName(), getReader());
waitForScript(jmd);
- if (jmd.getModelCount() > 0)
+
+ if (jmd.ms.mc > 0)
{
- ModelSet ms = jmd.getModelSet();
- String structs = ms.calculateStructures(null, true, false, true);
+ ModelSet ms = jmd.ms;
+ // Jmol 14.2 added third argument doReport = false
+ ms.calculateStructures(null, true, false, false, true);
// System.out.println("Structs\n"+structs);
- for (Model model : ms.getModels())
+ Group group = null;
+ int modelIndex = -1;
+ for (Model model : ms.am)
{
- for (int _bp = 0, _bpc = model.getBioPolymerCount(); _bp < _bpc; _bp++)
+ modelIndex++;
+ for (BioPolymer bp : ((BioModel) model).bioPolymers)
{
- Polymer bp = model.getBioPolymer(_bp);
- if (bp instanceof BioPolymer)
+ int _lastChainId = 0;
+ int[] groups = bp.getLeadAtomIndices();
+ char seq[] = new char[groups.length], secstr[] = new char[groups.length], secstrcode[] = new char[groups.length];
+ int groupc = 0, len = 0, firstrnum = 1, lastrnum = 0;
+
+ do
{
- BioPolymer biopoly = (BioPolymer) bp;
- char _lastChainId = 0;
- int[] groups = biopoly.getLeadAtomIndices();
- Group[] bpgrp = biopoly.getGroups();
- char seq[] = new char[groups.length], secstr[] = new char[groups.length], secstrcode[] = new char[groups.length];
- int groupc = 0, len = 0, firstrnum = 1, lastrnum = 0;
- do
+ if (groupc >= groups.length
+ || ms.at[groups[groupc]].group.chain.chainID != _lastChainId)
{
- if (groupc >= groups.length
- || ms.atoms[groups[groupc]].getChainID() != _lastChainId)
+ /*
+ * on change of chain (or at end), construct the sequence and
+ * secondary structure annotation for the last chain
+ */
+ if (len > 0)
{
- if (len > 0)
+ boolean isNa = bp.isNucleic();
+ // normalise sequence from Jmol to jalview
+ int[] cinds = isNa ? ResidueProperties.nucleotideIndex
+ : ResidueProperties.aaIndex;
+ int nonGap = isNa ? ResidueProperties.maxNucleotideIndex
+ : ResidueProperties.maxProteinIndex;
+ char ngc = 'X';
+ char newseq[] = new char[len];
+ Annotation asecstr[] = new Annotation[len + firstrnum - 1];
+ for (int p = 0; p < len; p++)
{
- boolean isNa = (biopoly.isDna() || biopoly.isRna());
- // normalise sequence from Jmol to jalview
- int[] cinds = isNa ? ResidueProperties.nucleotideIndex : ResidueProperties.aaIndex;
- int nonGap = isNa ? ResidueProperties.maxNucleotideIndex
- : ResidueProperties.maxProteinIndex;
- char ngc = 'X';
- char newseq[] = new char[len];
- Annotation asecstr[] = new Annotation[len+firstrnum-1];
- for (int p = 0; p < len; p++)
+ newseq[p] = cinds[seq[p]] == nonGap ? ngc : seq[p];
+ if (secstr[p] >= 'A' && secstr[p] <= 'z')
{
- newseq[p] = cinds[seq[p]] == nonGap ? ngc : seq[p];
- if (secstr[p] >= 'A' && secstr[p] <= 'z')
- {
- asecstr[p] = new Annotation("" + secstr[p], null,
- secstrcode[p], Float.NaN);
- }
+ asecstr[p] = new Annotation("" + secstr[p], null,
+ secstrcode[p], Float.NaN);
}
- SequenceI sq = new Sequence("" + getDataName() + "|"
- + model.getModelTitle() + "|" + _lastChainId,
- newseq, firstrnum, lastrnum);
- PDBEntry pdbe = new PDBEntry();
- pdbe.setFile(getDataName());
- pdbe.setId(getDataName());
- pdbe.setProperty(new Hashtable());
- // pdbe.getProperty().put("CHAIN", "" + _lastChainId);
- pdbe.setChainCode(String.valueOf(_lastChainId));
- sq.addPDBId(pdbe);
- // JAL-1533
- // Need to put the number of models for this polymer somewhere for Chimera/others to grab
- // pdbe.getProperty().put("PDBMODELS", biopoly.)
- seqs.add(sq);
- if (!isNa)
+ }
+ String modelTitle = (String) ms
+ .getInfo(modelIndex, "title");
+ SequenceI sq = new Sequence("" + getDataName() + "|"
+ + modelTitle + "|" + _lastChainId, newseq,
+ firstrnum, lastrnum);
+ PDBEntry pdbe = new PDBEntry();
+ pdbe.setFile(getDataName());
+ pdbe.setId(getDataName());
+ pdbe.setProperty(new Hashtable());
+ // pdbe.getProperty().put("CHAIN", "" + _lastChainId);
+ pdbe.setChainCode(String.valueOf(_lastChainId));
+ sq.addPDBId(pdbe);
+ // JAL-1533
+ // Need to put the number of models for this polymer somewhere
+ // for Chimera/others to grab
+ // pdbe.getProperty().put("PDBMODELS", biopoly.)
+ seqs.add(sq);
+ if (!isNa)
+ {
+ String mt = modelTitle == null ? getDataName()
+ : modelTitle;
+ if (_lastChainId >= ' ')
{
- String mt = model.getModelTitle() == null ? getDataName()
- : model.getModelTitle();
- if (_lastChainId >= ' ')
- {
- mt += _lastChainId;
- }
- AlignmentAnnotation ann = new AlignmentAnnotation(
- "Secondary Structure",
- "Secondary Structure for " + mt, asecstr);
- ann.belowAlignment=true;
- ann.visible=true;
- ann.autoCalculated=false;
- ann.setCalcId(getClass().getName());
- sq.addAlignmentAnnotation(ann);
- ann.adjustForAlignment();
- ann.validateRangeAndDisplay();
- annotations.add(ann);
+ mt += _lastChainId;
}
+ AlignmentAnnotation ann = new AlignmentAnnotation(
+ "Secondary Structure", "Secondary Structure for "
+ + mt, asecstr);
+ ann.belowAlignment = true;
+ ann.visible = true;
+ ann.autoCalculated = false;
+ ann.setCalcId(getClass().getName());
+ sq.addAlignmentAnnotation(ann);
+ ann.adjustForAlignment();
+ ann.validateRangeAndDisplay();
+ annotations.add(ann);
}
- len = 0;
- firstrnum = 1;
- lastrnum = 0;
}
- if (groupc < groups.length)
+ len = 0;
+ firstrnum = 1;
+ lastrnum = 0;
+ }
+ if (groupc < groups.length)
+ {
+ group = ms.at[groups[groupc]].group;
+ if (len == 0)
+ {
+ firstrnum = group.getResno();
+ _lastChainId = group.chain.chainID;
+ }
+ else
+ {
+ lastrnum = group.getResno();
+ }
+ seq[len] = group.getGroup1();
+ switch (group.getProteinStructureSubType())
{
- if (len == 0)
+ case HELIX310:
+ if (secstr[len] == 0)
{
- firstrnum = bpgrp[groupc].getResno();
- _lastChainId = bpgrp[groupc].getChainID();
+ secstr[len] = '3';
}
- else
+ case HELIXALPHA:
+ if (secstr[len] == 0)
{
- lastrnum = bpgrp[groupc].getResno();
+ secstr[len] = 'H';
}
- seq[len] = bpgrp[groupc].getGroup1();
- switch (bpgrp[groupc].getProteinStructureSubType())
+ case HELIXPI:
+ if (secstr[len] == 0)
{
- case HELIX_310:
- if (secstr[len] == 0)
- {
- secstr[len] = '3';
- }
- case HELIX_ALPHA:
- if (secstr[len] == 0)
- {
- secstr[len] = 'H';
- }
- case HELIX_PI:
- if (secstr[len] == 0)
- {
- secstr[len] = 'P';
- }
- case HELIX:
- if (secstr[len] == 0)
- {
- secstr[len] = 'H';
- }
- secstrcode[len] = 'H';
- break;
- case SHEET:
- secstr[len] = 'E';
- secstrcode[len] = 'E';
- break;
- default:
- secstr[len] = 0;
- secstrcode[len] = 0;
+ secstr[len] = 'P';
}
- len++;
+ case HELIX:
+ if (secstr[len] == 0)
+ {
+ secstr[len] = 'H';
+ }
+ secstrcode[len] = 'H';
+ break;
+ case SHEET:
+ secstr[len] = 'E';
+ secstrcode[len] = 'E';
+ break;
+ default:
+ secstr[len] = 0;
+ secstrcode[len] = 0;
}
- } while (groupc++ < groups.length);
-
- }
+ len++;
+ }
+ } while (groupc++ < groups.length);
}
}
* System.err.println("Squashed Jmol callback handler error:");
* e.printStackTrace(); } }
*/
- public void notifyCallback(EnumCallback type, Object[] data)
+ public void notifyCallback(CBK type, Object[] data)
{
String strInfo = (data == null || data[1] == null ? null : data[1]
.toString());
}
}
- private void notifyFileLoaded(String string, String string2,
- String string3, String string4, int intValue)
- {
- // TODO Auto-generated method stub
-
- }
-
String lastConsoleEcho = "";
private void sendConsoleEcho(String string)
}
@Override
- public boolean notifyEnabled(EnumCallback callbackPick)
+ public boolean notifyEnabled(CBK callbackPick)
{
switch (callbackPick)
{
case LOADSTRUCT:
case ERROR:
return true;
- case MEASURE:
- case PICK:
- case HOVER:
- case RESIZE:
- case SYNC:
- case CLICK:
- case ANIMFRAME:
- case MINIMIZATION:
+ default:
+ return false;
}
- return false;
}
@Override
}
@Override
- public void resizeInnerPanel(String data)
+ public Dimension resizeInnerPanel(String data)
{
- // TODO Auto-generated method stub
+ return null;
+ }
+ @Override
+ public Map<String, Object> getJSpecViewProperty(String arg0)
+ {
+ return null;
}
}
--- /dev/null
+package jalview.ext.varna;
+
+import fr.orsay.lri.varna.models.rna.RNA;
+
+import jalview.datamodel.AlignmentAnnotation;
+import jalview.datamodel.SequenceI;
+
+/**
+ * Data bean wrapping the data items that define one RNA view
+ */
+public class RnaModel
+{
+ public final String title;
+
+ public final AlignmentAnnotation ann;
+
+ public final SequenceI seq;
+
+ public final boolean gapped;
+
+ public final RNA rna;
+
+ // path to a file holding VARNA session state XML
+ public final String varnaSession;
+
+ public RnaModel(String t, AlignmentAnnotation aa, SequenceI s, RNA r,
+ boolean g,
+ String sessionFile)
+ {
+ title = t;
+ ann = aa;
+ seq = s;
+ gapped = g;
+ rna = r;
+ varnaSession = sessionFile;
+ }
+}
\ No newline at end of file
// temporary flag until SplitFrame is released
boolean asSplitFrame = Cache.getDefault(
- Preferences.ENABLE_SPLIT_FRAME, false);
+ Preferences.ENABLE_SPLIT_FRAME, true);
if (asSplitFrame)
{
/*
"label.translation_of_params", new Object[]
{ this.getTitle() });
af.setTitle(newTitle);
- if (Cache.getDefault(Preferences.ENABLE_SPLIT_FRAME, false))
+ if (Cache.getDefault(Preferences.ENABLE_SPLIT_FRAME, true))
{
final SequenceI[] seqs = viewport.getSelectionAsNewSequence();
viewport.openSplitFrame(af, new Alignment(seqs),
* If any cDNA/protein mappings can be made between the alignments, offer to
* open a linked alignment with split frame option.
*/
- if (Cache.getDefault(Preferences.ENABLE_SPLIT_FRAME, false))
+ if (Cache.getDefault(Preferences.ENABLE_SPLIT_FRAME, true))
{
if (AlignmentUtils.isMappable(al, getAlignment()))
{
*/
package jalview.gui;
+import jalview.bin.Cache;
+import jalview.datamodel.Alignment;
+import jalview.datamodel.AlignmentI;
+import jalview.datamodel.ColumnSelection;
+import jalview.datamodel.PDBEntry;
+import jalview.datamodel.SequenceI;
+import jalview.gui.StructureViewer.ViewerType;
+import jalview.io.AppletFormatAdapter;
+import jalview.io.JalviewFileChooser;
+import jalview.io.JalviewFileView;
+import jalview.schemes.BuriedColourScheme;
+import jalview.schemes.ColourSchemeI;
+import jalview.schemes.HelixColourScheme;
+import jalview.schemes.HydrophobicColourScheme;
+import jalview.schemes.PurinePyrimidineColourScheme;
+import jalview.schemes.StrandColourScheme;
+import jalview.schemes.TaylorColourScheme;
+import jalview.schemes.TurnColourScheme;
+import jalview.schemes.ZappoColourScheme;
+import jalview.structures.models.AAStructureBindingModel;
+import jalview.util.MessageManager;
+import jalview.util.Platform;
+
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import javax.swing.event.MenuEvent;
import javax.swing.event.MenuListener;
-import jalview.bin.Cache;
-import jalview.datamodel.Alignment;
-import jalview.datamodel.AlignmentI;
-import jalview.datamodel.ColumnSelection;
-import jalview.datamodel.PDBEntry;
-import jalview.datamodel.SequenceI;
-import jalview.gui.StructureViewer.ViewerType;
-import jalview.io.AppletFormatAdapter;
-import jalview.io.JalviewFileChooser;
-import jalview.io.JalviewFileView;
-import jalview.schemes.BuriedColourScheme;
-import jalview.schemes.ColourSchemeI;
-import jalview.schemes.HelixColourScheme;
-import jalview.schemes.HydrophobicColourScheme;
-import jalview.schemes.PurinePyrimidineColourScheme;
-import jalview.schemes.StrandColourScheme;
-import jalview.schemes.TaylorColourScheme;
-import jalview.schemes.TurnColourScheme;
-import jalview.schemes.ZappoColourScheme;
-import jalview.structures.models.AAStructureBindingModel;
-import jalview.util.MessageManager;
-import jalview.util.Platform;
-
public class AppJmol extends StructureViewerBase
{
AppJmolBinding jmb;
this.addInternalFrameListener(new InternalFrameAdapter()
{
+ @Override
public void internalFrameClosing(InternalFrameEvent internalFrameEvent)
{
closeViewer(false);
}
this.addInternalFrameListener(new InternalFrameAdapter()
{
+ @Override
public void internalFrameClosing(InternalFrameEvent internalFrameEvent)
{
closeViewer(false);
;
jmb.allocateViewer(renderPanel, true, "", null, null, "", scriptWindow,
null);
- jmb.newJmolPopup(true, "Jmol", true);
+ jmb.newJmolPopup("Jmol");
if (command == null)
{
command = "";
final Rectangle rectClip = new Rectangle();
+ @Override
public void paintComponent(Graphics g)
{
getSize(currentSize);
import jalview.structure.StructureSelectionManager;
import java.awt.Container;
-import java.util.BitSet;
+import java.util.Map;
import org.jmol.api.JmolAppConsoleInterface;
-import org.jmol.api.JmolViewer;
-import org.jmol.popup.JmolPopup;
-import org.openscience.jmol.app.jmolpanel.AppConsole;
+import org.jmol.java.BS;
+import org.jmol.popup.JmolAwtPopup;
+import org.openscience.jmol.app.jmolpanel.console.AppConsole;
public class AppJmolBinding extends JalviewJmolBinding
{
return new SequenceRenderer(((AlignmentPanel) alignment).av);
}
+ @Override
public void sendConsoleEcho(String strEcho)
{
if (console != null)
}
}
+ @Override
public void sendConsoleMessage(String strStatus)
{
if (console != null && strStatus != null)
}
}
+ @Override
public void notifyScriptTermination(String strStatus, int msWalltime)
{
// todo - script termination doesn't happen ?
showUrl(url, "jmol");
}
- public void newJmolPopup(boolean translateLocale, String menuName,
- boolean asPopup)
+ public void newJmolPopup(String menuName)
{
- jmolpopup = new JmolPopup();
- jmolpopup.initialize(viewer, translateLocale, menuName, asPopup);
+ jmolpopup = new JmolAwtPopup();
+ jmolpopup.jpiInitialize((viewer), menuName);
}
- public void selectionChanged(BitSet arg0)
+ @Override
+ public void selectionChanged(BS arg0)
{
// TODO Auto-generated method stub
}
+ @Override
public void refreshPdbEntries()
{
// TODO Auto-generated method stub
}
+ @Override
public void showConsole(boolean b)
{
appJmolWindow.showConsole(b);
}
@Override
- protected JmolAppConsoleInterface createJmolConsole(JmolViewer viewer2,
+ protected JmolAppConsoleInterface createJmolConsole(
Container consolePanel, String buttonsToShow)
{
+ viewer.setJmolCallbackListener(this);
return new AppConsole(viewer, consolePanel, buttonsToShow);
}
appJmolWindow.removeAlignmentPanel(((SeqPanel) svl).ap);
}
}
+
+ @Override
+ public Map<String, Object> getJSpecViewProperty(String arg0)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
}
import java.awt.BorderLayout;
import java.awt.Color;
-import java.util.ArrayList;
+import java.lang.reflect.InvocationTargetException;
+import java.util.Collection;
import java.util.Hashtable;
+import java.util.LinkedHashMap;
+import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import fr.orsay.lri.varna.VARNAPanel;
import fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax;
+import fr.orsay.lri.varna.exceptions.ExceptionLoadingFailed;
import fr.orsay.lri.varna.exceptions.ExceptionUnmatchedClosingParentheses;
-import fr.orsay.lri.varna.interfaces.InterfaceVARNAListener;
import fr.orsay.lri.varna.interfaces.InterfaceVARNASelectionListener;
import fr.orsay.lri.varna.models.BaseList;
-import fr.orsay.lri.varna.models.VARNAConfig;
+import fr.orsay.lri.varna.models.FullBackup;
import fr.orsay.lri.varna.models.annotations.HighlightRegionAnnotation;
import fr.orsay.lri.varna.models.rna.ModeleBase;
import fr.orsay.lri.varna.models.rna.RNA;
-import jalview.bin.Cache;
+import jalview.analysis.AlignSeq;
+import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.ColumnSelection;
+import jalview.datamodel.RnaViewerModel;
import jalview.datamodel.SequenceGroup;
import jalview.datamodel.SequenceI;
+import jalview.ext.varna.RnaModel;
import jalview.structure.SecondaryStructureListener;
import jalview.structure.SelectionListener;
import jalview.structure.SelectionSource;
import jalview.structure.StructureSelectionManager;
import jalview.structure.VamsasSource;
+import jalview.util.Comparison;
import jalview.util.MessageManager;
import jalview.util.ShiftList;
-public class AppVarna extends JInternalFrame implements
- InterfaceVARNAListener, SelectionListener,
- SecondaryStructureListener// implements
- // Runnable,SequenceStructureBinding,
- // ViewSetProvider
- , InterfaceVARNASelectionListener, VamsasSource
-
+public class AppVarna extends JInternalFrame implements SelectionListener,
+ SecondaryStructureListener, InterfaceVARNASelectionListener,
+ VamsasSource
{
- AppVarnaBinding vab;
+ private static final Pattern PAIRS_PATTERN = Pattern
+ .compile("[^([{<>}])]");
+
+ private AppVarnaBinding vab;
- VARNAPanel varnaPanel;
+ private AlignmentPanel ap;
- public String name;
+ private String viewId;
- public StructureSelectionManager ssm;
+ private StructureSelectionManager ssm;
/*
- * public AppVarna(){ vab = new AppVarnaBinding(); initVarna(); }
+ * Lookup for sequence and annotation mapped to each RNA in the viewer. Using
+ * a linked hashmap means that order is preserved when saved to the project.
*/
+ private Map<RNA, RnaModel> models = new LinkedHashMap<RNA, RnaModel>();
+
+ private Map<RNA, ShiftList> offsets = new Hashtable<RNA, ShiftList>();
+
+ private Map<RNA, ShiftList> offsetsInv = new Hashtable<RNA, ShiftList>();
+
+ private JSplitPane split;
- AlignmentPanel ap;
+ private VarnaHighlighter mouseOverHighlighter = new VarnaHighlighter();
- public AppVarna(String sname, SequenceI seq, String strucseq,
- String struc, String name, AlignmentPanel ap)
+ private VarnaHighlighter selectionHighlighter = new VarnaHighlighter();
+
+ private class VarnaHighlighter
{
+ private HighlightRegionAnnotation _lastHighlight;
- // System.out.println("1:"+sname);
- // System.out.println("2:"+seq);
- // System.out.println("3:"+strucseq);
- // System.out.println("4:"+struc);
- // System.out.println("5:"+name);
- // System.out.println("6:"+ap);
- this.ap = ap;
- ArrayList<RNA> rnaList = new ArrayList<RNA>();
- RNA rna1 = new RNA(name);
- try
+ private RNA _lastRNAhighlighted = null;
+
+ public VarnaHighlighter()
{
- rna1.setRNA(strucseq, replaceOddGaps(struc));
- // System.out.println("The sequence is :"+rna1.getSeq());
- // System.out.println("The sequence is:"+struc);
- // System.out.println("The sequence is:"+replaceOddGaps(struc).toString());
- } catch (ExceptionUnmatchedClosingParentheses e2)
+ }
+
+ /**
+ * Constructor when restoring from Varna session, including any highlight
+ * state
+ *
+ * @param rna
+ */
+ public VarnaHighlighter(RNA rna)
{
- e2.printStackTrace();
- } catch (ExceptionFileFormatOrSyntax e3)
+ // TODO nice try but doesn't work; do we need a highlighter per model?
+ _lastRNAhighlighted = rna;
+ List<HighlightRegionAnnotation> highlights = rna.getHighlightRegion();
+ if (highlights != null && !highlights.isEmpty())
+ {
+ _lastHighlight = highlights.get(0);
+ }
+ }
+
+ public void highlightRegion(RNA rna, int start, int end)
{
- e3.printStackTrace();
+ clearLastSelection();
+ HighlightRegionAnnotation highlight = new HighlightRegionAnnotation(
+ rna.getBasesBetween(start, end));
+ rna.addHighlightRegion(highlight);
+ _lastHighlight = highlight;
+ _lastRNAhighlighted = rna;
}
- RNA trim = trimRNA(rna1, "trimmed " + sname);
- rnaList.add(trim);
- rnaList.add(rna1);
- rnas.put(seq, rna1);
- rnas.put(seq, trim);
- rna1.setName(sname + " (with gaps)");
+ public HighlightRegionAnnotation getLastHighlight()
+ {
+ return _lastHighlight;
+ }
+ /**
+ * Clears all structure selection and refreshes the display
+ */
+ public void clearSelection()
{
- seqs.put(trim, seq);
- seqs.put(rna1, seq);
+ if (_lastRNAhighlighted != null)
+ {
+ _lastRNAhighlighted.getHighlightRegion().clear();
+ vab.updateSelectedRNA(_lastRNAhighlighted);
+ _lastRNAhighlighted = null;
+ _lastHighlight = null;
+ }
+ }
- /**
- * if (false || seq.getStart()!=1) { for (RNA rshift:rnaList) { ShiftList
- * shift=offsets.get(rshift); if (shift==null) { offsets.put(rshift,
- * shift=new ShiftList());} shift.addShift(1, seq.getStart()-1);
- * offsetsInv.put(rshift, shift.getInverse()); } }
- **/
+ /**
+ * Clear the last structure selection
+ */
+ public void clearLastSelection()
+ {
+ if (_lastRNAhighlighted != null)
+ {
+ _lastRNAhighlighted.removeHighlightRegion(_lastHighlight);
+ _lastRNAhighlighted = null;
+ _lastHighlight = null;
+ }
}
- vab = new AppVarnaBinding(rnaList);
- // vab = new AppVarnaBinding(seq,struc);
- this.name = sname + " trimmed to " + name;
+ }
+
+ /**
+ * Constructor
+ *
+ * @param seq
+ * the RNA sequence
+ * @param aa
+ * the annotation with the secondary structure string
+ * @param ap
+ * the AlignmentPanel creating this object
+ */
+ public AppVarna(SequenceI seq, AlignmentAnnotation aa, AlignmentPanel ap)
+ {
+ this(ap);
+
+ String sname = aa.sequenceRef == null ? "secondary structure (alignment)"
+ : seq.getName() + " structure";
+ String theTitle = sname
+ + (aa.sequenceRef == null ? " trimmed to " + seq.getName() : "");
+ theTitle = MessageManager.formatMessage("label.varna_params",
+ new String[]
+ { theTitle });
+ setTitle(theTitle);
+
+ String gappedTitle = sname + " (with gaps)";
+ RnaModel gappedModel = new RnaModel(gappedTitle, aa, seq, null, true,
+ null);
+ addModel(gappedModel, gappedTitle);
+
+ String trimmedTitle = "trimmed " + sname;
+ RnaModel trimmedModel = new RnaModel(trimmedTitle, aa, seq, null,
+ false, null);
+ addModel(trimmedModel, trimmedTitle);
+ vab.setSelectedIndex(0);
+ }
+
+ /**
+ * Constructor that links the viewer to a parent panel (but has no structures
+ * yet - use addModel to add them)
+ *
+ * @param ap
+ */
+ protected AppVarna(AlignmentPanel ap)
+ {
+ this.ap = ap;
+ this.viewId = System.currentTimeMillis() + "." + this.hashCode();
+ vab = new AppVarnaBinding();
initVarna();
- ssm = ap.getStructureSelectionManager();
- // System.out.println(ssm.toString());
+ this.ssm = ap.getStructureSelectionManager();
ssm.addStructureViewerListener(this);
ssm.addSelectionListener(this);
addInternalFrameListener(new InternalFrameAdapter()
close();
}
});
+ }
+ /**
+ * Constructor given viewer data read from a saved project file
+ *
+ * @param model
+ * @param ap
+ * the (or a) parent alignment panel
+ */
+ public AppVarna(RnaViewerModel model, AlignmentPanel ap)
+ {
+ this(ap);
+ setTitle(model.title);
+ this.viewId = model.viewId;
+ setBounds(model.x, model.y, model.width, model.height);
+ this.split.setDividerLocation(model.dividerLocation);
}
+ /**
+ * Constructs a split pane with an empty selection list and display panel, and
+ * adds it to the desktop
+ */
public void initVarna()
{
-
- // vab.setFinishedInit(false);
- varnaPanel = vab.get_varnaPanel();
+ VARNAPanel varnaPanel = vab.get_varnaPanel();
setBackground(Color.white);
- JSplitPane split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true,
+ split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true,
vab.getListPanel(), varnaPanel);
getContentPane().setLayout(new BorderLayout());
getContentPane().add(split, BorderLayout.CENTER);
- // getContentPane().add(vab.getTools(), BorderLayout.NORTH);
- varnaPanel.addVARNAListener(this);
+
varnaPanel.addSelectionListener(this);
- jalview.gui.Desktop.addInternalFrame(this,
- MessageManager.formatMessage("label.varna_params", new String[]
- { name }), getBounds().width, getBounds().height);
+ jalview.gui.Desktop.addInternalFrame(this, "", getBounds().width,
+ getBounds().height);
this.pack();
showPanel(true);
-
}
public String replaceOddGaps(String oldStr)
{
- String patternStr = "[^([{<>}])]";
- String replacementStr = ".";
- Pattern pattern = Pattern.compile(patternStr);
- Matcher matcher = pattern.matcher(oldStr);
- String newStr = matcher.replaceAll(replacementStr);
+ Matcher matcher = PAIRS_PATTERN.matcher(oldStr);
+ String newStr = matcher.replaceAll(".");
return newStr;
}
+ /**
+ * Constructs a new RNA model from the given one, without gaps. Also
+ * calculates and saves a 'shift list'
+ *
+ * @param rna
+ * @param name
+ * @return
+ */
public RNA trimRNA(RNA rna, String name)
{
ShiftList offset = new ShiftList();
e3.printStackTrace();
}
- StringBuffer seq = new StringBuffer(rnaTrim.getSeq());
- StringBuffer struc = new StringBuffer(rnaTrim.getStructDBN());
- int ofstart = -1, sleng = rnaTrim.getSeq().length();
+ String seq = rnaTrim.getSeq();
+ StringBuilder struc = new StringBuilder(256);
+ struc.append(rnaTrim.getStructDBN());
+ int ofstart = -1;
+ int sleng = seq.length();
+
for (int i = 0; i < sleng; i++)
{
- // TODO: Jalview utility for gap detection java.utils.isGap()
- // TODO: Switch to jalview rna datamodel
- if (jalview.util.Comparison.isGap(seq.charAt(i)))
+ if (Comparison.isGap(seq.charAt(i)))
{
if (ofstart == -1)
{
ofstart = i;
}
+ /*
+ * mark base or base pair in the structure with *
+ */
if (!rnaTrim.findPair(i).isEmpty())
{
int m = rnaTrim.findPair(i).get(1);
offset.addShift(offset.shift(ofstart), ofstart - sleng);
ofstart = -1;
}
- String newSeq = rnaTrim.getSeq().replace("-", "");
- rnaTrim.getSeq().replace(".", "");
+
+ /*
+ * remove the marked gaps from the structure
+ */
String newStruc = struc.toString().replace("*", "");
+ /*
+ * remove gaps from the sequence
+ */
+ String newSeq = AlignSeq.extractGaps(Comparison.GapChars, seq);
+
try
{
rnaTrim.setRNA(newSeq, newStruc);
registerOffset(rnaTrim, offset);
} catch (ExceptionUnmatchedClosingParentheses e)
{
- // TODO Auto-generated catch block
e.printStackTrace();
} catch (ExceptionFileFormatOrSyntax e)
{
- // TODO Auto-generated catch block
e.printStackTrace();
}
return rnaTrim;
}
- // needs to be many-many
- Map<RNA, SequenceI> seqs = new Hashtable<RNA, SequenceI>();
-
- Map<SequenceI, RNA> rnas = new Hashtable<SequenceI, RNA>();
-
- Map<RNA, ShiftList> offsets = new Hashtable<RNA, ShiftList>();
-
- Map<RNA, ShiftList> offsetsInv = new Hashtable<RNA, ShiftList>();
-
+ /**
+ * Save the sequence to structure mapping, and also its inverse.
+ *
+ * @param rnaTrim
+ * @param offset
+ */
private void registerOffset(RNA rnaTrim, ShiftList offset)
{
offsets.put(rnaTrim, offset);
this.setVisible(show);
}
- private boolean _started = false;
-
- public void run()
- {
- _started = true;
-
- try
- {
- initVarna();
- } catch (OutOfMemoryError oomerror)
- {
- new OOMWarning("When trying to open the Varna viewer!", oomerror);
- } catch (Exception ex)
- {
- Cache.log.error("Couldn't open Varna viewer!", ex);
- }
- }
-
- @Override
- public void onUINewStructure(VARNAConfig v, RNA r)
- {
-
- }
-
- @Override
- public void onWarningEmitted(String s)
- {
- // TODO Auto-generated method stub
-
- }
-
- private class VarnaHighlighter
- {
- private HighlightRegionAnnotation _lastHighlight;
-
- private RNA _lastRNAhighlighted = null;
-
- public void highlightRegion(RNA rna, int start, int end)
- {
- clearSelection(null);
- HighlightRegionAnnotation highlight = new HighlightRegionAnnotation(
- rna.getBasesBetween(start, end));
- rna.addHighlightRegion(highlight);
- _lastHighlight = highlight;
- _lastRNAhighlighted = rna;
-
- }
-
- public HighlightRegionAnnotation getLastHighlight()
- {
- return _lastHighlight;
- }
-
- public RNA getLastRNA()
- {
- return _lastRNAhighlighted;
- }
-
- public void clearSelection(AppVarnaBinding vab)
- {
- if (_lastRNAhighlighted != null)
- {
- _lastRNAhighlighted.removeHighlightRegion(_lastHighlight);
- if (vab != null)
- {
- vab.updateSelectedRNA(_lastRNAhighlighted);
- }
- _lastRNAhighlighted = null;
- _lastHighlight = null;
-
- }
- }
- }
-
- VarnaHighlighter mouseOverHighlighter = new VarnaHighlighter(),
- selectionHighlighter = new VarnaHighlighter();
-
/**
* If a mouseOver event from the AlignmentPanel is noticed the currently
* selected RNA in the VARNA window is highlighted at the specific position.
* To be able to remove it before the next highlight it is saved in
* _lastHighlight
+ *
+ * @param sequence
+ * @param index
+ * the aligned sequence position (base 0)
+ * @param position
+ * the dataset sequence position (base 1)
*/
@Override
- public void mouseOverSequence(SequenceI sequence, int index)
+ public void mouseOverSequence(SequenceI sequence, final int index,
+ final int position)
{
RNA rna = vab.getSelectedRNA();
- if (seqs.get(rna) == sequence)
+ if (rna == null)
{
- ShiftList shift = offsets.get(rna);
- if (shift != null)
- {
- // System.err.print("Orig pos:"+index);
- index = shift.shift(index);
- // System.err.println("\nFinal pos:"+index);
- }
- mouseOverHighlighter.highlightRegion(rna, index, index);
+ return;
+ }
+ RnaModel rnaModel = models.get(rna);
+ if (rnaModel.seq == sequence)
+ {
+ int highlightPos = rnaModel.gapped ? index : position - 1;
+ // int highlightPos = index;
+ // ShiftList shift = offsets.get(rna);
+ // if (shift != null)
+ // {
+ // System.err.print("Orig pos:" + index);
+ // highlightPos = shift.shift(index);
+ // System.err.println("\nFinal pos:" + index);
+ // }
+ mouseOverHighlighter.highlightRegion(rna, highlightPos, highlightPos);
vab.updateSelectedRNA(rna);
}
}
@Override
- public void onStructureRedrawn()
- {
- // TODO Auto-generated method stub
-
- }
-
- @Override
public void selection(SequenceGroup seqsel, ColumnSelection colsel,
SelectionSource source)
{
// TODO - reuse many-one panel-view system in jmol viewer
return;
}
+ RNA rna = vab.getSelectedRNA();
+ if (rna == null)
+ {
+ return;
+ }
if (seqsel != null && seqsel.getSize() > 0)
{
int start = seqsel.getStartRes(), end = seqsel.getEndRes();
- RNA rna = vab.getSelectedRNA();
ShiftList shift = offsets.get(rna);
if (shift != null)
{
}
else
{
- selectionHighlighter.clearSelection(vab);
+ selectionHighlighter.clearSelection();
}
}
+ /**
+ * Respond to a change of the base hovered over in the Varna viewer
+ */
@Override
- public void onHoverChanged(ModeleBase arg0, ModeleBase arg1)
+ public void onHoverChanged(ModeleBase previousBase, ModeleBase newBase)
{
RNA rna = vab.getSelectedRNA();
ShiftList shift = offsetsInv.get(rna);
- SequenceI seq = seqs.get(rna);
- if (arg1 != null && seq != null)
+ SequenceI seq = models.get(rna).seq;
+ if (newBase != null && seq != null)
{
if (shift != null)
{
- int i = shift.shift(arg1.getIndex());
+ int i = shift.shift(newBase.getIndex());
// System.err.println("shifted "+(arg1.getIndex())+" to "+i);
ssm.mouseOverVamsasSequence(seq, i, this);
}
else
{
- ssm.mouseOverVamsasSequence(seq, arg1.getIndex(), this);
+ ssm.mouseOverVamsasSequence(seq, newBase.getIndex(), this);
}
}
}
}
- @Override
- public void onTranslationChanged()
+ /**
+ * Returns the path to a temporary file containing a representation of the
+ * state of one Varna display
+ *
+ * @param rna
+ *
+ * @return
+ */
+ public String getStateInfo(RNA rna)
+ {
+ return vab.getStateInfo(rna);
+ }
+
+ public AlignmentPanel getAlignmentPanel()
{
- // TODO Auto-generated method stub
+ return ap;
+ }
+ public String getViewId()
+ {
+ return viewId;
}
- @Override
- public void onZoomLevelChanged()
+ /**
+ * Returns true if any of the viewer's models (not necessarily the one
+ * currently displayed) is for the given sequence
+ *
+ * @param seq
+ * @return
+ */
+ public boolean isListeningFor(SequenceI seq)
{
- // TODO Auto-generated method stub
+ for (RnaModel model : models.values())
+ {
+ if (model.seq == seq)
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+ /**
+ * Returns a value representing the horizontal split divider location
+ *
+ * @return
+ */
+ public int getDividerLocation()
+ {
+ return split == null ? 0 : split.getDividerLocation();
}
/**
protected void close()
{
/*
- * Deregister as a listener, to free references to this object
+ * Deregister as a listener, to release references to this object
*/
if (ssm != null)
{
}
}
+ /**
+ * Returns the secondary structure annotation that this viewer displays for
+ * the given sequence
+ *
+ * @return
+ */
+ public AlignmentAnnotation getAnnotation(SequenceI seq)
+ {
+ for (RnaModel model : models.values())
+ {
+ if (model.seq == seq)
+ {
+ return model.ann;
+ }
+ }
+ return null;
+ }
+
+ public int getSelectedIndex()
+ {
+ return this.vab.getSelectedIndex();
+ }
+
+ /**
+ * Returns the set of models shown by the viewer
+ *
+ * @return
+ */
+ public Collection<RnaModel> getModels()
+ {
+ return models.values();
+ }
+
+ /**
+ * Add a model (e.g. loaded from project file)
+ *
+ * @param rna
+ * @param modelName
+ */
+ public RNA addModel(RnaModel model, String modelName)
+ {
+ if (!model.ann.isValidStruc())
+ {
+ throw new IllegalArgumentException("Invalid RNA structure annotation");
+ }
+
+ /*
+ * loaded from project file with Varna session data
+ */
+ if (model.varnaSession != null)
+ {
+ try
+ {
+ FullBackup fromSession = vab.vp.loadSession(model.varnaSession);
+ vab.addStructure(fromSession.rna, fromSession.config);
+ RNA rna = fromSession.rna;
+ // copy the model, but now including the RNA object
+ RnaModel newModel = new RnaModel(model.title, model.ann, model.seq,
+ rna, model.gapped, model.varnaSession);
+ if (!model.gapped)
+ {
+ registerOffset(rna, buildOffset(model.seq));
+ }
+ models.put(rna, newModel);
+ // capture rna selection state when saved
+ selectionHighlighter = new VarnaHighlighter(rna);
+ return fromSession.rna;
+ } catch (ExceptionLoadingFailed e)
+ {
+ e.printStackTrace();
+ return null;
+ }
+ }
+
+ /*
+ * opened on request in Jalview session
+ */
+ RNA rna = new RNA(modelName);
+ String struc = model.ann.getRNAStruc();
+ struc = replaceOddGaps(struc);
+
+ String strucseq = model.seq.getSequenceAsString();
+ try
+ {
+ rna.setRNA(strucseq, struc);
+ } catch (ExceptionUnmatchedClosingParentheses e2)
+ {
+ e2.printStackTrace();
+ } catch (ExceptionFileFormatOrSyntax e3)
+ {
+ e3.printStackTrace();
+ }
+
+ if (!model.gapped)
+ {
+ rna = trimRNA(rna, modelName);
+ }
+ models.put(rna, new RnaModel(modelName, model.ann, model.seq, rna,
+ model.gapped, null));
+ vab.addStructure(rna);
+ return rna;
+ }
+
+ /**
+ * Constructs a shift list that describes the gaps in the sequence
+ *
+ * @param seq
+ * @return
+ */
+ protected ShiftList buildOffset(SequenceI seq)
+ {
+ // TODO refactor to avoid duplication with trimRNA()
+ // TODO JAL-1789 bugs in use of ShiftList here
+ ShiftList offset = new ShiftList();
+ int ofstart = -1;
+ int sleng = seq.getLength();
+ char[] seqChars = seq.getSequence();
+
+ for (int i = 0; i < sleng; i++)
+ {
+ if (Comparison.isGap(seqChars[i]))
+ {
+ if (ofstart == -1)
+ {
+ ofstart = i;
+ }
+ }
+ else
+ {
+ if (ofstart > -1)
+ {
+ offset.addShift(offset.shift(ofstart), ofstart - i);
+ ofstart = -1;
+ }
+ }
+ }
+ // final gap
+ if (ofstart > -1)
+ {
+ offset.addShift(offset.shift(ofstart), ofstart - sleng);
+ ofstart = -1;
+ }
+ return offset;
+ }
+
+ /**
+ * Set the selected index in the model selection list
+ *
+ * @param selectedR
+ */
+ public void setInitialSelection(final int selectedIndex)
+ {
+ vab.setSelectedIndex(selectedIndex);
+ }
}
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.GridLayout;
import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.Transferable;
import java.awt.dnd.DnDConstants;
import java.awt.dnd.DropTarget;
-import java.awt.dnd.DropTargetDragEvent;
+import java.awt.dnd.DropTargetAdapter;
import java.awt.dnd.DropTargetDropEvent;
-import java.awt.dnd.DropTargetEvent;
-import java.awt.dnd.DropTargetListener;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
import java.awt.event.ComponentEvent;
+import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
-import java.awt.event.MouseListener;
import java.io.File;
+import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import javax.swing.DefaultListModel;
import javax.swing.DefaultListSelectionModel;
-import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
-import javax.swing.JTextField;
import javax.swing.ListModel;
import javax.swing.ListSelectionModel;
import javax.swing.event.ListSelectionEvent;
import fr.orsay.lri.varna.VARNAPanel;
import fr.orsay.lri.varna.components.ReorderableJList;
-import fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax;
import fr.orsay.lri.varna.exceptions.ExceptionLoadingFailed;
+import fr.orsay.lri.varna.exceptions.ExceptionNAViewAlgorithm;
import fr.orsay.lri.varna.exceptions.ExceptionNonEqualLength;
-import fr.orsay.lri.varna.exceptions.ExceptionUnmatchedClosingParentheses;
-import fr.orsay.lri.varna.interfaces.InterfaceVARNAListener;
import fr.orsay.lri.varna.models.FullBackup;
import fr.orsay.lri.varna.models.VARNAConfig;
-import fr.orsay.lri.varna.models.rna.Mapping;
import fr.orsay.lri.varna.models.rna.RNA;
import jalview.datamodel.SequenceI;
+import jalview.ext.varna.JalviewVarnaBinding;
import jalview.structure.AtomSpec;
import jalview.util.MessageManager;
-public class AppVarnaBinding extends jalview.ext.varna.JalviewVarnaBinding
- implements DropTargetListener, InterfaceVARNAListener,
- MouseListener
+public class AppVarnaBinding extends JalviewVarnaBinding
{
-
- /**
- *
- */
- // private static final long serialVersionUID = -790155708306987257L;
-
- private String DEFAULT_SEQUENCE = "CAGCACGACACUAGCAGUCAGUGUCAGACUGCAIACAGCACGACACUAGCAGUCAGUGUCAGACUGCAIACAGCACGACACUAGCAGUCAGUGUCAGACUGCAIA";
-
- private String DEFAULT_STRUCTURE1 = "..(((((...(((((...(((((...(((((.....)))))...))))).....(((((...(((((.....)))))...))))).....)))))...)))))..";
-
- private String DEFAULT_STRUCTURE2 = "..(((((...(((((...(((((........(((((...(((((.....)))))...)))))..................))))).....)))))...)))))..";
-
public VARNAPanel vp;
- protected JPanel _tools = new JPanel();
-
- private JPanel _input = new JPanel();
-
- private JPanel _seqPanel = new JPanel();
-
- private JPanel _strPanel = new JPanel();
-
- private JLabel _info = new JLabel();
-
- private JTextField _str = new JTextField();
-
- private JTextField _seq = new JTextField();
-
- private JLabel _strLabel = new JLabel(
- MessageManager.getString("label.str"));
-
- private JLabel _seqLabel = new JLabel(
- MessageManager.getString("label.seq"));
-
- private JButton _createButton = new JButton(
- MessageManager.getString("action.create"));
-
- private JButton _updateButton = new JButton(
- MessageManager.getString("action.update"));
-
- private JButton _deleteButton = new JButton(
- MessageManager.getString("action.delete"));
-
- private JButton _duplicateButton = new JButton(
- MessageManager.getString("action.snapshot"));
-
+ // remove unused (commented out) fields?
+ // protected JPanel _tools = new JPanel();
+ //
+ // private JPanel _input = new JPanel();
+ //
+ // private JPanel _strPanel = new JPanel();
+ //
+ // private JTextField _str = new JTextField();
+ //
+ // private JTextField _seq = new JTextField();
+ //
+ // private JLabel _strLabel = new JLabel(
+ // MessageManager.getString("label.str"));
+ //
+ // private JButton _updateButton = new JButton(
+ // MessageManager.getString("action.update"));
+ //
+ // private JButton _deleteButton = new JButton(
+ // MessageManager.getString("action.delete"));
+ //
+ // private JButton _duplicateButton = new JButton(
+ // MessageManager.getString("action.snapshot"));
+ //
protected JPanel _listPanel = new JPanel();
private ReorderableJList _sideList = null;
private BackupHolder _rnaList;
- /*
- * public AppVarnaBinding() { //super("VARNA in Jalview");
- * //this.set_seq("ATGC"); //this.set_str(".()."); //RNAPanelDemoInit();
- *
- * //initVarna("ATGCATGATATATATATAT","....((((...))))....");
- * initVarna(this.DEFAULT_SEQUENCE,this.DEFAULT_STRUCTURE1); }
+ /**
+ * Constructor
*/
-
- public AppVarnaBinding(String seq, String struc)
- {
- // super("VARNA in Jalview");
- initVarna(seq, struc);
-
- }
-
- public AppVarnaBinding(ArrayList<RNA> rnaList)
+ public AppVarnaBinding()
{
-
- // super("VARNA in Jalview");
- initVarnaEdit(rnaList);
+ init();
}
- private void initVarna(String seq, String str)
+ /**
+ * Constructs the VARNAPanel and an (empty) selection list of structures to
+ * show in it
+ */
+ private void init()
{
+ DefaultListModel<FullBackup> dlm = new DefaultListModel<FullBackup>();
- DefaultListModel dlm = new DefaultListModel();
+ int marginTools = 40;
DefaultListSelectionModel m = new DefaultListSelectionModel();
m.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
_sideList = new ReorderableJList();
_sideList.setModel(dlm);
- _sideList.addMouseListener(this);
- _sideList.setSelectionModel(m);
- _sideList.setPreferredSize(new Dimension(100, 0));
- _sideList.addListSelectionListener(new ListSelectionListener()
+ _sideList.addMouseListener(new MouseAdapter()
{
- public void valueChanged(ListSelectionEvent arg0)
- {
- if (!_sideList.isSelectionEmpty() && !arg0.getValueIsAdjusting())
- {
- FullBackup sel = (FullBackup) _sideList.getSelectedValue();
- Mapping map = Mapping.DefaultOutermostMapping(vp.getRNA()
- .getSize(), sel.rna.getSize());
- vp.showRNAInterpolated(sel.rna, sel.config, map);
- _seq.setText(sel.rna.getSeq());
- _str.setText(sel.rna.getStructDBN());
- }
+ @Override
+ public void mouseClicked(MouseEvent e) {
+ AppVarnaBinding.this.mouseClicked(e);
}
});
-
- _rnaList = new BackupHolder(dlm, _sideList);
- RNA _RNA1 = new RNA("User defined 1");
-
- try
- {
-
- vp = new VARNAPanel("0", ".");
- _RNA1.setRNA(seq, str);
- _RNA1.drawRNARadiate(vp.getConfig());
- } catch (ExceptionNonEqualLength e)
- {
- vp.errorDialog(e);
- } catch (ExceptionUnmatchedClosingParentheses e2)
- {
- e2.printStackTrace();
- } catch (ExceptionFileFormatOrSyntax e3)
- {
- e3.printStackTrace();
- }
- vp.setPreferredSize(new Dimension(400, 400));
- _rnaList.add(vp.getConfig().clone(), _RNA1, generateDefaultName(), true);
-
- // TODO setBackground(_backgroundColor);
- vp.setBackground(_backgroundColor);
-
- // TODO getContentPane().setLayout(new BorderLayout());
- // TODO getContentPane().add(vp, BorderLayout.CENTER);
-
- // setVisible(true);
- vp.addVARNAListener(this);
- }
-
- private void initVarnaEdit(ArrayList<RNA> rnaInList)
- {
-
- DefaultListModel dlm = new DefaultListModel();
-
- int marginTools = 40;
-
- DefaultListSelectionModel m = new DefaultListSelectionModel();
- m.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
- m.setLeadAnchorNotificationEnabled(false);
-
- _sideList = new ReorderableJList();
- _sideList.setModel(dlm);
- _sideList.addMouseListener(this);
_sideList.setSelectionModel(m);
_sideList.setPreferredSize(new Dimension(100, 0));
_sideList.addListSelectionListener(new ListSelectionListener()
{
- public void valueChanged(ListSelectionEvent arg0)
+ public void valueChanged(ListSelectionEvent evt)
{
- // System.out.println(arg0);
- if (!_sideList.isSelectionEmpty() && !arg0.getValueIsAdjusting())
- {
- FullBackup sel = (FullBackup) _sideList.getSelectedValue();
- Mapping map = Mapping.DefaultOutermostMapping(vp.getRNA()
- .getSize(), sel.rna.getSize());
- // vp.showRNAInterpolated(sel.rna, sel.config, map);
- vp.showRNA(sel.rna, sel.config);
- // _seq.setText(sel.rna.getSeq());
- _str.setText(sel.rna.getStructDBN());
- }
+ changeSelectedStructure_actionPerformed(evt);
}
});
_rnaList = new BackupHolder(dlm, _sideList);
try
{
-
vp = new VARNAPanel("0", ".");
- for (int i = 0; i < rnaInList.size(); i++)
- {
- rnaInList.get(i).drawRNARadiate(vp.getConfig());
-
- }
} catch (ExceptionNonEqualLength e)
{
vp.errorDialog(e);
}
vp.setPreferredSize(new Dimension(400, 400));
- for (int i = 0; i < rnaInList.size(); i++)
- {
- if (i < rnaInList.size() - 1)
- {
- _rnaList.add(vp.getConfig().clone(), rnaInList.get(i), rnaInList
- .get(i).getName());
- }
- else
- {
- _rnaList.add(vp.getConfig().clone(), rnaInList.get(i), rnaInList
- .get(i).getName(), true);
- }
- }
-
- /*
- * _rnaList.add(vp.getConfig().clone(),_RNA2,generateDefaultName());
- * _rnaList.add(vp.getConfig().clone(),_RNA1,generateDefaultName(),true);
- */
JScrollPane listScroller = new JScrollPane(_sideList);
listScroller.setPreferredSize(new Dimension(150, 0));
vp.setBackground(_backgroundColor);
- Font textFieldsFont = Font.decode("MonoSpaced-PLAIN-12");
-
- // _seqLabel.setHorizontalTextPosition(JLabel.LEFT);
- // _seqLabel.setPreferredSize(new Dimension(marginTools, 15));
- _seq.setFont(textFieldsFont);
- _seq.setText(rnaInList.get(0).getSeq());
-
- _updateButton.addActionListener(new ActionListener()
- {
- public void actionPerformed(ActionEvent e)
- {
- FullBackup sel = (FullBackup) _sideList.getSelectedValue();
- sel.rna.setSequence("A");
- }
- });
-
- // _seqPanel.setLayout(new BorderLayout());
- // _seqPanel.add(_seqLabel, BorderLayout.WEST);
- // _seqPanel.add(_seq, BorderLayout.CENTER);
-
- _strLabel.setPreferredSize(new Dimension(marginTools, 15));
- _strLabel.setHorizontalTextPosition(JLabel.LEFT);
- _str.setFont(textFieldsFont);
- _strPanel.setLayout(new BorderLayout());
- _strPanel.add(_strLabel, BorderLayout.WEST);
- _strPanel.add(_str, BorderLayout.CENTER);
-
- _input.setLayout(new GridLayout(1, 0));
- // _input.add(_seqPanel);
- _input.add(_strPanel);
-
- JPanel goPanel = new JPanel();
- goPanel.setLayout(new BorderLayout());
-
- _tools.setLayout(new BorderLayout());
- _tools.add(_input, BorderLayout.CENTER);
- // _tools.add(_info, BorderLayout.SOUTH);
- _tools.add(goPanel, BorderLayout.EAST);
-
- /*
- * _deleteButton.addActionListener(new ActionListener() { public void
- * actionPerformed(ActionEvent e) { _rnaList.removeSelected(); } });
- * _duplicateButton.addActionListener(new ActionListener() { public void
- * actionPerformed(ActionEvent e) {
- * _rnaList.add((VARNAConfig)vp.getConfig().
- * clone(),vp.getRNA().clone(),vp.getRNA
- * ().getName()+"-"+DateFormat.getTimeInstance(DateFormat.LONG).format(new
- * Date()),true); }});
- */
- goPanel.add(_updateButton, BorderLayout.CENTER);
-
- JPanel ops = new JPanel();
- ops.setLayout(new GridLayout(1, 2));
- ops.add(_deleteButton);
- ops.add(_duplicateButton);
+ // MC commented out stuff not added to panel - remove?
+ // Font textFieldsFont = Font.decode("MonoSpaced-PLAIN-12");
+ //
+ // _seq.setFont(textFieldsFont);
+ // if (!rnaList.isEmpty())
+ // {
+ // _seq.setText(rnaList.get(0).getSeq());
+ // }
+
+ // _updateButton.addActionListener(new ActionListener()
+ // {
+ // public void actionPerformed(ActionEvent e)
+ // {
+ // FullBackup sel = (FullBackup) _sideList.getSelectedValue();
+ // sel.rna.setSequence("A");
+ // }
+ // });
+ //
+ // _strLabel.setPreferredSize(new Dimension(marginTools, 15));
+ // _strLabel.setHorizontalTextPosition(JLabel.LEFT);
+ // _str.setFont(textFieldsFont);
+ // _strPanel.setLayout(new BorderLayout());
+ // _strPanel.add(_strLabel, BorderLayout.WEST);
+ // _strPanel.add(_str, BorderLayout.CENTER);
+ //
+ // _input.setLayout(new GridLayout(1, 0));
+ // _input.add(_strPanel);
+ //
+ // JPanel goPanel = new JPanel();
+ // goPanel.setLayout(new BorderLayout());
+ //
+ // _tools.setLayout(new BorderLayout());
+ // _tools.add(_input, BorderLayout.CENTER);
+ // _tools.add(goPanel, BorderLayout.EAST);
+ //
+ // goPanel.add(_updateButton, BorderLayout.CENTER);
+ //
+ // JPanel ops = new JPanel();
+ // ops.setLayout(new GridLayout(1, 2));
+ // ops.add(_deleteButton);
+ // ops.add(_duplicateButton);
JLabel j = new JLabel(
MessageManager.getString("label.structures_manager"),
JLabel.CENTER);
_listPanel.setLayout(new BorderLayout());
- // _listPanel.add(ops, BorderLayout.SOUTH);
_listPanel.add(j, BorderLayout.NORTH);
_listPanel.add(listScroller, BorderLayout.CENTER);
- // JSplitPane split = new
- // JSplitPane(JSplitPane.HORIZONTAL_SPLIT,true,_listPanel,vp);
- /**
- * TODO getContentPane().setLayout(new BorderLayout());
- * getContentPane().add(split, BorderLayout.CENTER);
- * getContentPane().add(_tools, BorderLayout.NORTH);
- */
-
- // TODO setVisible(true);
- DropTarget dt = new DropTarget(vp, this);
-
- vp.addVARNAListener(this);
- }
-
- public JPanel getTools()
- {
- return _tools;
+ new DropTarget(vp, new DropTargetAdapter() {
+ @Override
+ public void drop(DropTargetDropEvent dtde)
+ {
+ AppVarnaBinding.this.drop(dtde);
+ }
+ });
}
public JPanel getListPanel()
}
/**
- * TODO: Is it effective to transfer the whole RNA?
+ * Returns the currently selected RNA, or null if none selected
*
- * @return Currently selected RNA
+ * @return
*/
public RNA getSelectedRNA()
{
- return _rnaList.getElementAt(_sideList.getSelectedIndex()).rna;
+ int selectedIndex = _sideList.getSelectedIndex();
+ if (selectedIndex < 0)
+ {
+ return null;
+ }
+ FullBackup selected = _rnaList.getElementAt(selectedIndex);
+ return selected.rna;
}
/**
vp.showRNA(rnaEdit);
}
- /*
- * private void RNAPanelDemoInit() { DefaultListModel dlm = new
- * DefaultListModel();
- *
- *
- * int marginTools = 40;
- *
- * DefaultListSelectionModel m = new DefaultListSelectionModel();
- * m.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
- * m.setLeadAnchorNotificationEnabled(false);
- *
- *
- * _sideList = new ReorderableJList(); _sideList.setModel(dlm);
- * _sideList.addMouseListener(this); _sideList.setSelectionModel(m);
- * _sideList.setPreferredSize(new Dimension(100, 0));
- * _sideList.addListSelectionListener( new ListSelectionListener(){ public
- * void valueChanged(ListSelectionEvent arg0) { //System.out.println(arg0); if
- * (!_sideList.isSelectionEmpty() && !arg0.getValueIsAdjusting()) { FullBackup
- * sel = (FullBackup) _sideList.getSelectedValue(); Mapping map =
- * Mapping.DefaultOutermostMapping(vp.getRNA().getSize(), sel.rna.getSize());
- * vp.showRNAInterpolated(sel.rna,sel.config,map);
- * _seq.setText(sel.rna.getSeq()); _str.setText(sel.rna.getStructDBN()); } }
- * });
- *
- * _rnaList = new BackupHolder(dlm,_sideList); RNA _RNA1 = new
- * RNA("User defined 1"); RNA _RNA2 = new RNA("User defined 2"); try { vp =
- * new VARNAPanel("0","."); _RNA1.setRNA(DEFAULT_SEQUENCE,
- * DEFAULT_STRUCTURE1); _RNA1.drawRNARadiate(vp.getConfig());
- * _RNA2.setRNA(DEFAULT_SEQUENCE, DEFAULT_STRUCTURE2);
- * _RNA2.drawRNARadiate(vp.getConfig()); } catch (ExceptionNonEqualLength e) {
- * vp.errorDialog(e); } catch (ExceptionUnmatchedClosingParentheses e2) {
- * e2.printStackTrace(); } catch (ExceptionFileFormatOrSyntax e3) {
- * e3.printStackTrace(); } vp.setPreferredSize(new Dimension(400, 400));
- * _rnaList.add(vp.getConfig().clone(),_RNA2,generateDefaultName());
- * _rnaList.add(vp.getConfig().clone(),_RNA1,generateDefaultName(),true);
- *
- * JScrollPane listScroller = new JScrollPane(_sideList);
- * listScroller.setPreferredSize(new Dimension(150, 0));
- *
- * setBackground(_backgroundColor); vp.setBackground(_backgroundColor);
- *
- *
- * Font textFieldsFont = Font.decode("MonoSpaced-PLAIN-12");
- *
- * _seqLabel.setHorizontalTextPosition(JLabel.LEFT);
- * _seqLabel.setPreferredSize(new Dimension(marginTools, 15));
- * _seq.setFont(textFieldsFont); _seq.setText(DEFAULT_SEQUENCE);
- *
- * _createButton.addActionListener(new ActionListener() { public void
- * actionPerformed(ActionEvent e) { try { RNA nRNA = new
- * RNA(generateDefaultName()); nRNA.setRNA(_seq.getText(), _str.getText());
- * nRNA.drawRNARadiate(vp.getConfig()); _rnaList.add(new
- * VARNAConfig(),nRNA,true); } catch (ExceptionUnmatchedClosingParentheses e1)
- * { JOptionPane.showMessageDialog(vp, e1.getMessage(),"Error",
- * JOptionPane.ERROR_MESSAGE); } catch (ExceptionFileFormatOrSyntax e1) {
- * JOptionPane.showMessageDialog(vp, e1.getMessage(),"Error",
- * JOptionPane.ERROR_MESSAGE); } } });
- *
- *
- * _seqPanel.setLayout(new BorderLayout()); _seqPanel.add(_seqLabel,
- * BorderLayout.WEST); _seqPanel.add(_seq, BorderLayout.CENTER);
- *
- * _strLabel.setPreferredSize(new Dimension(marginTools, 15));
- * _strLabel.setHorizontalTextPosition(JLabel.LEFT);
- * _str.setFont(textFieldsFont); _strPanel.setLayout(new BorderLayout());
- * _strPanel.add(_strLabel, BorderLayout.WEST); _strPanel.add(_str,
- * BorderLayout.CENTER);
- *
- * _input.setLayout(new GridLayout(2, 0)); _input.add(_seqPanel);
- * _input.add(_strPanel);
- *
- * JPanel goPanel = new JPanel(); goPanel.setLayout(new BorderLayout());
- *
- * _tools.setLayout(new BorderLayout()); _tools.add(_input,
- * BorderLayout.CENTER); _tools.add(_info, BorderLayout.SOUTH);
- * _tools.add(goPanel, BorderLayout.EAST);
- *
- * _deleteButton.addActionListener(new ActionListener() { public void
- * actionPerformed(ActionEvent e) { _rnaList.removeSelected(); } });
- * _duplicateButton.addActionListener(new ActionListener() { public void
- * actionPerformed(ActionEvent e) {
- * _rnaList.add((VARNAConfig)vp.getConfig().clone
- * (),vp.getRNA().clone(),vp.getRNA
- * ().getName()+"-"+DateFormat.getTimeInstance(DateFormat.LONG).format(new
- * Date()),true); }});
- *
- * JPanel ops = new JPanel(); ops.setLayout(new GridLayout(1,2));
- * ops.add(_deleteButton); ops.add(_duplicateButton);
- *
- * JLabel j = new JLabel("Structures Manager",JLabel.CENTER);
- * _listPanel.setLayout(new BorderLayout());
- *
- * _listPanel.add(ops,BorderLayout.SOUTH);
- * _listPanel.add(j,BorderLayout.NORTH);
- * _listPanel.add(listScroller,BorderLayout.CENTER);
- *
- * goPanel.add(_createButton, BorderLayout.CENTER);
- *
- * JSplitPane split = new
- * JSplitPane(JSplitPane.HORIZONTAL_SPLIT,true,_listPanel,vp);
- * getContentPane().setLayout(new BorderLayout()); getContentPane().add(split,
- * BorderLayout.CENTER); getContentPane().add(_tools, BorderLayout.NORTH);
- *
- * setVisible(true); DropTarget dt = new DropTarget(vp, this);
- *
- * vp.addVARNAListener(this); }
- */
public static String generateDefaultName()
{
return "User file #" + _nextID++;
}
- public RNA getRNA()
- {
- return (RNA) _sideList.getSelectedValue();
- }
-
public String[][] getParameterInfo()
{
String[][] info =
return info;
}
- public void init()
- {
- vp.setBackground(_backgroundColor);
- _error = true;
- }
-
@SuppressWarnings("unused")
private Color getSafeColor(String col, Color def)
{
vp = surface;
}
- public String get_seq()
- {
- return _seq.getText();
- }
-
- public void set_seq(String _seq)
- {
- this._seq.setText(_seq);
- }
-
- public String get_str()
- {
- return _str.getText();
- }
-
- public void set_str(String _str)
- {
- this._str.setText(_str);
- }
-
- public JLabel get_info()
- {
- return _info;
- }
-
- public void set_info(JLabel _info)
- {
- this._info = _info;
- }
-
- /*
- * public static void main(String[] args) { AppVarnaBinding d = new
- * AppVarnaBinding(); d.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- * d.pack(); d.setVisible(true); }
- */
-
- public void dragEnter(DropTargetDragEvent arg0)
- {
- // TODO Auto-generated method stub
-
- }
-
- public void dragExit(DropTargetEvent arg0)
- {
- // TODO Auto-generated method stub
-
- }
-
- public void dragOver(DropTargetDragEvent arg0)
- {
- // TODO Auto-generated method stub
-
- }
-
public void drop(DropTargetDropEvent dtde)
{
try
if (c instanceof VARNAPanel)
{
String path = o.toString();
- VARNAPanel vp = (VARNAPanel) c;
+ VARNAPanel varnaPanel = (VARNAPanel) c;
try
{
FullBackup bck = VARNAPanel.importSession(path);
.loadSecStr(path);
for (RNA r : mdls)
{
- r.drawRNA(vp.getConfig());
+ r.drawRNA(varnaPanel.getConfig());
String name = r.getName();
if (name.equals(""))
{
{
name += " (Model " + mn++ + ")";
}
- _rnaList.add(vp.getConfig().clone(), r, name, true);
+ _rnaList.add(varnaPanel.getConfig().clone(), r, name, true);
}
}
}
}
- public void dropActionChanged(DropTargetDragEvent arg0)
- {
- }
-
private class BackupHolder
{
- private DefaultListModel _rnaList;
+ private DefaultListModel<FullBackup> _rnalist;
- private ArrayList<RNA> _rnas = new ArrayList<RNA>();
+ private List<RNA> _rnas = new ArrayList<RNA>();
JList _l;
- public BackupHolder(DefaultListModel rnaList, JList l)
+ public BackupHolder(DefaultListModel<FullBackup> rnaList, JList l)
{
- _rnaList = rnaList;
+ _rnalist = rnaList;
_l = l;
}
- public void add(VARNAConfig c, RNA r)
- {
- add(c, r, r.getName(), false);
- }
-
- public void add(VARNAConfig c, RNA r, boolean select)
- {
- add(c, r, r.getName(), select);
- }
-
public void add(VARNAConfig c, RNA r, String name)
{
add(c, r, name, false);
}
+ /**
+ * Adds an entry to the end of the selection list and (optionally) sets it
+ * as selected
+ *
+ * @param c
+ * @param r
+ * @param name
+ * @param select
+ */
public void add(VARNAConfig c, RNA r, String name, boolean select)
{
if (select)
{
- _l.removeSelectionInterval(0, _rnaList.size());
+ _l.removeSelectionInterval(0, _rnalist.size());
}
if (name.equals(""))
{
name = generateDefaultName();
}
FullBackup bck = new FullBackup(c, r, name);
- _rnas.add(0, r);
- _rnaList.add(0, bck);
+ _rnas.add(r);
+ _rnalist.addElement(bck);
if (select)
{
_l.setSelectedIndex(0);
}
}
- public void remove(int i)
- {
- _rnas.remove(i);
- _rnaList.remove(i);
-
- }
-
- public DefaultListModel getModel()
- {
- return _rnaList;
- }
-
- public boolean contains(RNA r)
- {
- return _rnas.contains(r);
- }
-
- /*
- * public int getSize() { return _rnaList.getSize(); }
- */
public FullBackup getElementAt(int i)
{
- return (FullBackup) _rnaList.getElementAt(i);
+ return _rnalist.getElementAt(i);
}
-
- public void removeSelected()
- {
- int i = _l.getSelectedIndex();
- if (i != -1)
- {
- if (_rnaList.getSize() == 1)
- {
- RNA r = new RNA();
- try
- {
- r.setRNA(" ", ".");
- } catch (ExceptionUnmatchedClosingParentheses e1)
- {
- } catch (ExceptionFileFormatOrSyntax e1)
- {
- }
- vp.showRNA(r);
- vp.repaint();
- }
- else
- {
- int newi = i + 1;
- if (newi == _rnaList.getSize())
- {
- newi = _rnaList.getSize() - 2;
- }
- FullBackup bck = (FullBackup) _rnaList.getElementAt(newi);
- _l.setSelectedValue(bck, true);
- }
- _rnaList.remove(i);
- }
-
- }
- }
-
- public void onLayoutChanged()
- {
- // TODO Auto-generated method stub
-
- }
-
- public void onUINewStructure(VARNAConfig v, RNA r)
- {
- // patch to fix infinite loop
- // The problem is that onUINewStructure is called when user clicks
- // check with Yann about whether Jalview should do anything with this event.
- // e.g. if user has used VARNA's menu to import a structure .. Jalview may
- // need to be told which structure is displayed.
-
- // _rnaList.add(v, r, "", true);
- }
-
- public void onWarningEmitted(String s)
- {
}
public void mouseClicked(MouseEvent e)
if (e.getClickCount() == 2)
{
int index = _sideList.locationToIndex(e.getPoint());
- ListModel dlm = _sideList.getModel();
- FullBackup item = (FullBackup) dlm.getElementAt(index);
- ;
+ ListModel<FullBackup> dlm = _sideList.getModel();
+ // FullBackup item = dlm.getElementAt(index);
+
_sideList.ensureIndexIsVisible(index);
/*
* TODO Object newName = JOptionPane.showInputDialog( this,
}
}
- public void mouseEntered(MouseEvent arg0)
- {
- }
-
- public void mouseExited(MouseEvent arg0)
- {
- }
-
- public void mousePressed(MouseEvent arg0)
- {
- }
-
- public void mouseReleased(MouseEvent arg0)
- {
- }
-
@Override
public String[] getPdbFile()
{
}
@Override
- public void onStructureRedrawn()
+ public void highlightAtoms(List<AtomSpec> atoms)
{
}
@Override
- public void onZoomLevelChanged()
+ public boolean isListeningFor(SequenceI seq)
{
+ return true;
}
- @Override
- public void onTranslationChanged()
+ /**
+ * Returns the path to a temporary file containing a representation of the
+ * state of the Varna display, or null on any error
+ *
+ * @param rna
+ * @param jds
+ *
+ * @return
+ */
+ public String getStateInfo(RNA rna)
{
+ if (vp == null)
+ {
+ return null;
+ }
+
+ /*
+ * we have to show the RNA we want to save in the viewer; get the currently
+ * displayed model first so we can restore it
+ */
+ FullBackup sel = (FullBackup) _sideList.getSelectedValue();
+
+ FullBackup model = null;
+ ListModel models = _sideList.getModel();
+ for (int i = 0; i < models.getSize(); i++)
+ {
+ model = (FullBackup) models.getElementAt(i);
+ if (model.rna == rna)
+ {
+ break;
+ }
+ }
+ if (model == null)
+ {
+ return null;
+ }
+
+ /*
+ * switch display
+ */
+ vp.showRNA(model.rna, model.config);
+
+ try
+ {
+ File temp;
+ temp = File.createTempFile("varna", null);
+ temp.deleteOnExit();
+ String filePath = temp.getAbsolutePath();
+ vp.toXML(filePath);
+
+ /*
+ * restore the previous display
+ */
+ vp.showRNA(sel.rna, sel.config);
+
+ return filePath;
+ } catch (IOException e)
+ {
+ return null;
+ }
}
- @Override
- public void highlightAtoms(List<AtomSpec> atoms)
+ public int getSelectedIndex()
{
+ return _sideList.getSelectedIndex();
}
- @Override
- public boolean isListeningFor(SequenceI seq)
+ /**
+ * Switch the Varna display to the structure selected in the left hand panel
+ *
+ * @param evt
+ */
+ protected void changeSelectedStructure_actionPerformed(ListSelectionEvent evt)
{
- return true;
+ if (!evt.getValueIsAdjusting())
+ {
+ showSelectedStructure();
+ }
+ }
+
+ /**
+ *
+ */
+ protected void showSelectedStructure()
+ {
+ FullBackup sel = (FullBackup) _sideList.getSelectedValue();
+ if (sel != null)
+ {
+ vp.showRNA(sel.rna, sel.config);
+ }
+ }
+
+ /**
+ * Set and display the selected item in the list of structures
+ *
+ * @param selectedRna
+ */
+ public void setSelectedIndex(final int selectedRna)
+ {
+ /*
+ * note this does nothing if, say, selecting item 3 when only 1 has been
+ * added on load
+ */
+ _sideList.setSelectedIndex(selectedRna);
+ // TODO ? need a worker thread to get this to happen properly
+ }
+
+ /**
+ * Add an RNA structure to the selection list
+ *
+ * @param rna
+ */
+ public void addStructure(RNA rna)
+ {
+ VARNAConfig config = vp.getConfig().clone();
+ addStructure(rna, config);
+ }
+
+ /**
+ * @param rna
+ * @param config
+ */
+ protected void addStructure(final RNA rna, final VARNAConfig config)
+ {
+ drawRna(rna, config);
+ _rnaList.add(config, rna, rna.getName());
+ }
+
+ /**
+ * @param rna
+ * @param config
+ */
+ protected void drawRna(final RNA rna, final VARNAConfig config)
+ {
+ try
+ {
+ rna.drawRNA(rna.getDrawMode(), config);
+ } catch (ExceptionNAViewAlgorithm e)
+ {
+ // only throwable for draw mode = 3 NAView
+ System.err.println("Error drawing RNA: " + e.getMessage());
+ }
}
}
is.close();
} catch (IOException e)
{
- // ignoreß
+ // ignore
}
}
}
- // return this.chimeraSessionFile == null ? "" : chimeraSessionFile;
}
@Override
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.PDBEntry;
+import jalview.datamodel.RnaViewerModel;
+import jalview.datamodel.SequenceGroup;
import jalview.datamodel.SequenceI;
import jalview.datamodel.StructureViewerModel;
import jalview.datamodel.StructureViewerModel.StructureData;
+import jalview.ext.varna.RnaModel;
import jalview.gui.StructureViewer.ViewerType;
import jalview.schemabinding.version2.AlcodMap;
import jalview.schemabinding.version2.AlcodonFrame;
import jalview.schemabinding.version2.PdbentryItem;
import jalview.schemabinding.version2.Pdbids;
import jalview.schemabinding.version2.Property;
+import jalview.schemabinding.version2.RnaViewer;
+import jalview.schemabinding.version2.SecondaryStructure;
import jalview.schemabinding.version2.Sequence;
import jalview.schemabinding.version2.SequenceSet;
import jalview.schemabinding.version2.SequenceSetProperties;
*/
public class Jalview2XML
{
+ private static final String VIEWER_PREFIX = "viewer_";
+
+ private static final String RNA_PREFIX = "rna_";
+
private static final String UTF_8 = "UTF-8";
+ // use this with nextCounter() to make unique names for entities
+ private int counter = 0;
+
/*
* SequenceI reference -> XML ID string in jalview XML. Populated as XML reps
* of sequence objects are created.
*/
private Map<Viewport, AlignFrame> splitFrameCandidates = new HashMap<Viewport, AlignFrame>();
+ /*
+ * Map from displayed rna structure models to their saved session state jar
+ * entry names
+ */
+ private Map<RnaModel, String> rnaSessions = new HashMap<RnaModel, String>();
+
/**
* create/return unique hash string for sq
*
*/
public void saveState(JarOutputStream jout)
{
- AlignFrame[] frames = Desktop.getAlignFrames(); // Desktop.desktop.getAllFrames();
+ AlignFrame[] frames = Desktop.getAlignFrames();
if (frames == null)
{
Hashtable<String, AlignFrame> dsses = new Hashtable<String, AlignFrame>();
+ /*
+ * ensure cached data is clear before starting
+ */
+ // todo tidy up seqRefIds, seqsToIds initialisation / reset
+ rnaSessions.clear();
+ splitFrameCandidates.clear();
+
try
{
// //////////////////////////////////////////////////
List<String> shortNames = new ArrayList<String>();
+ List<String> viewIds = new ArrayList<String>();
// REVERSE ORDER
for (int i = frames.length - 1; i > -1; i--)
fileName = fileName + ".xml";
}
- saveState(apanel, fileName, jout);
+ saveState(apanel, fileName, jout, viewIds);
String dssid = getDatasetIdRef(af.getViewport().getAlignment()
.getDataset());
FileOutputStream fos = new FileOutputStream(jarFile);
JarOutputStream jout = new JarOutputStream(fos);
Hashtable<String, AlignFrame> dsses = new Hashtable<String, AlignFrame>();
+ List<String> viewIds = new ArrayList<String>();
+
for (AlignmentPanel apanel : af.alignPanels)
{
String jfileName = apSize == 1 ? fileName : fileName + ap;
{
jfileName = jfileName + ".xml";
}
- saveState(apanel, jfileName, jout);
+ saveState(apanel, jfileName, jout, viewIds);
String dssid = getDatasetIdRef(af.getViewport().getAlignment()
.getDataset());
if (!dsses.containsKey(dssid))
{
jfileName = jfileName + ".xml";
}
- saveState(_af.alignPanel, jfileName, true, jout);
+ saveState(_af.alignPanel, jfileName, true, jout, null);
}
}
* name of alignment panel written to output stream
* @param jout
* jar output stream
+ * @param viewIds
* @param out
* jar entry name
*/
public JalviewModel saveState(AlignmentPanel ap, String fileName,
- JarOutputStream jout)
+ JarOutputStream jout, List<String> viewIds)
{
- return saveState(ap, fileName, false, jout);
+ return saveState(ap, fileName, false, jout, viewIds);
}
/**
* jar entry name
*/
public JalviewModel saveState(AlignmentPanel ap, String fileName,
- boolean storeDS, JarOutputStream jout)
+ boolean storeDS, JarOutputStream jout, List<String> viewIds)
{
+ if (viewIds == null)
+ {
+ viewIds = new ArrayList<String>();
+ }
+
initSeqRefs();
- List<String> viewIds = new ArrayList<String>();
+
List<UserColourScheme> userColours = new ArrayList<UserColourScheme>();
AlignViewport av = ap.av;
Set<String> calcIdSet = new HashSet<String>();
// SAVE SEQUENCES
- String id = "";
- jalview.datamodel.SequenceI jds, jdatasq;
for (int i = 0; i < jal.getHeight(); i++)
{
- jds = jal.getSequenceAt(i);
- jdatasq = jds.getDatasetSequence() == null ? jds : jds
+ final SequenceI jds = jal.getSequenceAt(i);
+ final SequenceI jdatasq = jds.getDatasetSequence() == null ? jds
+ : jds
.getDatasetSequence();
- id = seqHash(jds);
+ String id = seqHash(jds);
if (seqRefIds.get(id) != null)
{
matchedFile = saveStructureState(ap, jds, pdb, entry,
viewIds, matchedFile, viewFrame);
/*
- * Only store each structure viewer's state once in each XML
- * document. First time through only (storeDS==false)
+ * Only store each structure viewer's state once in the project
+ * jar. First time through only (storeDS==false)
*/
String viewId = viewFrame.getViewId();
if (!storeDS && !viewIds.contains(viewId))
viewIds.add(viewId);
try
{
+ String viewerState = viewFrame.getStateInfo();
writeJarEntry(jout, getViewerJarEntryName(viewId),
- viewFrame.getStateInfo().getBytes());
+ viewerState.getBytes());
} catch (IOException e)
{
System.err.println("Error saving viewer state: "
}
}
+ saveRnaViewers(jout, jseq, jds, viewIds, ap, storeDS);
+
jms.addJSeq(jseq);
}
}
}
- /*
- * Save associated Varna panels
- */
- if (Desktop.desktop != null)
- {
- for (JInternalFrame frame : Desktop.desktop.getAllFrames())
- {
- if (frame instanceof AppVarna)
- {
- AppVarna vp = (AppVarna) frame;
- if (vp.ap == ap)
- {
- // save Varna state
- }
- }
- }
- }
-
// SAVE ANNOTATIONS
/**
* store forward refs from an annotationRow to any groups
*/
- IdentityHashMap groupRefs = new IdentityHashMap();
+ IdentityHashMap<SequenceGroup, String> groupRefs = new IdentityHashMap<SequenceGroup, String>();
if (storeDS)
{
for (SequenceI sq : jal.getSequences())
{
// Store annotation on dataset sequences only
- jalview.datamodel.AlignmentAnnotation[] aa = sq.getAnnotation();
+ AlignmentAnnotation[] aa = sq.getAnnotation();
if (aa != null && aa.length > 0)
{
storeAlignmentAnnotation(aa, groupRefs, av, calcIdSet, storeDS,
if (jal.getAlignmentAnnotation() != null)
{
// Store the annotation shown on the alignment.
- jalview.datamodel.AlignmentAnnotation[] aa = jal
- .getAlignmentAnnotation();
+ AlignmentAnnotation[] aa = jal.getAlignmentAnnotation();
storeAlignmentAnnotation(aa, groupRefs, av, calcIdSet, storeDS,
vamsasSet);
}
int i = -1;
for (jalview.datamodel.SequenceGroup sg : jal.getGroups())
{
- groups[++i] = new JGroup();
+ JGroup jGroup = new JGroup();
+ groups[++i] = jGroup;
- groups[i].setStart(sg.getStartRes());
- groups[i].setEnd(sg.getEndRes());
- groups[i].setName(sg.getName());
+ jGroup.setStart(sg.getStartRes());
+ jGroup.setEnd(sg.getEndRes());
+ jGroup.setName(sg.getName());
if (groupRefs.containsKey(sg))
{
- // group has references so set it's ID field
- groups[i].setId(groupRefs.get(sg).toString());
+ // group has references so set its ID field
+ jGroup.setId(groupRefs.get(sg));
}
if (sg.cs != null)
{
if (sg.cs.conservationApplied())
{
- groups[i].setConsThreshold(sg.cs.getConservationInc());
+ jGroup.setConsThreshold(sg.cs.getConservationInc());
if (sg.cs instanceof jalview.schemes.UserColourScheme)
{
- groups[i].setColour(setUserColourScheme(sg.cs, userColours,
+ jGroup.setColour(setUserColourScheme(sg.cs, userColours,
jms));
}
else
{
- groups[i]
+ jGroup
.setColour(ColourSchemeProperty.getColourName(sg.cs));
}
}
else if (sg.cs instanceof jalview.schemes.AnnotationColourGradient)
{
- groups[i].setColour("AnnotationColourGradient");
- groups[i].setAnnotationColours(constructAnnotationColours(
+ jGroup.setColour("AnnotationColourGradient");
+ jGroup.setAnnotationColours(constructAnnotationColours(
(jalview.schemes.AnnotationColourGradient) sg.cs,
userColours, jms));
}
else if (sg.cs instanceof jalview.schemes.UserColourScheme)
{
- groups[i]
+ jGroup
.setColour(setUserColourScheme(sg.cs, userColours, jms));
}
else
{
- groups[i].setColour(ColourSchemeProperty.getColourName(sg.cs));
+ jGroup.setColour(ColourSchemeProperty.getColourName(sg.cs));
}
- groups[i].setPidThreshold(sg.cs.getThreshold());
+ jGroup.setPidThreshold(sg.cs.getThreshold());
}
- groups[i].setOutlineColour(sg.getOutlineColour().getRGB());
- groups[i].setDisplayBoxes(sg.getDisplayBoxes());
- groups[i].setDisplayText(sg.getDisplayText());
- groups[i].setColourText(sg.getColourText());
- groups[i].setTextCol1(sg.textColour.getRGB());
- groups[i].setTextCol2(sg.textColour2.getRGB());
- groups[i].setTextColThreshold(sg.thresholdTextColour);
- groups[i].setShowUnconserved(sg.getShowNonconserved());
- groups[i].setIgnoreGapsinConsensus(sg.getIgnoreGapsConsensus());
- groups[i].setShowConsensusHistogram(sg.isShowConsensusHistogram());
- groups[i].setShowSequenceLogo(sg.isShowSequenceLogo());
- groups[i].setNormaliseSequenceLogo(sg.isNormaliseSequenceLogo());
- for (int s = 0; s < sg.getSize(); s++)
- {
- jalview.datamodel.Sequence seq = (jalview.datamodel.Sequence) sg
- .getSequenceAt(s);
- groups[i].addSeq(seqHash(seq));
+ jGroup.setOutlineColour(sg.getOutlineColour().getRGB());
+ jGroup.setDisplayBoxes(sg.getDisplayBoxes());
+ jGroup.setDisplayText(sg.getDisplayText());
+ jGroup.setColourText(sg.getColourText());
+ jGroup.setTextCol1(sg.textColour.getRGB());
+ jGroup.setTextCol2(sg.textColour2.getRGB());
+ jGroup.setTextColThreshold(sg.thresholdTextColour);
+ jGroup.setShowUnconserved(sg.getShowNonconserved());
+ jGroup.setIgnoreGapsinConsensus(sg.getIgnoreGapsConsensus());
+ jGroup.setShowConsensusHistogram(sg.isShowConsensusHistogram());
+ jGroup.setShowSequenceLogo(sg.isShowSequenceLogo());
+ jGroup.setNormaliseSequenceLogo(sg.isNormaliseSequenceLogo());
+ for (SequenceI seq : sg.getSequences())
+ {
+ jGroup.addSeq(seqHash(seq));
}
}
// using save and then load
try
{
+ System.out.println("Writing jar entry " + fileName);
JarEntry entry = new JarEntry(fileName);
jout.putNextEntry(entry);
PrintWriter pout = new PrintWriter(new OutputStreamWriter(jout,
}
/**
- * Copy the contents of a file to a new file added to the output jar
+ * Save any Varna viewers linked to this sequence. Writes an rnaViewer element
+ * for each viewer, with
+ * <ul>
+ * <li>viewer geometry (position, size, split pane divider location)</li>
+ * <li>index of the selected structure in the viewer (currently shows gapped
+ * or ungapped)</li>
+ * <li>the id of the annotation holding RNA secondary structure</li>
+ * <li>(currently only one SS is shown per viewer, may be more in future)</li>
+ * </ul>
+ * Varna viewer state is also written out (in native Varna XML) to separate
+ * project jar entries. A separate entry is written for each RNA structure
+ * displayed, with the naming convention
+ * <ul>
+ * <li>rna_viewId_sequenceId_annotationId_[gapped|trimmed]</li>
+ * </ul>
+ *
+ * @param jout
+ * @param jseq
+ * @param jds
+ * @param viewIds
+ * @param ap
+ * @param storeDataset
+ */
+ protected void saveRnaViewers(JarOutputStream jout, JSeq jseq,
+ final SequenceI jds, List<String> viewIds, AlignmentPanel ap,
+ boolean storeDataset)
+ {
+ JInternalFrame[] frames = Desktop.desktop.getAllFrames();
+ for (int f = frames.length - 1; f > -1; f--)
+ {
+ if (frames[f] instanceof AppVarna)
+ {
+ AppVarna varna = (AppVarna) frames[f];
+ /*
+ * link the sequence to every viewer that is showing it and is linked to
+ * its alignment panel
+ */
+ if (varna.isListeningFor(jds) && ap == varna.getAlignmentPanel())
+ {
+ String viewId = varna.getViewId();
+ RnaViewer rna = new RnaViewer();
+ rna.setViewId(viewId);
+ rna.setTitle(varna.getTitle());
+ rna.setXpos(varna.getX());
+ rna.setYpos(varna.getY());
+ rna.setWidth(varna.getWidth());
+ rna.setHeight(varna.getHeight());
+ rna.setDividerLocation(varna.getDividerLocation());
+ rna.setSelectedRna(varna.getSelectedIndex());
+ jseq.addRnaViewer(rna);
+
+ /*
+ * Store each Varna panel's state once in the project per sequence.
+ * First time through only (storeDataset==false)
+ */
+ // boolean storeSessions = false;
+ // String sequenceViewId = viewId + seqsToIds.get(jds);
+ // if (!storeDataset && !viewIds.contains(sequenceViewId))
+ // {
+ // viewIds.add(sequenceViewId);
+ // storeSessions = true;
+ // }
+ for (RnaModel model : varna.getModels())
+ {
+ if (model.seq == jds)
+ {
+ /*
+ * VARNA saves each view (sequence or alignment secondary
+ * structure, gapped or trimmed) as a separate XML file
+ */
+ String jarEntryName = rnaSessions.get(model);
+ if (jarEntryName == null)
+ {
+
+ String varnaStateFile = varna.getStateInfo(model.rna);
+ jarEntryName = RNA_PREFIX + viewId + "_"
+ + nextCounter();
+ copyFileToJar(jout, varnaStateFile, jarEntryName);
+ rnaSessions.put(model, jarEntryName);
+ }
+ SecondaryStructure ss = new SecondaryStructure();
+ String annotationId = varna.getAnnotation(jds).annotationId;
+ ss.setAnnotationId(annotationId);
+ ss.setViewerState(jarEntryName);
+ ss.setGapped(model.gapped);
+ ss.setTitle(model.title);
+ rna.addSecondaryStructure(ss);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Copy the contents of a file to a new entry added to the output jar
*
* @param jout
* @param infilePath
- * @param jarfileName
+ * @param jarEntryName
*/
protected void copyFileToJar(JarOutputStream jout, String infilePath,
- String jarfileName)
+ String jarEntryName)
{
DataInputStream dis = null;
try
dis = new DataInputStream(new FileInputStream(file));
byte[] data = new byte[(int) file.length()];
dis.readFully(data);
- writeJarEntry(jout, jarfileName, data);
+ writeJarEntry(jout, jarEntryName, data);
}
} catch (Exception ex)
{
* Write the data to a new entry of given name in the output jar file
*
* @param jout
- * @param jarfileName
+ * @param jarEntryName
* @param data
* @throws IOException
*/
- protected void writeJarEntry(JarOutputStream jout, String jarfileName,
+ protected void writeJarEntry(JarOutputStream jout, String jarEntryName,
byte[] data) throws IOException
{
if (jout != null)
{
- jout.putNextEntry(new JarEntry(jarfileName));
+ System.out.println("Writing jar entry " + jarEntryName);
+ jout.putNextEntry(new JarEntry(jarEntryName));
DataOutputStream dout = new DataOutputStream(jout);
dout.write(data, 0, data.length);
dout.flush();
}
private void storeAlignmentAnnotation(AlignmentAnnotation[] aa,
- IdentityHashMap groupRefs, AlignmentViewport av,
+ IdentityHashMap<SequenceGroup, String> groupRefs,
+ AlignmentViewport av,
Set<String> calcIdSet, boolean storeDS, SequenceSet vamsasSet)
{
{
Annotation an = new Annotation();
- if (aa[i].annotationId != null)
+ AlignmentAnnotation annotation = aa[i];
+ if (annotation.annotationId != null)
{
- annotationIds.put(aa[i].annotationId, aa[i]);
+ annotationIds.put(annotation.annotationId, annotation);
}
- an.setId(aa[i].annotationId);
+ an.setId(annotation.annotationId);
- an.setVisible(aa[i].visible);
+ an.setVisible(annotation.visible);
- an.setDescription(aa[i].description);
+ an.setDescription(annotation.description);
- if (aa[i].sequenceRef != null)
+ if (annotation.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());
+ // 2.9 JAL-1781 xref on sequence id rather than name
+ an.setSequenceRef(seqsToIds.get(annotation.sequenceRef));
}
- if (aa[i].groupRef != null)
+ if (annotation.groupRef != null)
{
- Object groupIdr = groupRefs.get(aa[i].groupRef);
+ String groupIdr = groupRefs.get(annotation.groupRef);
if (groupIdr == null)
{
// make a locally unique String
- groupRefs.put(aa[i].groupRef,
+ groupRefs.put(annotation.groupRef,
groupIdr = ("" + System.currentTimeMillis()
- + aa[i].groupRef.getName() + groupRefs.size()));
+ + annotation.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);
+ an.setGraphHeight(annotation.graphHeight);
+ an.setCentreColLabels(annotation.centreColLabels);
+ an.setScaleColLabels(annotation.scaleColLabel);
+ an.setShowAllColLabels(annotation.showAllColLabels);
+ an.setBelowAlignment(annotation.belowAlignment);
- if (aa[i].graph > 0)
+ if (annotation.graph > 0)
{
an.setGraph(true);
- an.setGraphType(aa[i].graph);
- an.setGraphGroup(aa[i].graphGroup);
- if (aa[i].getThreshold() != null)
+ an.setGraphType(annotation.graph);
+ an.setGraphGroup(annotation.graphGroup);
+ if (annotation.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());
+ line.setLabel(annotation.getThreshold().label);
+ line.setValue(annotation.getThreshold().value);
+ line.setColour(annotation.getThreshold().colour.getRGB());
an.setThresholdLine(line);
}
}
an.setGraph(false);
}
- an.setLabel(aa[i].label);
+ an.setLabel(annotation.label);
- if (aa[i] == av.getAlignmentQualityAnnot()
- || aa[i] == av.getAlignmentConservationAnnotation()
- || aa[i] == av.getAlignmentConsensusAnnotation()
- || aa[i].autoCalculated)
+ if (annotation == av.getAlignmentQualityAnnot()
+ || annotation == av.getAlignmentConservationAnnotation()
+ || annotation == av.getAlignmentConsensusAnnotation()
+ || annotation.autoCalculated)
{
// new way of indicating autocalculated annotation -
- an.setAutoCalculated(aa[i].autoCalculated);
+ an.setAutoCalculated(annotation.autoCalculated);
}
- if (aa[i].hasScore())
+ if (annotation.hasScore())
{
- an.setScore(aa[i].getScore());
+ an.setScore(annotation.getScore());
}
- if (aa[i].getCalcId() != null)
+ if (annotation.getCalcId() != null)
{
- calcIdSet.add(aa[i].getCalcId());
- an.setCalcId(aa[i].getCalcId());
+ calcIdSet.add(annotation.getCalcId());
+ an.setCalcId(annotation.getCalcId());
}
- if (aa[i].hasProperties())
+ if (annotation.hasProperties())
{
- for (String pr : aa[i].getProperties())
+ for (String pr : annotation.getProperties())
{
Property prop = new Property();
prop.setName(pr);
- prop.setValue(aa[i].getProperty(pr));
+ prop.setValue(annotation.getProperty(pr));
an.addProperty(prop);
}
}
AnnotationElement ae;
- if (aa[i].annotations != null)
+ if (annotation.annotations != null)
{
an.setScoreOnly(false);
- for (int a = 0; a < aa[i].annotations.length; a++)
+ for (int a = 0; a < annotation.annotations.length; a++)
{
- if ((aa[i] == null) || (aa[i].annotations[a] == null))
+ if ((annotation == null) || (annotation.annotations[a] == null))
{
continue;
}
ae = new AnnotationElement();
- if (aa[i].annotations[a].description != null)
+ if (annotation.annotations[a].description != null)
{
- ae.setDescription(aa[i].annotations[a].description);
+ ae.setDescription(annotation.annotations[a].description);
}
- if (aa[i].annotations[a].displayCharacter != null)
+ if (annotation.annotations[a].displayCharacter != null)
{
- ae.setDisplayCharacter(aa[i].annotations[a].displayCharacter);
+ ae.setDisplayCharacter(annotation.annotations[a].displayCharacter);
}
- if (!Float.isNaN(aa[i].annotations[a].value))
+ if (!Float.isNaN(annotation.annotations[a].value))
{
- ae.setValue(aa[i].annotations[a].value);
+ ae.setValue(annotation.annotations[a].value);
}
ae.setPosition(a);
- if (aa[i].annotations[a].secondaryStructure > ' ')
+ if (annotation.annotations[a].secondaryStructure > ' ')
{
- ae.setSecondaryStructure(aa[i].annotations[a].secondaryStructure
+ ae.setSecondaryStructure(annotation.annotations[a].secondaryStructure
+ "");
}
- if (aa[i].annotations[a].colour != null
- && aa[i].annotations[a].colour != java.awt.Color.black)
+ if (annotation.annotations[a].colour != null
+ && annotation.annotations[a].colour != java.awt.Color.black)
{
- ae.setColour(aa[i].annotations[a].colour.getRGB());
+ ae.setColour(annotation.annotations[a].colour.getRGB());
}
an.addAnnotationElement(ae);
- if (aa[i].autoCalculated)
+ if (annotation.autoCalculated)
{
// only write one non-null entry into the annotation row -
// sufficient to get the visualization attributes necessary to
{
an.setScoreOnly(true);
}
- if (!storeDS || (storeDS && !aa[i].autoCalculated))
+ if (!storeDS || (storeDS && !annotation.autoCalculated))
{
// skip autocalculated annotation - these are only provided for
// alignments
});
} catch (Exception x)
{
-
+ System.err.println("Error loading alignment: " + x.getMessage());
}
}
return af;
}
} while (jarentry != null);
resolveFrefedSequences();
- } catch (java.io.FileNotFoundException ex)
- {
- ex.printStackTrace();
- errorMessage = "Couldn't locate Jalview XML file : " + file;
- System.err.println("Exception whilst loading jalview XML file : "
- + ex + "\n");
- } catch (java.net.UnknownHostException ex)
+ } catch (IOException ex)
{
ex.printStackTrace();
errorMessage = "Couldn't locate Jalview XML file : " + file;
// ////////////////////////////////
// LOAD ANNOTATIONS
List<JvAnnotRow> autoAlan = new ArrayList<JvAnnotRow>();
- /**
+
+ /*
* store any annotations which forward reference a group's ID
*/
- Hashtable<String, ArrayList<jalview.datamodel.AlignmentAnnotation>> groupAnnotRefs = new Hashtable<String, ArrayList<jalview.datamodel.AlignmentAnnotation>>();
+ Map<String, List<AlignmentAnnotation>> groupAnnotRefs = new Hashtable<String, List<AlignmentAnnotation>>();
if (vamsasSet.getAnnotationCount() > 0)
{
for (int i = 0; i < an.length; i++)
{
+ Annotation annotation = an[i];
+
/**
* test if annotation is automatically calculated for this view only
*/
boolean autoForView = false;
- if (an[i].getLabel().equals("Quality")
- || an[i].getLabel().equals("Conservation")
- || an[i].getLabel().equals("Consensus"))
+ if (annotation.getLabel().equals("Quality")
+ || annotation.getLabel().equals("Conservation")
+ || annotation.getLabel().equals("Consensus"))
{
// Kludge for pre 2.5 projects which lacked the autocalculated flag
autoForView = true;
- if (!an[i].hasAutoCalculated())
+ if (!annotation.hasAutoCalculated())
{
- an[i].setAutoCalculated(true);
+ annotation.setAutoCalculated(true);
}
}
if (autoForView
- || (an[i].hasAutoCalculated() && an[i].isAutoCalculated()))
+ || (annotation.hasAutoCalculated() && annotation
+ .isAutoCalculated()))
{
// remove ID - we don't recover annotation from other views for
// view-specific annotation
- an[i].setId(null);
+ annotation.setId(null);
}
// set visiblity for other annotation in this view
- if (an[i].getId() != null
- && annotationIds.containsKey(an[i].getId()))
+ String annotationId = annotation.getId();
+ if (annotationId != null
+ && annotationIds.containsKey(annotationId))
{
- AlignmentAnnotation jda = annotationIds.get(an[i].getId());
+ AlignmentAnnotation jda = annotationIds.get(annotationId);
// in principle Visible should always be true for annotation displayed
// in multiple views
- if (an[i].hasVisible())
+ if (annotation.hasVisible())
{
- jda.visible = an[i].getVisible();
+ jda.visible = annotation.getVisible();
}
al.addAnnotation(jda);
continue;
}
// Construct new annotation from model.
- AnnotationElement[] ae = an[i].getAnnotationElement();
+ AnnotationElement[] ae = annotation.getAnnotationElement();
jalview.datamodel.Annotation[] anot = null;
java.awt.Color firstColour = null;
int anpos;
- if (!an[i].getScoreOnly())
+ if (!annotation.getScoreOnly())
{
anot = new jalview.datamodel.Annotation[al.getWidth()];
for (int aa = 0; aa < ae.length && aa < anot.length; aa++)
}
jalview.datamodel.AlignmentAnnotation jaa = null;
- if (an[i].getGraph())
+ if (annotation.getGraph())
{
float llim = 0, hlim = 0;
// if (autoForView || an[i].isAutoCalculated()) {
// hlim=11f;
// }
- jaa = new jalview.datamodel.AlignmentAnnotation(an[i].getLabel(),
- an[i].getDescription(), anot, llim, hlim,
- an[i].getGraphType());
+ jaa = new jalview.datamodel.AlignmentAnnotation(
+ annotation.getLabel(), annotation.getDescription(), anot,
+ llim, hlim, annotation.getGraphType());
- jaa.graphGroup = an[i].getGraphGroup();
+ jaa.graphGroup = annotation.getGraphGroup();
jaa._linecolour = firstColour;
- if (an[i].getThresholdLine() != null)
+ if (annotation.getThresholdLine() != null)
{
- jaa.setThreshold(new jalview.datamodel.GraphLine(an[i]
- .getThresholdLine().getValue(), an[i]
+ jaa.setThreshold(new jalview.datamodel.GraphLine(annotation
+ .getThresholdLine().getValue(), annotation
.getThresholdLine().getLabel(), new java.awt.Color(
- an[i].getThresholdLine().getColour())));
+ annotation.getThresholdLine().getColour())));
}
- if (autoForView || an[i].isAutoCalculated())
+ if (autoForView || annotation.isAutoCalculated())
{
// Hardwire the symbol display line to ensure that labels for
// histograms are displayed
jaa.annotationId = an[i].getId();
}
// recover sequence association
- if (an[i].getSequenceRef() != null)
+ String sequenceRef = an[i].getSequenceRef();
+ if (sequenceRef != null)
{
- if (al.findName(an[i].getSequenceRef()) != null)
+ // from 2.9 sequenceRef is to sequence id (JAL-1781)
+ SequenceI sequence = seqRefIds.get(sequenceRef);
+ if (sequence == null)
{
- jaa.createSequenceMapping(al.findName(an[i].getSequenceRef()),
- 1, true);
- al.findName(an[i].getSequenceRef()).addAlignmentAnnotation(jaa);
+ // in pre-2.9 projects sequence ref is to sequence name
+ sequence = al.findName(sequenceRef);
+ }
+ if (sequence != null)
+ {
+ jaa.createSequenceMapping(sequence, 1, true);
+ sequence.addAlignmentAnnotation(jaa);
}
}
// and make a note of any group association
if (an[i].getGroupRef() != null && an[i].getGroupRef().length() > 0)
{
- ArrayList<jalview.datamodel.AlignmentAnnotation> aal = groupAnnotRefs
+ List<jalview.datamodel.AlignmentAnnotation> aal = groupAnnotRefs
.get(an[i].getGroupRef());
if (aal == null)
{
boolean addAnnotSchemeGroup = false;
for (int i = 0; i < groups.length; i++)
{
+ JGroup jGroup = groups[i];
ColourSchemeI cs = null;
-
- if (groups[i].getColour() != null)
+ if (jGroup.getColour() != null)
{
- if (groups[i].getColour().startsWith("ucs"))
+ if (jGroup.getColour().startsWith("ucs"))
{
- cs = getUserColourScheme(jms, groups[i].getColour());
+ cs = getUserColourScheme(jms, jGroup.getColour());
}
- else if (groups[i].getColour().equals("AnnotationColourGradient")
- && groups[i].getAnnotationColours() != null)
+ else if (jGroup.getColour().equals("AnnotationColourGradient")
+ && jGroup.getAnnotationColours() != null)
{
addAnnotSchemeGroup = true;
cs = null;
}
else
{
- cs = ColourSchemeProperty.getColour(al, groups[i].getColour());
+ cs = ColourSchemeProperty.getColour(al, jGroup.getColour());
}
if (cs != null)
{
- cs.setThreshold(groups[i].getPidThreshold(), true);
+ cs.setThreshold(jGroup.getPidThreshold(), true);
}
}
- Vector seqs = new Vector();
+ Vector<SequenceI> seqs = new Vector<SequenceI>();
- for (int s = 0; s < groups[i].getSeqCount(); s++)
+ for (int s = 0; s < jGroup.getSeqCount(); s++)
{
- String seqId = groups[i].getSeq(s) + "";
- jalview.datamodel.SequenceI ts = seqRefIds.get(seqId);
+ String seqId = jGroup.getSeq(s) + "";
+ SequenceI ts = seqRefIds.get(seqId);
if (ts != null)
{
continue;
}
- jalview.datamodel.SequenceGroup sg = new jalview.datamodel.SequenceGroup(
- seqs, groups[i].getName(), cs, groups[i].getDisplayBoxes(),
- groups[i].getDisplayText(), groups[i].getColourText(),
- groups[i].getStart(), groups[i].getEnd());
+ SequenceGroup sg = new SequenceGroup(seqs, jGroup.getName(), cs,
+ jGroup.getDisplayBoxes(), jGroup.getDisplayText(),
+ jGroup.getColourText(), jGroup.getStart(),
+ jGroup.getEnd());
- sg.setOutlineColour(new java.awt.Color(groups[i].getOutlineColour()));
+ sg.setOutlineColour(new java.awt.Color(jGroup.getOutlineColour()));
- sg.textColour = new java.awt.Color(groups[i].getTextCol1());
- sg.textColour2 = new java.awt.Color(groups[i].getTextCol2());
- sg.setShowNonconserved(groups[i].hasShowUnconserved() ? groups[i]
+ sg.textColour = new java.awt.Color(jGroup.getTextCol1());
+ sg.textColour2 = new java.awt.Color(jGroup.getTextCol2());
+ sg.setShowNonconserved(jGroup.hasShowUnconserved() ? jGroup
.isShowUnconserved() : false);
- sg.thresholdTextColour = groups[i].getTextColThreshold();
- if (groups[i].hasShowConsensusHistogram())
+ sg.thresholdTextColour = jGroup.getTextColThreshold();
+ if (jGroup.hasShowConsensusHistogram())
{
- sg.setShowConsensusHistogram(groups[i].isShowConsensusHistogram());
+ sg.setShowConsensusHistogram(jGroup.isShowConsensusHistogram());
}
;
- if (groups[i].hasShowSequenceLogo())
+ if (jGroup.hasShowSequenceLogo())
{
- sg.setshowSequenceLogo(groups[i].isShowSequenceLogo());
+ sg.setshowSequenceLogo(jGroup.isShowSequenceLogo());
}
- if (groups[i].hasNormaliseSequenceLogo())
+ if (jGroup.hasNormaliseSequenceLogo())
{
- sg.setNormaliseSequenceLogo(groups[i].isNormaliseSequenceLogo());
+ sg.setNormaliseSequenceLogo(jGroup.isNormaliseSequenceLogo());
}
- if (groups[i].hasIgnoreGapsinConsensus())
+ if (jGroup.hasIgnoreGapsinConsensus())
{
- sg.setIgnoreGapsConsensus(groups[i].getIgnoreGapsinConsensus());
+ sg.setIgnoreGapsConsensus(jGroup.getIgnoreGapsinConsensus());
}
- if (groups[i].getConsThreshold() != 0)
+ if (jGroup.getConsThreshold() != 0)
{
jalview.analysis.Conservation c = new jalview.analysis.Conservation(
"All", ResidueProperties.propHash, 3,
sg.cs.setConservation(c);
}
- if (groups[i].getId() != null && groupAnnotRefs.size() > 0)
+ if (jGroup.getId() != null && groupAnnotRefs.size() > 0)
{
// re-instate unique group/annotation row reference
- ArrayList<jalview.datamodel.AlignmentAnnotation> jaal = groupAnnotRefs
- .get(groups[i].getId());
+ List<AlignmentAnnotation> jaal = groupAnnotRefs
+ .get(jGroup.getId());
if (jaal != null)
{
- for (jalview.datamodel.AlignmentAnnotation jaa : jaal)
+ for (AlignmentAnnotation jaa : jaal)
{
jaa.groupRef = sg;
if (jaa.autoCalculated)
{
// reconstruct the annotation colourscheme
sg.cs = constructAnnotationColour(
- groups[i].getAnnotationColours(), null, al, jms, false);
+ jGroup.getAnnotationColours(), null, al, jms, false);
}
}
}
av = af.viewport;
ap = af.alignPanel;
}
- // LOAD TREES
- // /////////////////////////////////////
- if (loadTreesAndStructures && jms.getTreeCount() > 0)
+
+ /*
+ * Load any trees, PDB structures and viewers
+ *
+ * Not done if flag is false (when this method is used for New View)
+ */
+ if (loadTreesAndStructures)
{
- try
+ loadTrees(jms, view, af, av, ap);
+ loadPDBStructures(jprovider, jseqs, af, ap);
+ loadRnaViewers(jprovider, jseqs, ap);
+ }
+ // and finally return.
+ return af;
+ }
+
+ /**
+ * Instantiate and link any saved RNA (Varna) viewers. The state of the Varna
+ * panel is restored from separate jar entries, two (gapped and trimmed) per
+ * sequence and secondary structure.
+ *
+ * Currently each viewer shows just one sequence and structure (gapped and
+ * trimmed), however this method is designed to support multiple sequences or
+ * structures in viewers if wanted in future.
+ *
+ * @param jprovider
+ * @param jseqs
+ * @param ap
+ */
+ private void loadRnaViewers(jarInputStreamProvider jprovider,
+ JSeq[] jseqs, AlignmentPanel ap)
+ {
+ /*
+ * scan the sequences for references to viewers; create each one the first
+ * time it is referenced, add Rna models to existing viewers
+ */
+ for (JSeq jseq : jseqs)
+ {
+ for (int i = 0; i < jseq.getRnaViewerCount(); i++)
{
- for (int t = 0; t < jms.getTreeCount(); t++)
+ RnaViewer viewer = jseq.getRnaViewer(i);
+ AppVarna appVarna = findOrCreateVarnaViewer(viewer, uniqueSetSuffix,
+ ap);
+
+ for (int j = 0; j < viewer.getSecondaryStructureCount(); j++)
{
+ SecondaryStructure ss = viewer.getSecondaryStructure(j);
+ SequenceI seq = seqRefIds.get(jseq.getId());
+ AlignmentAnnotation ann = this.annotationIds.get(ss
+ .getAnnotationId());
- Tree tree = jms.getTree(t);
+ /*
+ * add the structure to the Varna display (with session state copied
+ * from the jar to a temporary file)
+ */
+ boolean gapped = ss.isGapped();
+ String rnaTitle = ss.getTitle();
+ String sessionState = ss.getViewerState();
+ String tempStateFile = copyJarEntry(jprovider, sessionState,
+ "varna");
+ RnaModel rna = new RnaModel(rnaTitle, ann, seq, null, gapped,
+ tempStateFile);
+ appVarna.addModel(rna, rnaTitle);
+ }
+ appVarna.setInitialSelection(viewer.getSelectedRna());
+ }
+ }
+ }
- TreePanel tp = (TreePanel) retrieveExistingObj(tree.getId());
- if (tp == null)
- {
- tp = af.ShowNewickTree(
- new jalview.io.NewickFile(tree.getNewick()),
- tree.getTitle(), tree.getWidth(), tree.getHeight(),
- tree.getXpos(), tree.getYpos());
- if (tree.getId() != null)
- {
- // perhaps bind the tree id to something ?
- }
- }
- else
- {
- // update local tree attributes ?
- // TODO: should check if tp has been manipulated by user - if so its
- // settings shouldn't be modified
- tp.setTitle(tree.getTitle());
- tp.setBounds(new Rectangle(tree.getXpos(), tree.getYpos(), tree
- .getWidth(), tree.getHeight()));
- tp.av = av; // af.viewport; // TODO: verify 'associate with all
- // views'
- // works still
- tp.treeCanvas.av = av; // af.viewport;
- tp.treeCanvas.ap = ap; // af.alignPanel;
+ /**
+ * Locate and return an already instantiated matching AppVarna, or create one
+ * if not found
+ *
+ * @param viewer
+ * @param viewIdSuffix
+ * @param ap
+ * @return
+ */
+ protected AppVarna findOrCreateVarnaViewer(RnaViewer viewer,
+ String viewIdSuffix, AlignmentPanel ap)
+ {
+ /*
+ * on each load a suffix is appended to the saved viewId, to avoid conflicts
+ * if load is repeated
+ */
+ String postLoadId = viewer.getViewId() + viewIdSuffix;
+ for (JInternalFrame frame : getAllFrames())
+ {
+ if (frame instanceof AppVarna)
+ {
+ AppVarna varna = (AppVarna) frame;
+ if (postLoadId.equals(varna.getViewId()))
+ {
+ // this viewer is already instantiated
+ // could in future here add ap as another 'parent' of the
+ // AppVarna window; currently just 1-to-many
+ return varna;
+ }
+ }
+ }
- }
- if (tp == null)
- {
- warn("There was a problem recovering stored Newick tree: \n"
- + tree.getNewick());
- continue;
- }
+ /*
+ * viewer not found - make it
+ */
+ RnaViewerModel model = new RnaViewerModel(postLoadId,
+ viewer.getTitle(), viewer.getXpos(),
+ viewer.getYpos(), viewer.getWidth(), viewer.getHeight(),
+ viewer.getDividerLocation());
+ AppVarna varna = new AppVarna(model, ap);
- tp.fitToWindow.setState(tree.getFitToWindow());
- tp.fitToWindow_actionPerformed(null);
+ return varna;
+ }
- if (tree.getFontName() != null)
- {
- tp.setTreeFont(new java.awt.Font(tree.getFontName(), tree
- .getFontStyle(), tree.getFontSize()));
- }
- else
+ /**
+ * Load any saved trees
+ *
+ * @param jms
+ * @param view
+ * @param af
+ * @param av
+ * @param ap
+ */
+ protected void loadTrees(JalviewModelSequence jms, Viewport view,
+ AlignFrame af, AlignViewport av, AlignmentPanel ap)
+ {
+ // TODO result of automated refactoring - are all these parameters needed?
+ try
+ {
+ for (int t = 0; t < jms.getTreeCount(); t++)
+ {
+
+ Tree tree = jms.getTree(t);
+
+ TreePanel tp = (TreePanel) retrieveExistingObj(tree.getId());
+ if (tp == null)
+ {
+ tp = af.ShowNewickTree(
+ new jalview.io.NewickFile(tree.getNewick()),
+ tree.getTitle(), tree.getWidth(), tree.getHeight(),
+ tree.getXpos(), tree.getYpos());
+ if (tree.getId() != null)
{
- tp.setTreeFont(new java.awt.Font(view.getFontName(), view
- .getFontStyle(), tree.getFontSize()));
+ // perhaps bind the tree id to something ?
}
+ }
+ else
+ {
+ // update local tree attributes ?
+ // TODO: should check if tp has been manipulated by user - if so its
+ // settings shouldn't be modified
+ tp.setTitle(tree.getTitle());
+ tp.setBounds(new Rectangle(tree.getXpos(), tree.getYpos(), tree
+ .getWidth(), tree.getHeight()));
+ tp.av = av; // af.viewport; // TODO: verify 'associate with all
+ // views'
+ // works still
+ tp.treeCanvas.av = av; // af.viewport;
+ tp.treeCanvas.ap = ap; // af.alignPanel;
- tp.showPlaceholders(tree.getMarkUnlinked());
- tp.showBootstrap(tree.getShowBootstrap());
- tp.showDistances(tree.getShowDistances());
+ }
+ if (tp == null)
+ {
+ warn("There was a problem recovering stored Newick tree: \n"
+ + tree.getNewick());
+ continue;
+ }
- tp.treeCanvas.threshold = tree.getThreshold();
+ tp.fitToWindow.setState(tree.getFitToWindow());
+ tp.fitToWindow_actionPerformed(null);
- if (tree.getCurrentTree())
- {
- af.viewport.setCurrentTree(tp.getTree());
- }
+ if (tree.getFontName() != null)
+ {
+ tp.setTreeFont(new java.awt.Font(tree.getFontName(), tree
+ .getFontStyle(), tree.getFontSize()));
+ }
+ else
+ {
+ tp.setTreeFont(new java.awt.Font(view.getFontName(), view
+ .getFontStyle(), tree.getFontSize()));
}
- } catch (Exception ex)
- {
- ex.printStackTrace();
+ tp.showPlaceholders(tree.getMarkUnlinked());
+ tp.showBootstrap(tree.getShowBootstrap());
+ tp.showDistances(tree.getShowDistances());
+
+ tp.treeCanvas.threshold = tree.getThreshold();
+
+ if (tree.getCurrentTree())
+ {
+ af.viewport.setCurrentTree(tp.getTree());
+ }
}
- }
- // //LOAD STRUCTURES
- if (loadTreesAndStructures)
+ } catch (Exception ex)
{
- loadStructures(jprovider, jseqs, af, ap);
+ ex.printStackTrace();
}
- // and finally return.
- return af;
}
/**
* @param af
* @param ap
*/
- protected void loadStructures(jarInputStreamProvider jprovider,
+ protected void loadPDBStructures(jarInputStreamProvider jprovider,
JSeq[] jseqs, AlignFrame af, AlignmentPanel ap)
{
/*
/*
* Copy Chimera session from jar entry "viewer_"+viewId to a temporary file
*
- * Note this is the 'saved' viewId as in the project file XML, _not_ the
+ * NB this is the 'saved' viewId as in the project file XML, _not_ the
* 'uniquified' sviewid used to reconstruct the viewer here
*/
- chimeraSessionFile = copyJarEntry(jprovider,
- getViewerJarEntryName(data.getViewId()), "chimera");
+ String viewerJarEntryName = getViewerJarEntryName(data.getViewId());
+ chimeraSessionFile = copyJarEntry(jprovider, viewerJarEntryName,
+ "chimera");
Set<Entry<File, StructureData>> fileData = data.getFileData()
.entrySet();
final SequenceI[][] seqsArray = allseqs.toArray(new SequenceI[allseqs
.size()][]);
String newViewId = viewerData.getKey();
+
ChimeraViewFrame cvf = new ChimeraViewFrame(chimeraSessionFile,
af.alignPanel, pdbArray,
seqsArray, colourByChimera, colourBySequence, newViewId);
*/
protected String getViewerJarEntryName(String viewId)
{
- return "viewer_" + viewId;
+ return VIEWER_PREFIX + viewId;
}
/**
* @return true if version is development/null or evaluates to the same or
* later X.Y.Z (where X,Y,Z are like [0-9]+b?[0-9]*)
*/
- private boolean isVersionStringLaterThan(String supported, String version)
+ protected boolean isVersionStringLaterThan(String supported,
+ String version)
{
if (version == null || version.equalsIgnoreCase("DEVELOPMENT BUILD")
|| version.equalsIgnoreCase("Test")
}
}
- java.util.Hashtable datasetIds = null;
+ /*
+ * TODO use AlignmentI here and in related methods - needs
+ * AlignmentI.getDataset() changed to return AlignmentI instead of Alignment
+ */
+ Hashtable<String, Alignment> datasetIds = null;
- java.util.IdentityHashMap dataset2Ids = null;
+ IdentityHashMap<Alignment, String> dataset2Ids = null;
private Alignment getDatasetFor(String datasetId)
{
if (datasetIds == null)
{
- datasetIds = new Hashtable();
+ datasetIds = new Hashtable<String, Alignment>();
return null;
}
if (datasetIds.containsKey(datasetId))
{
- return (Alignment) datasetIds.get(datasetId);
+ return datasetIds.get(datasetId);
}
return null;
}
{
if (datasetIds == null)
{
- datasetIds = new Hashtable();
+ datasetIds = new Hashtable<String, Alignment>();
}
datasetIds.put(datasetId, dataset);
}
* @param dataset
* @return
*/
- private String getDatasetIdRef(jalview.datamodel.Alignment dataset)
+ private String getDatasetIdRef(Alignment dataset)
{
if (dataset.getDataset() != null)
{
// make a new datasetId and record it
if (dataset2Ids == null)
{
- dataset2Ids = new IdentityHashMap();
+ dataset2Ids = new IdentityHashMap<Alignment, String>();
}
else
{
- datasetId = (String) dataset2Ids.get(dataset);
+ datasetId = dataset2Ids.get(dataset);
}
if (datasetId == null)
{
boolean keepSeqRefs)
{
initSeqRefs();
- jalview.schemabinding.version2.JalviewModel jm = saveState(ap, null,
- null);
+ JalviewModel jm = saveState(ap, null, null, null);
if (!keepSeqRefs)
{
return result;
}
+
+ /**
+ * Returns an incrementing counter (0, 1, 2...)
+ *
+ * @return
+ */
+ private synchronized int nextCounter()
+ {
+ return counter++;
+ }
}
*/
package jalview.gui;
+import java.awt.Color;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Hashtable;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+import java.util.Vector;
+
+import javax.swing.ButtonGroup;
+import javax.swing.JCheckBoxMenuItem;
+import javax.swing.JColorChooser;
+import javax.swing.JMenu;
+import javax.swing.JMenuItem;
+import javax.swing.JOptionPane;
+import javax.swing.JPopupMenu;
+import javax.swing.JRadioButtonMenuItem;
+
import jalview.analysis.AAFrequency;
import jalview.analysis.AlignmentAnnotationUtils;
import jalview.analysis.AlignmentUtils;
import jalview.util.MessageManager;
import jalview.util.UrlLink;
-import java.awt.Color;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Hashtable;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-import java.util.Vector;
-
-import javax.swing.ButtonGroup;
-import javax.swing.JCheckBoxMenuItem;
-import javax.swing.JColorChooser;
-import javax.swing.JMenu;
-import javax.swing.JMenuItem;
-import javax.swing.JOptionPane;
-import javax.swing.JPopupMenu;
-import javax.swing.JRadioButtonMenuItem;
-
/**
* DOCUMENT ME!
*
makeReferenceSeq.setText("Mark as representative");
}
- if (ap.av.getAlignment().isNucleotide() == false)
+ if (!ap.av.getAlignment().isNucleotide())
{
remove(rnaStructureMenu);
}
-
- if (ap.av.getAlignment().isNucleotide() == true)
+ else
{
- AlignmentAnnotation[] aa = ap.av.getAlignment()
+ /*
+ * add menu items to 2D-render any alignment or sequence secondary
+ * structure annotation
+ */
+ AlignmentAnnotation[] aas = ap.av.getAlignment()
.getAlignmentAnnotation();
- for (int i = 0; aa != null && i < aa.length; i++)
+ if (aas != null)
{
- if (aa[i].isValidStruc() && aa[i].sequenceRef == null)
+ for (final AlignmentAnnotation aa : aas)
{
- final String rnastruc = aa[i].getRNAStruc();
- final String structureLine = aa[i].label + " (alignment)";
- menuItem = new JMenuItem();
- menuItem.setText(MessageManager.formatMessage(
- "label.2d_rna_structure_line", new Object[]
- { structureLine }));
- menuItem.addActionListener(new java.awt.event.ActionListener()
+ if (aa.isValidStruc() && aa.sequenceRef == null)
{
- @Override
- public void actionPerformed(ActionEvent e)
+ /*
+ * valid alignment RNA secondary structure annotation
+ */
+ menuItem = new JMenuItem();
+ menuItem.setText(MessageManager.formatMessage(
+ "label.2d_rna_structure_line", new Object[]
+ { aa.label }));
+ menuItem.addActionListener(new java.awt.event.ActionListener()
{
- new AppVarna(structureLine, seq, seq.getSequenceAsString(),
- rnastruc, seq.getName(), ap);
- System.out.println("end");
- }
- });
- rnaStructureMenu.add(menuItem);
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ new AppVarna(seq, aa, ap);
+ }
+ });
+ rnaStructureMenu.add(menuItem);
+ }
}
}
-
if (seq.getAnnotation() != null)
{
- AlignmentAnnotation seqAnno[] = seq.getAnnotation();
- for (int i = 0; i < seqAnno.length; i++)
+ AlignmentAnnotation seqAnns[] = seq.getAnnotation();
+ for (final AlignmentAnnotation aa : seqAnns)
{
- if (seqAnno[i].isValidStruc())
+ if (aa.isValidStruc())
{
- final String rnastruc = seqAnno[i].getRNAStruc();
-
+ /*
+ * valid sequence RNA secondary structure annotation
+ */
// TODO: make rnastrucF a bit more nice
menuItem = new JMenuItem();
menuItem.setText(MessageManager.formatMessage(
public void actionPerformed(ActionEvent e)
{
// TODO: VARNA does'nt print gaps in the sequence
-
- new AppVarna(seq.getName() + " structure", seq, seq
- .getSequenceAsString(), rnastruc, seq.getName(),
- ap);
+ new AppVarna(seq, aa, ap);
}
});
rnaStructureMenu.add(menuItem);
+++ /dev/null
-/*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
- *
- * This file is part of Jalview.
- *
- * Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3
- * of the License, or (at your option) any later version.
- *
- * Jalview is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
- * The Jalview Authors are detailed in the 'AUTHORS' file.
- */
-package jalview.gui;
-
-import org.jmol.api.*;
-
-import jalview.jbgui.GStructureViewer;
-
-import java.awt.*;
-import java.awt.event.*;
-
-import javax.swing.*;
-import javax.swing.text.*;
-
-import java.util.Vector;
-
-import org.jmol.i18n.GT;
-import org.jmol.util.Logger;
-import org.jmol.util.CommandHistory;
-
-// TODO: this class is copied in from jmol 11.0.2 - upgrade to 12.0.2 ?
-public final class ScriptWindow extends JPanel implements ActionListener,
- EnterListener
-{
-
- private ConsoleTextPane console;
-
- private JButton closeButton;
-
- private JButton runButton;
-
- private JButton haltButton;
-
- private JButton clearButton;
-
- private JButton historyButton;
-
- private JButton stateButton;
-
- JmolViewer viewer;
-
- GStructureViewer appJmol;
-
- public ScriptWindow(AppJmol appJmol)
- {
- this.viewer = appJmol.jmb.viewer;
- this.appJmol = appJmol;
-
- setLayout(new BorderLayout());
-
- console = new ConsoleTextPane(this);
-
- console.setPrompt();
- add(new JScrollPane(console), BorderLayout.CENTER);
-
- JPanel buttonPanel = new JPanel();
- add(buttonPanel, BorderLayout.SOUTH);
-
- runButton = new JButton(GT._("Run"));
- haltButton = new JButton(GT._("Halt"));
- runButton.addActionListener(this);
- // buttonPanel.add(runButton);
- haltButton.addActionListener(this);
- // buttonPanel.add(haltButton);
- haltButton.setEnabled(false);
-
- clearButton = new JButton(GT._("Clear"));
- clearButton.addActionListener(this);
- buttonPanel.add(clearButton);
-
- historyButton = new JButton(GT._("History"));
- historyButton.addActionListener(this);
- buttonPanel.add(historyButton);
-
- stateButton = new JButton(GT._("State"));
- stateButton.addActionListener(this);
- buttonPanel.add(stateButton);
-
- closeButton = new JButton(GT._("Close"));
- closeButton.addActionListener(this);
- buttonPanel.add(closeButton);
-
- for (int i = 0; i < buttonPanel.getComponentCount(); i++)
- {
- // ((JButton)buttonPanel.getComponent(i))
- // .setMargin(new Insets(0, 0, 0, 0));
- }
-
- }
-
- public void sendConsoleEcho(String strEcho)
- {
- if (strEcho != null && !isError)
- {
-
- console.outputEcho(strEcho);
-
- }
- setError(false);
- }
-
- boolean isError = false;
-
- void setError(boolean TF)
- {
- isError = TF;
- // if (isError)
- // console.recallCommand(true);
- }
-
- public void sendConsoleMessage(String strStatus)
- {
- if (strStatus == null)
- {
- console.clearContent();
- console.outputStatus("");
- }
- else if (strStatus.indexOf("ERROR:") >= 0)
- {
- console.outputError(strStatus);
- isError = true;
- }
- else if (!isError)
- {
- console.outputStatus(strStatus);
- }
- }
-
- public void notifyScriptTermination(String strMsg, int msWalltime)
- {
- if (strMsg != null && strMsg.indexOf("ERROR") >= 0)
- {
- console.outputError(strMsg);
- }
- runButton.setEnabled(true);
- haltButton.setEnabled(false);
- }
-
- public void enterPressed()
- {
- runButton.doClick(100);
- // executeCommand();
- }
-
- class ExecuteCommandThread extends Thread
- {
-
- String strCommand;
-
- ExecuteCommandThread(String command)
- {
- strCommand = command;
- }
-
- public void run()
- {
- try
- {
- executeCommand(strCommand);
- } catch (Exception ie)
- {
- Logger.debug("execution command interrupted!" + ie);
- }
- }
- }
-
- ExecuteCommandThread execThread;
-
- void executeCommandAsThread()
- {
- String strCommand = console.getCommandString().trim();
- if (strCommand.length() > 0)
- {
- execThread = new ExecuteCommandThread(strCommand);
- execThread.start();
- }
- }
-
- void executeCommand(String strCommand)
- {
- boolean doWait;
- setError(false);
- console.appendNewline();
- console.setPrompt();
- if (strCommand.length() > 0)
- {
- String strErrorMessage = null;
- doWait = (strCommand.indexOf("WAIT ") == 0);
- if (doWait)
- { // for testing, mainly
- // demonstrates using the statusManager system.
- runButton.setEnabled(false);
- haltButton.setEnabled(true);
-
- Vector info = (Vector) viewer
- .scriptWaitStatus(strCommand.substring(5),
- "+fileLoaded,+scriptStarted,+scriptStatus,+scriptEcho,+scriptTerminated");
- runButton.setEnabled(true);
- haltButton.setEnabled(false);
- /*
- * info = [ statusRecortSet0, statusRecortSet1, statusRecortSet2, ...]
- * statusRecordSet = [ statusRecord0, statusRecord1, statusRecord2, ...]
- * statusRecord = [int msgPtr, String statusName, int intInfo, String
- * msg]
- */
- for (int i = 0; i < info.size(); i++)
- {
- Vector statusRecordSet = (Vector) info.get(i);
- for (int j = 0; j < statusRecordSet.size(); j++)
- {
- Vector statusRecord = (Vector) statusRecordSet.get(j);
- Logger.info("msg#=" + statusRecord.get(0) + " "
- + statusRecord.get(1) + " intInfo="
- + statusRecord.get(2) + " stringInfo="
- + statusRecord.get(3));
- }
- }
- console.appendNewline();
- }
- else
- {
- boolean isScriptExecuting = viewer.isScriptExecuting();
- if (viewer.checkHalt(strCommand, true))
- strErrorMessage = (isScriptExecuting ? "string execution halted with "
- + strCommand
- : "no script was executing");
- else
- strErrorMessage = "";// viewer.scriptCheck(strCommand);
- // the problem is that scriptCheck is synchronized, so these might get
- // backed up.
- if (strErrorMessage != null && strErrorMessage.length() > 0)
- {
- console.outputError(strErrorMessage);
- }
- else
- {
- // runButton.setEnabled(false);
- haltButton.setEnabled(true);
- viewer.script(strCommand);
- }
- }
- }
- console.grabFocus();
- }
-
- public void actionPerformed(ActionEvent e)
- {
- Object source = e.getSource();
- if (source == closeButton)
- {
- // appJmol.showConsole(false);
- }
- else if (source == runButton)
- {
- executeCommandAsThread();
- }
- else if (source == clearButton)
- {
- console.clearContent();
- }
- else if (source == historyButton)
- {
- console.clearContent(viewer.getSetHistory(Integer.MAX_VALUE));
- }
- else if (source == stateButton)
- {
- console.clearContent(viewer.getStateInfo());
- }
- else if (source == haltButton)
- {
- viewer.haltScriptExecution();
- }
- console.grabFocus(); // always grab the focus (e.g., after clear)
- }
-}
-
-class ConsoleTextPane extends JTextPane
-{
-
- ConsoleDocument consoleDoc;
-
- EnterListener enterListener;
-
- JmolViewer viewer;
-
- ConsoleTextPane(ScriptWindow scriptWindow)
- {
- super(new ConsoleDocument());
- consoleDoc = (ConsoleDocument) getDocument();
- consoleDoc.setConsoleTextPane(this);
- this.enterListener = (EnterListener) scriptWindow;
- this.viewer = scriptWindow.viewer;
- }
-
- public String getCommandString()
- {
- String cmd = consoleDoc.getCommandString();
- return cmd;
- }
-
- public void setPrompt()
- {
- consoleDoc.setPrompt();
- }
-
- public void appendNewline()
- {
- consoleDoc.appendNewline();
- }
-
- public void outputError(String strError)
- {
- consoleDoc.outputError(strError);
- }
-
- public void outputErrorForeground(String strError)
- {
- consoleDoc.outputErrorForeground(strError);
- }
-
- public void outputEcho(String strEcho)
- {
- consoleDoc.outputEcho(strEcho);
- }
-
- public void outputStatus(String strStatus)
- {
- consoleDoc.outputStatus(strStatus);
- }
-
- public void enterPressed()
- {
- if (enterListener != null)
- enterListener.enterPressed();
- }
-
- public void clearContent()
- {
- clearContent(null);
- }
-
- public void clearContent(String text)
- {
- consoleDoc.clearContent();
- if (text != null)
- consoleDoc.outputEcho(text);
- setPrompt();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.awt.Component#processKeyEvent(java.awt.event.KeyEvent)
- */
-
- /**
- * Custom key event processing for command 0 implementation.
- *
- * Captures key up and key down strokes to call command history and redefines
- * the same events with control down to allow caret vertical shift.
- *
- * @see java.awt.Component#processKeyEvent(java.awt.event.KeyEvent)
- */
- protected void processKeyEvent(KeyEvent ke)
- {
- // Id Control key is down, captures events does command
- // history recall and inhibits caret vertical shift.
- if (ke.getKeyCode() == KeyEvent.VK_UP
- && ke.getID() == KeyEvent.KEY_PRESSED && !ke.isControlDown())
- {
- recallCommand(true);
- }
- else if (ke.getKeyCode() == KeyEvent.VK_DOWN
- && ke.getID() == KeyEvent.KEY_PRESSED && !ke.isControlDown())
- {
- recallCommand(false);
- }
- // If Control key is down, redefines the event as if it
- // where a key up or key down stroke without modifiers.
- // This allows to move the caret up and down
- // with no command history recall.
- else if ((ke.getKeyCode() == KeyEvent.VK_DOWN || ke.getKeyCode() == KeyEvent.VK_UP)
- && ke.getID() == KeyEvent.KEY_PRESSED && ke.isControlDown())
- {
- super.processKeyEvent(new KeyEvent((Component) ke.getSource(), ke
- .getID(), ke.getWhen(), 0, // No modifiers
- ke.getKeyCode(), ke.getKeyChar(), ke.getKeyLocation()));
- }
- // Standard processing for other events.
- else
- {
- super.processKeyEvent(ke);
- // check command for compiler-identifyable syntax issues
- // this may have to be taken out if people start complaining
- // that only some of the commands are being checked
- // that is -- that the script itself is not being fully checked
-
- // not perfect -- help here?
- if (ke.getID() == KeyEvent.KEY_RELEASED
- && (ke.getKeyCode() > KeyEvent.VK_DOWN)
- || ke.getKeyCode() == KeyEvent.VK_BACK_SPACE)
- checkCommand();
- }
- }
-
- /**
- * Recall command history.
- *
- * @param up
- * - history up or down
- */
- void recallCommand(boolean up)
- {
- String cmd = viewer.getSetHistory(up ? -1 : 1);
- if (cmd == null)
- {
- return;
- }
- try
- {
- if (cmd.endsWith(CommandHistory.ERROR_FLAG))
- {
- cmd = cmd.substring(0, cmd.indexOf(CommandHistory.ERROR_FLAG));
- consoleDoc.replaceCommand(cmd, true);
- }
- else
- {
- consoleDoc.replaceCommand(cmd, false);
- }
- } catch (BadLocationException e)
- {
- e.printStackTrace();
- }
- }
-
- void checkCommand()
- {
- String strCommand = consoleDoc.getCommandString();
- if (strCommand.length() == 0)
- return;
- consoleDoc
- .colorCommand(viewer.scriptCheck(strCommand) == null ? consoleDoc.attUserInput
- : consoleDoc.attError);
- }
-
-}
-
-class ConsoleDocument extends DefaultStyledDocument
-{
-
- ConsoleTextPane consoleTextPane;
-
- SimpleAttributeSet attError;
-
- SimpleAttributeSet attEcho;
-
- SimpleAttributeSet attPrompt;
-
- SimpleAttributeSet attUserInput;
-
- SimpleAttributeSet attStatus;
-
- ConsoleDocument()
- {
- super();
-
- attError = new SimpleAttributeSet();
- StyleConstants.setForeground(attError, Color.red);
-
- attPrompt = new SimpleAttributeSet();
- StyleConstants.setForeground(attPrompt, Color.magenta);
-
- attUserInput = new SimpleAttributeSet();
- StyleConstants.setForeground(attUserInput, Color.black);
-
- attEcho = new SimpleAttributeSet();
- StyleConstants.setForeground(attEcho, Color.blue);
- StyleConstants.setBold(attEcho, true);
-
- attStatus = new SimpleAttributeSet();
- StyleConstants.setForeground(attStatus, Color.black);
- StyleConstants.setItalic(attStatus, true);
- }
-
- void setConsoleTextPane(ConsoleTextPane consoleTextPane)
- {
- this.consoleTextPane = consoleTextPane;
- }
-
- Position positionBeforePrompt; // starts at 0, so first time isn't tracked
-
- // (at least on Mac OS X)
-
- Position positionAfterPrompt; // immediately after $, so this will track
-
- int offsetAfterPrompt; // only still needed for the insertString override and
-
- // replaceCommand
-
- /**
- * Removes all content of the script window, and add a new prompt.
- */
- void clearContent()
- {
- try
- {
- super.remove(0, getLength());
- } catch (BadLocationException exception)
- {
- System.out.println("Could not clear script window content: "
- + exception.getMessage());
- }
- }
-
- void setPrompt()
- {
- try
- {
- super.insertString(getLength(), "$ ", attPrompt);
- setOffsetPositions();
- consoleTextPane.setCaretPosition(offsetAfterPrompt);
- } catch (BadLocationException e)
- {
- e.printStackTrace();
- }
- }
-
- void setOffsetPositions()
- {
- try
- {
- offsetAfterPrompt = getLength();
- positionBeforePrompt = createPosition(offsetAfterPrompt - 2);
- // after prompt should be immediately after $ otherwise tracks the end
- // of the line (and no command will be found) at least on Mac OS X it did.
- positionAfterPrompt = createPosition(offsetAfterPrompt - 1);
- } catch (BadLocationException e)
- {
- e.printStackTrace();
- }
- }
-
- void setNoPrompt()
- {
- try
- {
- offsetAfterPrompt = getLength();
- positionAfterPrompt = positionBeforePrompt = createPosition(offsetAfterPrompt);
- consoleTextPane.setCaretPosition(offsetAfterPrompt);
- } catch (BadLocationException e)
- {
- e.printStackTrace();
- }
- }
-
- // it looks like the positionBeforePrompt does not track when it started out
- // as 0
- // and a insertString at location 0 occurs. It may be better to track the
- // position after the prompt in stead
- void outputBeforePrompt(String str, SimpleAttributeSet attribute)
- {
- try
- {
- int pt = consoleTextPane.getCaretPosition();
- Position caretPosition = createPosition(pt);
- pt = positionBeforePrompt.getOffset();
- super.insertString(pt, str + "\n", attribute);
- setOffsetPositions();
- pt = caretPosition.getOffset();
- consoleTextPane.setCaretPosition(pt);
- } catch (BadLocationException e)
- {
- e.printStackTrace();
- }
- }
-
- void outputError(String strError)
- {
- outputBeforePrompt(strError, attError);
- }
-
- void outputErrorForeground(String strError)
- {
- try
- {
- super.insertString(getLength(), strError + "\n", attError);
- consoleTextPane.setCaretPosition(getLength());
- } catch (BadLocationException e)
- {
- e.printStackTrace();
-
- }
- }
-
- void outputEcho(String strEcho)
- {
- outputBeforePrompt(strEcho, attEcho);
- }
-
- void outputStatus(String strStatus)
- {
- outputBeforePrompt(strStatus, attStatus);
- }
-
- void appendNewline()
- {
- try
- {
- super.insertString(getLength(), "\n", attUserInput);
- consoleTextPane.setCaretPosition(getLength());
- } catch (BadLocationException e)
- {
- e.printStackTrace();
- }
- }
-
- // override the insertString to make sure everything typed ends up at the end
- // or in the 'command line' using the proper font, and the newline is
- // processed.
- public void insertString(int offs, String str, AttributeSet a)
- throws BadLocationException
- {
- int ichNewline = str.indexOf('\n');
- if (ichNewline > 0)
- str = str.substring(0, ichNewline);
- if (ichNewline != 0)
- {
- if (offs < offsetAfterPrompt)
- {
- offs = getLength();
- }
- super.insertString(offs, str, a == attError ? a : attUserInput);
- consoleTextPane.setCaretPosition(offs + str.length());
- }
- if (ichNewline >= 0)
- {
- consoleTextPane.enterPressed();
- }
- }
-
- String getCommandString()
- {
- String strCommand = "";
- try
- {
- int cmdStart = positionAfterPrompt.getOffset();
- strCommand = getText(cmdStart, getLength() - cmdStart);
- while (strCommand.length() > 0 && strCommand.charAt(0) == ' ')
- strCommand = strCommand.substring(1);
- } catch (BadLocationException e)
- {
- e.printStackTrace();
- }
- return strCommand;
- }
-
- public void remove(int offs, int len) throws BadLocationException
- {
- if (offs < offsetAfterPrompt)
- {
- len -= offsetAfterPrompt - offs;
- if (len <= 0)
- return;
- offs = offsetAfterPrompt;
- }
- super.remove(offs, len);
- // consoleTextPane.setCaretPosition(offs);
- }
-
- public void replace(int offs, int length, String str, AttributeSet attrs)
- throws BadLocationException
- {
- if (offs < offsetAfterPrompt)
- {
- if (offs + length < offsetAfterPrompt)
- {
- offs = getLength();
- length = 0;
- }
- else
- {
- length -= offsetAfterPrompt - offs;
- offs = offsetAfterPrompt;
- }
- }
- super.replace(offs, length, str, attrs);
- // consoleTextPane.setCaretPosition(offs + str.length());
- }
-
- /**
- * Replaces current command on script.
- *
- * @param newCommand
- * new command value
- * @param isError
- * true to set error color ends with #??
- *
- * @throws BadLocationException
- */
- void replaceCommand(String newCommand, boolean isError)
- throws BadLocationException
- {
- if (positionAfterPrompt == positionBeforePrompt)
- return;
- replace(offsetAfterPrompt, getLength() - offsetAfterPrompt, newCommand,
- isError ? attError : attUserInput);
- }
-
- void colorCommand(SimpleAttributeSet att)
- {
- if (positionAfterPrompt == positionBeforePrompt)
- return;
- setCharacterAttributes(offsetAfterPrompt, getLength()
- - offsetAfterPrompt, att, true);
- }
-}
-
-interface EnterListener
-{
- public void enterPressed();
-}
-#Wed Jun 10 11:15:53 BST 2015
+#Fri Jun 26 14:22:47 BST 2015
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
jalview.schemabinding.version2.Setting=jalview.schemabinding.version2.descriptors.SettingDescriptor
jalview.schemabinding.version2.AlcodonFrame=jalview.schemabinding.version2.descriptors.AlcodonFrameDescriptor
jalview.schemabinding.version2.AnnotationElement=jalview.schemabinding.version2.descriptors.AnnotationElementDescriptor
+jalview.schemabinding.version2.SecondaryStructure=jalview.schemabinding.version2.descriptors.SecondaryStructureDescriptor
jalview.schemabinding.version2.SequenceSet=jalview.schemabinding.version2.descriptors.SequenceSetDescriptor
jalview.schemabinding.version2.Viewport=jalview.schemabinding.version2.descriptors.ViewportDescriptor
+jalview.schemabinding.version2.RnaViewer=jalview.schemabinding.version2.descriptors.RnaViewerDescriptor
jalview.schemabinding.version2.MapListType=jalview.schemabinding.version2.descriptors.MapListTypeDescriptor
jalview.schemabinding.version2.Property=jalview.schemabinding.version2.descriptors.PropertyDescriptor
jalview.schemabinding.version2.UserColourScheme=jalview.schemabinding.version2.descriptors.UserColourSchemeDescriptor
//--------------------------/
/**
- * handle for the calculation which uses this parameter set
+ * handle for the calculation which uses
+ * this parameter set
+ *
*/
private java.lang.String _calcId;
/**
- * should the calculation be performed immediately after
- * loading in order to refresh results
+ * should the calculation be performed
+ * immediately after loading in order to refresh results
+ *
*/
private boolean _needsUpdate = false;
private boolean _has_needsUpdate;
/**
- * should the calculation be automatically performed on edits
+ * should the calculation be automatically
+ * performed on edits
+ *
*/
private boolean _autoUpdate;
/**
* Returns the value of field 'autoUpdate'. The field
* 'autoUpdate' has the following description: should the
- * calculation be automatically performed on edits
+ * calculation be automatically
+ * performed on edits
+ *
*
* @return the value of field 'AutoUpdate'.
*/
/**
* Returns the value of field 'calcId'. The field 'calcId' has
* the following description: handle for the calculation which
- * uses this parameter set
+ * uses
+ * this parameter set
+ *
*
* @return the value of field 'CalcId'.
*/
/**
* Returns the value of field 'needsUpdate'. The field
* 'needsUpdate' has the following description: should the
- * calculation be performed immediately after loading in order
- * to refresh results
+ * calculation be performed
+ * immediately after loading in order to refresh results
+ *
*
* @return the value of field 'NeedsUpdate'.
*/
/**
* Returns the value of field 'autoUpdate'. The field
* 'autoUpdate' has the following description: should the
- * calculation be automatically performed on edits
+ * calculation be automatically
+ * performed on edits
+ *
*
* @return the value of field 'AutoUpdate'.
*/
/**
* Returns the value of field 'needsUpdate'. The field
* 'needsUpdate' has the following description: should the
- * calculation be performed immediately after loading in order
- * to refresh results
+ * calculation be performed
+ * immediately after loading in order to refresh results
+ *
*
* @return the value of field 'NeedsUpdate'.
*/
/**
* Sets the value of field 'autoUpdate'. The field 'autoUpdate'
* has the following description: should the calculation be
- * automatically performed on edits
+ * automatically
+ * performed on edits
+ *
*
* @param autoUpdate the value of field 'autoUpdate'.
*/
/**
* Sets the value of field 'calcId'. The field 'calcId' has the
* following description: handle for the calculation which uses
- * this parameter set
+ * this parameter set
+ *
*
* @param calcId the value of field 'calcId'.
*/
/**
* Sets the value of field 'needsUpdate'. The field
* 'needsUpdate' has the following description: should the
- * calculation be performed immediately after loading in order
- * to refresh results
+ * calculation be performed
+ * immediately after loading in order to refresh results
+ *
*
* @param needsUpdate the value of field 'needsUpdate'.
*/
/**
* Optional sequence group ID (only
- * needs to be unique for this
+ * needs to be
+ * unique for this
* alignment)
*
*/
/**
* Returns the value of field 'id'. The field 'id' has the
* following description: Optional sequence group ID (only
- * needs to be unique for this
+ * needs to be
+ * unique for this
* alignment)
*
*
/**
* Sets the value of field 'id'. The field 'id' has the
* following description: Optional sequence group ID (only
- * needs to be unique for this
+ * needs to be
+ * unique for this
* alignment)
*
*
*/
private java.util.Vector _hiddenSequencesList;
+ /**
+ * Reference to a viewer showing RNA structure
+ * for this sequence. Schema supports one viewer showing
+ * multiple
+ * annotations for multiple sequences, though currently only
+ * one
+ * annotation for one sequence (gapped or trimmed) is used
+ *
+ */
+ private java.util.Vector _rnaViewerList;
+
//----------------/
//- Constructors -/
this._featuresList = new java.util.Vector();
this._pdbidsList = new java.util.Vector();
this._hiddenSequencesList = new java.util.Vector();
+ this._rnaViewerList = new java.util.Vector();
}
}
/**
+ *
+ *
+ * @param vRnaViewer
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addRnaViewer(
+ final jalview.schemabinding.version2.RnaViewer vRnaViewer)
+ throws java.lang.IndexOutOfBoundsException {
+ this._rnaViewerList.addElement(vRnaViewer);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vRnaViewer
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addRnaViewer(
+ final int index,
+ final jalview.schemabinding.version2.RnaViewer vRnaViewer)
+ throws java.lang.IndexOutOfBoundsException {
+ this._rnaViewerList.add(index, vRnaViewer);
+ }
+
+ /**
*/
public void deleteColour(
) {
}
/**
+ * Method enumerateRnaViewer.
+ *
+ * @return an Enumeration over all
+ * jalview.schemabinding.version2.RnaViewer elements
+ */
+ public java.util.Enumeration enumerateRnaViewer(
+ ) {
+ return this._rnaViewerList.elements();
+ }
+
+ /**
* Returns the value of field 'colour'.
*
* @return the value of field 'Colour'.
}
/**
+ * Method getRnaViewer.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ * @return the value of the
+ * jalview.schemabinding.version2.RnaViewer at the given index
+ */
+ public jalview.schemabinding.version2.RnaViewer getRnaViewer(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._rnaViewerList.size()) {
+ throw new IndexOutOfBoundsException("getRnaViewer: Index value '" + index + "' not in range [0.." + (this._rnaViewerList.size() - 1) + "]");
+ }
+
+ return (jalview.schemabinding.version2.RnaViewer) _rnaViewerList.get(index);
+ }
+
+ /**
+ * Method getRnaViewer.Returns the contents of the collection
+ * in an Array. <p>Note: Just in case the collection contents
+ * are changing in another thread, we pass a 0-length Array of
+ * the correct type into the API call. This way we <i>know</i>
+ * that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public jalview.schemabinding.version2.RnaViewer[] getRnaViewer(
+ ) {
+ jalview.schemabinding.version2.RnaViewer[] array = new jalview.schemabinding.version2.RnaViewer[0];
+ return (jalview.schemabinding.version2.RnaViewer[]) this._rnaViewerList.toArray(array);
+ }
+
+ /**
+ * Method getRnaViewerCount.
+ *
+ * @return the size of this collection
+ */
+ public int getRnaViewerCount(
+ ) {
+ return this._rnaViewerList.size();
+ }
+
+ /**
* Returns the value of field 'start'.
*
* @return the value of field 'Start'.
}
/**
+ */
+ public void removeAllRnaViewer(
+ ) {
+ this._rnaViewerList.clear();
+ }
+
+ /**
* Method removeFeatures.
*
* @param vFeatures
}
/**
+ * Method removeRnaViewer.
+ *
+ * @param vRnaViewer
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeRnaViewer(
+ final jalview.schemabinding.version2.RnaViewer vRnaViewer) {
+ boolean removed = _rnaViewerList.remove(vRnaViewer);
+ return removed;
+ }
+
+ /**
+ * Method removeRnaViewerAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public jalview.schemabinding.version2.RnaViewer removeRnaViewerAt(
+ final int index) {
+ java.lang.Object obj = this._rnaViewerList.remove(index);
+ return (jalview.schemabinding.version2.RnaViewer) obj;
+ }
+
+ /**
* Sets the value of field 'colour'.
*
* @param colour the value of field 'colour'.
}
/**
+ *
+ *
+ * @param index
+ * @param vRnaViewer
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setRnaViewer(
+ final int index,
+ final jalview.schemabinding.version2.RnaViewer vRnaViewer)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._rnaViewerList.size()) {
+ throw new IndexOutOfBoundsException("setRnaViewer: Index value '" + index + "' not in range [0.." + (this._rnaViewerList.size() - 1) + "]");
+ }
+
+ this._rnaViewerList.set(index, vRnaViewer);
+ }
+
+ /**
+ *
+ *
+ * @param vRnaViewerArray
+ */
+ public void setRnaViewer(
+ final jalview.schemabinding.version2.RnaViewer[] vRnaViewerArray) {
+ //-- copy array
+ _rnaViewerList.clear();
+
+ for (int i = 0; i < vRnaViewerArray.length; i++) {
+ this._rnaViewerList.add(vRnaViewerArray[i]);
+ }
+ }
+
+ /**
* Sets the value of field 'start'.
*
* @param start the value of field 'start'.
--- /dev/null
+/*
+ * 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 -/
+//---------------------------------/
+
+import org.exolab.castor.xml.Marshaller;
+import org.exolab.castor.xml.Unmarshaller;
+
+/**
+ * Reference to a viewer showing RNA structure
+ * for this sequence. Schema supports one viewer showing multiple
+ * annotations for multiple sequences, though currently only one
+ * annotation for one sequence (gapped or trimmed) is used
+ *
+ *
+ * @version $Revision$ $Date$
+ */
+public class RnaViewer implements java.io.Serializable {
+
+
+ //--------------------------/
+ //- Class/Member Variables -/
+ //--------------------------/
+
+ /**
+ * Field _title.
+ */
+ private java.lang.String _title;
+
+ /**
+ * An id unique to the RNA viewer panel
+ *
+ */
+ private java.lang.String _viewId;
+
+ /**
+ * horizontal position of split pane divider
+ *
+ */
+ private int _dividerLocation;
+
+ /**
+ * keeps track of state for field: _dividerLocation
+ */
+ private boolean _has_dividerLocation;
+
+ /**
+ * Index of the selected structure in the
+ * viewer panel
+ *
+ */
+ private int _selectedRna;
+
+ /**
+ * keeps track of state for field: _selectedRna
+ */
+ private boolean _has_selectedRna;
+
+ /**
+ * Field _width.
+ */
+ private int _width;
+
+ /**
+ * keeps track of state for field: _width
+ */
+ private boolean _has_width;
+
+ /**
+ * Field _height.
+ */
+ private int _height;
+
+ /**
+ * keeps track of state for field: _height
+ */
+ private boolean _has_height;
+
+ /**
+ * Field _xpos.
+ */
+ private int _xpos;
+
+ /**
+ * keeps track of state for field: _xpos
+ */
+ private boolean _has_xpos;
+
+ /**
+ * Field _ypos.
+ */
+ private int _ypos;
+
+ /**
+ * keeps track of state for field: _ypos
+ */
+ private boolean _has_ypos;
+
+ /**
+ * Field _secondaryStructureList.
+ */
+ private java.util.Vector _secondaryStructureList;
+
+
+ //----------------/
+ //- Constructors -/
+ //----------------/
+
+ public RnaViewer() {
+ super();
+ this._secondaryStructureList = new java.util.Vector();
+ }
+
+
+ //-----------/
+ //- Methods -/
+ //-----------/
+
+ /**
+ *
+ *
+ * @param vSecondaryStructure
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addSecondaryStructure(
+ final jalview.schemabinding.version2.SecondaryStructure vSecondaryStructure)
+ throws java.lang.IndexOutOfBoundsException {
+ this._secondaryStructureList.addElement(vSecondaryStructure);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vSecondaryStructure
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addSecondaryStructure(
+ final int index,
+ final jalview.schemabinding.version2.SecondaryStructure vSecondaryStructure)
+ throws java.lang.IndexOutOfBoundsException {
+ this._secondaryStructureList.add(index, vSecondaryStructure);
+ }
+
+ /**
+ */
+ public void deleteDividerLocation(
+ ) {
+ this._has_dividerLocation= false;
+ }
+
+ /**
+ */
+ public void deleteHeight(
+ ) {
+ this._has_height= false;
+ }
+
+ /**
+ */
+ public void deleteSelectedRna(
+ ) {
+ this._has_selectedRna= false;
+ }
+
+ /**
+ */
+ public void deleteWidth(
+ ) {
+ this._has_width= false;
+ }
+
+ /**
+ */
+ public void deleteXpos(
+ ) {
+ this._has_xpos= false;
+ }
+
+ /**
+ */
+ public void deleteYpos(
+ ) {
+ this._has_ypos= false;
+ }
+
+ /**
+ * Method enumerateSecondaryStructure.
+ *
+ * @return an Enumeration over all
+ * jalview.schemabinding.version2.SecondaryStructure elements
+ */
+ public java.util.Enumeration enumerateSecondaryStructure(
+ ) {
+ return this._secondaryStructureList.elements();
+ }
+
+ /**
+ * Returns the value of field 'dividerLocation'. The field
+ * 'dividerLocation' has the following description: horizontal
+ * position of split pane divider
+ *
+ *
+ * @return the value of field 'DividerLocation'.
+ */
+ public int getDividerLocation(
+ ) {
+ return this._dividerLocation;
+ }
+
+ /**
+ * Returns the value of field 'height'.
+ *
+ * @return the value of field 'Height'.
+ */
+ public int getHeight(
+ ) {
+ return this._height;
+ }
+
+ /**
+ * Method getSecondaryStructure.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ * @return the value of the
+ * jalview.schemabinding.version2.SecondaryStructure at the
+ * given index
+ */
+ public jalview.schemabinding.version2.SecondaryStructure getSecondaryStructure(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._secondaryStructureList.size()) {
+ throw new IndexOutOfBoundsException("getSecondaryStructure: Index value '" + index + "' not in range [0.." + (this._secondaryStructureList.size() - 1) + "]");
+ }
+
+ return (jalview.schemabinding.version2.SecondaryStructure) _secondaryStructureList.get(index);
+ }
+
+ /**
+ * Method getSecondaryStructure.Returns the contents of the
+ * collection in an Array. <p>Note: Just in case the
+ * collection contents are changing in another thread, we pass
+ * a 0-length Array of the correct type into the API call.
+ * This way we <i>know</i> that the Array returned is of
+ * exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public jalview.schemabinding.version2.SecondaryStructure[] getSecondaryStructure(
+ ) {
+ jalview.schemabinding.version2.SecondaryStructure[] array = new jalview.schemabinding.version2.SecondaryStructure[0];
+ return (jalview.schemabinding.version2.SecondaryStructure[]) this._secondaryStructureList.toArray(array);
+ }
+
+ /**
+ * Method getSecondaryStructureCount.
+ *
+ * @return the size of this collection
+ */
+ public int getSecondaryStructureCount(
+ ) {
+ return this._secondaryStructureList.size();
+ }
+
+ /**
+ * Returns the value of field 'selectedRna'. The field
+ * 'selectedRna' has the following description: Index of the
+ * selected structure in the
+ * viewer panel
+ *
+ *
+ * @return the value of field 'SelectedRna'.
+ */
+ public int getSelectedRna(
+ ) {
+ return this._selectedRna;
+ }
+
+ /**
+ * Returns the value of field 'title'.
+ *
+ * @return the value of field 'Title'.
+ */
+ public java.lang.String getTitle(
+ ) {
+ return this._title;
+ }
+
+ /**
+ * Returns the value of field 'viewId'. The field 'viewId' has
+ * the following description: An id unique to the RNA viewer
+ * panel
+ *
+ *
+ * @return the value of field 'ViewId'.
+ */
+ public java.lang.String getViewId(
+ ) {
+ return this._viewId;
+ }
+
+ /**
+ * Returns the value of field 'width'.
+ *
+ * @return the value of field 'Width'.
+ */
+ public int getWidth(
+ ) {
+ return this._width;
+ }
+
+ /**
+ * Returns the value of field 'xpos'.
+ *
+ * @return the value of field 'Xpos'.
+ */
+ public int getXpos(
+ ) {
+ return this._xpos;
+ }
+
+ /**
+ * Returns the value of field 'ypos'.
+ *
+ * @return the value of field 'Ypos'.
+ */
+ public int getYpos(
+ ) {
+ return this._ypos;
+ }
+
+ /**
+ * Method hasDividerLocation.
+ *
+ * @return true if at least one DividerLocation has been added
+ */
+ public boolean hasDividerLocation(
+ ) {
+ return this._has_dividerLocation;
+ }
+
+ /**
+ * Method hasHeight.
+ *
+ * @return true if at least one Height has been added
+ */
+ public boolean hasHeight(
+ ) {
+ return this._has_height;
+ }
+
+ /**
+ * Method hasSelectedRna.
+ *
+ * @return true if at least one SelectedRna has been added
+ */
+ public boolean hasSelectedRna(
+ ) {
+ return this._has_selectedRna;
+ }
+
+ /**
+ * Method hasWidth.
+ *
+ * @return true if at least one Width has been added
+ */
+ public boolean hasWidth(
+ ) {
+ return this._has_width;
+ }
+
+ /**
+ * Method hasXpos.
+ *
+ * @return true if at least one Xpos has been added
+ */
+ public boolean hasXpos(
+ ) {
+ return this._has_xpos;
+ }
+
+ /**
+ * Method hasYpos.
+ *
+ * @return true if at least one Ypos has been added
+ */
+ public boolean hasYpos(
+ ) {
+ return this._has_ypos;
+ }
+
+ /**
+ * 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);
+ }
+
+ /**
+ */
+ public void removeAllSecondaryStructure(
+ ) {
+ this._secondaryStructureList.clear();
+ }
+
+ /**
+ * Method removeSecondaryStructure.
+ *
+ * @param vSecondaryStructure
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeSecondaryStructure(
+ final jalview.schemabinding.version2.SecondaryStructure vSecondaryStructure) {
+ boolean removed = _secondaryStructureList.remove(vSecondaryStructure);
+ return removed;
+ }
+
+ /**
+ * Method removeSecondaryStructureAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public jalview.schemabinding.version2.SecondaryStructure removeSecondaryStructureAt(
+ final int index) {
+ java.lang.Object obj = this._secondaryStructureList.remove(index);
+ return (jalview.schemabinding.version2.SecondaryStructure) obj;
+ }
+
+ /**
+ * Sets the value of field 'dividerLocation'. The field
+ * 'dividerLocation' has the following description: horizontal
+ * position of split pane divider
+ *
+ *
+ * @param dividerLocation the value of field 'dividerLocation'.
+ */
+ public void setDividerLocation(
+ final int dividerLocation) {
+ this._dividerLocation = dividerLocation;
+ this._has_dividerLocation = true;
+ }
+
+ /**
+ * Sets the value of field 'height'.
+ *
+ * @param height the value of field 'height'.
+ */
+ public void setHeight(
+ final int height) {
+ this._height = height;
+ this._has_height = true;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vSecondaryStructure
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setSecondaryStructure(
+ final int index,
+ final jalview.schemabinding.version2.SecondaryStructure vSecondaryStructure)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._secondaryStructureList.size()) {
+ throw new IndexOutOfBoundsException("setSecondaryStructure: Index value '" + index + "' not in range [0.." + (this._secondaryStructureList.size() - 1) + "]");
+ }
+
+ this._secondaryStructureList.set(index, vSecondaryStructure);
+ }
+
+ /**
+ *
+ *
+ * @param vSecondaryStructureArray
+ */
+ public void setSecondaryStructure(
+ final jalview.schemabinding.version2.SecondaryStructure[] vSecondaryStructureArray) {
+ //-- copy array
+ _secondaryStructureList.clear();
+
+ for (int i = 0; i < vSecondaryStructureArray.length; i++) {
+ this._secondaryStructureList.add(vSecondaryStructureArray[i]);
+ }
+ }
+
+ /**
+ * Sets the value of field 'selectedRna'. The field
+ * 'selectedRna' has the following description: Index of the
+ * selected structure in the
+ * viewer panel
+ *
+ *
+ * @param selectedRna the value of field 'selectedRna'.
+ */
+ public void setSelectedRna(
+ final int selectedRna) {
+ this._selectedRna = selectedRna;
+ this._has_selectedRna = true;
+ }
+
+ /**
+ * Sets the value of field 'title'.
+ *
+ * @param title the value of field 'title'.
+ */
+ public void setTitle(
+ final java.lang.String title) {
+ this._title = title;
+ }
+
+ /**
+ * Sets the value of field 'viewId'. The field 'viewId' has the
+ * following description: An id unique to the RNA viewer panel
+ *
+ *
+ * @param viewId the value of field 'viewId'.
+ */
+ public void setViewId(
+ final java.lang.String viewId) {
+ this._viewId = viewId;
+ }
+
+ /**
+ * Sets the value of field 'width'.
+ *
+ * @param width the value of field 'width'.
+ */
+ public void setWidth(
+ final int width) {
+ this._width = width;
+ this._has_width = true;
+ }
+
+ /**
+ * Sets the value of field 'xpos'.
+ *
+ * @param xpos the value of field 'xpos'.
+ */
+ public void setXpos(
+ final int xpos) {
+ this._xpos = xpos;
+ this._has_xpos = true;
+ }
+
+ /**
+ * Sets the value of field 'ypos'.
+ *
+ * @param ypos the value of field 'ypos'.
+ */
+ public void setYpos(
+ final int ypos) {
+ this._ypos = ypos;
+ this._has_ypos = 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.RnaViewer
+ */
+ public static jalview.schemabinding.version2.RnaViewer unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ return (jalview.schemabinding.version2.RnaViewer) Unmarshaller.unmarshal(jalview.schemabinding.version2.RnaViewer.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);
+ }
+
+}
--- /dev/null
+/*
+ * 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 -/
+//---------------------------------/
+
+import org.exolab.castor.xml.Marshaller;
+import org.exolab.castor.xml.Unmarshaller;
+
+/**
+ * Class SecondaryStructure.
+ *
+ * @version $Revision$ $Date$
+ */
+public class SecondaryStructure implements java.io.Serializable {
+
+
+ //--------------------------/
+ //- Class/Member Variables -/
+ //--------------------------/
+
+ /**
+ * Field _title.
+ */
+ private java.lang.String _title;
+
+ /**
+ * id attribute of Annotation in
+ * vamsasModel for
+ * the secondary structure annotation shown
+ * in the viewer
+ *
+ */
+ private java.lang.String _annotationId;
+
+ /**
+ * if true the RNA structure is shown with gaps, if false
+ * without
+ *
+ */
+ private boolean _gapped;
+
+ /**
+ * keeps track of state for field: _gapped
+ */
+ private boolean _has_gapped;
+
+ /**
+ * name of the project jar entry that holds
+ * the VARNA viewer state for the structure
+ *
+ */
+ private java.lang.String _viewerState;
+
+
+ //----------------/
+ //- Constructors -/
+ //----------------/
+
+ public SecondaryStructure() {
+ super();
+ }
+
+
+ //-----------/
+ //- Methods -/
+ //-----------/
+
+ /**
+ */
+ public void deleteGapped(
+ ) {
+ this._has_gapped= false;
+ }
+
+ /**
+ * Returns the value of field 'annotationId'. The field
+ * 'annotationId' has the following description: id attribute
+ * of Annotation in
+ * vamsasModel for
+ * the secondary structure annotation shown
+ * in the viewer
+ *
+ *
+ * @return the value of field 'AnnotationId'.
+ */
+ public java.lang.String getAnnotationId(
+ ) {
+ return this._annotationId;
+ }
+
+ /**
+ * Returns the value of field 'gapped'. The field 'gapped' has
+ * the following description: if true the RNA structure is
+ * shown with gaps, if false without
+ *
+ *
+ * @return the value of field 'Gapped'.
+ */
+ public boolean getGapped(
+ ) {
+ return this._gapped;
+ }
+
+ /**
+ * Returns the value of field 'title'.
+ *
+ * @return the value of field 'Title'.
+ */
+ public java.lang.String getTitle(
+ ) {
+ return this._title;
+ }
+
+ /**
+ * Returns the value of field 'viewerState'. The field
+ * 'viewerState' has the following description: name of the
+ * project jar entry that holds
+ * the VARNA viewer state for the structure
+ *
+ *
+ * @return the value of field 'ViewerState'.
+ */
+ public java.lang.String getViewerState(
+ ) {
+ return this._viewerState;
+ }
+
+ /**
+ * Method hasGapped.
+ *
+ * @return true if at least one Gapped has been added
+ */
+ public boolean hasGapped(
+ ) {
+ return this._has_gapped;
+ }
+
+ /**
+ * Returns the value of field 'gapped'. The field 'gapped' has
+ * the following description: if true the RNA structure is
+ * shown with gaps, if false without
+ *
+ *
+ * @return the value of field 'Gapped'.
+ */
+ public boolean isGapped(
+ ) {
+ return this._gapped;
+ }
+
+ /**
+ * 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 'annotationId'. The field
+ * 'annotationId' has the following description: id attribute
+ * of Annotation in
+ * vamsasModel for
+ * the secondary structure annotation shown
+ * in the viewer
+ *
+ *
+ * @param annotationId the value of field 'annotationId'.
+ */
+ public void setAnnotationId(
+ final java.lang.String annotationId) {
+ this._annotationId = annotationId;
+ }
+
+ /**
+ * Sets the value of field 'gapped'. The field 'gapped' has the
+ * following description: if true the RNA structure is shown
+ * with gaps, if false without
+ *
+ *
+ * @param gapped the value of field 'gapped'.
+ */
+ public void setGapped(
+ final boolean gapped) {
+ this._gapped = gapped;
+ this._has_gapped = true;
+ }
+
+ /**
+ * Sets the value of field 'title'.
+ *
+ * @param title the value of field 'title'.
+ */
+ public void setTitle(
+ final java.lang.String title) {
+ this._title = title;
+ }
+
+ /**
+ * Sets the value of field 'viewerState'. The field
+ * 'viewerState' has the following description: name of the
+ * project jar entry that holds
+ * the VARNA viewer state for the structure
+ *
+ *
+ * @param viewerState the value of field 'viewerState'.
+ */
+ public void setViewerState(
+ final java.lang.String viewerState) {
+ this._viewerState = viewerState;
+ }
+
+ /**
+ * 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.SecondaryStructure
+ */
+ public static jalview.schemabinding.version2.SecondaryStructure unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ return (jalview.schemabinding.version2.SecondaryStructure) Unmarshaller.unmarshal(jalview.schemabinding.version2.SecondaryStructure.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);
+ }
+
+}
/**
* Optional minimum colour
- * for graduated feature
+ * for graduated
+ * feature
* colour
*
*/
* Returns the value of field 'mincolour'. The field
* 'mincolour' has the following description: Optional minimum
* colour
- * for graduated feature
+ * for graduated
+ * feature
* colour
*
*
/**
* Sets the value of field 'mincolour'. The field 'mincolour'
* has the following description: Optional minimum colour
- * for graduated feature
+ * for graduated
+ * feature
* colour
*
*
private boolean _has_colourByJmol;
/**
- * An identifier for the viewer type, currently either
- * JMOL or CHIMERA
+ * An
+ * identifier
+ * for
+ * the
+ * viewer
+ * type,
+ * currently
+ * either
+ * JMOL
+ * or
+ * CHIMERA
*
*/
private java.lang.String _type;
/**
* Returns the value of field 'type'. The field 'type' has the
- * following description: An identifier for the viewer type,
- * currently either
- * JMOL or CHIMERA
+ * following description: An
+ * identifier
+ * for
+ * the
+ * viewer
+ * type,
+ * currently
+ * either
+ * JMOL
+ * or
+ * CHIMERA
*
*
* @return the value of field 'Type'.
/**
* Sets the value of field 'type'. The field 'type' has the
- * following description: An identifier for the viewer type,
- * currently either
- * JMOL or CHIMERA
+ * following description: An
+ * identifier
+ * for
+ * the
+ * viewer
+ * type,
+ * currently
+ * either
+ * JMOL
+ * or
+ * CHIMERA
*
*
* @param type the value of field 'type'.
/**
* Tree ID added for binding tree
- * visualization settings to vamsas
+ * visualization
+ * settings to vamsas
* document trees in jalview 2.4.1
*
*/
/**
* Returns the value of field 'id'. The field 'id' has the
* following description: Tree ID added for binding tree
- * visualization settings to vamsas
+ * visualization
+ * settings to vamsas
* document trees in jalview 2.4.1
*
*
/**
* Sets the value of field 'id'. The field 'id' has the
* following description: Tree ID added for binding tree
- * visualization settings to vamsas
+ * visualization
+ * settings to vamsas
* document trees in jalview 2.4.1
*
*
/**
* unique id used by jalview to
- * synchronize between stored and
+ * synchronize
+ * between stored and
* instantiated views
*
*/
private java.lang.String _id;
/**
- * The viewport id of this viewport's (cdna/protein) coding
- * complement, if any
+ * The viewport id of this viewport's
+ * (cdna/protein) coding complement, if any
*
*/
private java.lang.String _complementId;
/**
* Returns the value of field 'complementId'. The field
* 'complementId' has the following description: The viewport
- * id of this viewport's (cdna/protein) coding complement, if
- * any
+ * id of this viewport's
+ * (cdna/protein) coding complement, if any
*
*
* @return the value of field 'ComplementId'.
/**
* Returns the value of field 'id'. The field 'id' has the
* following description: unique id used by jalview to
- * synchronize between stored and
+ * synchronize
+ * between stored and
* instantiated views
*
*
/**
* Sets the value of field 'complementId'. The field
* 'complementId' has the following description: The viewport
- * id of this viewport's (cdna/protein) coding complement, if
- * any
+ * id of this viewport's
+ * (cdna/protein) coding complement, if any
*
*
* @param complementId the value of field 'complementId'.
/**
* Sets the value of field 'id'. The field 'id' has the
* following description: unique id used by jalview to
- * synchronize between stored and
+ * synchronize
+ * between stored and
* instantiated views
*
*
typeValidator.setMaxInclusive(2147483647);
}
desc.setValidator(fieldValidator);
+ //-- _rnaViewerList
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.RnaViewer.class, "_rnaViewerList", "rnaViewer", org.exolab.castor.xml.NodeType.Element);
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {
+ public java.lang.Object getValue( java.lang.Object object )
+ throws IllegalStateException
+ {
+ JSeq target = (JSeq) object;
+ return target.getRnaViewer();
+ }
+ public void setValue( java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try {
+ JSeq target = (JSeq) object;
+ target.addRnaViewer( (jalview.schemabinding.version2.RnaViewer) value);
+ } catch (java.lang.Exception ex) {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
+ try {
+ JSeq target = (JSeq) object;
+ target.removeAllRnaViewer();
+ } catch (java.lang.Exception ex) {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
+ public java.lang.Object newInstance(java.lang.Object parent) {
+ return new jalview.schemabinding.version2.RnaViewer();
+ }
+ };
+ desc.setHandler(handler);
+ desc.setNameSpaceURI("www.jalview.org");
+ desc.setMultivalued(true);
+ addFieldDescriptor(desc);
+
+ //-- validation code for: _rnaViewerList
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ fieldValidator.setMinOccurs(0);
+ { //-- local scope
+ }
+ desc.setValidator(fieldValidator);
}
--- /dev/null
+/*
+ * 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 -/
+//---------------------------------/
+
+import jalview.schemabinding.version2.RnaViewer;
+
+/**
+ * Class RnaViewerDescriptor.
+ *
+ * @version $Revision$ $Date$
+ */
+public class RnaViewerDescriptor 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 RnaViewerDescriptor() {
+ super();
+ _nsURI = "www.jalview.org";
+ _xmlName = "rnaViewer";
+ _elementDefinition = true;
+
+ //-- set grouping compositor
+ setCompositorAsSequence();
+ 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
+
+ //-- _title
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_title", "title", 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
+ {
+ RnaViewer target = (RnaViewer) object;
+ return target.getTitle();
+ }
+ public void setValue( java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try {
+ RnaViewer target = (RnaViewer) object;
+ target.setTitle( (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: _title
+ 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);
+ //-- _viewId
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_viewId", "viewId", 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
+ {
+ RnaViewer target = (RnaViewer) object;
+ return target.getViewId();
+ }
+ public void setValue( java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try {
+ RnaViewer target = (RnaViewer) object;
+ target.setViewId( (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: _viewId
+ 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);
+ //-- _dividerLocation
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_dividerLocation", "dividerLocation", org.exolab.castor.xml.NodeType.Attribute);
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {
+ public java.lang.Object getValue( java.lang.Object object )
+ throws IllegalStateException
+ {
+ RnaViewer target = (RnaViewer) object;
+ if (!target.hasDividerLocation()) { return null; }
+ return new java.lang.Integer(target.getDividerLocation());
+ }
+ public void setValue( java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try {
+ RnaViewer target = (RnaViewer) object;
+ // if null, use delete method for optional primitives
+ if (value == null) {
+ target.deleteDividerLocation();
+ return;
+ }
+ target.setDividerLocation( ((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: _dividerLocation
+ 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);
+ //-- _selectedRna
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_selectedRna", "selectedRna", org.exolab.castor.xml.NodeType.Attribute);
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {
+ public java.lang.Object getValue( java.lang.Object object )
+ throws IllegalStateException
+ {
+ RnaViewer target = (RnaViewer) object;
+ if (!target.hasSelectedRna()) { return null; }
+ return new java.lang.Integer(target.getSelectedRna());
+ }
+ public void setValue( java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try {
+ RnaViewer target = (RnaViewer) object;
+ // if null, use delete method for optional primitives
+ if (value == null) {
+ target.deleteSelectedRna();
+ return;
+ }
+ target.setSelectedRna( ((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: _selectedRna
+ 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);
+ //-- _width
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_width", "width", org.exolab.castor.xml.NodeType.Attribute);
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {
+ public java.lang.Object getValue( java.lang.Object object )
+ throws IllegalStateException
+ {
+ RnaViewer target = (RnaViewer) object;
+ if (!target.hasWidth()) { return null; }
+ return new java.lang.Integer(target.getWidth());
+ }
+ public void setValue( java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try {
+ RnaViewer target = (RnaViewer) object;
+ // if null, use delete method for optional primitives
+ if (value == null) {
+ target.deleteWidth();
+ return;
+ }
+ target.setWidth( ((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: _width
+ 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);
+ //-- _height
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_height", "height", org.exolab.castor.xml.NodeType.Attribute);
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {
+ public java.lang.Object getValue( java.lang.Object object )
+ throws IllegalStateException
+ {
+ RnaViewer target = (RnaViewer) object;
+ if (!target.hasHeight()) { return null; }
+ return new java.lang.Integer(target.getHeight());
+ }
+ public void setValue( java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try {
+ RnaViewer target = (RnaViewer) object;
+ // if null, use delete method for optional primitives
+ if (value == null) {
+ target.deleteHeight();
+ return;
+ }
+ target.setHeight( ((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: _height
+ 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);
+ //-- _xpos
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_xpos", "xpos", org.exolab.castor.xml.NodeType.Attribute);
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {
+ public java.lang.Object getValue( java.lang.Object object )
+ throws IllegalStateException
+ {
+ RnaViewer target = (RnaViewer) object;
+ if (!target.hasXpos()) { return null; }
+ return new java.lang.Integer(target.getXpos());
+ }
+ public void setValue( java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try {
+ RnaViewer target = (RnaViewer) object;
+ // if null, use delete method for optional primitives
+ if (value == null) {
+ target.deleteXpos();
+ return;
+ }
+ target.setXpos( ((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: _xpos
+ 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);
+ //-- _ypos
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_ypos", "ypos", org.exolab.castor.xml.NodeType.Attribute);
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {
+ public java.lang.Object getValue( java.lang.Object object )
+ throws IllegalStateException
+ {
+ RnaViewer target = (RnaViewer) object;
+ if (!target.hasYpos()) { return null; }
+ return new java.lang.Integer(target.getYpos());
+ }
+ public void setValue( java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try {
+ RnaViewer target = (RnaViewer) object;
+ // if null, use delete method for optional primitives
+ if (value == null) {
+ target.deleteYpos();
+ return;
+ }
+ target.setYpos( ((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: _ypos
+ 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);
+ //-- initialize element descriptors
+
+ //-- _secondaryStructureList
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.SecondaryStructure.class, "_secondaryStructureList", "secondaryStructure", org.exolab.castor.xml.NodeType.Element);
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {
+ public java.lang.Object getValue( java.lang.Object object )
+ throws IllegalStateException
+ {
+ RnaViewer target = (RnaViewer) object;
+ return target.getSecondaryStructure();
+ }
+ public void setValue( java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try {
+ RnaViewer target = (RnaViewer) object;
+ target.addSecondaryStructure( (jalview.schemabinding.version2.SecondaryStructure) value);
+ } catch (java.lang.Exception ex) {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
+ try {
+ RnaViewer target = (RnaViewer) object;
+ target.removeAllSecondaryStructure();
+ } catch (java.lang.Exception ex) {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
+ public java.lang.Object newInstance(java.lang.Object parent) {
+ return new jalview.schemabinding.version2.SecondaryStructure();
+ }
+ };
+ desc.setHandler(handler);
+ desc.setNameSpaceURI("www.jalview.org");
+ desc.setRequired(true);
+ desc.setMultivalued(true);
+ addFieldDescriptor(desc);
+
+ //-- validation code for: _secondaryStructureList
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ fieldValidator.setMinOccurs(1);
+ { //-- local scope
+ }
+ desc.setValidator(fieldValidator);
+ }
+
+
+ //-----------/
+ //- 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.RnaViewer.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;
+ }
+
+}
--- /dev/null
+/*
+ * 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 -/
+//---------------------------------/
+
+import jalview.schemabinding.version2.SecondaryStructure;
+
+/**
+ * Class SecondaryStructureDescriptor.
+ *
+ * @version $Revision$ $Date$
+ */
+public class SecondaryStructureDescriptor 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 SecondaryStructureDescriptor() {
+ super();
+ _nsURI = "www.jalview.org";
+ _xmlName = "secondaryStructure";
+ _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
+
+ //-- _title
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_title", "title", 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
+ {
+ SecondaryStructure target = (SecondaryStructure) object;
+ return target.getTitle();
+ }
+ public void setValue( java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try {
+ SecondaryStructure target = (SecondaryStructure) object;
+ target.setTitle( (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: _title
+ 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);
+ //-- _annotationId
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_annotationId", "annotationId", 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
+ {
+ SecondaryStructure target = (SecondaryStructure) object;
+ return target.getAnnotationId();
+ }
+ public void setValue( java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try {
+ SecondaryStructure target = (SecondaryStructure) object;
+ target.setAnnotationId( (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.setRequired(true);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
+
+ //-- validation code for: _annotationId
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ fieldValidator.setMinOccurs(1);
+ { //-- 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);
+ //-- _gapped
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_gapped", "gapped", org.exolab.castor.xml.NodeType.Attribute);
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {
+ public java.lang.Object getValue( java.lang.Object object )
+ throws IllegalStateException
+ {
+ SecondaryStructure target = (SecondaryStructure) object;
+ if (!target.hasGapped()) { return null; }
+ return (target.getGapped() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
+ }
+ public void setValue( java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try {
+ SecondaryStructure target = (SecondaryStructure) object;
+ // if null, use delete method for optional primitives
+ if (value == null) {
+ target.deleteGapped();
+ return;
+ }
+ target.setGapped( ((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: _gapped
+ 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);
+ //-- _viewerState
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_viewerState", "viewerState", 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
+ {
+ SecondaryStructure target = (SecondaryStructure) object;
+ return target.getViewerState();
+ }
+ public void setValue( java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try {
+ SecondaryStructure target = (SecondaryStructure) object;
+ target.setViewerState( (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: _viewerState
+ 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);
+ //-- 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.SecondaryStructure.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;
+ }
+
+}
*/
package jalview.structure;
-import jalview.datamodel.*;
+import jalview.datamodel.SequenceI;
public interface SecondaryStructureListener
{
// TODO - redefine to allow RNA mouseovers to be passed back correctly to
// listeners
- public void mouseOverSequence(SequenceI sequence, int index);
+ /**
+ * act on a mouseover event
+ *
+ * @param sequence
+ * @param index
+ * the aligned sequence position (base 0)
+ * @param position
+ * the dataset sequence position (base 1)
+ */
+ public void mouseOverSequence(SequenceI sequence, int index, int position);
}
else if (listener instanceof SecondaryStructureListener)
{
((SecondaryStructureListener) listener).mouseOverSequence(seq,
- indexpos);
+ indexpos, index);
}
}
}
*/
package jalview.ws;
-import jalview.bin.Cache;
-import jalview.datamodel.DBRefEntry;
-import jalview.datamodel.SequenceGroup;
-import jalview.datamodel.SequenceI;
-import jalview.gui.AlignFrame;
-import jalview.gui.Desktop;
-import jalview.gui.JvSwingUtils;
-import jalview.util.GroupUrlLink;
-import jalview.util.MessageManager;
-import jalview.util.GroupUrlLink.UrlStringTooLongException;
-
import java.awt.Component;
import java.awt.Cursor;
import java.awt.event.ActionEvent;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
-import com.lowagie.text.html.HtmlEncoder;
+import jalview.bin.Cache;
+import jalview.datamodel.DBRefEntry;
+import jalview.datamodel.SequenceGroup;
+import jalview.datamodel.SequenceI;
+import jalview.gui.AlignFrame;
+import jalview.gui.Desktop;
+import jalview.gui.JvSwingUtils;
+import jalview.util.GroupUrlLink;
+import jalview.util.GroupUrlLink.UrlStringTooLongException;
+import jalview.util.MessageManager;
/**
* Lightweight runnable to discover dynamic 'one way' group URL services
* @deprecated
*
*/
+@Deprecated
public class EnfinEnvision2OneWay extends DefaultHandler implements
Runnable, WSMenuEntryProviderI
{
}
try
{
- descr = HtmlEncoder.encode(descr);
+ // TODO check with Jim if this class (EnfinEnvision) is obsolete
+ // descr = HtmlEncoder.encode(descr); // iText removed from Jmol 14.2
} catch (Exception e)
{
}
private JMenu buildGroupURLMenu(SequenceI[] seqs, SequenceGroup sg)
{
if (groupURLdescr == null || groupURLLinks == null)
+ {
return null;
+ }
// TODO: usability: thread off the generation of group url content so root
// menu appears asap
// sequence only URLs
import java.util.List;
import java.util.StringTokenizer;
-import org.jmol.util.ArrayUtil;
import compbio.metadata.Argument;
import compbio.metadata.Option;
import compbio.metadata.Parameter;
--- /dev/null
+package jalview.analysis;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+import org.junit.Test;
+
+public class AlignSeqTest
+{
+ @Test
+ public void testExtractGaps()
+ {
+ assertNull(AlignSeq.extractGaps(null, null));
+ assertNull(AlignSeq.extractGaps(null, "ACG"));
+ assertNull(AlignSeq.extractGaps("-. ", null));
+
+ assertEquals(" AC-G.T", AlignSeq.extractGaps("", " AC-G.T"));
+ assertEquals("AC-G.T", AlignSeq.extractGaps(" ", " AC-G.T"));
+ assertEquals("ACG.T", AlignSeq.extractGaps(" -", " AC-G.T"));
+ assertEquals("ACGT", AlignSeq.extractGaps(" -.", " AC-G.T ."));
+ assertEquals(" ACG.T", AlignSeq.extractGaps("-", " AC-G.T"));
+ }
+}