Merge branch 'feature/JAL-3181linkOrdering' into develop
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 28 Mar 2019 07:56:40 +0000 (07:56 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 28 Mar 2019 07:56:40 +0000 (07:56 +0000)
500 files changed:
.ant-targets-build.xml
.classpath
.gitignore
THIRDPARTYLIBS
build.xml
examples/backupfilestest.fa [new file with mode: 0644]
examples/groovy/colourConserved.groovy
examples/groovy/colourSchemes.groovy
examples/groovy/colourUnconserved.groovy
examples/testdata/projects/manyViews.jvp [new file with mode: 0644]
examples/testdata/projects/twoViews.jvp [new file with mode: 0644]
help/help.jhm
help/html/calculations/pca.html
help/html/calculations/treeviewer.html
help/html/colourSchemes/index.html
help/html/features/das.gif [deleted file]
help/html/features/exportannot.gif [deleted file]
help/html/features/pdbsequencefetcher.html
help/html/features/preferences.html
help/html/features/search.gif [deleted file]
help/html/features/uniprotsequencefetcher.html
help/html/menus/alignmentMenu.html
help/html/menus/alwcolour.html
lib/castor-1.1-cycle-xml.jar [deleted file]
lib/intervalstore-src-v0.4.jar [new file with mode: 0644]
lib/intervalstore-v0.4.jar [new file with mode: 0644]
lib/spring-core-3.0.5.RELEASE.jar [deleted file]
lib/spring-web-3.0.5.RELEASE.jar [deleted file]
resources/AmbiguityCodes.dat [new file with mode: 0644]
resources/GeneticCodes.dat [new file with mode: 0644]
resources/embl_mapping.xml [deleted file]
resources/lang/Messages.properties
resources/lang/Messages_es.properties
resources/uniprot_mapping.xml [deleted file]
schemas/JalviewUserColours.xsd
schemas/JalviewWsParamSet.xsd
schemas/castor-mapping.xsd [deleted file]
schemas/embl.xsd [new file with mode: 0644]
schemas/embl_bindings.xml [new file with mode: 0644]
schemas/jalview.xsd
schemas/uniprot.xsd [new file with mode: 0644]
schemas/vamsas.xsd
src/castor.properties [deleted file]
src/jalview/analysis/AlignmentUtils.java
src/jalview/analysis/Dna.java
src/jalview/analysis/Finder.java
src/jalview/analysis/GeneticCodeI.java [new file with mode: 0644]
src/jalview/analysis/GeneticCodes.java [new file with mode: 0644]
src/jalview/analysis/PCA.java
src/jalview/analysis/scoremodels/PIDModel.java
src/jalview/analysis/scoremodels/ScoreMatrix.java
src/jalview/analysis/scoremodels/ScoreModels.java
src/jalview/analysis/scoremodels/SimilarityParams.java
src/jalview/api/AlignViewportI.java
src/jalview/api/FeatureColourI.java
src/jalview/api/FeatureRenderer.java
src/jalview/api/FinderI.java [new file with mode: 0644]
src/jalview/api/RotatableCanvasI.java
src/jalview/appletgui/AlignFrame.java
src/jalview/appletgui/AlignViewport.java
src/jalview/appletgui/AlignmentPanel.java
src/jalview/appletgui/FeatureColourChooser.java
src/jalview/appletgui/Finder.java
src/jalview/appletgui/IdCanvas.java
src/jalview/appletgui/IdPanel.java
src/jalview/appletgui/OverviewPanel.java
src/jalview/appletgui/PCAPanel.java
src/jalview/appletgui/RotatableCanvas.java
src/jalview/appletgui/SeqCanvas.java
src/jalview/appletgui/TreeCanvas.java
src/jalview/bin/Cache.java
src/jalview/bin/Jalview.java
src/jalview/binding/Alignment.java [deleted file]
src/jalview/binding/Annotation.java [deleted file]
src/jalview/binding/AnnotationElement.java [deleted file]
src/jalview/binding/Colour.java [deleted file]
src/jalview/binding/CompoundMatcher.java [deleted file]
src/jalview/binding/Feature.java [deleted file]
src/jalview/binding/FeatureMatcher.java [deleted file]
src/jalview/binding/FeatureMatcherSet.java [deleted file]
src/jalview/binding/FeatureSettings.java [deleted file]
src/jalview/binding/Features.java [deleted file]
src/jalview/binding/Filter.java [deleted file]
src/jalview/binding/JGroup.java [deleted file]
src/jalview/binding/JSeq.java [deleted file]
src/jalview/binding/JalviewModel.java [deleted file]
src/jalview/binding/JalviewModelSequence.java [deleted file]
src/jalview/binding/JalviewUserColours.java [deleted file]
src/jalview/binding/MatchCondition.java [deleted file]
src/jalview/binding/MatcherSet.java [deleted file]
src/jalview/binding/Pdbentry.java [deleted file]
src/jalview/binding/PdbentryItem.java [deleted file]
src/jalview/binding/Pdbids.java [deleted file]
src/jalview/binding/Property.java [deleted file]
src/jalview/binding/Sequence.java [deleted file]
src/jalview/binding/SequenceSet.java [deleted file]
src/jalview/binding/SequenceType.java [deleted file]
src/jalview/binding/Setting.java [deleted file]
src/jalview/binding/Tree.java [deleted file]
src/jalview/binding/UserColourScheme.java [deleted file]
src/jalview/binding/UserColours.java [deleted file]
src/jalview/binding/VAMSAS.java [deleted file]
src/jalview/binding/VamsasModel.java [deleted file]
src/jalview/binding/Viewport.java [deleted file]
src/jalview/binding/types/ColourThreshTypeType.java [deleted file]
src/jalview/binding/types/FeatureMatcherByType.java [deleted file]
src/jalview/binding/types/NoValueColour.java [deleted file]
src/jalview/commands/EditCommand.java
src/jalview/controller/AlignViewController.java
src/jalview/datamodel/Alignment.java
src/jalview/datamodel/AlignmentI.java
src/jalview/datamodel/AlignmentView.java
src/jalview/datamodel/ColumnSelection.java
src/jalview/datamodel/HiddenColumns.java
src/jalview/datamodel/Point.java [new file with mode: 0644]
src/jalview/datamodel/SearchResultMatchI.java
src/jalview/datamodel/SearchResults.java
src/jalview/datamodel/SearchResultsI.java
src/jalview/datamodel/Sequence.java
src/jalview/datamodel/SequenceCollectionI.java
src/jalview/datamodel/SequenceGroup.java
src/jalview/datamodel/SequenceI.java
src/jalview/datamodel/SequencePoint.java
src/jalview/datamodel/features/FeatureLocationI.java
src/jalview/datamodel/features/FeatureStore.java
src/jalview/datamodel/features/NCList.java [deleted file]
src/jalview/datamodel/features/NCNode.java [deleted file]
src/jalview/datamodel/features/RangeComparator.java [deleted file]
src/jalview/datamodel/features/SequenceFeatures.java
src/jalview/datamodel/xdb/embl/EmblEntry.java [deleted file]
src/jalview/datamodel/xdb/embl/EmblError.java [deleted file]
src/jalview/datamodel/xdb/embl/EmblFeature.java [deleted file]
src/jalview/datamodel/xdb/embl/EmblFile.java [deleted file]
src/jalview/datamodel/xdb/embl/EmblSequence.java [deleted file]
src/jalview/datamodel/xdb/embl/Qualifier.java [deleted file]
src/jalview/datamodel/xdb/uniprot/UniprotEntry.java [deleted file]
src/jalview/datamodel/xdb/uniprot/UniprotFeature.java [deleted file]
src/jalview/datamodel/xdb/uniprot/UniprotFile.java [deleted file]
src/jalview/datamodel/xdb/uniprot/UniprotProteinName.java [deleted file]
src/jalview/datamodel/xdb/uniprot/UniprotSequence.java [deleted file]
src/jalview/ext/ensembl/EnsemblCdna.java
src/jalview/ext/ensembl/EnsemblCds.java
src/jalview/ext/ensembl/EnsemblFeatures.java
src/jalview/ext/ensembl/EnsemblGene.java
src/jalview/ext/ensembl/EnsemblGenome.java
src/jalview/ext/ensembl/EnsemblRestClient.java
src/jalview/ext/ensembl/EnsemblSeqProxy.java
src/jalview/ext/ensembl/EnsemblSequenceFetcher.java
src/jalview/fts/core/GFTSPanel.java
src/jalview/fts/service/pdb/PDBFTSPanel.java
src/jalview/fts/service/uniprot/UniprotFTSPanel.java
src/jalview/gui/AlignFrame.java
src/jalview/gui/AlignViewport.java
src/jalview/gui/AlignmentPanel.java
src/jalview/gui/AnnotationChooser.java
src/jalview/gui/AnnotationColourChooser.java
src/jalview/gui/AnnotationColumnChooser.java
src/jalview/gui/AnnotationExporter.java
src/jalview/gui/AnnotationLabels.java
src/jalview/gui/AnnotationPanel.java
src/jalview/gui/CalculationChooser.java
src/jalview/gui/ColourMenuHelper.java
src/jalview/gui/CutAndPasteTransfer.java
src/jalview/gui/Desktop.java
src/jalview/gui/FeatureSettings.java
src/jalview/gui/FeatureTypeSettings.java
src/jalview/gui/Finder.java
src/jalview/gui/FontChooser.java
src/jalview/gui/Help.java
src/jalview/gui/IdCanvas.java
src/jalview/gui/IdPanel.java
src/jalview/gui/Jalview2XML_V1.java [deleted file]
src/jalview/gui/JalviewBooleanRadioButtons.java [new file with mode: 0644]
src/jalview/gui/OverviewPanel.java
src/jalview/gui/PCAPanel.java
src/jalview/gui/PopupMenu.java
src/jalview/gui/Preferences.java
src/jalview/gui/RotatableCanvas.java
src/jalview/gui/ScalePanel.java
src/jalview/gui/SeqCanvas.java
src/jalview/gui/SeqPanel.java
src/jalview/gui/SequenceFetcher.java
src/jalview/gui/SliderPanel.java
src/jalview/gui/SplitFrame.java
src/jalview/gui/StructureViewerBase.java
src/jalview/gui/TreeCanvas.java
src/jalview/gui/TreePanel.java
src/jalview/gui/UserDefinedColours.java
src/jalview/gui/VamsasApplication.java
src/jalview/gui/WsParamSetManager.java
src/jalview/io/AnnotationFile.java
src/jalview/io/BackupFilenameFilter.java [new file with mode: 0644]
src/jalview/io/BackupFilenameParts.java [new file with mode: 0644]
src/jalview/io/BackupFiles.java [new file with mode: 0644]
src/jalview/io/FeaturesFile.java
src/jalview/io/FileLoader.java
src/jalview/io/JalviewFileChooser.java
src/jalview/io/JalviewFileFilter.java
src/jalview/io/JalviewFileView.java
src/jalview/io/VamsasAppDatastore.java
src/jalview/io/vcf/VCFLoader.java
src/jalview/jbgui/GAlignFrame.java
src/jalview/jbgui/GDasSourceBrowser.java [deleted file]
src/jalview/jbgui/GDesktop.java
src/jalview/jbgui/GFinder.java
src/jalview/jbgui/GPCAPanel.java
src/jalview/jbgui/GPreferences.java
src/jalview/jbgui/GWsPreferences.java
src/jalview/math/Matrix.java
src/jalview/math/MatrixI.java
src/jalview/math/RotatableMatrix.java
src/jalview/math/SparseMatrix.java
src/jalview/project/Jalview2XML.java [moved from src/jalview/gui/Jalview2XML.java with 73% similarity]
src/jalview/renderer/seqfeatures/FeatureRenderer.java
src/jalview/schemabinding/version2/.castor.cdr [deleted file]
src/jalview/schemabinding/version2/AlcodMap.java [deleted file]
src/jalview/schemabinding/version2/Alcodon.java [deleted file]
src/jalview/schemabinding/version2/AlcodonFrame.java [deleted file]
src/jalview/schemabinding/version2/Annotation.java [deleted file]
src/jalview/schemabinding/version2/AnnotationColourScheme.java [deleted file]
src/jalview/schemabinding/version2/AnnotationColours.java [deleted file]
src/jalview/schemabinding/version2/AnnotationElement.java [deleted file]
src/jalview/schemabinding/version2/CalcIdParam.java [deleted file]
src/jalview/schemabinding/version2/Colour.java [deleted file]
src/jalview/schemabinding/version2/CompoundMatcher.java [deleted file]
src/jalview/schemabinding/version2/DBRef.java [deleted file]
src/jalview/schemabinding/version2/Feature.java [deleted file]
src/jalview/schemabinding/version2/FeatureMatcher.java [deleted file]
src/jalview/schemabinding/version2/FeatureMatcherSet.java [deleted file]
src/jalview/schemabinding/version2/FeatureSettings.java [deleted file]
src/jalview/schemabinding/version2/Features.java [deleted file]
src/jalview/schemabinding/version2/Filter.java [deleted file]
src/jalview/schemabinding/version2/Group.java [deleted file]
src/jalview/schemabinding/version2/HiddenColumns.java [deleted file]
src/jalview/schemabinding/version2/JGroup.java [deleted file]
src/jalview/schemabinding/version2/JSeq.java [deleted file]
src/jalview/schemabinding/version2/JalviewModel.java [deleted file]
src/jalview/schemabinding/version2/JalviewModelSequence.java [deleted file]
src/jalview/schemabinding/version2/JalviewUserColours.java [deleted file]
src/jalview/schemabinding/version2/MapListFrom.java [deleted file]
src/jalview/schemabinding/version2/MapListTo.java [deleted file]
src/jalview/schemabinding/version2/MapListType.java [deleted file]
src/jalview/schemabinding/version2/Mapping.java [deleted file]
src/jalview/schemabinding/version2/MappingChoice.java [deleted file]
src/jalview/schemabinding/version2/MatchCondition.java [deleted file]
src/jalview/schemabinding/version2/MatcherSet.java [deleted file]
src/jalview/schemabinding/version2/OtherData.java [deleted file]
src/jalview/schemabinding/version2/Pdbentry.java [deleted file]
src/jalview/schemabinding/version2/PdbentryItem.java [deleted file]
src/jalview/schemabinding/version2/Pdbids.java [deleted file]
src/jalview/schemabinding/version2/Property.java [deleted file]
src/jalview/schemabinding/version2/RnaViewer.java [deleted file]
src/jalview/schemabinding/version2/SecondaryStructure.java [deleted file]
src/jalview/schemabinding/version2/Sequence.java [deleted file]
src/jalview/schemabinding/version2/SequenceSet.java [deleted file]
src/jalview/schemabinding/version2/SequenceSetProperties.java [deleted file]
src/jalview/schemabinding/version2/SequenceType.java [deleted file]
src/jalview/schemabinding/version2/Setting.java [deleted file]
src/jalview/schemabinding/version2/StructureState.java [deleted file]
src/jalview/schemabinding/version2/ThresholdLine.java [deleted file]
src/jalview/schemabinding/version2/Tree.java [deleted file]
src/jalview/schemabinding/version2/UserColourScheme.java [deleted file]
src/jalview/schemabinding/version2/UserColours.java [deleted file]
src/jalview/schemabinding/version2/VAMSAS.java [deleted file]
src/jalview/schemabinding/version2/VamsasModel.java [deleted file]
src/jalview/schemabinding/version2/Viewport.java [deleted file]
src/jalview/schemabinding/version2/WebServiceParameterSet.java [deleted file]
src/jalview/schemabinding/version2/descriptors/AlcodMapDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/AlcodonDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/AlcodonFrameDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/AnnotationColourSchemeDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/AnnotationColoursDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/AnnotationDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/AnnotationElementDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/CalcIdParamDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/ColourDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/CompoundMatcherDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/DBRefDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/FeatureDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/FeatureMatcherDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/FeatureMatcherSetDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/FeatureSettingsDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/FeaturesDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/FilterDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/GroupDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/HiddenColumnsDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/JGroupDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/JSeqDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/JalviewModelDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/JalviewModelSequenceDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/JalviewUserColoursDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/MapListFromDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/MapListToDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/MapListTypeDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/MappingChoiceDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/MappingDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/MatchConditionDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/MatcherSetDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/OtherDataDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/PdbentryDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/PdbentryItemDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/PdbidsDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/PropertyDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/RnaViewerDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/SecondaryStructureDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/SequenceDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/SequenceSetDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/SequenceSetPropertiesDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/SequenceTypeDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/SettingDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/StructureStateDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/ThresholdLineDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/TreeDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/UserColourSchemeDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/UserColoursDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/VAMSASDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/VamsasModelDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/ViewportDescriptor.java [deleted file]
src/jalview/schemabinding/version2/descriptors/WebServiceParameterSetDescriptor.java [deleted file]
src/jalview/schemabinding/version2/types/.castor.cdr [deleted file]
src/jalview/schemabinding/version2/types/ColourThreshTypeType.java [deleted file]
src/jalview/schemabinding/version2/types/FeatureMatcherByType.java [deleted file]
src/jalview/schemabinding/version2/types/NoValueColour.java [deleted file]
src/jalview/schemabinding/version2/types/descriptors/ColourThreshTypeTypeDescriptor.java [deleted file]
src/jalview/schemabinding/version2/types/descriptors/FeatureMatcherByTypeDescriptor.java [deleted file]
src/jalview/schemabinding/version2/types/descriptors/NoValueColourDescriptor.java [deleted file]
src/jalview/schemes/AnnotationColourGradient.java
src/jalview/schemes/Blosum62ColourScheme.java
src/jalview/schemes/BuriedColourScheme.java
src/jalview/schemes/ClustalxColourScheme.java
src/jalview/schemes/ColourSchemeI.java
src/jalview/schemes/ColourSchemeLoader.java
src/jalview/schemes/ColourSchemeProperty.java
src/jalview/schemes/ColourSchemes.java
src/jalview/schemes/CovariationColourScheme.java
src/jalview/schemes/FeatureColour.java
src/jalview/schemes/FollowerColourScheme.java
src/jalview/schemes/HelixColourScheme.java
src/jalview/schemes/HydrophobicColourScheme.java
src/jalview/schemes/IdColourScheme.java [new file with mode: 0644]
src/jalview/schemes/JalviewColourScheme.java
src/jalview/schemes/NucleotideColourScheme.java
src/jalview/schemes/PIDColourScheme.java
src/jalview/schemes/PurinePyrimidineColourScheme.java
src/jalview/schemes/RNAHelicesColour.java
src/jalview/schemes/RNAInteractionColourScheme.java
src/jalview/schemes/ResidueColourScheme.java
src/jalview/schemes/ResidueProperties.java
src/jalview/schemes/ScoreColourScheme.java
src/jalview/schemes/StrandColourScheme.java
src/jalview/schemes/TCoffeeColourScheme.java
src/jalview/schemes/TaylorColourScheme.java
src/jalview/schemes/TurnColourScheme.java
src/jalview/schemes/UserColourScheme.java
src/jalview/schemes/ZappoColourScheme.java
src/jalview/util/DBRefUtils.java
src/jalview/util/JSONUtils.java [new file with mode: 0644]
src/jalview/viewmodel/AlignmentViewport.java
src/jalview/viewmodel/PCAModel.java
src/jalview/viewmodel/ViewportRanges.java
src/jalview/viewmodel/seqfeatures/FeatureRendererModel.java
src/jalview/workers/ConsensusThread.java
src/jalview/ws/DBRefFetcher.java
src/jalview/ws/dbsources/EmblXmlSource.java
src/jalview/ws/dbsources/Uniprot.java
src/jalview/ws/jws2/AADisorderClient.java
src/jalview/xml/binding/embl/EntrySetType.java [new file with mode: 0644]
src/jalview/xml/binding/embl/EntryType.java [new file with mode: 0644]
src/jalview/xml/binding/embl/ObjectFactory.java [new file with mode: 0644]
src/jalview/xml/binding/embl/ROOT.java [new file with mode: 0644]
src/jalview/xml/binding/embl/XrefType.java [new file with mode: 0644]
src/jalview/xml/binding/jalview/AlcodonFrame.java [new file with mode: 0644]
src/jalview/xml/binding/jalview/Annotation.java [new file with mode: 0644]
src/jalview/xml/binding/jalview/AnnotationColourScheme.java [new file with mode: 0644]
src/jalview/xml/binding/jalview/AnnotationElement.java [new file with mode: 0644]
src/jalview/xml/binding/jalview/DoubleMatrix.java [new file with mode: 0644]
src/jalview/xml/binding/jalview/DoubleVector.java [new file with mode: 0644]
src/jalview/xml/binding/jalview/Feature.java [new file with mode: 0644]
src/jalview/xml/binding/jalview/FeatureMatcher.java [new file with mode: 0644]
src/jalview/xml/binding/jalview/FeatureMatcherSet.java [new file with mode: 0644]
src/jalview/xml/binding/jalview/FilterBy.java [new file with mode: 0644]
src/jalview/xml/binding/jalview/JalviewModel.java [new file with mode: 0644]
src/jalview/xml/binding/jalview/JalviewUserColours.java [new file with mode: 0644]
src/jalview/xml/binding/jalview/MapListType.java [new file with mode: 0644]
src/jalview/xml/binding/jalview/Mapping.java [new file with mode: 0644]
src/jalview/xml/binding/jalview/NoValueColour.java [new file with mode: 0644]
src/jalview/xml/binding/jalview/ObjectFactory.java [new file with mode: 0644]
src/jalview/xml/binding/jalview/PcaDataType.java [new file with mode: 0644]
src/jalview/xml/binding/jalview/Pdbentry.java [new file with mode: 0644]
src/jalview/xml/binding/jalview/Sequence.java [new file with mode: 0644]
src/jalview/xml/binding/jalview/SequenceSet.java [new file with mode: 0644]
src/jalview/xml/binding/jalview/SequenceType.java [new file with mode: 0644]
src/jalview/xml/binding/jalview/ThresholdType.java [new file with mode: 0644]
src/jalview/xml/binding/jalview/VAMSAS.java [new file with mode: 0644]
src/jalview/xml/binding/jalview/WebServiceParameterSet.java [new file with mode: 0644]
src/jalview/xml/binding/jalview/package-info.java [new file with mode: 0644]
src/jalview/xml/binding/uniprot/CitationType.java [new file with mode: 0644]
src/jalview/xml/binding/uniprot/CofactorType.java [new file with mode: 0644]
src/jalview/xml/binding/uniprot/CommentType.java [new file with mode: 0644]
src/jalview/xml/binding/uniprot/ConsortiumType.java [new file with mode: 0644]
src/jalview/xml/binding/uniprot/DbReferenceType.java [new file with mode: 0644]
src/jalview/xml/binding/uniprot/Entry.java [new file with mode: 0644]
src/jalview/xml/binding/uniprot/EventType.java [new file with mode: 0644]
src/jalview/xml/binding/uniprot/EvidenceType.java [new file with mode: 0644]
src/jalview/xml/binding/uniprot/EvidencedStringType.java [new file with mode: 0644]
src/jalview/xml/binding/uniprot/FeatureType.java [new file with mode: 0644]
src/jalview/xml/binding/uniprot/GeneLocationType.java [new file with mode: 0644]
src/jalview/xml/binding/uniprot/GeneNameType.java [new file with mode: 0644]
src/jalview/xml/binding/uniprot/GeneType.java [new file with mode: 0644]
src/jalview/xml/binding/uniprot/ImportedFromType.java [new file with mode: 0644]
src/jalview/xml/binding/uniprot/InteractantType.java [new file with mode: 0644]
src/jalview/xml/binding/uniprot/IsoformType.java [new file with mode: 0644]
src/jalview/xml/binding/uniprot/KeywordType.java [new file with mode: 0644]
src/jalview/xml/binding/uniprot/LocationType.java [new file with mode: 0644]
src/jalview/xml/binding/uniprot/MoleculeType.java [new file with mode: 0644]
src/jalview/xml/binding/uniprot/NameListType.java [new file with mode: 0644]
src/jalview/xml/binding/uniprot/ObjectFactory.java [new file with mode: 0644]
src/jalview/xml/binding/uniprot/OrganismNameType.java [new file with mode: 0644]
src/jalview/xml/binding/uniprot/OrganismType.java [new file with mode: 0644]
src/jalview/xml/binding/uniprot/PersonType.java [new file with mode: 0644]
src/jalview/xml/binding/uniprot/PositionType.java [new file with mode: 0644]
src/jalview/xml/binding/uniprot/PropertyType.java [new file with mode: 0644]
src/jalview/xml/binding/uniprot/ProteinExistenceType.java [new file with mode: 0644]
src/jalview/xml/binding/uniprot/ProteinType.java [new file with mode: 0644]
src/jalview/xml/binding/uniprot/ReferenceType.java [new file with mode: 0644]
src/jalview/xml/binding/uniprot/SequenceType.java [new file with mode: 0644]
src/jalview/xml/binding/uniprot/SourceDataType.java [new file with mode: 0644]
src/jalview/xml/binding/uniprot/SourceType.java [new file with mode: 0644]
src/jalview/xml/binding/uniprot/StatusType.java [new file with mode: 0644]
src/jalview/xml/binding/uniprot/SubcellularLocationType.java [new file with mode: 0644]
src/jalview/xml/binding/uniprot/Uniprot.java [new file with mode: 0644]
src/jalview/xml/binding/uniprot/package-info.java [new file with mode: 0644]
test/jalview/analysis/AlignSeqTest.java
test/jalview/analysis/AlignmentUtilsTests.java
test/jalview/analysis/CrossRefTest.java
test/jalview/analysis/DnaTest.java
test/jalview/analysis/FinderTest.java
test/jalview/analysis/GeneticCodesTest.java [new file with mode: 0644]
test/jalview/analysis/scoremodels/PIDModelTest.java
test/jalview/analysis/scoremodels/ScoreMatrixTest.java
test/jalview/analysis/scoremodels/ScoreModelsTest.java
test/jalview/bin/CommandLineOperations.java
test/jalview/controller/AlignViewControllerTest.java
test/jalview/datamodel/AlignmentTest.java
test/jalview/datamodel/AllColsIteratorTest.java
test/jalview/datamodel/AllRowsIteratorTest.java
test/jalview/datamodel/ColumnSelectionTest.java
test/jalview/datamodel/SearchResultsTest.java
test/jalview/datamodel/SequenceGroupTest.java
test/jalview/datamodel/SequenceTest.java
test/jalview/datamodel/features/FeatureStoreTest.java
test/jalview/datamodel/features/NCListTest.java [deleted file]
test/jalview/datamodel/features/NCNodeTest.java [deleted file]
test/jalview/datamodel/features/RangeComparatorTest.java [deleted file]
test/jalview/datamodel/xdb/embl/EmblEntryTest.java [deleted file]
test/jalview/datamodel/xdb/embl/EmblFileTest.java [deleted file]
test/jalview/datamodel/xdb/embl/EmblTestHelper.java [deleted file]
test/jalview/ext/ensembl/EnsemblCdnaTest.java
test/jalview/ext/ensembl/EnsemblCdsTest.java
test/jalview/ext/ensembl/EnsemblGeneTest.java
test/jalview/ext/ensembl/EnsemblGenomeTest.java
test/jalview/ext/ensembl/EnsemblSeqProxyTest.java
test/jalview/gui/AlignFrameTest.java
test/jalview/gui/AlignViewportTest.java
test/jalview/gui/AnnotationLabelsTest.java [new file with mode: 0644]
test/jalview/gui/AnnotationPanelTest.java [new file with mode: 0644]
test/jalview/gui/CalculationChooserTest.java [new file with mode: 0644]
test/jalview/gui/ColourMenuHelperTest.java [new file with mode: 0644]
test/jalview/gui/FeatureSettingsTest.java
test/jalview/gui/ScalePanelTest.java
test/jalview/gui/SeqCanvasTest.java
test/jalview/gui/SeqPanelTest.java
test/jalview/io/AnnotationFileIOTest.java
test/jalview/io/BackupFilesTest.java [new file with mode: 0644]
test/jalview/io/CrossRef2xmlTests.java
test/jalview/io/FeaturesFileTest.java
test/jalview/io/ScoreMatrixFileTest.java
test/jalview/io/SequenceAnnotationReportTest.java
test/jalview/io/testProps.jvprops
test/jalview/io/vcf/VCFLoaderTest.java
test/jalview/math/MatrixTest.java
test/jalview/math/RotatableMatrixTest.java [new file with mode: 0644]
test/jalview/project/Jalview2xmlTests.java [moved from test/jalview/io/Jalview2xmlTests.java with 80% similarity]
test/jalview/renderer/seqfeatures/FeatureColourFinderTest.java
test/jalview/renderer/seqfeatures/FeatureRendererTest.java
test/jalview/schemes/AnnotationColourGradientTest.java
test/jalview/schemes/ColourSchemePropertyTest.java
test/jalview/schemes/ColourSchemesTest.java
test/jalview/schemes/DnaCodonTests.java [deleted file]
test/jalview/schemes/FeatureColourTest.java
test/jalview/schemes/JalviewColourSchemeTest.java
test/jalview/schemes/ResiduePropertiesTest.java
test/jalview/util/DBRefUtilsTest.java
test/jalview/util/JSONUtilsTest.java [new file with mode: 0644]
test/jalview/ws/dbsources/EmblSourceTest.java [new file with mode: 0644]
test/jalview/ws/dbsources/UniprotTest.java
test/jalview/ws/jabaws/RNAStructExportImport.java
utils/castor-1.1-cycle-codegen-anttask.jar [deleted file]
utils/castor-1.1-cycle-codegen.jar [deleted file]
utils/i18nAnt.xml

index 15432a1..2a9de83 100644 (file)
@@ -3,12 +3,12 @@ buildPropertiesFile
 buildTests
 buildextclients
 buildindices
-castorbinding
 clean
 compileApplet
 distclean
 help
 init
+jaxb-bindings
 linkcheck
 makeApplet
 makedist
index 0da91bb..4f9cb8a 100644 (file)
@@ -13,7 +13,6 @@
        <classpathentry kind="lib" path="lib/saaj.jar"/>
        <classpathentry kind="lib" path="lib/wsdl4j.jar"/>
        <classpathentry kind="lib" path="lib/xercesImpl.jar"/>
-       <classpathentry kind="lib" path="lib/castor-1.1-cycle-xml.jar" sourcepath="C:/Documents and Settings/JimP/workspace-3.3/castor/src/main/java"/>
        <classpathentry kind="lib" path="lib/JGoogleAnalytics_0.3.jar" sourcepath="/JGoogleAnalytics/src/main/java"/>
        <classpathentry kind="lib" path="lib/vamsas-client.jar"/>
        <classpathentry kind="lib" path="lib/commons-logging-1.1.1.jar"/>
@@ -36,8 +35,6 @@
        <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/spring-core-3.0.5.RELEASE.jar"/>
-       <classpathentry kind="lib" path="lib/spring-web-3.0.5.RELEASE.jar"/>
        <classpathentry kind="lib" path="lib/jabaws-min-client-2.2.0.jar" sourcepath="/clustengine"/>
        <classpathentry kind="lib" path="lib/json_simple-1.1.jar" sourcepath="/Users/jimp/Downloads/json_simple-1.1-all.zip"/>
        <classpathentry kind="lib" path="lib/slf4j-api-1.7.7.jar"/>
@@ -70,5 +67,6 @@
        <classpathentry kind="lib" path="lib/htsjdk-2.12.0.jar"/>
        <classpathentry kind="lib" path="lib/groovy-all-2.4.12-indy.jar"/>
        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+       <classpathentry kind="lib" path="lib/intervalstore-v0.4.jar"/>
        <classpathentry kind="output" path="classes"/>
 </classpath>
index d355a80..211ddc9 100644 (file)
@@ -1,11 +1,13 @@
-.project
+/*.project
+.classpath
 /dist
 /clover
 /classes
 /tests
 /test-reports
 /test-output
-.externalToolBuilders/Jalview Release indices [Builder].launch
+.externalToolBuilders/*
+.settings/*
 /.DS_Store
 .DS_Store
 /.com.apple.timemachine.supported
index afa99d2..728711e 100644 (file)
@@ -38,8 +38,6 @@ miglayout-4.0-swing.jar       BSD http://www.migcalendar.com/miglayout/versions/4.0/li
 min-jaba-client.jar
 regex.jar
 saaj.jar
-spring-core-3.0.5.RELEASE.jar : Apache License: jdas runtime dependencies retrieved via maven - TODO: JAL-3035 remove if no longer needed ?
-spring-web-3.0.5.RELEASE.jar : Apache License: jdas runtime dependencies retrieved via maven - TODO: JAL-3035 remove if no longer needed ?
 vamsas-client.jar
 wsdl4j.jar
 xercesImpl.jar
index 5ca105a..9cd966c 100755 (executable)
--- a/build.xml
+++ b/build.xml
   <delete file="in.jar" />
 </target>
 
-<target name="castorbinding" depends="init" description="Generate Java bindings to supported Jalview XML models.">
-  <taskdef name="castor-srcgen" classname="org.castor.anttask.CastorCodeGenTask" classpathref="build.classpath" />
+<target name="jaxb-bindings" depends="init" description="Generates JAXB bindings for supported Jalview XML models (needs xjc on the path)">
   <delete>
-    <fileset dir="${sourceDir}/jalview/schemabinding/version2">
+    <fileset dir="${sourceDir}/jalview/xml/binding/jalview">
       <include name="*.java" />
-      <include name="descriptors/*.java" />
     </fileset>
   </delete>
-  <castor-srcgen file="${schemaDir}/vamsas.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
-  <castor-srcgen file="${schemaDir}/JalviewUserColours.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
-  <castor-srcgen file="${schemaDir}/JalviewWsParamSet.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
-  <castor-srcgen file="${schemaDir}/jalview.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
-  <!-- 
-               now build the jalview.binding package with the old schema set
-               -->
+  <exec executable="xjc">
+    <arg value="${schemaDir}/jalview.xsd"/>
+    <arg value="-d"/>
+    <arg value="${sourceDir}"/>
+    <arg value="-p"/>
+    <arg value="jalview.xml.binding.jalview"/>
+  </exec>
   <delete>
-    <fileset dir="${sourceDir}/jalview/binding/">
-      <include name="**" />
+    <fileset dir="${sourceDir}/jalview/xml/binding/embl">
+      <include name="*.java" />
     </fileset>
   </delete>
-  <castor-srcgen file="${schemaDir}/vamsasJvV1.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
-  <castor-srcgen file="${schemaDir}/JalviewUserColours.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
-  <castor-srcgen file="${schemaDir}/jalviewJvV1.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
+
+  <exec executable="xjc">
+    <arg value="${schemaDir}/embl.xsd"/>
+    <arg value="-d"/>
+    <arg value="${sourceDir}"/>
+    <arg value="-b"/>
+    <arg value="${schemaDir}/embl_bindings.xml"/>
+    <arg value="-p"/>
+    <arg value="jalview.xml.binding.embl"/>
+  </exec>
+
+  <delete>
+    <fileset dir="${sourceDir}/jalview/xml/binding/uniprot">
+      <include name="*.java" />
+    </fileset>
+  </delete>
+
+  <exec executable="xjc">
+    <arg value="${schemaDir}/uniprot.xsd"/>
+    <arg value="-d"/>
+    <arg value="${sourceDir}"/>
+    <arg value="-p"/>
+    <arg value="jalview.xml.binding.uniprot"/>
+  </exec>
 </target>
+
 <target name="sourcedist" description="create jalview source distribution" depends="init">
   <delete file="${source.dist.name}" />
   <!-- temporary copy of source to update timestamps -->
diff --git a/examples/backupfilestest.fa b/examples/backupfilestest.fa
new file mode 100644 (file)
index 0000000..c536a79
--- /dev/null
@@ -0,0 +1,2 @@
+>BACKUP_FILES/1-6 backupfiles
+AAAARG
index 4a15922..5fc2ad1 100644 (file)
@@ -24,6 +24,7 @@ import jalview.schemes.ColourSchemes
 import jalview.datamodel.AnnotatedCollectionI
 import jalview.datamodel.SequenceI
 import jalview.datamodel.SequenceCollectionI
+import jalview.api.AlignViewportI
 import jalview.util.Comparison
 
 /*
@@ -42,7 +43,7 @@ conserved = { ->
     /*
      * to make a new instance for each alignment view
      */
-    getInstance: { AnnotatedCollectionI coll, Map<SequenceI, SequenceCollectionI> map -> conserved() },
+    getInstance: { AlignViewportI view, AnnotatedCollectionI coll -> conserved() },
     
     /*
      * method only needed if colour scheme has to recalculate
index d5ca973..eb40cc6 100644 (file)
@@ -4,6 +4,7 @@ import jalview.schemes.ColourSchemes;
 import jalview.datamodel.AnnotatedCollectionI;
 import jalview.datamodel.SequenceI;
 import jalview.datamodel.SequenceCollectionI;
+import jalview.api.AlignViewportI
 
 /*
  * Example script that registers two new alignment colour schemes
@@ -25,7 +26,7 @@ candy = { ->
     /*
      * to make a new instance for each alignment view
      */
-    getInstance: { AnnotatedCollectionI coll, Map<SequenceI, SequenceCollectionI> map -> candy() },
+    getInstance: { view, coll -> candy() },
     
     /*
      * method only needed if colour scheme has to recalculate
@@ -85,7 +86,7 @@ byWeight = { ->
     // this colour scheme is peptide-specific:
     isApplicableTo: { coll -> !coll.isNucleotide() },
     alignmentChanged: { coll, map -> },
-    getInstance: { coll, map -> byWeight() },
+    getInstance: { view, coll -> byWeight() },
     isSimple: { true },
     findColour: {res, col, seq, consensus, pid -> 
         switch (res) {
index 68730f3..2365c1e 100644 (file)
@@ -24,6 +24,7 @@ import jalview.schemes.ColourSchemes
 import jalview.datamodel.AnnotatedCollectionI
 import jalview.datamodel.SequenceI
 import jalview.datamodel.SequenceCollectionI
+import jalview.api.AlignViewportI
 import jalview.util.Comparison
 
 /*
@@ -41,7 +42,7 @@ unconserved = { ->
     /*
      * to make a new instance for each alignment view
      */
-    getInstance: { AnnotatedCollectionI coll, Map<SequenceI, SequenceCollectionI> map -> unconserved() },
+    getInstance: { view, coll -> unconserved() },
     
     /*
      * method only needed if colour scheme has to recalculate
diff --git a/examples/testdata/projects/manyViews.jvp b/examples/testdata/projects/manyViews.jvp
new file mode 100644 (file)
index 0000000..065b29c
Binary files /dev/null and b/examples/testdata/projects/manyViews.jvp differ
diff --git a/examples/testdata/projects/twoViews.jvp b/examples/testdata/projects/twoViews.jvp
new file mode 100644 (file)
index 0000000..80333cd
Binary files /dev/null and b/examples/testdata/projects/twoViews.jvp differ
index 78f86b6..1666cc6 100755 (executable)
    
    <mapID target="biojson" url="html/features/bioJsonFormat.html" />
    <mapID target="pdbfetcher" url="html/features/pdbsequencefetcher.html" />
+   <mapID target="pdbfts" url="html/features/pdbsequencefetcher.html#pdbfts" />
    <mapID target="siftsmapping" url="html/features/siftsmapping.html" />
    <mapID target="pdbchooser" url="html/features/structurechooser.html" />
    <mapID target="selectcolbyannot" url="html/features/columnFilterByAnnotation.html" />
    <mapID target="ensemblfetch" url="html/features/ensemblsequencefetcher.html" />
    
    <mapID target="uniprotfetcher" url="html/features/uniprotsequencefetcher.html" />
+   <mapID target="uniprotfts" url="html/features/uniprotsequencefetcher.html#uniprotfts" />
    
    <mapID target="urllinks" url="html/webServices/urllinks.html" />
    <mapID target="linksprefs" url="html/features/preferences.html#links" />
index 0104078..5b76d10 100755 (executable)
     <em>Calculating PCAs for aligned sequences</em><br />Jalview can
     perform PCA analysis on both proteins and nucleotide sequence
     alignments. In both cases, components are generated by an
-    eigenvector decomposition of the matrix formed from the sum of
-    substitution matrix scores at each aligned position between each
-    pair of sequences - computed with one of the available score
-    matrices, such as <a href="scorematrices.html#blosum62">BLOSUM62</a>,
+    eigenvector decomposition of the matrix formed from pairwise similarity
+    scores between each pair of sequences. The similarity score model is 
+    selected on the <a href="calculations.html">calculations dialog</a>, and
+    may use one of the available score matrices, such as 
+    <a href="scorematrices.html#blosum62">BLOSUM62</a>,
     <a href="scorematrices.html#pam250">PAM250</a>, or the <a
       href="scorematrices.html#simplenucleotide">simple single
-      nucleotide substitution matrix</a>. The options available for
-    calculation are given in the <strong><em>Change
-        Parameters</em></strong> menu.
+      nucleotide substitution matrix</a>, or by sequence percentage identity,
+      or sequence feature similarity. 
   </p>
   <img src="pcaviewer.gif">
   <p>
index 3d6245e..8cb2b59 100755 (executable)
   </p>
   <p>
     <strong><em>Selecting Sequence Leaf Nodes</em></strong><br>
-    Selecting sequence ids at the leaves of the tree selects the
+    Selecting sequence IDs at the leaves of the tree selects the
     corresponding sequences in the original alignment. These selections
     are also reflected in any other analysis windows associated with the
     alignment, such as another tree viewer.
   </p>
   <p>
-    <strong><em>Grouping sequences by partitioning the
-        tree at a particular distanec</em></strong><br> Clicking anywhere along
+    <strong><em><a name="partitioning">Grouping sequences by partitioning</a> the
+        tree at a particular distance</em></strong><br> Clicking anywhere along
     the extent of the tree (but not on a leaf or internal node) defines
     a tree 'partition', by cutting every branch of the tree spanning the
     depth where the mouse-click occurred. Groups are created containing
     sequences at the leaves of each connected sub tree. These groups are
     each given a different colour, which are reflected in other windows
-    in the same way as if the sequence ids were selected, and can be
+    in the same way as if the sequence IDs were selected, and can be
     edited in the same way as user defined sequence groups.
   </p>
   <p>
     identifying specific patterns of conservation and mutation
     corresponding to the overall phylogenetic structure, when combined
     with the <a href="../colourSchemes/conservation.html">conservation
-      based colour scheme</a>.
+      based colour scheme</a>.To distinguish parts of the alignment assigned
+    to different groups, you may also enable the Sequence ID colour
+    scheme via the <a href="../menus/alwcolour.html">Alignment
+      window's Colours menu</a> (<em>Since 2.11</em>).
   </p>
   <p>
     <strong><em>Selecting Subtrees and changing the branch
index 7664101..51d0738 100755 (executable)
@@ -35,18 +35,18 @@ td {
   <p>
     <strong>Colour schemes</strong>
   </p>
-  <p>Jalview allows the user to set a background colour for the
+  <p>Jalview allows the user to set a colour scheme for the
     whole alignment view or for each group defined on regions within it.</p>
-  <p>To change the background colour, simply select the colour from
+  <p>To change the colour for a view, simply select a new colour scheme from
     the &quot;Colour&quot; menu.</p>
   <p>To change the colour of a group, right click on any residue
     within a group and use the popup menu to define the group colour.</p>
-  <p>At the top of the &quot;Colour&quot; menu the tick box
-    &quot;Apply Background Colour to all groups&quot;. This is ticked by
+  <p>At the top of the &quot;Colour&quot; menu you'll see a tick box
+    &quot;Apply Colour to all groups&quot;. This is ticked by
     default so that a chosen colour scheme will be applied to all
     existing groups. If you wish to maintain the colour scheme for
-    defined groups, make sure you deselect this option before changing
-    the background colour.</p>
+    defined groups, make sure you deselect this option before selecting
+    a new scheme in the Colour menu.</p>
   <p>
     The <strong>&quot;Colour&#8594;<a
       href="../colourSchemes/textcolour.html">Colour Text...</a>&quot;
diff --git a/help/html/features/das.gif b/help/html/features/das.gif
deleted file mode 100644 (file)
index 1f884cb..0000000
Binary files a/help/html/features/das.gif and /dev/null differ
diff --git a/help/html/features/exportannot.gif b/help/html/features/exportannot.gif
deleted file mode 100644 (file)
index 2133cc1..0000000
Binary files a/help/html/features/exportannot.gif and /dev/null differ
index bb63bed..9251277 100644 (file)
@@ -43,7 +43,7 @@
     alt="PDB sequence fetcher (introduced in Jalview 2.9)" />
 
   <p>
-    <strong>Searching the PDB Database</strong>
+    <a name="pdbfts"><strong>Searching the PDB Database</strong></a>
   </p>
   <p>To search the PDB, begin typing in the text box. If the
     'autosearch' checkbox is enabled, then the results of your query
index 52e88db..8c6b699 100755 (executable)
@@ -62,8 +62,7 @@
       sequence alignments and EPS files.
     </li>
     <li>The <a href="#editing"><strong>&quot;Editing&quot;</strong>
-        Preferences</a> tab contains settings affecting the export of
-      sequence alignments and EPS files.
+        Preferences</a> tab contains settings affecting behaviour when editing alignments.
     </li>
     <li>The <a href="../webServices/webServicesPrefs.html"><strong>&quot;Web
           Service&quot;</strong> Preferences</a> tab allows you to configure the <a
     the backbone atoms in the PDB file will be extracted as annotation
     lines shown on the alignment.
   <p>
-    <em>Default structure viewer</em> - choose JMOL or CHIMERA for
+    <em>Default structure viewer</em> - choose Jmol or CHIMERA for
     viewing 3D structures.
   <p>
     <em>Path to Chimera program</em> - Optional, as Jalview will search
         Preferences tab</strong></a>
   </p>
   <p>
-    <em>Default Browser (Unix)</em><br> Its difficult in Java to
+    <em>Default Browser (Unix)</em><br> It's difficult in Java to
     detect the default web browser for Unix users. If Jalview can't find
     your default web browser, enter the name or full path to your web
     browser application.
     just those you have configured yourself <em>via</em> the <em>Edit
       Links</em> buttons. Press <em>Show all</em> to clear any filters.
   </p>
-  <p>The links table is prepoulated with persistent URLs for many common
+  <p>The links table is prepopulated with persistent URLs for many common
     bioinformatics databases (since 2.10.2). These links are downloaded by Jalview from
     the <em>identifiers.org</em> website, and the names and URLs are not
     user editable.
     allows the user to set a default rendering style for EPS export:
   <ul>
     <li>&quot;Prompt each time&quot;<br> Choose this to be
-      asked select between Lineart and Text each time you make an EPS
+      asked to select between Lineart and Text each time you make an EPS
       file.
     </li>
     <li>&quot;Lineart&quot;<br> EPS files will accurately
     ignored if <em>&quot;Automatically set ID width&quot;</em> is set.
   </p>
   <p>
-    <em>Sequence//Start-End Numbering</em><br> The output tab also
+    <em>Sequence/Start-End Numbering</em><br> The output tab also
     has a group of checkboxes for each file format. If these are ticked,
     then Jalview will write files with the start and end sequence
     positions appended to each sequence id:
diff --git a/help/html/features/search.gif b/help/html/features/search.gif
deleted file mode 100755 (executable)
index 1c0ffb0..0000000
Binary files a/help/html/features/search.gif and /dev/null differ
index 4a64f52..72e7649 100644 (file)
@@ -44,7 +44,7 @@
   </p>
 
   <p>
-    <strong>Searching the UniProt Database</strong>
+    <a name="uniprotfts"><strong>Searching the UniProt Database</strong></a>
   </p>
   <p>To search UniProt, simply begin typing in the text box. If the
     'autosearch' check box is enabled, then after a short delay (about
index f3ab75d..3a057a8 100755 (executable)
       </strong> <em>See <a href="../colourSchemes/index.html">colours</a>
           for a description of all colour schemes.
       </em><br></li>
-      <li><strong>By Conservation<br>
+        <li><strong>Sequence ID<br></strong><em>Shades
+            sequences using their Sequence ID colour. Useful when
+            performing <a
+            href="../calculations/treeviewer.html#partitioning">tree
+              based subfamily analysis</a>.
+        </em></li>
+        <li><strong>By Conservation<br>
       </strong><em>See <a href="../colourSchemes/conservation.html">Colouring
             by Conservation</a>.
       </em><br></li>
index e62a130..9a96595 100755 (executable)
         a description of all colour schemes.
     </em><br>
     </li>
+    <li><strong>Sequence ID<br></strong><em>Shades
+        sequences using their Sequence ID colour. Useful when performing
+        <a href="../calculations/treeviewer.html#partitioning">tree
+          based subfamily analysis</a>.
+    </em></li>
     <li><strong>By Conservation<br>
     </strong><em>See <a href="../colourSchemes/conservation.html">Colouring
           by Conservation</a>.
diff --git a/lib/castor-1.1-cycle-xml.jar b/lib/castor-1.1-cycle-xml.jar
deleted file mode 100644 (file)
index 5070435..0000000
Binary files a/lib/castor-1.1-cycle-xml.jar and /dev/null differ
diff --git a/lib/intervalstore-src-v0.4.jar b/lib/intervalstore-src-v0.4.jar
new file mode 100644 (file)
index 0000000..3feafbb
Binary files /dev/null and b/lib/intervalstore-src-v0.4.jar differ
diff --git a/lib/intervalstore-v0.4.jar b/lib/intervalstore-v0.4.jar
new file mode 100644 (file)
index 0000000..4f6101c
Binary files /dev/null and b/lib/intervalstore-v0.4.jar differ
diff --git a/lib/spring-core-3.0.5.RELEASE.jar b/lib/spring-core-3.0.5.RELEASE.jar
deleted file mode 100644 (file)
index ea9500d..0000000
Binary files a/lib/spring-core-3.0.5.RELEASE.jar and /dev/null differ
diff --git a/lib/spring-web-3.0.5.RELEASE.jar b/lib/spring-web-3.0.5.RELEASE.jar
deleted file mode 100644 (file)
index 5a2381a..0000000
Binary files a/lib/spring-web-3.0.5.RELEASE.jar and /dev/null differ
diff --git a/resources/AmbiguityCodes.dat b/resources/AmbiguityCodes.dat
new file mode 100644 (file)
index 0000000..9372c03
--- /dev/null
@@ -0,0 +1,13 @@
+# source: IUPAC codes as per http://www.insdc.org/documents/feature_table.html#7.4.1
+DNA
+R      AG
+Y      TC
+W      AT
+S      GC
+M      AC
+K      GT
+H      ATC
+B      GTC
+V      GAC
+D      GAT
+N      GATC
diff --git a/resources/GeneticCodes.dat b/resources/GeneticCodes.dat
new file mode 100644 (file)
index 0000000..4735cf2
--- /dev/null
@@ -0,0 +1,327 @@
+-- source: ftp://ftp.ncbi.nih.gov/entrez/misc/data/gc.prt (19th March 2018)
+-- SGC3 name edited slightly so as to fit all on one line
+--**************************************************************************
+--  This is the NCBI genetic code table
+--  Initial base data set from Andrzej Elzanowski while at PIR International
+--  Addition of Eubacterial and Alternative Yeast by J.Ostell at NCBI
+--  Base 1-3 of each codon have been added as comments to facilitate
+--    readability at the suggestion of Peter Rice, EMBL
+--  Later additions by Taxonomy Group staff at NCBI
+--
+--  Version 4.2
+--     Added Karyorelict nuclear genetic code 27
+--     Added Condylostoma nuclear genetic code 28
+--     Added Mesodinium nuclear genetic code 29
+--     Added Peritrich nuclear genetic code 30
+--     Added Blastocrithidia nuclear genetic code 31
+--
+--  Version 4.1
+--     Added Pachysolen tannophilus nuclear genetic code 26
+--
+--  Version 4.0
+--     Updated version to reflect numerous undocumented changes:
+--     Corrected start codons for genetic code 25
+--     Name of new genetic code is Candidate Division SR1 and Gracilibacteria
+--     Added candidate division SR1 nuclear genetic code 25
+--     Added GTG as start codon for genetic code 24
+--     Corrected Pterobranchia Mitochondrial genetic code (24)
+--     Added genetic code 24, Pterobranchia Mitochondrial
+--     Genetic code 11 is now Bacterial, Archaeal and Plant Plastid
+--     Fixed capitalization of mitochondrial in codes 22 and 23
+--     Added GTG, ATA, and TTG as alternative start codons to code 13
+--
+--  Version 3.9
+--     Code 14 differs from code 9 only by translating UAA to Tyr rather than
+--     STOP.  A recent study (Telford et al, 2000) has found no evidence that
+--     the codon UAA codes for Tyr in the flatworms, but other opinions exist.
+--     There are very few GenBank records that are translated with code 14,
+--     but a test translation shows that retranslating these records with code
+--     9 can cause premature terminations.  Therefore, GenBank will maintain
+--     code 14 until further information becomes available.
+--
+--  Version 3.8
+--     Added GTG start to Echinoderm mitochondrial code, code 9
+--
+--  Version 3.7
+--     Added code 23 Thraustochytrium mitochondrial code
+--        formerly OGMP code 93
+--        submitted by Gertraude Berger, Ph.D.
+--
+--  Version 3.6
+--     Added code 22 TAG-Leu, TCA-stop
+--        found in mitochondrial DNA of Scenedesmus obliquus
+--        submitted by Gertraude Berger, Ph.D.
+--        Organelle Genome Megasequencing Program, Univ Montreal
+--
+--  Version 3.5
+--     Added code 21, Trematode Mitochondrial
+--       (as deduced from: Garey & Wolstenholme,1989; Ohama et al, 1990)
+--     Added code 16, Chlorophycean Mitochondrial
+--       (TAG can translated to Leucine instaed to STOP in chlorophyceans
+--        and fungi)
+--
+--  Version 3.4
+--     Added CTG,TTG as allowed alternate start codons in Standard code.
+--        Prats et al. 1989, Hann et al. 1992
+--
+--  Version 3.3 - 10/13/95
+--     Added alternate intiation codon ATC to code 5
+--        based on complete mitochondrial genome of honeybee
+--        Crozier and Crozier (1993)
+--
+--  Version 3.2 - 6/24/95
+--  Code       Comments
+--   10        Alternative Ciliate Macronuclear renamed to Euplotid Macro...
+--   15        Blepharisma Macro.. code added
+--    5        Invertebrate Mito.. GTG allowed as alternate initiator
+--   11        Eubacterial renamed to Bacterial as most alternate starts
+--               have been found in Archea
+--
+--
+--  Version 3.1 - 1995
+--  Updated as per Andrzej Elzanowski at NCBI
+--     Complete documentation in NCBI toolkit documentation
+--  Note: 2 genetic codes have been deleted
+--
+--   Old id   Use id     - Notes
+--
+--   id 7      id 4      - Kinetoplast code now merged in code id 4
+--   id 8      id 1      - all plant chloroplast differences due to RNA edit
+--
+--*************************************************************************
+
+Genetic-code-table ::= {
+ {
+  name "Standard" ,
+  name "SGC0" ,
+  id 1 ,
+  ncbieaa  "FFLLSSSSYY**CC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG",
+  sncbieaa "---M------**--*----M---------------M----------------------------"
+  -- Base1  TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
+  -- Base2  TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
+  -- Base3  TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
+ },
+ {
+  name "Vertebrate Mitochondrial" ,
+  name "SGC1" ,
+  id 2 ,
+  ncbieaa  "FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIMMTTTTNNKKSS**VVVVAAAADDEEGGGG",
+  sncbieaa "----------**--------------------MMMM----------**---M------------"
+  -- Base1  TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
+  -- Base2  TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
+  -- Base3  TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
+ },
+ {
+  name "Yeast Mitochondrial" ,
+  name "SGC2" ,
+  id 3 ,
+  ncbieaa  "FFLLSSSSYY**CCWWTTTTPPPPHHQQRRRRIIMMTTTTNNKKSSRRVVVVAAAADDEEGGGG",
+  sncbieaa "----------**----------------------MM----------------------------"
+  -- Base1  TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
+  -- Base2  TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
+  -- Base3  TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
+ },
+ {
+    name "Mold / Protozoan / Coelenterate Mitochondrial; Mycoplasma; Spiroplasma" ,
+  name "SGC3" ,
+  id 4 ,
+  ncbieaa  "FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG",
+  sncbieaa "--MM------**-------M------------MMMM---------------M------------"
+  -- Base1  TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
+  -- Base2  TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
+  -- Base3  TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
+ },
+ {
+  name "Invertebrate Mitochondrial" ,
+  name "SGC4" ,
+  id 5 ,
+  ncbieaa  "FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIMMTTTTNNKKSSSSVVVVAAAADDEEGGGG",
+  sncbieaa "---M------**--------------------MMMM---------------M------------"
+  -- Base1  TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
+  -- Base2  TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
+  -- Base3  TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
+ },
+ {
+  name "Ciliate Nuclear; Dasycladacean Nuclear; Hexamita Nuclear" ,
+  name "SGC5" ,
+  id 6 ,
+  ncbieaa  "FFLLSSSSYYQQCC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG",
+  sncbieaa "--------------*--------------------M----------------------------"
+  -- Base1  TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
+  -- Base2  TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
+  -- Base3  TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
+ },
+ {
+  name "Echinoderm Mitochondrial; Flatworm Mitochondrial" ,
+  name "SGC8" ,
+  id 9 ,
+  ncbieaa  "FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIIMTTTTNNNKSSSSVVVVAAAADDEEGGGG",
+  sncbieaa "----------**-----------------------M---------------M------------"
+  -- Base1  TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
+  -- Base2  TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
+  -- Base3  TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
+ },
+ {
+  name "Euplotid Nuclear" ,
+  name "SGC9" ,
+  id 10 ,
+  ncbieaa  "FFLLSSSSYY**CCCWLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG",
+  sncbieaa "----------**-----------------------M----------------------------"
+  -- Base1  TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
+  -- Base2  TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
+  -- Base3  TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
+ },
+ {
+  name "Bacterial, Archaeal and Plant Plastid" ,
+  id 11 ,
+  ncbieaa  "FFLLSSSSYY**CC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG",
+  sncbieaa "---M------**--*----M------------MMMM---------------M------------"
+  -- Base1  TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
+  -- Base2  TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
+  -- Base3  TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
+ },
+ {
+  name "Alternative Yeast Nuclear" ,
+  id 12 ,
+  ncbieaa  "FFLLSSSSYY**CC*WLLLSPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG",
+  sncbieaa "----------**--*----M---------------M----------------------------"
+  -- Base1  TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
+  -- Base2  TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
+  -- Base3  TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
+ },
+ {
+  name "Ascidian Mitochondrial" ,
+  id 13 ,
+  ncbieaa  "FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIMMTTTTNNKKSSGGVVVVAAAADDEEGGGG",
+  sncbieaa "---M------**----------------------MM---------------M------------"
+  -- Base1  TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
+  -- Base2  TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
+  -- Base3  TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
+ },
+ {
+  name "Alternative Flatworm Mitochondrial" ,
+  id 14 ,
+  ncbieaa  "FFLLSSSSYYY*CCWWLLLLPPPPHHQQRRRRIIIMTTTTNNNKSSSSVVVVAAAADDEEGGGG",
+  sncbieaa "-----------*-----------------------M----------------------------"
+  -- Base1  TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
+  -- Base2  TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
+  -- Base3  TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
+ } ,
+ {
+  name "Blepharisma Macronuclear" ,
+  id 15 ,
+  ncbieaa  "FFLLSSSSYY*QCC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG",
+  sncbieaa "----------*---*--------------------M----------------------------"
+  -- Base1  TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
+  -- Base2  TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
+  -- Base3  TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
+ } ,
+ {
+  name "Chlorophycean Mitochondrial" ,
+  id 16 ,
+  ncbieaa  "FFLLSSSSYY*LCC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG",
+  sncbieaa "----------*---*--------------------M----------------------------"
+  -- Base1  TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
+  -- Base2  TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
+  -- Base3  TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
+ } ,
+ {
+  name "Trematode Mitochondrial" ,
+  id 21 ,
+  ncbieaa  "FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIMMTTTTNNNKSSSSVVVVAAAADDEEGGGG",
+  sncbieaa "----------**-----------------------M---------------M------------"
+  -- Base1  TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
+  -- Base2  TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
+  -- Base3  TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
+ } ,
+ {
+  name "Scenedesmus obliquus Mitochondrial" ,
+  id 22 ,
+  ncbieaa  "FFLLSS*SYY*LCC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG",
+  sncbieaa "------*---*---*--------------------M----------------------------"
+  -- Base1  TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
+  -- Base2  TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
+  -- Base3  TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
+ } ,
+ {
+  name "Thraustochytrium Mitochondrial" ,
+  id 23 ,
+  ncbieaa  "FF*LSSSSYY**CC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG",
+  sncbieaa "--*-------**--*-----------------M--M---------------M------------"
+  -- Base1  TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
+  -- Base2  TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
+  -- Base3  TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
+ } ,
+ {
+  name "Pterobranchia Mitochondrial" ,
+  id 24 ,
+  ncbieaa  "FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSSKVVVVAAAADDEEGGGG",
+  sncbieaa "---M------**-------M---------------M---------------M------------"
+  -- Base1  TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
+  -- Base2  TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
+  -- Base3  TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
+ } ,
+ {
+  name "Candidate Division SR1 and Gracilibacteria" ,
+  id 25 ,
+  ncbieaa  "FFLLSSSSYY**CCGWLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG",
+  sncbieaa "---M------**-----------------------M---------------M------------"
+  -- Base1  TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
+  -- Base2  TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
+  -- Base3  TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
+ } ,
+ {
+  name "Pachysolen tannophilus Nuclear" ,
+  id 26 ,
+  ncbieaa  "FFLLSSSSYY**CC*WLLLAPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG",
+  sncbieaa "----------**--*----M---------------M----------------------------"
+  -- Base1  TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
+  -- Base2  TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
+  -- Base3  TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
+ } ,
+ {
+  name "Karyorelict Nuclear" ,
+  id 27 ,
+  ncbieaa  "FFLLSSSSYYQQCCWWLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG",
+  sncbieaa "--------------*--------------------M----------------------------"
+  -- Base1  TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
+  -- Base2  TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
+  -- Base3  TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
+ } ,
+ {
+  name "Condylostoma Nuclear" ,
+  id 28 ,
+  ncbieaa  "FFLLSSSSYYQQCCWWLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG",
+  sncbieaa "----------**--*--------------------M----------------------------"
+  -- Base1  TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
+  -- Base2  TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
+  -- Base3  TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
+ } ,
+ {
+  name "Mesodinium Nuclear" ,
+  id 29 ,
+  ncbieaa  "FFLLSSSSYYYYCC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG",
+  sncbieaa "--------------*--------------------M----------------------------"
+  -- Base1  TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
+  -- Base2  TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
+  -- Base3  TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
+ } ,
+ {
+  name "Peritrich Nuclear" ,
+  id 30 ,
+  ncbieaa  "FFLLSSSSYYEECC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG",
+  sncbieaa "--------------*--------------------M----------------------------"
+  -- Base1  TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
+  -- Base2  TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
+  -- Base3  TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
+ } ,
+ {
+  name "Blastocrithidia Nuclear" ,
+  id 31 ,
+  ncbieaa  "FFLLSSSSYYEECCWWLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG",
+  sncbieaa "----------**-----------------------M----------------------------"
+  -- Base1  TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
+  -- Base2  TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
+  -- Base3  TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
+ }
+}
diff --git a/resources/embl_mapping.xml b/resources/embl_mapping.xml
deleted file mode 100644 (file)
index 3b80821..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-<?xml version="1.0"?>
-<!--
- * 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.
--->
-<mapping xmlns="http://castor.exolab.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="http://castor.exolab.org/ ../schemas/castor-mapping.xsd">
-<!--
-       History: Originally created from EMBL_common_V1.0
-       Updated on 24th April 2007 for WsDBFetch Service move to EMBL_Services_V1.1.xsd
-       Updated May 2016 for EMBL XML 1.2 JAL-2113 JAL-2114
-         see ftp://ftp.sra.ebi.ac.uk/meta/xsd/sra_1_5/ENA.embl.xsd
-         see http://www.ebi.ac.uk/ena/submit/data-formats
-       -->
-       <class name="jalview.datamodel.xdb.embl.EmblFile">
-               <map-to xml="ROOT"/>
-               <field name="text" type="string">
-                       <bind-xml node="text"/>
-               </field>
-               <field name="entries" type="jalview.datamodel.xdb.embl.EmblEntry" collection="vector">
-                       <bind-xml name="entry"/>
-               </field>
-               <field name="errors" type="jalview.datamodel.xdb.embl.EmblError" collection="vector">
-                       <bind-xml name="Error"/>
-               </field>
-       </class>
-       <class name="jalview.datamodel.xdb.embl.EmblEntry">
-               <field name="accession" type="string">
-                       <bind-xml name="accession" node="attribute"/>
-               </field>
-               <!-- 
-                   in EMBL XML 1.2 sequence/@version became entry/version 
-                   entry/@version became entry/@entryVersion
-               -->
-               <field name="sequenceVersion" type="string">
-                       <bind-xml name="version" node="attribute"/>
-               </field>
-               <field name="entryVersion" type="string">
-                       <bind-xml name="entryVersion" node="attribute"/>
-               </field>
-               <field name="dataClass" type="string">
-                       <bind-xml name="dataClass" node="attribute"/>
-               </field>
-               <field name="taxonomicDivision" type="string">
-                       <bind-xml name="taxonomicDivision" node="attribute"/>
-               </field>
-               <field name="moleculeType" type="string">
-                       <bind-xml name="moleculeType" node="attribute"/>
-               </field>
-               <field name="sequenceLength" type="string">
-                       <bind-xml name="sequenceLength" node="attribute"/>
-               </field>
-               <field name="topology" type="string">
-                       <bind-xml name="topology" node="attribute" location="type"/>
-               </field>
-               <field name="firstPublicDate" type="string">
-                       <bind-xml name="firstPublic" node="attribute"/>
-               </field>
-               <field name="firstPublicRelease" type="string">
-                       <bind-xml name="firstPublicRelease" node="attribute"/>
-               </field>
-               <field name="lastUpdatedDate" type="string">
-                       <bind-xml name="lastUpdated" node="attribute"/>
-               </field>
-               <field name="lastUpdatedRelease" type="string">
-                       <bind-xml name="lastUpdatedRelease" node="attribute"/>
-               </field>
-               <field name="description" type="string">
-                       <bind-xml name="description" node="element"/>
-               </field>
-               <field name="keywords" type="string" collection="vector">
-                       <bind-xml name="keyword" node="element"/>
-               </field>
-               <field name="features" type="jalview.datamodel.xdb.embl.EmblFeature" collection="vector">
-                       <bind-xml name="feature"/>
-               </field>
-               <field name="dbRefs" type="jalview.datamodel.DBRefEntry" collection="vector">
-                       <bind-xml name="xref" />
-               </field>
-               <field name="sequence" type="jalview.datamodel.xdb.embl.EmblSequence">
-                       <bind-xml name="sequence"/>
-               </field>
-       </class>
-       <class name="jalview.datamodel.xdb.embl.EmblSequence">
-               <field name="sequence" type="string">
-                       <bind-xml node="text"/>
-               </field>
-       </class>
-       <class name="jalview.datamodel.xdb.embl.EmblFeature" verify-constructable="false">
-               <field name="name" type="string">
-                       <bind-xml name="name" node="attribute"/>
-               </field>
-               <field name="location" type="string">
-                       <bind-xml name="location" node="attribute"/>
-               </field>
-               <field name="dbRefs" type="jalview.datamodel.DBRefEntry" collection="vector">
-                       <bind-xml name="xref" node="element"/>
-               </field>
-               <field name="qualifiers" type="jalview.datamodel.xdb.embl.Qualifier" collection="vector">
-                       <bind-xml name="qualifier"/>
-               </field>                                        
-       </class>
-       <class name="jalview.datamodel.DBRefEntry" verify-constructable="false">
-               <field name="accessionId" type="java.lang.String">
-                       <bind-xml name="id" node="attribute"/>
-               </field>
-               <field name="source" type="java.lang.String"> 
-                       <bind-xml name="db" node="attribute"/>
-               </field>
-               <field name="version" type="string">
-                       <bind-xml name="secondaryId" node="attribute"/>
-               </field>
-       </class>
-       <class  name="jalview.datamodel.xdb.embl.Qualifier" verify-constructable="false">
-               <field name="name">
-                       <bind-xml name="name" node="attribute"/>
-               </field>
-               <field name="evidence" type="string" collection="array">
-                       <bind-xml name="evidence" node="element"/>
-               </field>
-               <field name="values" type="string" collection="array">
-                       <bind-xml name="value" node="element"/>
-               </field>
-       </class>
-</mapping>
index acf6fba..a400afe 100644 (file)
@@ -30,6 +30,7 @@ action.minimize_associated_windows = Minimize Associated Windows
 action.close_all = Close all
 action.load_project = Load Project
 action.save_project = Save Project
+action.save_project_as = Save Project as...
 action.quit = Quit
 action.expand_views = Expand Views
 action.gather_views = Gather Views
@@ -118,10 +119,8 @@ action.select = Select
 action.new_view = New View
 action.close = Close
 action.add = Add
-action.save_as_default = Save as default
 action.save_as = Save as...
 action.save = Save
-action.cancel_fetch = Cancel Fetch
 action.change_font = Change Font
 action.change_font_tree_panel = Change Font (Tree Panel)
 action.colour = Colour
@@ -140,7 +139,6 @@ action.fetch_db_references = Fetch DB References
 action.view_flanking_regions = Show flanking regions
 label.view_flanking_regions = Show sequence data either side of the subsequences involved in this alignment
 label.structures_manager = Structures Manager
-label.nickname = Nickname:
 label.url = URL
 label.url\: = URL:
 label.input_file_url = Enter URL or Input File
@@ -162,7 +160,6 @@ label.current_parameter_set_name = Current parameter set name:
 label.service_action = Service Action:
 label.post_url = POST URL:
 label.url_suffix = URL Suffix
-label.sequence_source = Sequence Source
 label.per_seq = per Sequence
 label.result_vertically_separable = Results are vertically separable
 label.amend = Amend
@@ -172,10 +169,9 @@ label.principal_component_analysis = Principal Component Analysis
 label.average_distance_identity = Average Distance Using % Identity
 label.neighbour_joining_identity = Neighbour Joining Using % Identity
 label.choose_calculation = Choose Calculation
-label.treecalc_title = {0} Using {1}
+label.calc_title = {0} Using {1}
 label.tree_calc_av = Average Distance
 label.tree_calc_nj = Neighbour Joining
-label.select_score_model = Select score model
 label.score_model_pid = % Identity
 label.score_model_blosum62 = BLOSUM62
 label.score_model_pam250 = PAM 250
@@ -188,21 +184,22 @@ label.out_to_textbox = Output to Textbox
 label.occupancy = Occupancy
 # delete Clustal - use FileFormat name instead
 label.clustal = Clustal
-# label.colourScheme_<schemeName> as in JalviewColourScheme
+# label.colourScheme_<schemeName> as in JalviewColourScheme, spaces removed
 label.colourScheme_clustal = Clustalx
 label.colourScheme_blosum62 = BLOSUM62 Score
-label.colourScheme_%_identity = Percentage Identity
+label.colourScheme_%identity = Percentage Identity
 label.colourScheme_zappo = Zappo
 label.colourScheme_taylor = Taylor
 label.colourScheme_hydrophobic = Hydrophobicity
-label.colourScheme_helix_propensity = Helix Propensity
-label.colourScheme_strand_propensity = Strand Propensity
-label.colourScheme_turn_propensity = Turn Propensity
-label.colourScheme_buried_index = Buried Index
+label.colourScheme_helixpropensity = Helix Propensity
+label.colourScheme_strandpropensity = Strand Propensity
+label.colourScheme_turnpropensity = Turn Propensity
+label.colourScheme_buriedindex = Buried Index
 label.colourScheme_purine/pyrimidine = Purine/Pyrimidine
 label.colourScheme_nucleotide = Nucleotide
-label.colourScheme_t-coffee_scores = T-Coffee Scores
-label.colourScheme_rna_helices = By RNA Helices
+label.colourScheme_t-coffeescores = T-Coffee Scores
+label.colourScheme_rnahelices = By RNA Helices
+label.colourScheme_sequenceid = Sequence ID Colour
 label.blc = BLC
 label.fasta = Fasta
 label.msf = MSF
@@ -353,7 +350,6 @@ label.status = Status
 label.channels = Channels
 label.channel_title_item_count = {0} ({1})
 label.blog_item_published_on_date = {0} {1} 
-label.select_das_service_from_table = Select a DAS service from the table to read a full description here.</font></html>
 label.session_update = Session Update
 label.new_vamsas_session = New Vamsas Session
 action.load_vamsas_session = Load Vamsas Session...
@@ -371,7 +367,6 @@ label.load_colours = Load Colours
 label.save_colours = Save Colours
 label.load_colours_tooltip = Load feature colours and filters from file
 label.save_colours_tooltip = Save feature colours and filters to file
-label.fetch_das_features = Fetch DAS Features
 label.selected_database_to_fetch_from = Selected {0} database {1} to fetch from {2} 
 label.database_param = Database: {0}
 label.example = Example
@@ -409,9 +404,6 @@ label.couldnt_find_pdb_id_in_file = Couldn't find a PDB id in the file supplied.
 label.no_pdb_id_in_file = No PDB Id in File
 label.couldnt_read_pasted_text = Couldn't read the pasted text {0}
 label.error_parsing_text = Error parsing text
-label.enter_local_das_source = Enter Nickname & URL of Local DAS Source
-label.you_can_only_edit_or_remove_local_das_sources = You can only edit or remove local DAS Sources!
-label.public_das_source = Public DAS source - not editable
 label.input_alignment_from_url = Input Alignment From URL
 label.input_alignment = Input Alignment
 label.couldnt_import_as_vamsas_session = Couldn't import {0} as a new vamsas session.
@@ -428,8 +420,6 @@ label.invalid_url = Invalid URL !
 label.error_loading_file = Error loading file
 label.problems_opening_file = Encountered problems opening {0}!!
 label.file_open_error = File open error
-label.no_das_sources_selected_warn = No das sources were selected.\nPlease select some sources and\ntry again.
-label.no_das_sources_selected_title = No DAS Sources Selected
 label.colour_scheme_exists_overwrite = Colour scheme {0} exists.\nContinue saving colour scheme as {1}?"
 label.duplicate_scheme_name = Duplicate scheme name
 label.jalview_new_questionnaire = There is a new Questionnaire available. Would you like to complete it now ?\n
@@ -502,6 +492,10 @@ label.edit_name_description = Edit Name/Description...
 label.create_sequence_feature = Create Sequence Feature...
 label.edit_sequence = Edit Sequence
 label.edit_sequences = Edit Sequences
+label.insert_gap = Insert 1 gap
+label.insert_gaps = Insert {0} gaps
+label.delete_gap = Delete 1 gap
+label.delete_gaps = Delete {0} gaps
 label.sequence_details = Sequence Details
 label.jmol_help = Jmol Help
 label.chimera_help = Chimera Help
@@ -622,7 +616,6 @@ label.visual = Visual
 label.connections = Connections
 label.output = Output
 label.editing = Editing
-label.das_settings = DAS Settings
 label.web_services = Web Services
 label.right_click_to_edit_currently_selected_parameter = Right click to edit currently selected parameter.
 label.let_jmol_manage_structure_colours = Let Jmol manage structure colours
@@ -638,10 +631,6 @@ label.delete_service_url = Delete Service URL
 label.details = Details
 label.options = Options
 label.parameters = Parameters
-label.available_das_sources = Available DAS Sources
-label.full_details = Full Details
-label.authority = Authority
-label.type = Type
 label.proxy_server = Proxy Server
 label.file_output = File Output
 label.select_input_type = Select input type
@@ -710,9 +699,6 @@ label.sort_alignment_new_tree = Sort Alignment With New Tree
 label.add_sequences = Add Sequences
 label.new_window = New Window
 label.split_window = Split Window
-label.refresh_available_sources = Refresh Available Sources
-label.use_registry = Use Registry
-label.add_local_source = Add Local Source
 label.set_as_default = Set as Default
 label.show_labels = Show labels
 action.background_colour = Background Colour...
@@ -771,7 +757,7 @@ label.run_with_preset_params = Run {0} with preset
 label.view_and_change_parameters_before_running_calculation = View and change parameters before running calculation
 label.view_documentation = View documentation
 label.select_return_type = Select return type
-label.translation_of_params = Translation of {0}
+label.translation_of_params = Translation of {0} (Table {1})
 label.features_for_params = Features for - {0}
 label.annotations_for_params = Annotations for - {0}
 label.generating_features_for_params = Generating features for - {0}
@@ -853,7 +839,6 @@ label.multiharmony = Multi-Harmony
 label.unable_start_web_service_analysis = Unable to start web service analysis
 label.job_couldnt_be_started_check_input = The Job couldn't be started. Please check your input, and the Jalview console for any warning messages.
 label.prompt_each_time = Prompt each time
-label.use_source = Use Source
 label.couldnt_save_project = Couldn't save project
 label.error_whilst_saving_current_state_to = Error whilst saving current state to {0}
 label.error_whilst_loading_project_from = Error whilst loading project from {0}
@@ -879,7 +864,6 @@ label.error_unsupported_owwner_user_colour_scheme = Unsupported owner for User C
 label.save_alignment_to_file = Save Alignment to file
 label.save_features_to_file = Save Features to File
 label.save_annotation_to_file = Save Annotation to File
-label.no_features_on_alignment = No features found on alignment
 label.save_pdb_file = Save PDB File
 label.save_text_to_file = Save Text to File
 label.save_state = Save State
@@ -1079,8 +1063,6 @@ exception.unable_to_create_internet_config = Unable to create an Internet Config
 exception.invocation_target_calling_url = InvocationTargetException while calling openURL: {0}
 exception.illegal_access_calling_url = IllegalAccessException while calling openURL: {0}
 exception.interrupted_launching_browser = InterruptedException while launching browser: {0}
-exception.das_source_doesnt_support_sequence_command = Source {0} does not support the sequence command.
-exception.invalid_das_source = Invalid das source: {0}
 exception.ebiembl_retrieval_failed_on = EBI EMBL XML retrieval failed on {0}:{1}
 exception.no_pdb_records_for_chain = No PDB Records for {0} chain {1}
 exception.unexpected_handling_rnaml_translation_for_pdb = Unexpected exception when handling RNAML translation of PDB data
@@ -1135,10 +1117,6 @@ status.parsing_results = Parsing results.
 status.processing = Processing...
 status.refreshing_web_service_menus = Refreshing Web Service Menus
 status.collecting_job_results = Collecting job results.
-status.fetching_das_sequence_features = Fetching DAS Sequence Features
-status.no_das_sources_active = No DAS Sources Active
-status.das_feature_fetching_cancelled = DAS Feature Fetching Cancelled
-status.das_feature_fetching_complete = DAS Feature Fetching Complete
 status.fetching_db_refs = Fetching db refs
 status.loading_cached_pdb_entries = Loading Cached PDB Entries
 status.searching_for_pdb_structures = Searching for PDB Structures
@@ -1161,8 +1139,6 @@ warn.urls_not_contacted = URLs that could not be contacted
 warn.urls_no_jaba = URLs without any JABA Services
 info.validate_jabaws_server = Validate JabaWS Server ?\n(Look in console output for results)
 label.test_server = Test Server?
-info.you_want_jalview_to_find_uniprot_accessions = Do you want Jalview to find\nUniprot Accession ids for given sequence names?
-label.find_uniprot_accession_ids = Find Uniprot Accession Ids
 label.new_sequence_fetcher = New Sequence Fetcher
 label.additional_sequence_fetcher = Additional Sequence Fetcher
 label.select_database_retrieval_source = Select Database Retrieval Source
@@ -1284,7 +1260,6 @@ label.SEQUENCE_ID_for_DB_ACCESSION1 = Please review your URL links in the 'Conne
 label.SEQUENCE_ID_for_DB_ACCESSION2 = URL links using '$SEQUENCE_ID$' for DB accessions now use '$DB_ACCESSION$'.
 label.do_not_display_again = Do not display this message again
 exception.url_cannot_have_duplicate_id = {0} cannot be used as a label for more than one line
-label.filter = Filter text:
 action.customfilter = Custom only
 action.showall = Show All
 label.insert = Insert:
@@ -1299,7 +1274,6 @@ label.edit_sequence_url_link = Edit sequence URL link
 warn.name_cannot_be_duplicate = User-defined URL names must be unique and cannot be MIRIAM ids
 label.output_seq_details = Output Sequence Details to list all database references
 label.urllinks = Links
-label.default_cache_size = Default Cache Size
 action.clear_cached_items = Clear Cached Items
 label.togglehidden = Show hidden regions
 label.quality_descr = Alignment Quality based on Blosum62 scores
@@ -1352,7 +1326,6 @@ label.colour_by_text = Colour by text
 label.graduated_colour = Graduated Colour
 label.by_text_of = By text of
 label.by_range_of = By range of
-label.filters_tooltip = Click to set or amend filters
 label.or = Or
 label.and = And
 label.sequence_feature_colours = Sequence Feature Colours
@@ -1363,3 +1336,60 @@ label.most_bound_molecules = Most Bound Molecules
 label.most_polymer_residues = Most Polymer Residues
 label.cached_structures = Cached Structures
 label.free_text_search = Free Text Search
+label.backupfiles_confirm_delete = Confirm delete
+label.backupfiles_confirm_delete_old_files = Delete the following older backup files? (see the Backups tab in Preferences for more options)
+label.backupfiles_confirm_save_file = Confirm save file
+label.backupfiles_confirm_save_file_backupfiles_roll_wrong = Something possibly went wrong with the backups of this file.
+label.backupfiles_confirm_save_new_saved_file_ok = The new saved file seems okay.
+label.backupfiles_confirm_save_new_saved_file_not_ok = The new saved file might not be okay.
+label.backups = Backups
+label.backup = Backup
+label.backup_files = Backup Files
+label.enable_backupfiles = Enable backup files
+label.backup_filename_strategy = Backup filename strategy
+label.append_to_filename = Append to filename (%n is replaced by the backup number)
+label.append_to_filename_tooltip = %n in the text will be replaced by the backup number. The text will appear after the filename. See the summary box above.
+label.index_digits = Number of digits to use for the backup number (%n)
+label.summary_of_backups_scheme = Summary of backup scheme
+label.increment_index = Increase appended text numbers - newest file has largest number.
+label.reverse_roll = "Roll" appended text numbers - newest backup file is always number 1.
+label.keep_files = Deleting old backup files
+label.keep_all_backup_files = Do not delete old backup files
+label.keep_only_this_number_of_backup_files = Keep only this number of most recent backup files
+label.autodelete_old_backup_files = Autodelete old backup files:
+label.always_ask = Always ask
+label.auto_delete = Automatically delete
+label.filename = filename
+label.braced_oldest = (oldest)
+label.braced_newest = (most recent)
+label.configuration = Configuration
+label.configure_feature_tooltip = Click to configure variable colour or filters
+label.schemes = Schemes
+label.customise = Customise
+label.default = Default
+label.single_file = Single backup
+label.keep_all_versions = Keep all versions
+label.rolled_backups = Rolled backup files
+label.previously_saved_scheme = Previously saved scheme
+label.no_backup_files = NO BACKUP FILES
+label.include_backup_files = Include backup files
+label.cancel_changes = Cancel changes
+label.warning_confirm_change_reverse = Warning!\nIf you change the increment/decrement of the backup filename number, without changing the suffix or number of digits,\nthis may cause loss of backup files created with the previous backup filename scheme.\nAre you sure you wish to do this?
+label.change_increment_decrement = Change increment/decrement?
+label.was_previous = was {0}
+label.newerdelete_replacement_line = Backup file\n''{0}''\t(modified {2}, size {4})\nis to be deleted and replaced by apparently older file\n''{1}''\t(modified {3}, size {5}).
+label.confirm_deletion_or_rename = Confirm deletion of ''{0}'' or rename to ''{1}''?
+label.newerdelete_line = Backup file\n''{0}''\t(modified {2}, size {4})\nis to be deleted but is newer than the oldest remaining backup file\n''{1}''\t(modified {3}, size {5}).
+label.confirm_deletion = Confirm deletion of ''{0}''?
+label.delete = Delete
+label.rename = Rename
+label.keep = Keep
+label.file_info = (modified {0}, size {1})
+label.annotation_name = Annotation Name
+label.annotation_description = Annotation Description 
+label.edit_annotation_name_description = Edit Annotation Name/Description
+label.alignment = alignment
+label.pca = PCA
+label.create_image_of = Create {0} image of {1}
+label.click_to_edit = Click to edit, right-click for menu
+label.by_annotation_tooltip = Annotation Colour is configured from the main Colour menu
index 555977d..08373ba 100644 (file)
@@ -30,6 +30,7 @@ action.minimize_associated_windows = Minimizar ventanas asociadas
 action.close_all = Cerrar todo
 action.load_project = Cargar proyecto
 action.save_project = Guardar proyecto
+action.save_project_as = Guardar proyecto como...
 action.quit = Salir
 action.expand_views = Expandir vistas
 action.gather_views = Capturar vistas
@@ -115,10 +116,8 @@ action.select = Seleccionar
 action.new_view = Nueva vista
 action.close = Cerrar
 action.add = Añadir
-action.save_as_default = Guardar como por defecto
 action.save_as = Guardar como
 action.save = Guardar
-action.cancel_fetch = Cancelar búsqueda
 action.change_font = Cambiar Fuente
 action.change_font_tree_panel = Cambiar fuente (panel del árbol)
 action.colour = Color
@@ -137,7 +136,6 @@ action.fetch_db_references = Recuperar referencias a base de datos
 action.view_flanking_regions = Mostrar flancos
 label.view_flanking_regions = Mostrar los datos de la secuencia a ambos lados de las subsecuencias implicadas en este alineamiento
 label.structures_manager = Administrar estructuras
-label.nickname = Sobrenombre:
 label.url\: = URL:
 label.url = URL 
 label.input_file_url = Introducir URL en el fichero de entrada
@@ -159,7 +157,6 @@ label.current_parameter_set_name = Nombre actual del conjunto de par
 label.service_action = Acción de servicio:
 label.post_url = POST URL: 
 label.url_suffix = URL Sufijo
-label.sequence_source = Fuente de la secuencia
 label.per_seq = por secuencia
 label.result_vertically_separable = Los resultados son separables verticalmente
 label.amend = Modificar
@@ -169,10 +166,9 @@ label.principal_component_analysis = An
 label.average_distance_identity = Distancia Media Usando % de Identidad
 label.neighbour_joining_identity = Unir vecinos utilizando % de Identidad
 label.choose_calculation = Elegir el cálculo
-label.treecalc_title = {0} utilizando {1}
+label.calc_title = {0} utilizando {1}
 label.tree_calc_av = Distancia media
 label.tree_calc_nj = Unir vecinos
-label.select_score_model = Selecciones modelo de puntuación
 label.score_model_pid = % Identidad
 label.score_model_blosum62 = BLOSUM62
 label.score_model_pam250 = PAM 250
@@ -187,18 +183,19 @@ label.clustal = Clustal
 # label.colourScheme_<schemeName> as in JalviewColourScheme
 label.colourScheme_clustal = Clustalx
 label.colourScheme_blosum62 = Puntuación del BLOSUM62
-label.colourScheme_%_identity = Porcentaje de identidad
+label.colourScheme_%identity = Porcentaje de identidad
 label.colourScheme_zappo = Zappo
 label.colourScheme_taylor = Taylor
 label.colourScheme_hydrophobic = Hidrofobicidad
-label.colourScheme_helix_propensity = Tendencia de la hélice
-label.colourScheme_strand_propensity = Tendencia de la hebra
-label.colourScheme_turn_propensity = Tendencia de giro
-label.colourScheme_buried_index = Índice de encubrimiento
+label.colourScheme_helixpropensity = Tendencia de la hélice
+label.colourScheme_strandpropensity = Tendencia de la hebra
+label.colourScheme_turnpropensity = Tendencia de giro
+label.colourScheme_buriedindex = Índice de encubrimiento
 label.colourScheme_purine/pyrimidine = Purina/Pirimidina
 label.colourScheme_nucleotide = Nucleótido
-label.colourScheme_t-coffee_scores = Puntuación del T-Coffee
-label.colourScheme_rna_helices = Por hélices de RNA
+label.colourScheme_t-coffeescores = Puntuación del T-Coffee
+label.colourScheme_rnahelices = Por hélices de RNA
+label.colourScheme_sequenceid = Color de ID de secuencia
 label.blc = BLC
 label.fasta = Fasta
 label.msf = MSF
@@ -322,7 +319,6 @@ label.status =  [Estado]
 label.channels = Canales
 label.channel_title_item_count = {0} ({1})
 label.blog_item_published_on_date = {0} {1} 
-label.select_das_service_from_table = Seleccionar servicio DAS de la tabla para leer una descripción completa aquí.
 label.session_update = Actualizar sesión
 label.new_vamsas_session = Nueva sesión Vamsas
 action.save_vamsas_session = Guardar Sesión Vamsas
@@ -339,7 +335,6 @@ label.load_colours = Cargar colores
 label.save_colours = Guardar colores
 label.load_colours_tooltip = Cargar colores y filtros desde fichero
 label.save_colours_tooltip = Guardar colores y filtros en fichero
-label.fetch_das_features = Recuperar funciones DAS
 label.selected_database_to_fetch_from = Seleccionada {0} Base de datos {1} para buscar de {2} 
 label.database_param = Base de datos: {0}
 label.example = Ejemplo
@@ -376,9 +371,6 @@ label.couldnt_find_pdb_id_in_file = No se pudo encontrar un Id PDB en el fichero
 label.no_pdb_id_in_file = No hay un Id PDB en el fichero
 label.couldnt_read_pasted_text = No se pudo leer el texto pegado {0}
 label.error_parsing_text = Error analizando el texto
-label.enter_local_das_source = Intruduzca el Nickname & URL de la fuente DAS local
-label.you_can_only_edit_or_remove_local_das_sources = Sólo puedes editar o eliminar fuentes DAS locales!
-label.public_das_source = Fuente pública DAS - no editable
 label.input_alignment_from_url = Alineamiento de entrada desde URL
 label.input_alignment = Alineamiento de entrada
 label.couldnt_import_as_vamsas_session = No se pudo importar {0} como una nueva sesión Vamsas.
@@ -395,8 +387,6 @@ label.invalid_url = URL Invalido!
 label.error_loading_file = Error al cargar el fichero
 label.problems_opening_file = Encontrados problemas al abrir el fichero {0}!!
 label.file_open_error = Error al abrir el fichero
-label.no_das_sources_selected_warn = No han sido seleccionadas fuentes DAS.\nPor favor, seleccione algunas fuentes y\npruebe de nuevo.
-label.no_das_sources_selected_title = No han sido seleccionadas fuentes DAS
 label.colour_scheme_exists_overwrite = El esquema de colores {0} ya existe.\nContinuar guardando el esquema de colores como {1}?
 label.duplicate_scheme_name = Duplicar nombre de esquema
 label.jalview_new_questionnaire = Hay un nuevo cuestionario disponible. Querr\u00EDa completarlo ahora ?\n
@@ -468,6 +458,10 @@ label.edit_name_description = Editar nombre/descripci
 label.create_sequence_feature = Crear función de secuencia
 label.edit_sequence = Editar secuencia
 label.edit_sequences = Editar secuencias
+label.insert_gap = Insertar 1 hueco
+label.insert_gaps = Insertar {0} huecos
+label.delete_gap = Borrar 1 hueco
+label.delete_gaps = Borrar {0} huecos
 label.sequence_details = Detalles de la secuencia
 label.jmol_help = Ayuda de Jmol
 # Todos/Todas is gender-sensitive, but currently only used for feminine (cadena / anotación)! 
@@ -577,7 +571,6 @@ label.visual = Visual
 label.connections = Conexiones
 label.output = Salida
 label.editing = Edición
-label.das_settings = Configuración DAS
 label.web_services = Servicios web
 label.right_click_to_edit_currently_selected_parameter = Haga clic en el botón derecho para editar el parámetro seleccionado actualmente.
 label.let_jmol_manage_structure_colours = Permitir que Jmol gestione la estructuras cromáticas
@@ -590,10 +583,6 @@ label.delete_service_url = Borrar la URL del servicio
 label.details = Detalles
 label.options = Opciones
 label.parameters = Paramétros
-label.available_das_sources = Fuentes DAS disponibles
-label.full_details = Detalles completos
-label.authority = Autoridad
-label.type = Tipo
 label.proxy_server = Servidor proxy
 label.file_output = Fichero de salida
 label.select_input_type = Seleccionar el tipo de entrada
@@ -656,9 +645,6 @@ label.get_cross_refs = Obtener referencias cruzadas
 label.sort_alignment_new_tree = Alinear el alineamiento con el nuevo árbol
 label.add_sequences = Añadir secuencias
 label.new_window = Nueva ventana
-label.refresh_available_sources = Refrescar las fuentes disponibles
-label.use_registry = Utilizar el registro
-label.add_local_source = Añadir fuente local
 label.set_as_default = Establecer por defecto
 label.show_labels = Mostrar etiquetas
 label.associate_nodes_with = Asociar nodos con
@@ -700,7 +686,7 @@ label.run_with_preset_params = Ejecutar {0} con preconfiguraci
 label.view_and_change_parameters_before_running_calculation = Ver y cambiar los parámetros antes de lanzar el cálculo
 label.view_documentation = Ver documentación
 label.select_return_type = Seleccionar el tipo de retorno
-label.translation_of_params = Traducción de {0}
+label.translation_of_params = Traducción de {0} (Tabla {1})
 label.features_for_params = Características de - {0}
 label.annotations_for_params = Anotaciones de - {0}
 label.generating_features_for_params = Generando características de - {0}
@@ -778,7 +764,6 @@ label.multiharmony = Multi-Harmony
 label.unable_start_web_service_analysis = No es posible iniciar el servicio web de análisis
 label.job_couldnt_be_started_check_input = El trabajo no puede arrancarse. Por favor, compruebe los parámetros de entrada y los mensajes de advertencia de la consola de Jalview.
 label.prompt_each_time = Preguntar siempre
-label.use_source = Fuente
 label.couldnt_save_project = No es posible guardar el proyecto
 label.error_whilst_saving_current_state_to = Error mientras se guardaba el estado a {0}
 label.error_whilst_loading_project_from = Error cargando el proyecto desde  {0}
@@ -804,7 +789,6 @@ label.error_unsupported_owwner_user_colour_scheme = Propietario no soportado par
 label.save_alignment_to_file = Guardar Alineamiento en fichero
 label.save_features_to_file = Guardar Características en un fichero
 label.save_annotation_to_file = Guardar Anotación en un fichero
-label.no_features_on_alignment = No se han encontrado características en el alineamiento
 label.save_pdb_file = Guardar fichero PDB 
 label.save_text_to_file = Guardar Texto en un fichero
 label.save_state = Guardar estado
@@ -1004,8 +988,6 @@ exception.unable_to_create_internet_config = Imposible crear una instancia de co
 exception.invocation_target_calling_url = InvocationTargetException mientras se invocaba openURL: {0}
 exception.illegal_access_calling_url = IllegalAccessException mientras se invocaba openURL: {0}
 exception.interrupted_launching_browser = InterruptedException mientras se lanzaba el navegador: {0}
-exception.das_source_doesnt_support_sequence_command = La fuente {0} no soporta el comando sequence.
-exception.invalid_das_source = Fuente DAS no válida: {0}
 exception.ebiembl_retrieval_failed_on = La recuperación de datos EBI EMBL XML ha fallado en {0}:{1}
 exception.no_pdb_records_for_chain = No se han encontrado registros {0} para la cadena {1}
 exception.unexpected_handling_rnaml_translation_for_pdb = Excepcion inesperada cuando se traducían a RNAML los datos PDB
@@ -1057,10 +1039,6 @@ status.parsing_results = Parseando resultados.
 status.processing = Procesando...
 status.refreshing_web_service_menus = Refrescando los menús de servicios web
 status.collecting_job_results = Recolectando los resultados de los trabajos.
-status.fetching_das_sequence_features = Recuperando las características DAS de las secuencias
-status.no_das_sources_active = No existe ninguna fuente DAS activa
-status.das_feature_fetching_cancelled = Recuperación de características DAS cancelada
-status.das_feature_fetching_complete = Recuperación de características DAS completada
 status.fetching_db_refs = Recuperando db refs
 label.font_doesnt_have_letters_defined = La fuente no tiene letras definidas\npor lo que no puede emplease\ncon datos de alineamientos
 label.font_too_small = Tamaño de la letra es demasiado pequeña
@@ -1077,8 +1055,6 @@ warn.server_didnt_pass_validation = El servicio no ha pasado la validaci\u00F3n.
 warn.url_must_contain = La URL de la secuencia debe contener $SEQUENCE_ID$, $DB_ACCESSION$ o un regex
 info.validate_jabaws_server = \u00BFValidar el servidor JabaWS?\n(Consulte la consola de salida para obtener los resultados)
 label.test_server = ¿Probar servidor?
-info.you_want_jalview_to_find_uniprot_accessions = \u00BFDesea que Jalview encuentre\nUniprot Accession ids para los nombres de secuencias dados?
-label.find_uniprot_accession_ids = Buscar Uniprot Accession Ids
 label.new_sequence_fetcher = Añadir recuperador de secuencias
 label.additional_sequence_fetcher = Recuperador de secuencia adicional
 label.select_database_retrieval_source = Seleccionar fuente de recuperación de bases de datos
@@ -1285,7 +1261,6 @@ label.SEQUENCE_ID_for_DB_ACCESSION1 = Por favor, revise sus URLs en la pesta
 label.SEQUENCE_ID_for_DB_ACCESSION2 = URL enlaza usando '$SEQUENCE_ID$' para accesiones DB ahora usar '$DB_ACCESSION$'.
 label.do_not_display_again = No mostrar este mensaje de nuevo
 exception.url_cannot_have_duplicate_id = {0} no puede ser usada como etiqueta en más de un enlace
-label.filter = Filtrar texto:
 action.customfilter = Sólo personalizado
 action.showall = Mostrar todo
 label.insert = Insertar:
@@ -1300,7 +1275,6 @@ label.edit_sequence_url_link = Editar link de secuencia URL
 warn.name_cannot_be_duplicate = Los nombres URL definidos por el usuario deben ser únicos y no pueden ser ids de MIRIAM
 label.output_seq_details = Seleccionar Detalles de la secuencia para ver todas
 label.urllinks = Enlaces
-label.default_cache_size = Tamaño del caché por defecto
 action.clear_cached_items = Borrar elementos en caché
 label.quality_descr = Calidad de alineamiento basándose en puntuación Blosum62
 label.conservation_descr = Conservación del alineamiento total menos de {0}% huecos
@@ -1353,7 +1327,6 @@ label.colour_by_text = Colorear por texto
 label.graduated_colour = Color graduado
 label.by_text_of = Por texto de
 label.by_range_of = Por rango de
-label.filters_tooltip = Haga clic para configurar o modificar los filtros
 label.or = O
 label.and = Y
 label.sequence_feature_colours = Colores de características de las secuencias
@@ -1364,3 +1337,60 @@ label.most_bound_molecules = M
 label.most_polymer_residues = Más Residuos de Polímeros
 label.cached_structures = Estructuras en Caché
 label.free_text_search = Búsqueda de texto libre
+label.backupfiles_confirm_delete = Confirmar borrar
+label.backupfiles_confirm_delete_old_files = ¿Borrar los siguientes archivos? (ver la pestaña 'Copias' de la ventana de Preferencias para más opciones)
+label.backupfiles_confirm_save_file = Confirmar guardar archivo
+label.backupfiles_confirm_save_file_backupfiles_roll_wrong = Posiblemente algo está mal con los archivos de respaldos.
+label.backupfiles_confirm_save_new_saved_file_ok = El nuevo archivo guardado parece estar bien.
+label.backupfiles_confirm_save_new_saved_file_not_ok = El nuevo archivo guardado podría no estar bien.
+label.backups = Respaldos
+label.backup = Respaldo
+label.backup_files = Archivos de respaldos
+label.enable_backupfiles = Habilitar archivos de respaldos
+label.backup_filename_strategy = Estrategia de nombres de archivo de respaldos
+label.append_to_filename = Adjuntar texto (%n es reemplazado por el número de respaldo)
+label.append_to_filename_tooltip = %n en el texto será reemplazado por el número de respaldo. El texto será después del nombre del archivo. Vea el cuadro de resumen arriba.
+label.index_digits = Número de dígitos a utilizar para el número de respaldo.
+label.summary_of_backups_scheme = Resumen del esquema de copias de seguridad
+label.increment_index = Aumente los números de texto adjuntos: el archivo más nuevo tiene el número más grande
+label.reverse_roll = Ciclos de texto adjuntos: el respaldo más reciente es siempre el número 1
+label.keep_files = Borrando los respaldos antiguos
+label.keep_all_backup_files = No borrar respaldos antiguas
+label.keep_only_this_number_of_backup_files = Mantenga solo este número de respaldos más recientes
+label.autodelete_old_backup_files = Borrer automáticamente respaldos antiguos:
+label.always_ask = Pregunta siempre
+label.auto_delete = Borrer automáticamente
+label.filename = nombre_de_archivo
+label.braced_oldest = (mas antiguo)
+label.braced_newest = (mas nuevo)
+label.configuration = Configuración
+label.configure_feature_tooltip = Haga clic para configurar el color o los filtros
+label.schemes = Esquemas
+label.customise = Personalizado
+label.default = Defecto
+label.single_file = Solo uno respaldo
+label.keep_all_versions = Mantener todas las versiones
+label.rolled_backups = Ciclos respaldos
+label.previously_saved_scheme = Esquema previamente guardado
+label.no_backup_files = NO ARCHIVOS DE RESPALDOS
+label.include_backup_files = Incluir archivos de respaldos
+label.cancel_changes = Cancelar cambios
+label.warning_confirm_change_reverse = ¡Advertencia!\nSi cambia el incremento/decremento del número de archivos de respaldos, sin cambiar el sufijo o número de dígitos,\nesto puede causar la pérdida de los archivos de respaldos creados con el esquema anterior de nombre de archivo de respaldos.\n¿Está seguro de que desea hacer esto?
+label.change_increment_decrement = ¿Cambiar de incremento/decremento?
+label.was_previous = era {0}
+label.newerdelete_replacement_line = El archivo de respaldo\n''{0}''\t(modificado {2}, tamaño {4})\nserá borrado y reemplazarse por un archivo aparentemente más antiguo\n''{1}''\t(modificado {3}, tamaño {5}).
+label.confirm_deletion_or_rename = Confirmar borrar ''{0}'', o cambiar el nombre a ''{1}''?
+label.newerdelete_line = El archivo de respaldo\n''{0}''\t(modificado {2}, tamaño {4})\nserá borrado pero es mas nuevo que el archivo de respaldo restante más antiguo\n''{1}''\t(modified {3}, size {5}).
+label.confirm_deletion = Confirmar eliminar ''{0}''?
+label.delete = Borrar
+label.rename = Cambiar
+label.keep = Mantener
+label.file_info = (modificado {0}, tamaño {1})
+label.annotation_name = Nombre de la anotación
+label.annotation_description = Descripción de la anotación 
+label.edit_annotation_name_description = Editar el nombre/descripción de la anotación
+label.alignment = alineamiento
+label.pca = ACP
+label.create_image_of = Crear imagen {0} de {1}
+label.click_to_edit = Haga clic para editar, clic en el botón derecho para ver el menú  
+label.by_annotation_tooltip = El color de anotación se configura desde el menú principal de colores
diff --git a/resources/uniprot_mapping.xml b/resources/uniprot_mapping.xml
deleted file mode 100755 (executable)
index 68868c4..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version="1.0"?>
-<!--
- * 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.
--->
-<mapping>
-  <!-- see https://www.uniprot.org/docs/uniprot.xsd for latest Uniprot XML schema -->
-       <class name="jalview.datamodel.xdb.uniprot.UniprotFile">
-                 <map-to xml="uniprot"/>               
-                 <field name="UniprotEntries" type="jalview.datamodel.xdb.uniprot.UniprotEntry" collection="vector">
-                     <bind-xml name="entry"/>
-                </field>               
-        </class>
-                
-        <class name="jalview.datamodel.xdb.uniprot.UniprotEntry">
-               <field name="name" type="string" collection="vector"/>
-               <field name="accession" type="string" collection="vector"/>
-               <field name="protein" type="jalview.datamodel.xdb.uniprot.UniprotProteinName"/>
-           <field name="UniprotSequence" type="jalview.datamodel.xdb.uniprot.UniprotSequence">
-               <bind-xml name="sequence"/> 
-           </field>
-           <field name="feature" type="jalview.datamodel.xdb.uniprot.UniprotFeature" collection="vector"/>
-           <field name="dbReference" type="jalview.datamodel.PDBEntry" collection="vector"/>
-                      
-        </class>
-       <class name="jalview.datamodel.xdb.uniprot.UniprotProteinName">
-               <field name="name" collection="vector" type="string">
-                       <bind-xml name="fullName" location="recommendedName" node="element"/>
-               </field>
-       </class>
-        <!-- uniprot protein name is now a collection of collections - the INCLUDES and CONTAINS entries of the uniprot
-               record. This means this doesn't exist anymore...
-        <class name="jalview.datamodel.xdb.uniprot.UniprotProteinName">
-               <field name="name" type="string" collection="vector">
-                       <bind-xml name="name"/>
-               </field>                
-        </class>
-        -->
-        
-        <class name="jalview.datamodel.xdb.uniprot.UniprotFeature">
-               <field name="type">
-                       <bind-xml node="attribute"/>
-               </field>
-               <field name="description">
-                        <bind-xml node="attribute"/>
-               </field>
-               <field name="status">
-                       <bind-xml node="attribute"/>
-               </field>
-               <field name="position">
-                <bind-xml name="position" node="attribute" location="location/position"/>
-               </field>
-               <field name="begin">
-                <bind-xml name="position" node="attribute" location="location/begin"/>
-               </field>
-    <field name="end">
-      <bind-xml name="position" node="attribute" location="location/end"/>
-    </field>
-    <field name="variation" collection="vector" type="string">
-     <bind-xml name="variation"/>
-    </field>
-    <field name="original">
-     <bind-xml name="original"/>
-    </field>
-        </class>
-       
-          <class name="jalview.datamodel.xdb.uniprot.UniprotSequence">
-                    <field name="content" type="string">
-                       <bind-xml name="sequence" node="text"/>
-                    </field>
-        </class>
-        
-        <class name="jalview.datamodel.PDBEntry">
-               <field name="type"><bind-xml node="attribute"/></field>
-               <field name="id"><bind-xml node="attribute"/></field>
-               <field name="props" collection="hashtable">
-                       <bind-xml name="property">
-                          <class name="org.exolab.castor.mapping.MapItem">
-                             <field name="key">
-                               <bind-xml name="type" node="attribute"/>
-                             </field>
-                             <field name="value">
-                               <bind-xml node="attribute"/>
-                               </field>
-                          </class>
-                       </bind-xml>
-               </field>
-        </class>
-
-</mapping>
index 3934d66..50f0479 100755 (executable)
   
   You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
 -->
+<!-- 
+       Java JAXB binding classes are generated by running command line tool xjc:
+           xjc schemas/jalview.xsd -d src -p jalview.xml.binding.jalview
+       Note this also generates code for included schemas
+-->
 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:jalview="www.jalview.org/colours" targetNamespace="www.jalview.org/colours">
+       <xs:element name="JalviewUserColours" type="jalview:JalviewUserColours" />
        <xs:complexType name="JalviewUserColours">
                <xs:sequence>
                        <xs:element name="Version" maxOccurs="1" minOccurs="0" type="xs:string">
                                        <xs:attribute name="RGB" type="xs:string" use="required"/>
                                        <xs:attribute name="minRGB" type="xs:string" use="optional"/>
                                        <xs:attribute name="noValueColour" use="optional" type="jalview:NoValueColour" default="Min" />
-                                       <xs:attribute name="threshType" use="optional">
-                                               <xs:simpleType> 
-                                                       <xs:restriction base="xs:string">
-                                                     <xs:enumeration value="NONE" />
-                                                     <xs:enumeration value="ABOVE" />
-                                                     <xs:enumeration value="BELOW" />
-                                                   </xs:restriction>   
-                                           </xs:simpleType> 
-                                       </xs:attribute>
+                                       <xs:attribute name="threshType" use="optional" type="jalview:ThresholdType" />
                                        <xs:attribute name="threshold" type="xs:float" use="optional"/>
                                        <xs:attribute name="max" type="xs:float" use="optional"/>
                                        <xs:attribute name="min" type="xs:float" use="optional"/>
            <xs:element name="condition" type="xs:string" /> 
            <xs:element name="value" type="xs:string" /> 
          </xs:sequence>
-         <xs:attribute name="by">
-               <xs:simpleType> 
-                       <xs:restriction base="xs:string">
-                     <xs:enumeration value="byLabel" />
-                     <xs:enumeration value="byScore" />
-                     <xs:enumeration value="byAttribute" />
-                   </xs:restriction>   
-           </xs:simpleType> 
-         </xs:attribute> 
-       </xs:complexType> 
+         <xs:attribute name="by" type="jalview:FilterBy" />
+       </xs:complexType>
+
+       <xs:simpleType name="ThresholdType">
+               <xs:annotation>
+                       <xs:documentation>Whether filter has a threshold, and if so is it
+                               above or below
+                       </xs:documentation>
+               </xs:annotation>
+               <xs:restriction base="xs:string">
+                       <xs:enumeration value="NONE" />
+                       <xs:enumeration value="ABOVE" />
+                       <xs:enumeration value="BELOW" />
+               </xs:restriction>
+       </xs:simpleType>
+       
+       <xs:simpleType name="FilterBy">
+               <xs:annotation>
+                       <xs:documentation>Filter may apply to label, score or some feature attribute</xs:documentation>
+               </xs:annotation>
+               <xs:restriction base="xs:string">
+             <xs:enumeration value="byLabel" />
+             <xs:enumeration value="byScore" />
+             <xs:enumeration value="byAttribute" />
+           </xs:restriction>   
+       </xs:simpleType>
        
        <xs:simpleType name="NoValueColour">
                <xs:annotation>
index 443d19d..3a20002 100644 (file)
  * 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"
+<!-- 
+       Java JAXB binding classes are generated by running command line tool xjc:
+           xjc schemas/jalview.xsd -d src -p jalview.xml.binding.jalview
+       Note this also generates code for included schemas
+-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsparams="www.jalview.org/xml/wsparamset"
        targetNamespace="www.jalview.org/xml/wsparamset">
+       <xs:element name="WebServiceParameterSet" type="wsparams:WebServiceParameterSet" />
        <xs:complexType name="WebServiceParameterSet">
                <xs:sequence>
                        <xs:element name="Version" maxOccurs="1" minOccurs="0"
diff --git a/schemas/castor-mapping.xsd b/schemas/castor-mapping.xsd
deleted file mode 100644 (file)
index c33b8a4..0000000
+++ /dev/null
@@ -1,315 +0,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.
--->
-<!--DOCTYPE schema PUBLIC "-//W3C/DTD XML Schema Version 1.0//EN"
-    "http://www.w3.org/TR/2000/WD-xmlschema-1-20000225/structures.dtd"-->
-    <!--
-        Castor Object Mapping XML Schema
-        
-        Namespace: http://castor.exolab.org/
-        System:    http://castor.exolab.org/mapping.xsd
-        Public:    -//EXOLAB/Castor Object Mapping Schema Version 1.0//EN
-        
-        *Note*: This schema is under evolution and subject to change.
-        
-    -->
-    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-        targetNamespace="http://castor.exolab.org/"
-        xmlns="http://castor.exolab.org/"
-        version="0.9.4">
-        
-        <xsd:element name="mapping">
-            <xsd:complexType>
-                <xsd:sequence>
-                    <xsd:element name="description"   type="xsd:string" minOccurs="0" maxOccurs="1" />
-                    <xsd:element ref="include"        minOccurs="0" maxOccurs="unbounded" />
-                    <xsd:element ref="class"          minOccurs="0" maxOccurs="unbounded" />
-                    <xsd:element ref="key-generator"  minOccurs="0" maxOccurs="unbounded" />
-                </xsd:sequence>
-            </xsd:complexType>
-        </xsd:element>
-        
-        <xsd:element name="include">
-            <xsd:complexType>
-                <xsd:attribute name="href" type="xsd:string" use="required"/>
-            </xsd:complexType>
-        </xsd:element>
-        
-        <xsd:element name="class">
-            <xsd:complexType>
-                <xsd:sequence>
-                    <xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1" />
-                    <xsd:element ref="cache-type"   minOccurs="0" maxOccurs="1" />
-                    <xsd:element ref="map-to" minOccurs="0" maxOccurs="1" />
-                    <xsd:choice minOccurs="1">
-                        <xsd:element ref="field" minOccurs="0" maxOccurs="unbounded"/>
-                        <xsd:element ref="container" minOccurs="0" maxOccurs="unbounded"/>
-                    </xsd:choice>
-                </xsd:sequence>
-                <xsd:attribute name="name"     type="xsd:ID"         use="required"/>
-                <xsd:attribute name="extends"  type="xsd:IDREF"      use="optional"/>
-                <xsd:attribute name="depends"  type="xsd:IDREF"      use="optional"/>
-                <xsd:attribute name="identity" type="xsd:NMTOKENS"   use="optional"/>
-                <xsd:attribute name="access"   default="shared"    use="optional">
-                    <xsd:simpleType>
-                        <xsd:restriction base="xsd:string">
-                            <xsd:enumeration value="read-only"/>
-                            <xsd:enumeration value="shared"/>
-                            <xsd:enumeration value="exclusive"/>
-                            <xsd:enumeration value="db-locked"/>
-                        </xsd:restriction>
-                    </xsd:simpleType>
-                </xsd:attribute>
-                <xsd:attribute name="key-generator" type="xsd:string"   use="optional"/>
-                <xsd:attribute name="auto-complete" type="xsd:boolean"  use="optional" default="false"/>
-                <xsd:attribute name="verify-constructable" type="xsd:boolean"  use="optional" default="true"/>
-            </xsd:complexType>
-        </xsd:element>
-        
-        <xsd:element name="map-to">
-            <xsd:complexType>
-                <xsd:attribute name="table"     type="xsd:NMTOKEN"  use="optional"/>
-                <xsd:attribute name="xml"       type="xsd:string"   use="optional"/>
-                <xsd:attribute name="ns-uri"    type="xsd:string"   use="optional"/>
-                <xsd:attribute name="ns-prefix" type="xsd:NMTOKEN"  use="optional"/>
-                <xsd:attribute name="ldap-dn"   type="xsd:string"   use="optional"/>
-                <xsd:attribute name="ldap-oc"   type="xsd:string"   use="optional"/>
-            </xsd:complexType>
-        </xsd:element>
-        
-        <xsd:element name="field">
-            <xsd:complexType>
-                <xsd:sequence>
-                    <xsd:element name="description"   type="xsd:string" minOccurs="0" maxOccurs="1" />
-                    <xsd:element ref="sql"            minOccurs="0" maxOccurs="1"/>
-                    <xsd:element ref="bind-xml"       minOccurs="0" maxOccurs="1"/>
-                    <xsd:element ref="ldap"           minOccurs="0" maxOccurs="1"/>
-                </xsd:sequence>
-                
-                <xsd:attribute name="name"          type="xsd:string" use="required"/>
-                <xsd:attribute name="type"          type="xsd:string" use="optional"/>
-                <xsd:attribute name="required"      type="xsd:boolean"  use="optional"   default="false"/>
-                <xsd:attribute name="transient"     type="xsd:boolean"  use="optional"   default="false"/>
-                <xsd:attribute name="direct"        type="xsd:boolean"  use="optional"   default="false"/>
-                <xsd:attribute name="lazy"          type="xsd:boolean"  use="optional"   default="false"/>
-                <xsd:attribute name="container"     type="xsd:boolean"  use="optional"/>
-                <xsd:attribute name="get-method"    type="xsd:string"  use="optional"/>
-                <xsd:attribute name="has-method"    type="xsd:string"  use="optional"/>
-                <xsd:attribute name="set-method"    type="xsd:string"  use="optional"/>
-                <xsd:attribute name="create-method" type="xsd:string"  use="optional"/>
-                <xsd:attribute name="handler"       type="xsd:string"   use="optional"/>
-                <xsd:attribute name="collection"    use="optional">
-                    <xsd:simpleType>
-                        <xsd:restriction base="xsd:string">
-                            <xsd:enumeration value="array"/>
-                            <xsd:enumeration value="vector"/>
-                            <xsd:enumeration value="arraylist"/>
-                            <xsd:enumeration value="hashtable"/>
-                            <xsd:enumeration value="collection"/>
-                            <xsd:enumeration value="set"/>
-                            <xsd:enumeration value="map"/>
-                            <xsd:enumeration value="enumerate"/>
-                        </xsd:restriction>
-                    </xsd:simpleType>
-                </xsd:attribute>
-            </xsd:complexType>
-        </xsd:element>
-        
-        <xsd:element name="container">
-            <xsd:complexType>
-                <xsd:sequence>
-                    <xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1" />
-                    <xsd:element ref="field" minOccurs="1"/>
-                </xsd:sequence>
-                <xsd:attribute name="name"          type="xsd:NMTOKEN" use="required"/>
-                <xsd:attribute name="type"          type="xsd:NMTOKEN" use="optional"/>
-                <xsd:attribute name="required"      type="xsd:boolean" use="optional"  default="false"/>
-                <xsd:attribute name="direct"        type="xsd:boolean" use="optional"  default="false"/>
-                <xsd:attribute name="get-method"    type="xsd:NMTOKEN" use="optional"/>
-                <xsd:attribute name="set-method"    type="xsd:NMTOKEN" use="optional"/>
-                <xsd:attribute name="create-method" type="xsd:NMTOKEN" use="optional"/>
-            </xsd:complexType>
-        </xsd:element>
-        
-        <xsd:element name="sql">
-            <xsd:complexType>
-                <xsd:attribute name="name"       type="xsd:NMTOKENS"   use="optional"/>
-                <xsd:attribute name="type"       type="xsd:string"   use="optional"/>
-                <xsd:attribute name="many-table" type="xsd:NMTOKEN"    use="optional"/>
-                <xsd:attribute name="many-key"   type="xsd:NMTOKENS"   use="optional"/>
-                <xsd:attribute name="read-only"  type="xsd:boolean"    use="optional" default="false"/>
-                
-                <!-- signals that this field is transient for database mapping (ie should be ignored) -->
-                <xsd:attribute name="transient" type="xsd:boolean" use="optional"/>
-                
-                
-                <xsd:attribute name="dirty"  default="check"  use="optional">
-                    <xsd:simpleType>
-                        <xsd:restriction base="xsd:string">
-                            <xsd:enumeration value="check"/>
-                            <xsd:enumeration value="ignore"/>
-                        </xsd:restriction>
-                    </xsd:simpleType>
-                </xsd:attribute>
-            </xsd:complexType>
-        </xsd:element>
-        
-        <!--
-            The 'bind-xml' element is used for specifying XML specific databinding
-            properties and behavior for a specific field. 'bind-xml' may only appear
-            as a child of a 'field' element.
-        -->
-        <xsd:element name="bind-xml">
-            <xsd:annotation>
-                <xsd:documentation>
-                    The 'bind-xml' element is used for specifying XML specific databinding
-                    properties and behavior for a specific field. 'bind-xml' may only appear
-                    as a child of a 'field' element.
-                </xsd:documentation>
-            </xsd:annotation>
-            <xsd:complexType>
-                
-                <xsd:sequence>
-                    <xsd:element ref="class" minOccurs="0" maxOccurs="1"/>
-                    <xsd:element name="property" type="propertyType" minOccurs="0" maxOccurs="unbounded"/>
-                </xsd:sequence>
-                
-                <!--
-                    An optional attribute used for specifying the XML name for the
-                    field associated with the 'bind-xml' element.
-                -->
-                <xsd:attribute name="name" type="xsd:QName"  use="optional">
-                    <xsd:annotation>
-                        <xsd:documentation>
-                            An optional attribute used for specifying the XML name for the
-                            field associated with the 'bind-xml' element.
-                        </xsd:documentation>
-                    </xsd:annotation>
-                </xsd:attribute>
-                
-                <xsd:attribute name="type" type="xsd:NMTOKEN"  use="optional"/>
-                
-                <!--
-                    Allows specifying how Castor should automatically determines
-                    the XML name of this field when no name has been specified.
-                -->
-                <xsd:attribute name="auto-naming" use="optional">
-                    <xsd:annotation>
-                        <xsd:documentation>
-                            Allows specifying how Castor should automatically determines
-                            the XML name of this field when no name has been specified.
-                            In most cases the XML name is determined by using the field name,
-                            but in some cases the user may want to use the Class name of
-                            the field type. This attribute allows choosing between the
-                            two approaches. If this attribute is not specified, the field
-                            name is used as the XML name.
-                        </xsd:documentation>
-                    </xsd:annotation>
-                    <xsd:simpleType>
-                        <xsd:restriction base="xsd:string">
-                            <xsd:enumeration value="deriveByClass"/>
-                            <xsd:enumeration value="deriveByField"/>
-                        </xsd:restriction>
-                    </xsd:simpleType>
-                </xsd:attribute>
-                
-                <!--
-                    Allows specifying a nested location path for this field,
-                    the value should just be a simplified XPath like value
-                    where names are separated by "/".
-                -->
-                <xsd:attribute name="location" type="xsd:string" use="optional">
-                    <xsd:annotation>
-                        <xsd:documentation>
-                            Allows specifying a nested location path for this field,
-                            the value should just be a simplified XPath like value
-                            where names are separated by "/".
-                        </xsd:documentation>
-                    </xsd:annotation>
-                </xsd:attribute>
-                
-                <!-- Allows overriding the matching rule -->
-                <xsd:attribute name="matches" type="xsd:string" use="optional"/>
-                
-                
-                <!-- Signal that this field should be marshalled as a reference -->
-                <xsd:attribute name="reference" type="xsd:boolean" use="optional"/>
-                
-                <!-- NodeType for the XML node -->
-                <xsd:attribute name="node" use="optional">
-                    <xsd:simpleType>
-                        <xsd:restriction base="xsd:string">
-                            <xsd:enumeration value="attribute"/>
-                            <xsd:enumeration value="element"/>
-                            <xsd:enumeration value="namespace"/>
-                            <xsd:enumeration value="text"/>
-                        </xsd:restriction>
-                    </xsd:simpleType>
-                </xsd:attribute>
-                
-                <xsd:attribute name="QName-prefix" type="xsd:NMTOKEN" use="optional"/>
-                
-                <!-- Signal that this field is transient for XML (ie should be ignored) -->
-                <xsd:attribute name="transient" type="xsd:boolean" use="optional"/>
-                
-            </xsd:complexType>
-        </xsd:element>
-        
-        
-        
-        <xsd:element name="ldap">
-            <xsd:complexType>
-                <xsd:attribute name="name" type="xsd:NMTOKEN" use="optional"/>
-            </xsd:complexType>
-        </xsd:element>
-        
-        <xsd:element name="key-generator">
-            <xsd:complexType>
-                <xsd:sequence>
-                    <xsd:element ref="param" minOccurs="0" maxOccurs="unbounded" />
-                </xsd:sequence>
-                <xsd:attribute name="name"  type="xsd:ID"     use="required"/>
-                <xsd:attribute name="alias" type="xsd:string" use="optional"/>
-            </xsd:complexType>
-        </xsd:element>
-        
-        <xsd:element name="cache-type">
-            <xsd:complexType>
-                <xsd:attribute name="type" type="xsd:string" use="optional" default="count-limited" />
-                <xsd:attribute name="capacity" type="xsd:integer" use="optional"/>
-            </xsd:complexType>
-        </xsd:element>
-        
-        <xsd:element name="param">
-            <xsd:complexType>
-                <xsd:attribute name="name"  type="xsd:string"  use="required"/>
-                <xsd:attribute name="value" type="xsd:string"  use="required"/>
-            </xsd:complexType>
-        </xsd:element>
-        
-        
-        <xsd:complexType name="propertyType">
-            <xsd:sequence>
-                <xsd:element name="name"  type="xsd:string"/>
-                <xsd:element name="value" type="xsd:string"/>
-            </xsd:sequence>
-        </xsd:complexType>
-        
-        
-    </xsd:schema>
diff --git a/schemas/embl.xsd b/schemas/embl.xsd
new file mode 100644 (file)
index 0000000..1baebfe
--- /dev/null
@@ -0,0 +1,309 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- 
+    Retrieved for Jalview 14-Sep-2018 from ftp://ftp.sra.ebi.ac.uk/meta/xsd/sra_1_5/ENA.embl.xsd 
+       Modified to match ftp://ftp.sra.ebi.ac.uk/meta/xsd/sra_1_5/ENA.root.xsd with only ENA.embl.xsd included 
+       root element "ROOT" contains a <choice> of "entry" (single accession) or "entrySet" (one or more accessions) 
+       Java binding classes are generated by 
+               xjc schemas/embl.xsd -b schemas/embl_bindings.xml -d src -p jalview.xml.binding.embl 
+-->
+<xs:schema xmlns:ebi="http://www.ebi.ac.uk/embl/schema"
+       xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       attributeFormDefault="unqualified" elementFormDefault="qualified"
+       version="1.1">
+       <xs:complexType name="XrefType">
+               <xs:annotation>
+                       <xs:documentation>Database cross-reference.</xs:documentation>
+               </xs:annotation>
+               <xs:attribute name="db" type="xs:string" use="required" />
+               <xs:attribute name="id" type="xs:string" use="required" />
+               <xs:attribute name="secondaryId" type="xs:string"
+                       use="optional" />
+       </xs:complexType>
+       <xs:complexType name="EntrySetType">
+               <xs:sequence minOccurs="1" maxOccurs="unbounded">
+                       <xs:element name="entry" type="EntryType" />
+               </xs:sequence>
+       </xs:complexType>
+       <xs:complexType name="EntryType">
+               <xs:sequence>
+                       <xs:element maxOccurs="unbounded" minOccurs="0"
+                               name="secondaryAccession" type="xs:string" />
+                       <xs:element maxOccurs="unbounded" minOccurs="0"
+                               name="projectAccession" type="xs:string" />
+                       <xs:element maxOccurs="1" minOccurs="1" name="description"
+                               type="xs:string" />
+                       <xs:element maxOccurs="1" minOccurs="0" name="comment"
+                               type="xs:string" />
+                       <xs:element maxOccurs="unbounded" minOccurs="0"
+                               name="keyword" type="xs:string" />
+                       <xs:element maxOccurs="unbounded" minOccurs="0"
+                               name="reference">
+                               <xs:annotation>
+                                       <xs:documentation>Not supported for EMBL-CDS.</xs:documentation>
+                               </xs:annotation>
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element maxOccurs="1" minOccurs="0" name="title"
+                                                       type="xs:string" />
+                                               <xs:element maxOccurs="unbounded" minOccurs="0"
+                                                       name="author" type="xs:string" />
+                                               <xs:element maxOccurs="unbounded" minOccurs="0"
+                                                       name="applicant" type="xs:string">
+                                                       <xs:annotation>
+                                                               <xs:documentation>Patent applicant.</xs:documentation>
+                                                       </xs:annotation>
+                                               </xs:element>
+                                               <xs:element maxOccurs="1" minOccurs="0"
+                                                       name="consortium" type="xs:string" />
+                                               <xs:element maxOccurs="1" minOccurs="0"
+                                                       name="submissionDate" type="xs:date">
+                                                       <xs:annotation>
+                                                               <xs:documentation>The submission date (used only for submission
+                                                                       references).</xs:documentation>
+                                                       </xs:annotation>
+                                               </xs:element>
+                                               <xs:element maxOccurs="1" minOccurs="0" name="journal"
+                                                       type="xs:string">
+                                                       <xs:annotation>
+                                                               <xs:documentation>The journal name (used only for article
+                                                                       references).</xs:documentation>
+                                                       </xs:annotation>
+                                               </xs:element>
+                                               <xs:element maxOccurs="1" minOccurs="0" name="year"
+                                                       type="xs:string">
+                                                       <xs:annotation>
+                                                               <xs:documentation>The publication year (used only for article
+                                                                       references).</xs:documentation>
+                                                       </xs:annotation>
+                                               </xs:element>
+                                               <xs:element maxOccurs="1" minOccurs="0" name="volume"
+                                                       type="xs:string">
+                                                       <xs:annotation>
+                                                               <xs:documentation>The volume number (used only for article
+                                                                       references).</xs:documentation>
+                                                       </xs:annotation>
+                                               </xs:element>
+                                               <xs:element maxOccurs="1" minOccurs="0" name="issue"
+                                                       type="xs:string">
+                                                       <xs:annotation>
+                                                               <xs:documentation>The issue number (used only for article
+                                                                       references).</xs:documentation>
+                                                       </xs:annotation>
+                                               </xs:element>
+                                               <xs:element maxOccurs="1" minOccurs="0"
+                                                       name="firstPage" type="xs:string">
+                                                       <xs:annotation>
+                                                               <xs:documentation>The first page (used only for article
+                                                                       references).</xs:documentation>
+                                                       </xs:annotation>
+                                               </xs:element>
+                                               <xs:element maxOccurs="1" minOccurs="0" name="lastPage"
+                                                       type="xs:string">
+                                                       <xs:annotation>
+                                                               <xs:documentation>The last page (used only for article
+                                                                       references).</xs:documentation>
+                                                       </xs:annotation>
+                                               </xs:element>
+                                               <xs:element maxOccurs="1" minOccurs="0" name="comment"
+                                                       type="xs:string" />
+                                               <xs:element maxOccurs="1" minOccurs="0"
+                                                       name="referenceLocation" type="xs:string" />
+                                               <xs:element maxOccurs="unbounded" minOccurs="0"
+                                                       name="xref" type="XrefType" />
+                                       </xs:sequence>
+                                       <xs:attribute name="type" use="required">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="submission" />
+                                                               <xs:enumeration value="book" />
+                                                               <xs:enumeration value="article" />
+                                                               <xs:enumeration value="patent" />
+                                                               <xs:enumeration value="thesis" />
+                                                               <xs:enumeration value="unpublished" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="number" type="xs:integer"
+                                               use="required" />
+                                       <xs:attribute name="location" type="xs:string" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element maxOccurs="unbounded" minOccurs="0"
+                               name="xref" type="XrefType" />
+                       <xs:element maxOccurs="unbounded" minOccurs="0"
+                               name="feature">
+                               <xs:annotation>
+                                       <xs:documentation>Sequence feature.</xs:documentation>
+                               </xs:annotation>
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element maxOccurs="1" minOccurs="0" name="taxon">
+                                                       <xs:complexType>
+                                                               <xs:sequence>
+                                                                       <xs:element maxOccurs="1" minOccurs="0"
+                                                                               name="lineage">
+                                                                               <xs:complexType>
+                                                                                       <xs:sequence>
+                                                                                               <xs:element maxOccurs="unbounded" minOccurs="1"
+                                                                                                       name="taxon">
+                                                                                                       <xs:complexType>
+                                                                                                               <xs:attribute name="scientificName"
+                                                                                                                       type="xs:string" use="required" />
+                                                                                                       </xs:complexType>
+                                                                                               </xs:element>
+                                                                                       </xs:sequence>
+                                                                               </xs:complexType>
+                                                                       </xs:element>
+                                                               </xs:sequence>
+                                                               <xs:attribute name="scientificName"
+                                                                       type="xs:string" use="required" />
+                                                               <xs:attribute name="commonName" type="xs:string"
+                                                                       use="optional" />
+                                                               <xs:attribute name="taxId" type="xs:integer"
+                                                                       use="optional" />
+                                                       </xs:complexType>
+                                               </xs:element>
+                                               <xs:element maxOccurs="unbounded" minOccurs="0"
+                                                       name="xref" type="XrefType" />
+                                               <xs:element maxOccurs="unbounded" minOccurs="0"
+                                                       name="qualifier">
+                                                       <xs:annotation>
+                                                               <xs:documentation>Sequence feature qualifier.</xs:documentation>
+                                                       </xs:annotation>
+                                                       <xs:complexType>
+                                                               <xs:sequence>
+                                                                       <xs:element maxOccurs="1" minOccurs="0" name="value"
+                                                                               type="xs:string" />
+                                                               </xs:sequence>
+                                                               <xs:attribute name="name" type="xs:string"
+                                                                       use="required" />
+                                                       </xs:complexType>
+                                               </xs:element>
+                                       </xs:sequence>
+                                       <xs:attribute name="name" type="xs:string"
+                                               use="required" />
+                                       <xs:attribute name="location" type="xs:string"
+                                               use="required" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element maxOccurs="1" minOccurs="0" name="assembly">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element maxOccurs="unbounded" minOccurs="1"
+                                                       name="range">
+                                                       <xs:complexType>
+                                                               <xs:attribute name="begin" type="xs:integer"
+                                                                       use="required" />
+                                                               <xs:attribute name="end" type="xs:integer"
+                                                                       use="required" />
+                                                               <xs:attribute name="primaryBegin" type="xs:integer"
+                                                                       use="optional" />
+                                                               <xs:attribute name="primaryEnd" type="xs:integer"
+                                                                       use="optional" />
+                                                               <xs:attribute name="accession" type="xs:string"
+                                                                       use="required" />
+                                                               <xs:attribute name="version" type="xs:integer"
+                                                                       use="required" />
+                                                               <xs:attribute default="false" name="complement"
+                                                                       type="xs:boolean" use="optional" />
+                                                       </xs:complexType>
+                                               </xs:element>
+                                       </xs:sequence>
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element maxOccurs="1" minOccurs="0" name="contig">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:choice maxOccurs="unbounded" minOccurs="0">
+                                                       <xs:element maxOccurs="1" minOccurs="1" name="range">
+                                                               <xs:complexType>
+                                                                       <xs:attribute name="begin" type="xs:integer"
+                                                                               use="required" />
+                                                                       <xs:attribute name="end" type="xs:integer"
+                                                                               use="required" />
+                                                                       <xs:attribute name="primaryBegin"
+                                                                               type="xs:integer" use="optional" />
+                                                                       <xs:attribute name="primaryEnd" type="xs:integer"
+                                                                               use="optional" />
+                                                                       <xs:attribute name="accession" type="xs:string"
+                                                                               use="required" />
+                                                                       <xs:attribute name="version" type="xs:integer"
+                                                                               use="required" />
+                                                                       <xs:attribute default="false" name="complement"
+                                                                               type="xs:boolean" use="optional" />
+                                                               </xs:complexType>
+                                                       </xs:element>
+                                                       <xs:element maxOccurs="1" minOccurs="1" name="gap">
+                                                               <xs:complexType>
+                                                                       <xs:attribute name="begin" type="xs:integer"
+                                                                               use="required" />
+                                                                       <xs:attribute name="end" type="xs:integer"
+                                                                               use="required" />
+                                                                       <xs:attribute name="length" type="xs:integer"
+                                                                               use="required" />
+                                                                       <xs:attribute default="false" name="unknownLength"
+                                                                               type="xs:boolean" use="optional" />
+                                                               </xs:complexType>
+                                                       </xs:element>
+                                               </xs:choice>
+                                       </xs:sequence>
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element maxOccurs="1" minOccurs="0" name="sequence"
+                               type="xs:string" />
+               </xs:sequence>
+               <xs:attribute name="accession" type="xs:string"
+                       use="required" />
+               <xs:attribute name="version" type="xs:integer"
+                       use="required" />
+               <xs:attribute name="entryVersion" type="xs:integer">
+                       <xs:annotation>
+                               <xs:documentation>Not supported for EMBL-CDS.</xs:documentation>
+                       </xs:annotation>
+               </xs:attribute>
+               <xs:attribute name="dataClass" type="xs:string"
+                       use="required" />
+               <xs:attribute name="taxonomicDivision" type="xs:string"
+                       use="required" />
+               <xs:attribute name="moleculeType" type="xs:string"
+                       use="required" />
+               <xs:attribute name="sequenceLength" type="xs:integer"
+                       use="required" />
+               <xs:attribute name="topology" use="required">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="circular" />
+                                       <xs:enumeration value="linear" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="firstPublic" type="xs:date">
+                       <xs:annotation>
+                               <xs:documentation>Not supported for EMBL-CDS.</xs:documentation>
+                       </xs:annotation>
+               </xs:attribute>
+               <xs:attribute name="firstPublicRelease" type="xs:integer">
+                       <xs:annotation>
+                               <xs:documentation>Not supported for EMBL-CDS.</xs:documentation>
+                       </xs:annotation>
+               </xs:attribute>
+               <xs:attribute name="lastUpdated" type="xs:date">
+                       <xs:annotation>
+                               <xs:documentation>Not supported for EMBL-CDS.</xs:documentation>
+                       </xs:annotation>
+               </xs:attribute>
+               <xs:attribute name="lastUpdatedRelease" type="xs:integer">
+                       <xs:annotation>
+                               <xs:documentation>Not supported for EMBL-CDS.</xs:documentation>
+                       </xs:annotation>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:element name="ROOT">
+               <xs:complexType>
+                       <xs:choice>
+                               <xs:element name="entrySet" type="EntrySetType" />
+                               <xs:element name="entry" type="EntryType" />
+                       </xs:choice>
+               </xs:complexType>
+       </xs:element>
+</xs:schema>
diff --git a/schemas/embl_bindings.xml b/schemas/embl_bindings.xml
new file mode 100644 (file)
index 0000000..0f6f669
--- /dev/null
@@ -0,0 +1,15 @@
+<!--  
+       Binding file stops the nested 'taxon' elements generating invalid Java (nested type hiding enclosing type).
+       The binding converts EntryType/feature/taxon to EntryType$Feature$FeatureTaxon.
+       EntryType/feature/taxon/lineage/taxon generates EntryType$Feature$FeatureTaxon$Lineage$Taxon.  
+-->
+<jaxb:bindings
+       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+       xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" version="2.1">
+       <jaxb:bindings schemaLocation="embl.xsd">
+               <jaxb:bindings
+                       node="/xsd:schema/xsd:complexType[@name='EntryType']/xsd:sequence/xsd:element[@name='feature']/xsd:complexType/xsd:sequence/xsd:element[@name='taxon']/xsd:complexType">
+                       <jaxb:class name="FeatureTaxon" />
+               </jaxb:bindings>
+       </jaxb:bindings>
+</jaxb:bindings>
\ No newline at end of file
index 48824e7..07dee98 100755 (executable)
        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. -->
+<!-- 
+       Java JAXB binding classes are generated by running command line tool xjc:
+           xjc schemas/jalview.xsd -d src -p jalview.xml.binding.jalview
+       Note this also generates code for included schemas
+-->
 <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"
@@ -21,6 +26,7 @@
                schemaLocation="JalviewUserColours.xsd" />
        <xs:import namespace="www.jalview.org/xml/wsparamset"
                schemaLocation="JalviewWsParamSet.xsd" />
+       <xs:element name="JalviewModel" type="jv:JalviewModel" />
        <xs:complexType name="JalviewModel">
                <xs:sequence>
                        <xs:element name="creationDate" type="xs:dateTime" />
                                                        </xs:annotation>
                                                </xs:attribute>
                                                <xs:attributeGroup ref="jv:swingwindow" />
+                                               <xs:attribute name="linkToAllViews" use="optional" default="false" type="xs:boolean" />
+                                       </xs:complexType>
+                               </xs:element>
+                               <xs:element name="PcaViewer" minOccurs="0" maxOccurs="unbounded">
+                                       <xs:complexType>
+                                               <xs:sequence>
+                                                       <xs:element name="sequencePoint" minOccurs="1" maxOccurs="unbounded">
+                                                               <xs:complexType>
+                                                                       <xs:attribute name="sequenceRef" type="xs:string" />
+                                                                       <xs:attributeGroup ref="jv:position" />
+                                                               </xs:complexType>
+                                                       </xs:element>
+                                                       <xs:element name="axis" minOccurs="3" maxOccurs="3">
+                                                               <xs:annotation>
+                                                                       <xs:documentation>
+                                                                               endpoints of X, Y and Z axes in that order
+                                                                       </xs:documentation>
+                                                               </xs:annotation>
+                                                               <xs:complexType>
+                                                                       <xs:attributeGroup ref="jv:position" />
+                                                               </xs:complexType>
+                                                       </xs:element>
+                                                       <xs:element name="seqPointMin">
+                                                               <xs:complexType>
+                                                                       <xs:attributeGroup ref="jv:position" />
+                                                               </xs:complexType>
+                                                       </xs:element>
+                                                       <xs:element name="seqPointMax">
+                                                               <xs:complexType>
+                                                                       <xs:attributeGroup ref="jv:position" />
+                                                               </xs:complexType>
+                                                       </xs:element>
+                                                       <xs:element name="pcaData" type="jv:PcaDataType" />
+                                               </xs:sequence>
+                                               <xs:attribute name="title" type="xs:string" />
+                                               <xs:attribute name="scoreModelName" type="xs:string" />
+                                               <xs:attribute name="xDim" type="xs:int" />
+                                               <xs:attribute name="yDim" type="xs:int" />
+                                               <xs:attribute name="zDim" type="xs:int" />
+                                               <xs:attribute name="bgColour" type="xs:int" />
+                                               <xs:attribute name="scaleFactor" type="xs:float" />
+                                               <xs:attribute name="showLabels" type="xs:boolean" />
+                                               <xs:attribute name="linkToAllViews" type="xs:boolean" />
+                                               <xs:attributeGroup ref="jv:SimilarityParams" />
+                                               <xs:attributeGroup ref="jv:swingwindow" />
                                        </xs:complexType>
                                </xs:element>
                                <xs:element name="FeatureSettings" minOccurs="0">
                <xs:attribute name="predefinedColours" type="xs:boolean"
                        use="optional" />
        </xs:complexType>
-
+       <xs:attributeGroup name="SimilarityParams">
+               <xs:annotation>
+                       <xs:documentation>
+                               parameters that condition a similarity score calculation
+                       </xs:documentation>
+               </xs:annotation>
+               <xs:attribute name="includeGaps" type="xs:boolean" />
+               <xs:attribute name="matchGaps" type="xs:boolean" />
+               <xs:attribute name="includeGappedColumns" type="xs:boolean" />
+               <xs:attribute name="denominateByShortestLength" type="xs:boolean" />
+       </xs:attributeGroup>
+       <xs:attributeGroup name="position">
+               <xs:attribute name="xPos" type="xs:float" />
+               <xs:attribute name="yPos" type="xs:float" />
+               <xs:attribute name="zPos" type="xs:float" />
+       </xs:attributeGroup>
+       <xs:complexType name="PcaDataType">
+               <xs:annotation>
+                       <xs:documentation>
+                               The results of a PCA calculation
+                       </xs:documentation>
+               </xs:annotation>
+               <xs:sequence>
+                       <xs:element name="pairwiseMatrix" type="jv:DoubleMatrix" />
+                       <xs:element name="tridiagonalMatrix" type="jv:DoubleMatrix" />
+                       <xs:element name="eigenMatrix" type="jv:DoubleMatrix" />
+               </xs:sequence>
+       </xs:complexType>
+       <xs:complexType name="DoubleVector">
+               <xs:sequence>
+                       <xs:element name="v" type="xs:double" minOccurs="0" maxOccurs="unbounded" />
+               </xs:sequence>
+       </xs:complexType>
+       <xs:complexType name="DoubleMatrix">
+               <xs:sequence>
+                       <xs:element name="row" type="jv:DoubleVector" minOccurs="0" maxOccurs="unbounded" />
+                       <xs:element name="D" minOccurs="0" type="jv:DoubleVector" />
+                       <xs:element name="E" minOccurs="0" type="jv:DoubleVector" />
+               </xs:sequence>
+               <xs:attribute name="rows"  type="xs:int" />
+               <xs:attribute name="columns" type="xs:int" />
+       </xs:complexType>
 </xs:schema>
diff --git a/schemas/uniprot.xsd b/schemas/uniprot.xsd
new file mode 100644 (file)
index 0000000..1744d37
--- /dev/null
@@ -0,0 +1,1077 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- *****************************************************************************
+       UniProt Knowledgebase
+       Version:        $Revision: 1.3 $
+       Date:           $Date: 2015/04/07 15:00:57 $
+
+       Copyright (c) 2011 UniProt consortium
+       All rights reserved.
+*******************************************************************************-->
+<xs:schema targetNamespace="http://uniprot.org/uniprot" xmlns:xs="http://www.w3.org/2001/XMLSchema"
+           xmlns="http://uniprot.org/uniprot" elementFormDefault="qualified">
+<!--  
+       Retrieved for Jalview 13-Sep-2018 from https://www.uniprot.org/docs/uniprot.xsd 
+       Java binding classes are generated by 
+          xjc schemas/uniprot.xsd -d src -p jalview.xml.binding.uniprot 
+-->
+    <!-- XML Schema definition for the UniProtKB XML format
+         Tested with:
+         -XSV (XML Schema Validator), http://www.w3.org/2001/03/webdata/xsv
+         -->
+    <!-- Root element definition begins -->
+    <xs:element name="uniprot">
+        <xs:annotation>
+            <xs:documentation>Describes a collection of UniProtKB entries.</xs:documentation>
+        </xs:annotation>
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element ref="entry" maxOccurs="unbounded"/>
+                <xs:element ref="copyright" minOccurs="0"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <!-- Root element definition ends -->
+
+    <!-- Entry definition begins -->
+    <xs:element name="entry">
+        <xs:annotation>
+            <xs:documentation>Describes a UniProtKB entry.</xs:documentation>
+        </xs:annotation>
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element name="accession" type="xs:string" maxOccurs="unbounded"/>
+                <xs:element name="name" type="xs:string" maxOccurs="unbounded"/>
+                <xs:element name="protein" type="proteinType"/>
+                <xs:element name="gene" type="geneType" minOccurs="0" maxOccurs="unbounded"/>
+                <xs:element name="organism" type="organismType" />
+                <xs:element name="organismHost" type="organismType" minOccurs="0" maxOccurs="unbounded"/>
+                <xs:element name="geneLocation" type="geneLocationType" minOccurs="0" maxOccurs="unbounded"/>
+                <xs:element name="reference" type="referenceType" maxOccurs="unbounded"/>
+                <xs:element name="comment" type="commentType" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+                <xs:element name="dbReference" type="dbReferenceType" minOccurs="0" maxOccurs="unbounded"/>
+                <xs:element name="proteinExistence" type="proteinExistenceType"/>
+                <xs:element name="keyword" type="keywordType" minOccurs="0" maxOccurs="unbounded"/>
+                <xs:element name="feature" type="featureType" minOccurs="0" maxOccurs="unbounded"/>
+                <xs:element name="evidence" type="evidenceType" minOccurs="0" maxOccurs="unbounded"/>
+                <xs:element name="sequence" type="sequenceType"/>
+            </xs:sequence>
+            <xs:attribute name="dataset" use="required">
+                <xs:simpleType>
+                    <xs:restriction base="xs:string">
+                        <xs:enumeration value="Swiss-Prot"/>
+                        <xs:enumeration value="TrEMBL"/>
+                    </xs:restriction>
+                </xs:simpleType>
+            </xs:attribute>
+            <xs:attribute name="created" type="xs:date" use="required"/>
+            <xs:attribute name="modified" type="xs:date" use="required"/>
+            <xs:attribute name="version" type="xs:int" use="required"/>
+        </xs:complexType>
+    </xs:element>
+    <!-- Entry definition ends -->
+
+    <xs:element name="copyright" type="xs:string"/>
+
+    <!-- Protein names definition begins -->
+    <xs:complexType name="proteinType">
+        <xs:annotation>
+            <xs:documentation>Describes the names for the protein and parts thereof.
+            Equivalent to the flat file DE-line.</xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:group ref="proteinNameGroup"/>
+            <xs:element name="domain" minOccurs="0" maxOccurs="unbounded">
+                <xs:annotation>
+                    <xs:documentation>Describes names of "domains".
+                    Equivalent to the flat file DE-line Includes: section.</xs:documentation>
+                </xs:annotation>
+                <xs:complexType>
+                    <xs:group ref="proteinNameGroup"/>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="component" minOccurs="0" maxOccurs="unbounded">
+                <xs:annotation>
+                    <xs:documentation>Describes names of processed products.
+                    Equivalent to the flat file DE-line Contains: section.</xs:documentation>
+                </xs:annotation>
+                <xs:complexType>
+                    <xs:group ref="proteinNameGroup"/>
+                </xs:complexType>
+            </xs:element>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:group name="proteinNameGroup">
+        <xs:sequence>
+            <xs:element name="recommendedName" minOccurs="0">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="fullName" type="evidencedStringType"/>
+                        <xs:element name="shortName" type="evidencedStringType" minOccurs="0" maxOccurs="unbounded"/>
+                        <xs:element name="ecNumber" type="evidencedStringType" minOccurs="0" maxOccurs="unbounded"/>
+                    </xs:sequence>
+                    <!-- xs:attribute name="ref" type="xs:string" use="optional"/ -->
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="alternativeName" minOccurs="0" maxOccurs="unbounded">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="fullName" type="evidencedStringType" minOccurs="0"/>
+                        <xs:element name="shortName" type="evidencedStringType" minOccurs="0" maxOccurs="unbounded"/>
+                        <xs:element name="ecNumber" type="evidencedStringType" minOccurs="0" maxOccurs="unbounded"/>
+                    </xs:sequence>
+                    <!-- xs:attribute name="ref" type="xs:string" use="optional"/ -->
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="submittedName" minOccurs="0" maxOccurs="unbounded">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="fullName" type="evidencedStringType"/>
+                        <xs:element name="ecNumber" type="evidencedStringType" minOccurs="0" maxOccurs="unbounded"/>
+                    </xs:sequence>
+                    <!-- xs:attribute name="ref" type="xs:string" use="optional"/ -->
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="allergenName" type="evidencedStringType" minOccurs="0"/>
+            <xs:element name="biotechName" type="evidencedStringType" minOccurs="0"/>
+            <xs:element name="cdAntigenName" type="evidencedStringType" minOccurs="0" maxOccurs="unbounded"/>
+            <xs:element name="innName" type="evidencedStringType" minOccurs="0" maxOccurs="unbounded"/>
+        </xs:sequence>
+    </xs:group>
+    <!-- Protein names definition ends -->
+
+    <!-- Gene names definition begins -->
+    <xs:complexType name="geneType">
+        <xs:annotation>
+            <xs:documentation>Describes a gene.
+            Equivalent to the flat file GN-line.</xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element name="name" type="geneNameType" maxOccurs="unbounded"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="geneNameType">
+        <xs:annotation>
+            <xs:documentation>Describes different types of gene designations.
+            Equivalent to the flat file GN-line.</xs:documentation>
+        </xs:annotation>
+        <xs:simpleContent>
+            <xs:extension base="xs:string">
+                <xs:attribute name="evidence" type="intListType" use="optional"/>
+                <xs:attribute name="type" use="required">
+                    <xs:simpleType>
+                        <xs:restriction base="xs:string">
+                            <xs:enumeration value="primary"/>
+                            <xs:enumeration value="synonym"/>
+                            <xs:enumeration value="ordered locus"/>
+                            <xs:enumeration value="ORF"/>
+                        </xs:restriction>
+                    </xs:simpleType>
+                </xs:attribute>
+            </xs:extension>
+        </xs:simpleContent>
+    </xs:complexType>
+    <!-- Gene names definition ends -->
+
+    <!-- Organism definition begins -->
+    <xs:complexType name="organismType">
+        <xs:annotation>
+            <xs:documentation>Describes the source organism.</xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element name="name" type="organismNameType" maxOccurs="unbounded">
+                <xs:annotation>
+                    <xs:documentation>Describes the names of the source organism.
+                    Equivalent to the flat file OS-line.</xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="dbReference" type="dbReferenceType" maxOccurs="unbounded">
+                <xs:annotation>
+                    <xs:documentation>Describes a cross-reference to the NCBI taxonomy database.
+                    Equivalent to the flat file OX-line.</xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="lineage" minOccurs="0">
+                <xs:annotation>
+                    <xs:documentation>Describes the lineage of the source organism.
+                    Equivalent to the flat file OC-line.</xs:documentation>
+                </xs:annotation>
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="taxon" type="xs:string" maxOccurs="unbounded"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+        </xs:sequence>
+        <xs:attribute name="evidence" type="intListType" use="optional"/>
+    </xs:complexType>
+    <xs:complexType name="organismNameType">
+        <xs:annotation>
+            <xs:documentation>Describes different types of source organism names.</xs:documentation>
+        </xs:annotation>
+        <xs:simpleContent>
+            <xs:extension base="xs:string">
+                <xs:attribute name="type" use="required">
+                    <xs:simpleType>
+                        <xs:restriction base="xs:string">
+                            <xs:enumeration value="common"/>
+                            <xs:enumeration value="full"/>
+                            <xs:enumeration value="scientific"/>
+                            <xs:enumeration value="synonym"/>
+                            <xs:enumeration value="abbreviation"/>
+                        </xs:restriction>
+                    </xs:simpleType>
+                </xs:attribute>
+            </xs:extension>
+        </xs:simpleContent>
+    </xs:complexType>
+    <!-- Organism definition ends -->
+
+    <!-- Gene location definition begins -->
+    <xs:complexType name="geneLocationType">
+        <xs:annotation>
+            <xs:documentation>Describes non-nuclear gene locations (organelles and plasmids).
+            Equivalent to the flat file OG-line.</xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element name="name" type="statusType" minOccurs="0" maxOccurs="unbounded"/>
+        </xs:sequence>
+        <xs:attribute name="type" use="required">
+            <xs:simpleType>
+                <xs:restriction base="xs:string">
+                    <xs:enumeration value="apicoplast"/>
+                    <xs:enumeration value="chloroplast"/>
+                    <xs:enumeration value="organellar chromatophore"/>
+                    <xs:enumeration value="cyanelle"/>
+                    <xs:enumeration value="hydrogenosome"/>
+                    <xs:enumeration value="mitochondrion"/>
+                    <xs:enumeration value="non-photosynthetic plastid"/>
+                    <xs:enumeration value="nucleomorph"/>
+                    <xs:enumeration value="plasmid"/>
+                    <xs:enumeration value="plastid"/>
+                </xs:restriction>
+            </xs:simpleType>
+        </xs:attribute>
+        <xs:attribute name="evidence" type="intListType" use="optional"/>
+    </xs:complexType>
+    <xs:complexType name="statusType">
+        <xs:annotation>
+            <xs:documentation>Indicates whether the name of a plasmid is known or unknown.</xs:documentation>
+        </xs:annotation>
+        <xs:simpleContent>
+            <xs:extension base="xs:string">
+                <xs:attribute name="status" use="optional" default="known">
+                    <xs:simpleType>
+                        <xs:restriction base="xs:string">
+                            <xs:enumeration value="known"/>
+                            <xs:enumeration value="unknown"/>
+                        </xs:restriction>
+                    </xs:simpleType>
+                </xs:attribute>
+            </xs:extension>
+        </xs:simpleContent>
+    </xs:complexType>
+    <!-- Gene location definition ends -->
+
+    <!-- Reference definition begins -->
+    <xs:complexType name="referenceType">
+        <xs:annotation>
+            <xs:documentation>Describes a citation and a summary of its content.
+            Equivalent to the flat file RN-, RP-, RC-, RX-, RG-, RA-, RT- and RL-lines.</xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element name="citation" type="citationType"/>
+            <xs:group ref="sptrCitationGroup"/>
+        </xs:sequence>
+        <xs:attribute name="evidence" type="intListType" use="optional"/>
+        <xs:attribute name="key" type="xs:string" use="required"/>
+    </xs:complexType>
+    <!-- Reference definition ends -->
+
+    <!-- Citation definition begins -->
+    <xs:complexType name="citationType">
+        <xs:annotation>
+            <xs:documentation>Describes different types of citations.
+            Equivalent to the flat file RX-, RG-, RA-, RT- and RL-lines.</xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element name="title" type="xs:string" minOccurs="0">
+                <xs:annotation>
+                    <xs:documentation>Describes the title of a citation.
+                    Equivalent to the flat file RT-line.</xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="editorList" type="nameListType" minOccurs="0">
+                <xs:annotation>
+                    <xs:documentation>Describes the editors of a book (only used for books).
+                    Equivalent to part of the flat file RL-line of books.</xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="authorList" type="nameListType" minOccurs="0">
+                <xs:annotation>
+                    <xs:documentation>Describes the authors of a citation.
+                    Equivalent to the flat file RA-line.</xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="locator" type="xs:string" minOccurs="0">
+                <xs:annotation>
+                    <xs:documentation>Describes the location (URL) of an online journal article.
+                    No flat file equivalent.</xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="dbReference" type="dbReferenceType" minOccurs="0" maxOccurs="unbounded">
+                <xs:annotation>
+                    <xs:documentation>Describes cross-references to bibliography databases (MEDLINE, PubMed, AGRICOLA) or other online resources (DOI).
+                    Equivalent to the flat file RX-line.</xs:documentation>
+                </xs:annotation>
+            </xs:element>
+        </xs:sequence>
+        <xs:attribute name="type" use="required">
+            <xs:annotation>
+                <xs:documentation>Describes the type of a citation.</xs:documentation>
+            </xs:annotation>
+            <xs:simpleType>
+                <xs:restriction base="xs:string">
+                    <xs:enumeration value="book"/>
+                    <xs:enumeration value="journal article"/>
+                    <xs:enumeration value="online journal article"/>
+                    <xs:enumeration value="patent"/>
+                    <xs:enumeration value="submission"/>
+                    <xs:enumeration value="thesis"/>
+                    <xs:enumeration value="unpublished observations"/>
+                </xs:restriction>
+            </xs:simpleType>
+        </xs:attribute>
+        <xs:attribute name="date" use="optional">
+            <xs:simpleType>
+                <xs:union memberTypes="xs:date xs:gYearMonth xs:gYear"/>
+            </xs:simpleType>
+        </xs:attribute>
+        <xs:attribute name="name" type="xs:string" use="optional">
+            <xs:annotation>
+                <xs:documentation>Describes the name of an (online) journal or book.</xs:documentation>
+            </xs:annotation>
+        </xs:attribute>
+        <xs:attribute name="volume" type="xs:string" use="optional">
+            <xs:annotation>
+                <xs:documentation>Describes the volume of a journal or book.</xs:documentation>
+            </xs:annotation>
+        </xs:attribute>
+        <xs:attribute name="first" type="xs:string" use="optional">
+            <xs:annotation>
+                <xs:documentation>Describes the first page of an article.</xs:documentation>
+            </xs:annotation>
+        </xs:attribute>
+        <xs:attribute name="last" type="xs:string" use="optional">
+            <xs:annotation>
+                <xs:documentation>Describes the last page of an article.</xs:documentation>
+            </xs:annotation>
+        </xs:attribute>
+        <xs:attribute name="publisher" type="xs:string" use="optional">
+            <xs:annotation>
+                <xs:documentation>Describes the publisher of a book.</xs:documentation>
+            </xs:annotation>
+        </xs:attribute>
+        <xs:attribute name="city" type="xs:string" use="optional">
+            <xs:annotation>
+                <xs:documentation>Describes the city where a book was published.</xs:documentation>
+            </xs:annotation>
+        </xs:attribute>
+        <xs:attribute name="db" type="xs:string" use="optional">
+            <xs:annotation>
+                <xs:documentation>Describes the database name of submissions.</xs:documentation>
+            </xs:annotation>
+        </xs:attribute>
+        <xs:attribute name="number" type="xs:string" use="optional">
+            <xs:annotation>
+                <xs:documentation>Describes a patent number.</xs:documentation>
+            </xs:annotation>
+        </xs:attribute>
+        <xs:attribute name="institute" type="xs:string" use="optional">
+            <xs:annotation>
+                <xs:documentation>Describes the institute where a thesis was made.</xs:documentation>
+            </xs:annotation>
+        </xs:attribute>
+        <xs:attribute name="country" type="xs:string" use="optional">
+            <xs:annotation>
+                <xs:documentation>Describes the country where a thesis was made.</xs:documentation>
+            </xs:annotation>
+        </xs:attribute>
+    </xs:complexType>
+    <xs:complexType name="consortiumType">
+        <xs:annotation>
+            <xs:documentation>Describes the authors of a citation when these are represented by a consortium.
+            Equivalent to the flat file RG-line.</xs:documentation>
+        </xs:annotation>
+        <xs:attribute name="name" type="xs:string" use="required"/>
+    </xs:complexType>
+    <xs:complexType name="personType">
+        <xs:attribute name="name" type="xs:string" use="required"/>
+    </xs:complexType>
+    <xs:complexType name="nameListType">
+        <xs:choice maxOccurs="unbounded">
+            <xs:element name="consortium" type="consortiumType"/>
+            <xs:element name="person" type="personType"/>
+        </xs:choice>
+    </xs:complexType>
+    <!-- Citation definition ends -->
+
+    <!-- Citation summary definition begins -->
+    <xs:group name="sptrCitationGroup">
+        <xs:annotation>
+            <xs:documentation>Groups a citation's scope and source descriptions.</xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element name="scope" type="xs:string" maxOccurs="unbounded">
+                <xs:annotation>
+                    <xs:documentation>Describes the scope of a citation.
+                    Equivalent to the flat file RP-line.</xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="source" type="sourceDataType" minOccurs="0"/>
+        </xs:sequence>
+    </xs:group>
+    <xs:complexType name="sourceDataType">
+        <xs:annotation>
+            <xs:documentation>Describes the source of the sequence according to the citation.
+            Equivalent to the flat file RC-line.</xs:documentation>
+        </xs:annotation>
+        <xs:choice maxOccurs="unbounded">
+            <xs:element name="strain">
+                <xs:complexType>
+                    <xs:simpleContent>
+                        <xs:extension base="xs:string">
+                            <xs:attribute name="evidence" type="intListType" use="optional"/>
+                        </xs:extension>
+                    </xs:simpleContent>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="plasmid">
+                <xs:complexType>
+                    <xs:simpleContent>
+                        <xs:extension base="xs:string">
+                            <xs:attribute name="evidence" type="intListType" use="optional"/>
+                        </xs:extension>
+                    </xs:simpleContent>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="transposon">
+                <xs:complexType>
+                    <xs:simpleContent>
+                        <xs:extension base="xs:string">
+                            <xs:attribute name="evidence" type="intListType" use="optional"/>
+                        </xs:extension>
+                    </xs:simpleContent>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="tissue">
+                <xs:complexType>
+                    <xs:simpleContent>
+                        <xs:extension base="xs:string">
+                            <xs:attribute name="evidence" type="intListType" use="optional"/>
+                        </xs:extension>
+                    </xs:simpleContent>
+                </xs:complexType>
+            </xs:element>
+        </xs:choice>
+    </xs:complexType>
+    <!-- Citation summary definition ends -->
+
+    <!-- Comment definition begins -->
+    <xs:complexType name="commentType">
+        <xs:annotation>
+            <xs:documentation>Describes different types of general annotations.
+            Equivalent to the flat file CC-line.</xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element name="molecule" type="moleculeType" minOccurs="0"/>
+            <xs:choice minOccurs="0">
+                <xs:group ref="bpcCommentGroup"/>
+
+                <xs:sequence>
+                    <xs:annotation>
+                        <xs:documentation>Used in 'cofactor' annotations.</xs:documentation>
+                    </xs:annotation>
+                    <xs:element name="cofactor" type="cofactorType" maxOccurs="unbounded"/>
+                </xs:sequence>
+
+                <xs:sequence>
+                    <xs:annotation>
+                        <xs:documentation>Used in 'subcellular location' annotations.</xs:documentation>
+                    </xs:annotation>
+                    <xs:element name="subcellularLocation" type="subcellularLocationType" maxOccurs="unbounded"/>
+                </xs:sequence>
+
+                <xs:element name="conflict">
+                    <xs:annotation>
+                        <xs:documentation>Used in 'sequence caution' annotations.</xs:documentation>
+                    </xs:annotation>
+                    <xs:complexType>
+                        <xs:sequence>
+                            <xs:element name="sequence" minOccurs="0">
+                                <xs:complexType>
+                                    <xs:attribute name="resource" use="required">
+                                        <xs:simpleType>
+                                            <xs:restriction base="xs:string">
+                                                <xs:enumeration value="EMBL-CDS"/>
+                                                <xs:enumeration value="EMBL"/>
+                                            </xs:restriction>
+                                        </xs:simpleType>
+                                    </xs:attribute>
+                                    <xs:attribute name="id" type="xs:string" use="required"/>
+                                    <xs:attribute name="version" type="xs:int" use="optional"/>
+                                </xs:complexType>
+                            </xs:element>
+                        </xs:sequence>
+                        <xs:attribute name="type" use="required">
+                            <xs:simpleType>
+                                <xs:restriction base="xs:string">
+                                    <xs:enumeration value="frameshift"/>
+                                    <xs:enumeration value="erroneous initiation"/>
+                                    <xs:enumeration value="erroneous termination"/>
+                                    <xs:enumeration value="erroneous gene model prediction"/>
+                                    <xs:enumeration value="erroneous translation"/>
+                                    <xs:enumeration value="miscellaneous discrepancy"/>
+                                </xs:restriction>
+                            </xs:simpleType>
+                        </xs:attribute>
+                        <xs:attribute name="ref" type="xs:string" use="optional">
+                            <xs:annotation>
+                                <xs:documentation>Refers to the 'key' attribute of a 'reference' element.</xs:documentation>
+                            </xs:annotation>
+                        </xs:attribute>
+                    </xs:complexType>
+                </xs:element>
+
+                <xs:sequence>
+                    <xs:element name="link" minOccurs="0" maxOccurs="unbounded">
+                        <xs:annotation>
+                            <xs:documentation>Used in 'online information' annotations.</xs:documentation>
+                        </xs:annotation>
+                        <xs:complexType>
+                            <xs:attribute name="uri" type="xs:anyURI" use="required"/>
+                        </xs:complexType>
+                    </xs:element>
+                </xs:sequence>
+
+                <xs:sequence>
+                    <xs:annotation>
+                        <xs:documentation>Used in 'alternative products' annotations.</xs:documentation>
+                    </xs:annotation>
+                    <xs:element name="event" type="eventType" maxOccurs="4"/>
+                    <xs:element name="isoform" type="isoformType" minOccurs="0" maxOccurs="unbounded"/>
+                </xs:sequence>
+
+                <xs:sequence>
+                    <xs:annotation>
+                        <xs:documentation>Used in 'interaction' annotations.</xs:documentation>
+                    </xs:annotation>
+                    <xs:element name="interactant" type="interactantType" minOccurs="2" maxOccurs="2"/>
+                    <xs:element name="organismsDiffer" type="xs:boolean" default="false"/>
+                    <xs:element name="experiments" type="xs:int"/>
+                </xs:sequence>
+                
+                <xs:element name="disease">
+                    <xs:annotation>
+                        <xs:documentation>Used in 'disease' annotations.</xs:documentation>
+                    </xs:annotation>
+                    <xs:complexType>
+                        <xs:sequence>
+                            <xs:element name="name" type="xs:string"/>
+                            <xs:element name="acronym" type="xs:string"/>
+                            <xs:element name="description" type="xs:string"/>
+                            <xs:element name="dbReference" type="dbReferenceType"/>
+                        </xs:sequence>
+                        <xs:attribute name="id" type="xs:string" use="required"/>
+                    </xs:complexType>
+                </xs:element>
+
+            </xs:choice>
+
+            <xs:element name="location" type="locationType" minOccurs="0" maxOccurs="unbounded">
+                <xs:annotation>
+                    <xs:documentation>Used in 'mass spectrometry' and 'sequence caution' annotations.</xs:documentation>
+                </xs:annotation>
+            </xs:element>
+
+            <xs:element name="text" type="evidencedStringType" minOccurs="0" maxOccurs="unbounded"/>
+
+        </xs:sequence>
+
+        <xs:attribute name="type" use="required">
+            <xs:annotation>
+                <xs:documentation>Describes the type of a general annotation.
+                Equivalent to the flat file CC comment topics (except for "DATABASE" which is translated to "online information").</xs:documentation>
+            </xs:annotation>
+            <xs:simpleType>
+                <xs:restriction base="xs:string">
+                    <xs:enumeration value="allergen"/>
+                    <xs:enumeration value="alternative products"/>
+                    <xs:enumeration value="biotechnology"/>
+                    <xs:enumeration value="biophysicochemical properties"/>
+                    <xs:enumeration value="catalytic activity"/>
+                    <xs:enumeration value="caution"/>
+                    <xs:enumeration value="cofactor"/>
+                    <xs:enumeration value="developmental stage"/>
+                    <xs:enumeration value="disease"/>
+                    <xs:enumeration value="domain"/>
+                    <xs:enumeration value="disruption phenotype"/>
+                    <xs:enumeration value="activity regulation"/>
+                    <xs:enumeration value="function"/>
+                    <xs:enumeration value="induction"/>
+                    <xs:enumeration value="miscellaneous"/>
+                    <xs:enumeration value="pathway"/>
+                    <xs:enumeration value="pharmaceutical"/>
+                    <xs:enumeration value="polymorphism"/>
+                    <xs:enumeration value="PTM"/>
+                    <xs:enumeration value="RNA editing"/>
+                    <xs:enumeration value="similarity"/>
+                    <xs:enumeration value="subcellular location"/>
+                    <xs:enumeration value="sequence caution"/>
+                    <xs:enumeration value="subunit"/>
+                    <xs:enumeration value="tissue specificity"/>
+                    <xs:enumeration value="toxic dose"/>
+                    <xs:enumeration value="online information"/>
+                    <xs:enumeration value="mass spectrometry"/>
+                    <xs:enumeration value="interaction"/>
+                </xs:restriction>
+            </xs:simpleType>
+        </xs:attribute>
+
+        <xs:attribute name="locationType" type="xs:string" use="optional">
+            <xs:annotation>
+                <xs:documentation>Describes the type of sequence location in 'RNA editing' annotations. Common values are "Not_applicable" and "Undetermined".</xs:documentation>
+            </xs:annotation>
+        </xs:attribute>
+
+        <xs:attribute name="name" type="xs:string" use="optional">
+            <xs:annotation>
+                <xs:documentation>Describes an optional name for an 'online information'.</xs:documentation>
+            </xs:annotation>
+        </xs:attribute>
+
+        <xs:attribute name="mass" type="xs:float" use="optional">
+            <xs:annotation>
+                <xs:documentation>Describes the molecular mass in 'mass spectrometry' annotations.</xs:documentation>
+            </xs:annotation>
+        </xs:attribute>
+        <xs:attribute name="error" type="xs:string" use="optional">
+            <xs:annotation>
+                <xs:documentation>Describes the error of the mass measurement in 'mass spectrometry' annotations.</xs:documentation>
+            </xs:annotation>
+        </xs:attribute>
+        <xs:attribute name="method" type="xs:string" use="optional">
+            <xs:annotation>
+                <xs:documentation>Describes the experimental method in 'mass spectrometry' annotations.</xs:documentation>
+            </xs:annotation>
+        </xs:attribute>
+
+        <xs:attribute name="evidence" type="intListType" use="optional"/>
+    </xs:complexType>
+
+    <xs:group name="bpcCommentGroup">
+        <xs:annotation>
+            <xs:documentation>Describes different types of biophysicochemical properties.</xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element name="absorption" minOccurs="0">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="max" type="evidencedStringType" minOccurs="0"/>
+                        <xs:element name="text" type="evidencedStringType" minOccurs="0" maxOccurs="unbounded"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="kinetics" minOccurs="0">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="KM" type="evidencedStringType" minOccurs="0" maxOccurs="unbounded"/>
+                        <xs:element name="Vmax" type="evidencedStringType" minOccurs="0" maxOccurs="unbounded"/>
+                        <xs:element name="text" type="evidencedStringType" minOccurs="0" maxOccurs="unbounded"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="phDependence" minOccurs="0">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="text" type="evidencedStringType" maxOccurs="unbounded"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="redoxPotential" minOccurs="0">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="text" type="evidencedStringType" maxOccurs="unbounded"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="temperatureDependence" minOccurs="0">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="text" type="evidencedStringType" maxOccurs="unbounded"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+        </xs:sequence>
+    </xs:group>
+
+    <xs:complexType name="cofactorType">
+        <xs:annotation>
+            <xs:documentation>Describes a cofactor.</xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element name="name" type="xs:string"/>
+            <xs:element name="dbReference" type="dbReferenceType"/>
+        </xs:sequence>
+        <xs:attribute name="evidence" type="intListType" use="optional"/>
+    </xs:complexType>
+
+    <xs:complexType name="subcellularLocationType">
+        <xs:annotation>
+            <xs:documentation>Describes the subcellular location and optionally the topology and orientation of a molecule.</xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element name="location" type="evidencedStringType" maxOccurs="unbounded"/>
+            <xs:element name="topology" type="evidencedStringType" minOccurs="0" maxOccurs="unbounded"/>
+            <xs:element name="orientation" type="evidencedStringType" minOccurs="0" maxOccurs="unbounded"/>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="eventType">
+        <xs:annotation>
+            <xs:documentation>Describes the type of events that cause alternative products.</xs:documentation>
+        </xs:annotation>
+        <xs:attribute name="type" use="required">
+            <xs:simpleType>
+                <xs:restriction base="xs:string">
+                    <xs:enumeration value="alternative splicing"/>
+                    <xs:enumeration value="alternative initiation"/>
+                    <xs:enumeration value="alternative promoter"/>
+                    <xs:enumeration value="ribosomal frameshifting"/>
+                </xs:restriction>
+            </xs:simpleType>
+        </xs:attribute>
+    </xs:complexType>
+
+    <xs:complexType name="isoformType">
+        <xs:annotation>
+            <xs:documentation>Describes isoforms in 'alternative products' annotations.</xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element name="id" type="xs:string" maxOccurs="unbounded"/>
+            <xs:element name="name" maxOccurs="unbounded">
+                <xs:complexType>
+                    <xs:simpleContent>
+                        <xs:extension base="xs:string">
+                            <xs:attribute name="evidence" type="intListType" use="optional"/>
+                        </xs:extension>
+                    </xs:simpleContent>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="sequence">
+                <xs:complexType>
+                    <xs:attribute name="type" use="required">
+                        <xs:simpleType>
+                            <xs:restriction base="xs:string">
+                                <xs:enumeration value="not described"/>
+                                <xs:enumeration value="described"/>
+                                <xs:enumeration value="displayed"/>
+                                <xs:enumeration value="external"/>
+                            </xs:restriction>
+                        </xs:simpleType>
+                    </xs:attribute>
+                    <xs:attribute name="ref" type="xs:string" use="optional"/>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="text" type="evidencedStringType" minOccurs="0" maxOccurs="unbounded"/>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:group name="interactantGroup">
+        <xs:sequence>
+            <xs:element name="id" type="xs:string"/>
+            <xs:element name="label" type="xs:string" minOccurs="0"/>
+        </xs:sequence>
+    </xs:group>
+    <xs:complexType name="interactantType">
+        <xs:group ref="interactantGroup" minOccurs="0"/>
+        <xs:attribute name="intactId" type="xs:string" use="required"/>
+    </xs:complexType>
+    <!-- Comment definition ends -->
+
+    <!-- Database cross-reference definition begins -->
+    <xs:complexType name="dbReferenceType">
+        <xs:annotation>
+            <xs:documentation>Describes a database cross-reference.
+            Equivalent to the flat file DR-line.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element name="molecule" type="moleculeType" minOccurs="0"/>
+            <xs:element name="property" type="propertyType" minOccurs="0" maxOccurs="unbounded"/>
+        </xs:sequence>
+        <xs:attribute name="type" type="xs:string" use="required">
+            <xs:annotation>
+                <xs:documentation>Describes the name of the database.</xs:documentation>
+            </xs:annotation>
+        </xs:attribute>
+        <xs:attribute name="id" type="xs:string" use="required">
+            <xs:annotation>
+                <xs:documentation>Describes a unique database identifier.</xs:documentation>
+            </xs:annotation>
+        </xs:attribute>
+        <xs:attribute name="evidence" type="intListType" use="optional"/>
+        <!-- xs:attribute name="key" type="xs:string" use="optional"/ -->
+    </xs:complexType>
+
+    <xs:complexType name="propertyType">
+        <xs:attribute name="type" type="xs:string" use="required"/>
+        <xs:attribute name="value" type="xs:string" use="required"/>
+    </xs:complexType>
+    <!-- Database cross-reference definition ends -->
+
+    <!-- Protein existence definition begins -->
+    <xs:complexType name="proteinExistenceType">
+        <xs:annotation>
+            <xs:documentation>Describes the evidence for the protein's existence.
+            Equivalent to the flat file PE-line.</xs:documentation>
+        </xs:annotation>
+        <xs:attribute name="type" use="required">
+            <xs:simpleType>
+                <xs:restriction base="xs:string">
+                    <xs:enumeration value="evidence at protein level"/>
+                    <xs:enumeration value="evidence at transcript level"/>
+                    <xs:enumeration value="inferred from homology"/>
+                    <xs:enumeration value="predicted"/>
+                    <xs:enumeration value="uncertain"/>
+                </xs:restriction>
+            </xs:simpleType>
+        </xs:attribute>
+    </xs:complexType>
+    <!-- Protein existence definition ends -->
+
+    <!-- Keyword definition begins -->
+    <xs:complexType name="keywordType">
+        <xs:simpleContent>
+            <xs:extension base="xs:string">
+                <xs:attribute name="evidence" type="intListType" use="optional"/>
+                <xs:attribute name="id" type="xs:string" use="required"/>
+            </xs:extension>
+        </xs:simpleContent>
+    </xs:complexType>
+    <!-- Keyword definition ends -->
+
+    <!-- Feature definition begins -->
+    <xs:complexType name="featureType">
+        <xs:annotation>
+            <xs:documentation>Describes different types of sequence annotations.
+            Equivalent to the flat file FT-line.</xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element name="original" type="xs:string" minOccurs="0">
+               <xs:annotation>
+                    <xs:documentation>Describes the original sequence in annotations that describe natural or artifical sequence variations.</xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="variation" type="xs:string" minOccurs="0" maxOccurs="unbounded">
+              <xs:annotation>
+                    <xs:documentation>Describes the variant sequence in annotations that describe natural or artifical sequence variations.</xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="location" type="locationType">
+                <xs:annotation>
+                    <xs:documentation>Describes the sequence coordinates of the annotation.</xs:documentation>
+                </xs:annotation>
+            </xs:element>
+        </xs:sequence>
+        <xs:attribute name="type" use="required">
+            <xs:annotation>
+                <xs:documentation>Describes the type of a sequence annotation.
+                Equivalent to the flat file FT feature keys, but using full terms instead of acronyms.</xs:documentation>
+            </xs:annotation>
+            <xs:simpleType>
+                <xs:restriction base="xs:string">
+                    <xs:enumeration value="active site"/>
+                    <xs:enumeration value="binding site"/>
+                    <xs:enumeration value="calcium-binding region"/>
+                    <xs:enumeration value="chain"/>
+                    <xs:enumeration value="coiled-coil region"/>
+                    <xs:enumeration value="compositionally biased region"/>
+                    <xs:enumeration value="cross-link"/>
+                    <xs:enumeration value="disulfide bond"/>
+                    <xs:enumeration value="DNA-binding region"/>
+                    <xs:enumeration value="domain"/>
+                    <xs:enumeration value="glycosylation site"/>
+                    <xs:enumeration value="helix"/>
+                    <xs:enumeration value="initiator methionine"/>
+                    <xs:enumeration value="lipid moiety-binding region"/>
+                    <xs:enumeration value="metal ion-binding site"/>
+                    <xs:enumeration value="modified residue"/>
+                    <xs:enumeration value="mutagenesis site"/>
+                    <xs:enumeration value="non-consecutive residues"/>
+                    <xs:enumeration value="non-terminal residue"/>
+                    <xs:enumeration value="nucleotide phosphate-binding region"/>
+                    <xs:enumeration value="peptide"/>
+                    <xs:enumeration value="propeptide"/>
+                    <xs:enumeration value="region of interest"/>
+                    <xs:enumeration value="repeat"/>
+                    <xs:enumeration value="non-standard amino acid"/>
+                    <xs:enumeration value="sequence conflict"/>
+                    <xs:enumeration value="sequence variant"/>
+                    <xs:enumeration value="short sequence motif"/>
+                    <xs:enumeration value="signal peptide"/>
+                    <xs:enumeration value="site"/>
+                    <xs:enumeration value="splice variant"/>
+                    <xs:enumeration value="strand"/>
+                    <xs:enumeration value="topological domain"/>
+                    <xs:enumeration value="transit peptide"/>
+                    <xs:enumeration value="transmembrane region"/>
+                    <xs:enumeration value="turn"/>
+                    <xs:enumeration value="unsure residue"/>
+                    <xs:enumeration value="zinc finger region"/>
+                    <xs:enumeration value="intramembrane region"/>
+                </xs:restriction>
+            </xs:simpleType>
+        </xs:attribute>
+        <xs:attribute name="status" use="optional">
+            <xs:simpleType>
+                <xs:restriction base="xs:string">
+                    <xs:enumeration value="by similarity"/>
+                    <xs:enumeration value="probable"/>
+                    <xs:enumeration value="potential"/>
+                </xs:restriction>
+            </xs:simpleType>
+        </xs:attribute>
+        <xs:attribute name="id" type="xs:string" use="optional"/>
+        <xs:attribute name="description" type="xs:string" use="optional"/>
+        <xs:attribute name="evidence" type="intListType" use="optional"/>
+        <xs:attribute name="ref" type="xs:string" use="optional"/>
+    </xs:complexType>
+
+    <xs:complexType name="locationType">
+        <xs:annotation>
+            <xs:documentation>Describes a sequence location as either a range with a begin and end or as a position. The 'sequence' attribute is only used when the location is not on the canonical sequence displayed in the current entry.</xs:documentation>
+        </xs:annotation>
+        <xs:choice>
+            <xs:sequence>
+                <xs:element name="begin" type="positionType"/>
+                <xs:element name="end" type="positionType"/>
+            </xs:sequence>
+            <xs:element name="position" type="positionType"/>
+        </xs:choice>
+        <xs:attribute name="sequence" type="xs:string" use="optional"/>
+    </xs:complexType>
+
+    <xs:complexType name="positionType">
+        <xs:attribute name="position" type="xs:unsignedLong" use="optional"/>
+        <xs:attribute name="status" use="optional" default="certain">
+            <xs:simpleType>
+                <xs:restriction base="xs:string">
+                    <xs:enumeration value="certain"/>
+                    <xs:enumeration value="uncertain"/>
+                    <xs:enumeration value="less than"/>
+                    <xs:enumeration value="greater than"/>
+                    <xs:enumeration value="unknown"/>
+                </xs:restriction>
+            </xs:simpleType>
+        </xs:attribute>
+        <xs:attribute name="evidence" type="intListType" use="optional"/>
+    </xs:complexType>
+    <!-- Feature definition ends -->
+
+    <!-- Sequence definition begins -->
+    <xs:complexType name="sequenceType">
+        <xs:simpleContent>
+            <xs:extension base="xs:string">
+                <xs:attribute name="length" type="xs:int" use="required"/>
+                <xs:attribute name="mass" type="xs:int" use="required"/>
+                <xs:attribute name="checksum" type="xs:string" use="required"/>
+                <xs:attribute name="modified" type="xs:date" use="required"/>
+                <xs:attribute name="version" type="xs:int" use="required"/>
+                <xs:attribute name="precursor" type="xs:boolean" use="optional"/>
+                <xs:attribute name="fragment" use="optional">
+                    <xs:simpleType>
+                        <xs:restriction base="xs:string">
+                            <xs:enumeration value="single"/>
+                            <xs:enumeration value="multiple"/>
+                        </xs:restriction>
+                    </xs:simpleType>
+                </xs:attribute>
+            </xs:extension>
+        </xs:simpleContent>
+    </xs:complexType>
+    <!-- Sequence definition ends -->
+
+    <!-- Molecule definition begins -->
+    <xs:complexType name="moleculeType">
+        <xs:annotation>
+            <xs:documentation>Describes a molecule by name or unique identifier.</xs:documentation>
+        </xs:annotation>
+        <xs:simpleContent>
+            <xs:extension base="xs:string">
+                <xs:attribute name="id" type="xs:string" use="optional"/>
+            </xs:extension>
+        </xs:simpleContent>
+    </xs:complexType>
+    <!-- Molecule definition ends -->
+
+    <!-- Evidence definition begins -->
+    <xs:complexType name="evidenceType">
+        <xs:annotation>
+            <xs:documentation>Describes the evidence for an annotation.
+            No flat file equivalent.</xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element name="source" type="sourceType" minOccurs="0"/>
+            <xs:element name="importedFrom" type="importedFromType" minOccurs="0"/>
+        </xs:sequence>
+        <xs:attribute name="type" type="xs:string" use="required">
+            <xs:annotation>
+                <xs:documentation>Describes the type of an evidence using the Evidence Code Ontology (http://www.obofoundry.org/cgi-bin/detail.cgi?id=evidence_code).</xs:documentation>
+            </xs:annotation>
+        </xs:attribute>
+        <xs:attribute name="key" type="xs:integer" use="required">
+            <xs:annotation>
+                <xs:documentation>A unique key to link annotations (via 'evidence' attributes) to evidences.</xs:documentation>
+            </xs:annotation>
+        </xs:attribute>
+    </xs:complexType>
+    <xs:complexType name="sourceType">
+        <xs:annotation>
+            <xs:documentation>Describes the source of the data using a database cross-reference (or a 'ref' attribute when the source cannot be found in a public data source, such as PubMed, and is cited only within the UniProtKB entry).</xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element name="dbReference" type="dbReferenceType" minOccurs="0"/>
+        </xs:sequence>
+        <xs:attribute name="ref" type="xs:integer" use="optional"/>
+    </xs:complexType>
+    <xs:complexType name="importedFromType">
+        <xs:annotation>
+            <xs:documentation>Describes the source of the evidence, when it is not assigned by UniProt, but imported from an external database.</xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element name="dbReference" type="dbReferenceType"/>
+        </xs:sequence>
+    </xs:complexType>
+    <!-- Evidence definition ends -->
+
+    <xs:complexType name="evidencedStringType">
+        <xs:simpleContent>
+            <xs:extension base="xs:string">
+                <xs:attribute name="evidence" type="intListType" use="optional"/>
+                <xs:attribute name="status" use="optional">
+                    <xs:simpleType>
+                        <xs:restriction base="xs:string">
+                            <xs:enumeration value="by similarity"/>
+                            <xs:enumeration value="probable"/>
+                            <xs:enumeration value="potential"/>
+                        </xs:restriction>
+                    </xs:simpleType>
+                </xs:attribute>
+            </xs:extension>
+        </xs:simpleContent>
+    </xs:complexType>
+
+    <xs:simpleType name="intListType">
+       <xs:list itemType="xs:int"/>
+   </xs:simpleType>
+</xs:schema>
index 65a1307..22b7aac 100755 (executable)
  * The Jalview Authors are detailed in the 'AUTHORS' file.
 -->
 <!-- edited with XMLSpy v2006 sp1 U (http://www.altova.com) by ioh[ (o[ih[oh) -->
+<!-- 
+       Java JAXB binding classes are generated by running command line tool xjc:
+           xjc schemas/jalview.xsd -d src -p jalview.xml.binding.jalview
+       Note this also generates code for included schemas
+-->
 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:vamsas="www.vamsas.ac.uk/jalview/version2" targetNamespace="www.vamsas.ac.uk/jalview/version2" elementFormDefault="qualified" attributeFormDefault="unqualified">
        <xs:complexType name="VAMSAS">
                <xs:sequence>
diff --git a/src/castor.properties b/src/castor.properties
deleted file mode 100644 (file)
index 5b17458..0000000
+++ /dev/null
@@ -1,254 +0,0 @@
-###############################################################################
-# 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.
-###############################################################################
-# THE CASTOR PROPERTIES FILE
-# This file specifies values for Castor run-time which may be configured
-# by the user.
-# $Id$
-
-# This section defines Backwards compatibility switches.
-#
-# Hashtable/Map default mapping.
-# For backward compatibility with 0.9.5.2 and earlier.
-#
-#org.exolab.castor.xml.saveMapKeys=false
-
-# Defines the default XML parser to be used by Castor.
-# The parser must implement org.xml.sax.Parser.
-#
-org.exolab.castor.parser=org.apache.xerces.parsers.SAXParser
-
-# Defines the (default) XML serializer factory to use by Castor, which must
-# implement org.exolab.castor.xml.SerializerFactory; default is 
-# org.exolab.castor.xml.XercesXMLSerializerFactory
-# 
-# When using Castor XML with JDK 5.0, you may switch to the XercesJDK5XMLSerializerFactory
-# which will use the Xerces instance as shipped with the JDK itself; this avoids
-# having to download another Xerces instance and installing it. 
-org.exolab.castor.xml.serializer.factory=org.exolab.castor.xml.XercesXMLSerializerFactory
-#org.exolab.castor.xml.serializer.factory=org.exolab.castor.xml.XercesJDK5XMLSerializerFactory
-
-# Defines the NodeType for use with Java primitive types (int, long, boolean,
-# etc). This value is only used by the Introspector.  Valid values are either
-# "attribute" or "element". By default, all primitives are marshaled as
-# attributes. Uncomment the following line to change the NodeType to element.
-#
-#org.exolab.castor.xml.introspector.primitive.nodetype=element
-
-# Defines the Naming "style" or conventions to use when creating XML names
-# from Java class or field names.
-# Valid values are as follows:
-# -----------------------------------------------------------------
-# lower (default)  |  All names are lowercase with hyphens
-#                  |  separating words.
-#                  |
-#                  |  Example: personInfo = person-info
-# -----------------------------------------------------------------
-# mixed            |  All names are mixed case, with Uppercase
-#                  |  character as the first letter of a new word.
-#                  |
-#                  |  Example: personInfo = personInfo
-#                  |  Example: FooBar     = fooBar
-# -----------------------------------------------------------------
-# {Any ClassName}  |  Any Class which implements
-#                  |  org.exolab.castor.xml.XMLNaming
-# -----------------------------------------------------------------
-#
-# By default, all names are treated as the "lower" option.  To preserve the
-# Java mixed-case conventions, uncomment the following line.
-#
-#org.exolab.castor.xml.naming=mixed
-
-###############################
-# REGULAR EXPRESSION EVALUATORS
-#
-# Defines the Regular Expression Evaluator to be used by Castor.
-# The evaluator must implement org.exolab.castor.util.RegExpEvaluator.
-#
-# Uncomment the following to basically suppress Regular expressions evaluation:
-#org.exolab.castor.regexp=org.exolab.castor.xml.util.AlwaysTrueRegExpEvaluator
-#
-# An implementation which uses the Jakarta RegExp library:
-#org.exolab.castor.regexp=org.exolab.castor.util.JakartaRegExpEvaluator
-#
-# An implementation which uses the Jakarta ORO library:
-org.exolab.castor.regexp=org.exolab.castor.util.JakartaOroEvaluator
-
-# True if all documents should be indented on output by default.
-# Defaults to false.
-#
-#org.exolab.castor.indent=true
-
-# True if xml documents should be validated by the SAX Parser
-# Defaults to false.
-#
-org.exolab.castor.parser.validation=false
-
-# True for parser to support Namespaces.
-# Defaults to false.
-#
-org.exolab.castor.parser.namespaces=false
-
-# True if all documents should be validated by the marshaling framework
-# Defaults to true.
-#
-org.exolab.castor.marshalling.validation=true
-
-# Comma separated list of SAX 2 features that should be enabled for the
-# default parser.
-#
-#org.exolab.castor.sax.features=
-
-# Comma separated list of SAX 2 features that should be disabled for the
-# default parser.
-#
-#org.exolab.castor.sax.features-to-disable
-
-# True if debugging output should be generated.
-# Defaults to false.
-#
-org.exolab.castor.debug=false
-
-# List of collection handlers for Java 1.1 and Java 1.2 run-times:
-#
-org.exolab.castor.mapping.collections=\
-  org.exolab.castor.mapping.loader.J1CollectionHandlers,\
-  org.exolab.castor.mapping.loader.J2CollectionHandlers
-
-# List of persistence factories for the supported database servers:
-#
-org.exolab.castor.jdo.engines=\
-  org.exolab.castor.jdo.drivers.OracleFactory,\
-  org.exolab.castor.jdo.drivers.PostgreSQLFactory,\
-  org.exolab.castor.jdo.drivers.SybaseFactory,\
-  org.exolab.castor.jdo.drivers.SQLServerFactory,\
-  org.exolab.castor.jdo.drivers.DB2Factory,\
-  org.exolab.castor.jdo.drivers.InformixFactory,\
-  org.exolab.castor.jdo.drivers.HsqlFactory,\
-  org.exolab.castor.jdo.drivers.InstantDBFactory,\
-  org.exolab.castor.jdo.drivers.InterbaseFactory,\
-  org.exolab.castor.jdo.drivers.MySQLFactory,\
-  org.exolab.castor.jdo.drivers.SapDbFactory,\
-  org.exolab.castor.jdo.drivers.GenericFactory,\
-  org.exolab.castor.jdo.drivers.DerbyFactory,\
-  org.castor.jdo.drivers.PointbaseFactory,\
-  org.castor.jdo.drivers.ProgressFactory
-
-# List of key generator factories:
-#
-org.exolab.castor.jdo.keyGeneratorFactories=\
-  org.exolab.castor.jdo.keygen.MaxKeyGeneratorFactory,\
-  org.exolab.castor.jdo.keygen.HighLowKeyGeneratorFactory,\
-  org.exolab.castor.jdo.keygen.IdentityKeyGeneratorFactory,\
-  org.exolab.castor.jdo.keygen.SequenceKeyGeneratorFactory,\
-  org.exolab.castor.jdo.keygen.UUIDKeyGeneratorFactory
-
-# Collection handlers for the source code generator:
-#
-org.exolab.castor.builder.type.j2=\
-  org.exolab.castor.builder.FieldInfoFactoryJ2
-org.exolab.castor.builder.type.j1=\
-  org.exolab.castor.builder.FieldInfoFactory
-org.exolab.castor.builder.type.odmg=\
-  org.exolab.castor.builder.FieldInfoFactoryODMG30
-
-# Configures the default time zone to apply to dates/times fetched from
-# database fields (if not already part of the data).  Specify same format as
-# in java.util.TimeZone.getTimeZone, or the empty string to use the computer's
-# local time zone. Please see http://de.wikipedia.org/wiki/Zeitzone for
-# detailed information about time zones.
-#
-org.exolab.castor.jdo.defaultTimeZone=
-#org.exolab.castor.jdo.defaultTimeZone=GMT-8:00
-
-# List of TxSynchronizeable implementations:
-#
-#org.exolab.castor.persist.TxSynchronizable=
-
-# Sets the buffer size in bytes for fetching LOBs (this is dependent upon
-# the JDBC driver implementation).  The value below == 5k.
-#
-org.exolab.castor.jdo.lobBufferSize=5120
-
-# True if database configuration should be initalization
-# when loading it (default: true).
-#
-#org.exolab.castor.jdo.DatabaseInitializeAtLoad=true
-
-# True if proxy classes should be used for JDBC connections and
-# prepared statements.
-# Defaults to true.
-#
-org.exolab.castor.persist.useProxies=false
-
-# MappingLoader implementations:
-#
-org.castor.mapping.loaderFactories=\
-  org.castor.mapping.JDOMappingLoaderFactory,\
-  org.castor.mapping.XMLMappingLoaderFactory
-
-# Cache implementations:
-#
-org.castor.cache.Factories=\
-  org.castor.cache.simple.NoCacheFactory,\
-  org.castor.cache.simple.TimeLimitedFactory,\
-  org.castor.cache.simple.CountLimitedFactory,\
-  org.castor.cache.simple.UnlimitedFactory,\
-  org.castor.cache.distributed.FKCacheFactory,\
-  org.castor.cache.distributed.JcsCacheFactory,\
-  org.castor.cache.distributed.JCacheFactory,\
-  org.castor.cache.distributed.CoherenceCacheFactory,\
-  org.castor.cache.distributed.OsCacheFactory,\
-  org.castor.cache.hashbelt.FIFOHashbeltFactory,\
-  org.castor.cache.hashbelt.LRUHashbeltFactory,\
-  org.castor.cache.distributed.EHCacheFactory,\
-  org.castor.cache.distributed.GigaspacesCacheFactory
-
-# TransactionManagerFactory implementations:
-#
-org.castor.transactionmanager.Factories=\
-  org.castor.transactionmanager.WebSphereTransactionManagerFactory,\
-  org.castor.transactionmanager.WebSphere5TransactionManagerFactory,\
-  org.castor.transactionmanager.WebSphere51TransactionManagerFactory,\
-  org.castor.transactionmanager.LocalTransactionManagerFactory,\
-  org.castor.transactionmanager.JNDIENCTransactionManagerFactory,\
-  org.castor.transactionmanager.JOTMTransactionManagerFactory
-
-# Selects whether the TransactionManager should be initialized at registration,
-# or lazily when requested for the first time.
-# Defaults to false.
-#
-org.castor.transactionmanager.InitializeAtRegistration=false
-
-# Instructs Castor JDO to use the JDBC 3.0-specific features to obtain
-# the generated value of an identity column.
-# Defaults to false.
-#
-org.castor.jdo.use.jdbc30=false
-
-# Specifies whether to use ANSI-compliant SQL for MS SQL Server.
-# Defaults to false.
-#
-org.exolab.castor.jdo.sqlserver.ansi-compliant=false
-
-# Specifyies whether the ClassDescriptorResolver should (automatically) search
-# for and consult with package mapping files (.castor.xml) to retrieve class
-# descriptor information; on by default.
-# Defaults to true.
-#
-#org.exolab.castor.xml.loadPackageMappings=false
index d1217bf..0dfd383 100644 (file)
@@ -74,12 +74,15 @@ import java.util.TreeMap;
  */
 public class AlignmentUtils
 {
-
   private static final int CODON_LENGTH = 3;
 
   private static final String SEQUENCE_VARIANT = "sequence_variant:";
 
-  private static final String ID = "ID";
+  /*
+   * the 'id' attribute is provided for variant features fetched from
+   * Ensembl using its REST service with JSON format 
+   */
+  public static final String VARIANT_ID = "id";
 
   /**
    * A data model to hold the 'normal' base value at a position, and an optional
@@ -2575,15 +2578,15 @@ public class AlignmentUtils
             peptidePos, var.getSource());
 
     StringBuilder attributes = new StringBuilder(32);
-    String id = (String) var.variant.getValue(ID);
+    String id = (String) var.variant.getValue(VARIANT_ID);
     if (id != null)
     {
       if (id.startsWith(SEQUENCE_VARIANT))
       {
         id = id.substring(SEQUENCE_VARIANT.length());
       }
-      sf.setValue(ID, id);
-      attributes.append(ID).append("=").append(id);
+      sf.setValue(VARIANT_ID, id);
+      attributes.append(VARIANT_ID).append("=").append(id);
       // TODO handle other species variants JAL-2064
       StringBuilder link = new StringBuilder(32);
       try
index 2ad8487..9611a4c 100644 (file)
@@ -194,10 +194,11 @@ public class Dna
   }
 
   /**
+   * Translates cDNA using the specified code table
    * 
    * @return
    */
-  public AlignmentI translateCdna()
+  public AlignmentI translateCdna(GeneticCodeI codeTable)
   {
     AlignedCodonFrame acf = new AlignedCodonFrame();
 
@@ -209,7 +210,7 @@ public class Dna
     for (s = 0; s < sSize; s++)
     {
       SequenceI newseq = translateCodingRegion(selection.get(s),
-              seqstring[s], acf, pepseqs);
+              seqstring[s], acf, pepseqs, codeTable);
 
       if (newseq != null)
       {
@@ -429,11 +430,12 @@ public class Dna
    * @param acf
    *          Definition of global ORF alignment reference frame
    * @param proteinSeqs
+   * @param codeTable
    * @return sequence ready to be added to alignment.
    */
   protected SequenceI translateCodingRegion(SequenceI selection,
           String seqstring, AlignedCodonFrame acf,
-          List<SequenceI> proteinSeqs)
+          List<SequenceI> proteinSeqs, GeneticCodeI codeTable)
   {
     List<int[]> skip = new ArrayList<>();
     int[] skipint = null;
@@ -466,9 +468,8 @@ public class Dna
         /*
          * Filled up a reading frame...
          */
-        AlignedCodon alignedCodon = new AlignedCodon(cdp[0], cdp[1],
-                cdp[2]);
-        String aa = ResidueProperties.codonTranslate(new String(codon));
+        AlignedCodon alignedCodon = new AlignedCodon(cdp[0], cdp[1], cdp[2]);
+        String aa = codeTable.translate(new String(codon));
         rf = 0;
         final String gapString = String.valueOf(gapChar);
         if (aa == null)
index 191f6e8..3cbef6d 100644 (file)
  */
 package jalview.analysis;
 
+import jalview.api.AlignViewportI;
+import jalview.api.FinderI;
 import jalview.datamodel.AlignmentI;
+import jalview.datamodel.Range;
 import jalview.datamodel.SearchResultMatchI;
 import jalview.datamodel.SearchResults;
 import jalview.datamodel.SearchResultsI;
 import jalview.datamodel.SequenceGroup;
 import jalview.datamodel.SequenceI;
+import jalview.datamodel.VisibleContigsIterator;
 import jalview.util.Comparison;
 
-import java.util.ArrayList;
 import java.util.List;
 import java.util.Vector;
 
 import com.stevesoft.pat.Regex;
 
-public class Finder
+/**
+ * Implements the search algorithm for the Find dialog
+ */
+public class Finder implements FinderI
 {
-  /**
-   * Implements the search algorithms for the Find dialog box.
+  /*
+   * matched residue locations
    */
-  SearchResultsI searchResults;
+  private SearchResultsI searchResults;
 
-  AlignmentI alignment;
+  /*
+   * sequences matched by id or description
+   */
+  private Vector<SequenceI> idMatches;
 
-  SequenceGroup selection = null;
+  /*
+   * the viewport to search over
+   */
+  private AlignViewportI viewport;
 
-  Vector<SequenceI> idMatch = null;
+  /*
+   * sequence index in alignment to search from
+   */
+  private int sequenceIndex;
 
-  boolean caseSensitive = false;
+  /*
+   * column position in sequence to search from, base 0
+   * - absolute column number including any hidden columns
+   * (position after start of last match for a repeat search)
+   */
+  private int columnIndex;
 
-  private boolean includeDescription = false;
+  /**
+   * Constructor for searching a viewport
+   * 
+   * @param av
+   */
+  public Finder(AlignViewportI av)
+  {
+    this.viewport = av;
+    this.sequenceIndex = 0;
+    this.columnIndex = -1;
+  }
 
-  boolean findAll = false;
+  @Override
+  public void findAll(String theSearchString, boolean matchCase,
+          boolean searchDescription)
+  {
+    /*
+     * search from the start
+     */
+    sequenceIndex = 0;
+    columnIndex = -1;
 
-  Regex regex = null;
+    doFind(theSearchString, matchCase, searchDescription, true);
 
-  /**
-   * holds last-searched position between calls to find(false)
-   */
-  int seqIndex = 0, resIndex = -1;
+    /*
+     * reset to start for next search
+     */
+    sequenceIndex = 0;
+    columnIndex = -1;
+  }
 
-  public Finder(AlignmentI alignment, SequenceGroup selection)
+  @Override
+  public void findNext(String theSearchString, boolean matchCase,
+          boolean searchDescription)
   {
-    this.alignment = alignment;
-    this.selection = selection;
+    doFind(theSearchString, matchCase, searchDescription, false);
+    
+    if (searchResults.isEmpty() && idMatches.isEmpty())
+    {
+      /*
+       * search failed - reset to start for next search
+       */
+      sequenceIndex = 0;
+      columnIndex = -1;
+    }
   }
 
   /**
-   * restart search at given sequence and residue on alignment and (optionally)
-   * contained in selection
+   * Performs a 'find next' or 'find all'
    * 
-   * @param alignment
-   * @param selectionGroup
-   * @param seqIndex
-   * @param resIndex
+   * @param theSearchString
+   * @param matchCase
+   * @param searchDescription
+   * @param findAll
    */
-  public Finder(AlignmentI alignment, SequenceGroup selectionGroup,
-          int seqIndex, int resIndex)
+  protected void doFind(String theSearchString, boolean matchCase,
+          boolean searchDescription, boolean findAll)
   {
-    this(alignment, selectionGroup);
-    this.seqIndex = seqIndex;
-    this.resIndex = resIndex;
-  }
+    String searchString = matchCase ? theSearchString
+            : theSearchString.toUpperCase();
+    Regex searchPattern = new Regex(searchString);
+    searchPattern.setIgnoreCase(!matchCase);
 
-  public boolean find(String searchString)
-  {
-    boolean hasResults = false;
-    if (!caseSensitive)
-    {
-      searchString = searchString.toUpperCase();
-    }
-    regex = new Regex(searchString);
-    regex.setIgnoreCase(!caseSensitive);
     searchResults = new SearchResults();
-    idMatch = new Vector<SequenceI>();
-    String item = null;
-    boolean found = false;
-    int end = alignment.getHeight();
+    idMatches = new Vector<>();
 
-    // /////////////////////////////////////////////
-
-    if (selection != null)
+    SequenceGroup selection = viewport.getSelectionGroup();
+    if (selection != null && selection.getSize() < 1)
     {
-      if ((selection.getSize() < 1)
-              || ((selection.getEndRes() - selection.getStartRes()) < 2))
-      {
-        selection = null;
-      }
+      selection = null; // ? ignore column-only selection
     }
-    SearchResultMatchI lastm = null;
 
-    while (!found && (seqIndex < end))
-    {
-      SequenceI seq = alignment.getSequenceAt(seqIndex);
+    AlignmentI alignment = viewport.getAlignment();
+    int end = alignment.getHeight();
 
-      if ((selection != null && selection.getSize() > 0)
-              && !selection.getSequences(null).contains(seq))
+    while (sequenceIndex < end)
+    {
+      SequenceI seq = alignment.getSequenceAt(sequenceIndex);
+      boolean found = findNextMatch(seq, searchString, searchPattern,
+              searchDescription);
+      if (found && !findAll)
       {
-        seqIndex++;
-        resIndex = -1;
-
-        continue;
+        return;
       }
-      if (resIndex < 0)
+      if (!found)
       {
-        resIndex = 0;
-        // test for one off matches - sequence position and sequence ID
-        // //// is the searchString a residue number?
-        try
-        {
-          int res = Integer.parseInt(searchString);
-          // possibly a residue number - check if valid for seq
-          if (seq.getEnd() >= res)
-          {
-            searchResults.addResult(seq, res, res);
-            hasResults = true;
-            // resIndex=seq.getLength();
-            // seqIndex++;
-            if (!findAll)
-            {
-              found = true;
-              break;
-            }
-          }
-        } catch (NumberFormatException ex)
-        {
-        }
-
-        if (regex.search(seq.getName()) && !idMatch.contains(seq))
-        {
-          idMatch.addElement(seq);
-          hasResults = true;
-          if (!findAll)
-          {
-            // stop and return the match
-            found = true;
-            break;
-          }
-        }
-
-        if (isIncludeDescription() && seq.getDescription() != null
-                && regex.search(seq.getDescription())
-                && !idMatch.contains(seq))
-        {
-          idMatch.addElement(seq);
-          hasResults = true;
-          if (!findAll)
-          {
-            // stop and return the match
-            found = true;
-            break;
-          }
-        }
+        sequenceIndex++;
+        columnIndex = -1;
       }
-      item = seq.getSequenceAsString();
+    }
+  }
 
-      if ((selection != null)
-              && (selection.getEndRes() < alignment.getWidth() - 1))
-      {
-        item = item.substring(0, selection.getEndRes() + 1);
-      }
+  /**
+   * Answers the start-end column range of the visible region of
+   * <code>sequence</code> starting at or after the given <code>column</code>.
+   * If there are no hidden columns, this just returns the remaining width of
+   * the sequence. The range is restricted to the current <code>selection</code>
+   * if there is one. Answers null if there are no visible columns at or after
+   * <code>column</code>.
+   */
+  protected Range getNextVisibleSequenceRegion(SequenceI sequence,
+          int column)
+  {
+    int seqColStart = column;
+    int seqColEnd = sequence.getLength() - 1;
 
-      // /Shall we ignore gaps???? - JBPNote: Add Flag for forcing this or not
-      StringBuilder noGapsSB = new StringBuilder();
-      int insertCount = 0;
-      List<Integer> spaces = new ArrayList<Integer>();
+    /*
+     * restrict search to (next) visible column region, 
+     * in case there are hidden columns
+     */
+    AlignmentI alignment = viewport.getAlignment();
+    VisibleContigsIterator visibleRegions = alignment.getHiddenColumns()
+            .getVisContigsIterator(column, alignment.getWidth(),
+                    false);
+    int[] visible = visibleRegions.hasNext() ? visibleRegions.next() : null;
+    if (visible == null)
+    {
+      columnIndex = seqColEnd + 1;
+      return null;
+    }
+    seqColStart = Math.max(seqColStart, visible[0]);
+    seqColEnd = Math.min(seqColEnd, visible[1]);
 
-      for (int j = 0; j < item.length(); j++)
+    /*
+     * restrict search to selected region if there is one
+     */
+    SequenceGroup selection = viewport.getSelectionGroup();
+    if (selection != null)
+    {
+      int selectionStart = selection.getStartRes();
+      int selectionEnd = selection.getEndRes();
+      if (selectionStart > seqColEnd || selectionEnd < seqColStart)
       {
-        if (!Comparison.isGap(item.charAt(j)))
-        {
-          noGapsSB.append(item.charAt(j));
-          spaces.add(Integer.valueOf(insertCount));
-        }
-        else
-        {
-          insertCount++;
-        }
+        /*
+         * sequence region doesn't overlap selection region 
+         */
+        columnIndex = seqColEnd + 1;
+        return null;
       }
+      seqColStart = Math.max(seqColStart, selectionStart);
+      seqColEnd = Math.min(seqColEnd, selectionEnd);
+    }
 
-      String noGaps = noGapsSB.toString();
-      for (int r = resIndex; r < noGaps.length(); r++)
-      {
+    return new Range(seqColStart, seqColEnd);
+  }
 
-        if (regex.searchFrom(noGaps, r))
-        {
-          resIndex = regex.matchedFrom();
-
-          if ((selection != null && selection.getSize() > 0) && (resIndex
-                  + spaces.get(resIndex) < selection.getStartRes()))
-          {
-            continue;
-          }
-          // if invalid string used, then regex has no matched to/from
-          int sres = seq.findPosition(resIndex + spaces.get(resIndex));
-          int eres = seq.findPosition(regex.matchedTo() - 1
-                  + (spaces.get(regex.matchedTo() - 1)));
-          // only add result if not contained in previous result
-          if (lastm == null || (lastm.getSequence() != seq
-                  || (!(lastm.getStart() <= sres
-                          && lastm.getEnd() >= eres))))
-          {
-            lastm = searchResults.addResult(seq, sres, eres);
-          }
-          hasResults = true;
-          if (!findAll)
-          {
-            // thats enough, break and display the result
-            found = true;
-            resIndex++;
-
-            break;
-          }
-
-          r = resIndex;
-        }
-        else
-        {
-          break;
-        }
-      }
+  /**
+   * Finds the next match in the given sequence, starting at column at
+   * <code>columnIndex</code>. Answers true if a match is found, else false. If
+   * a match is found, <code>columnIndex</code> is advanced to the column after
+   * the start of the matched region, ready for a search from the next position.
+   * 
+   * @param seq
+   * @param searchString
+   * @param searchPattern
+   * @param matchDescription
+   * @return
+   */
+  protected boolean findNextMatch(SequenceI seq, String searchString,
+          Regex searchPattern, boolean matchDescription)
+  {
+    SequenceGroup selection = viewport.getSelectionGroup();
+    if (selection != null && !selection.contains(seq))
+    {
+      /*
+       * this sequence is not in the selection - advance to next sequence
+       */
+      return false;
+    }
 
-      if (!found)
+    if (columnIndex < 0)
+    {
+      /*
+       * at start of sequence; try find by residue number, in sequence id,
+       * or (optionally) in sequence description
+       */
+      if (doNonMotifSearches(seq, searchString, searchPattern,
+              matchDescription))
       {
-        seqIndex++;
-        resIndex = -1;
+        return true;
       }
     }
 
-    /**
-     * We now search the Id string in the main search loop. for (int id = 0; id
-     * < alignment.getHeight(); id++) { if
-     * (regex.search(alignment.getSequenceAt(id).getName())) {
-     * idMatch.addElement(alignment.getSequenceAt(id)); hasResults = true; } }
+    /*
+     * search for next match in sequence string
      */
-    return hasResults;
-  }
-
-  /**
-   * @return the alignment
-   */
-  public AlignmentI getAlignment()
-  {
-    return alignment;
+    int end = seq.getLength();
+    while (columnIndex < end)
+    {
+      if (searchNextVisibleRegion(seq, searchPattern))
+      {
+        return true;
+      }
+    }
+    return false;
   }
 
   /**
-   * @param alignment
-   *          the alignment to set
+   * Searches the sequence, starting from <code>columnIndex</code>, and adds the
+   * next match (if any) to <code>searchResults</code>. The search is restricted
+   * to the next visible column region, and to the <code>selection</code> region
+   * if there is one. Answers true if a match is added, else false.
+   * 
+   * @param seq
+   * @param searchPattern
+   * @return
    */
-  public void setAlignment(AlignmentI alignment)
+  protected boolean searchNextVisibleRegion(SequenceI seq, Regex searchPattern)
   {
-    this.alignment = alignment;
-  }
+    Range visible = getNextVisibleSequenceRegion(seq, columnIndex);
+    if (visible == null)
+    {
+      return false;
+    }
+    String seqString = seq.getSequenceAsString(visible.start, visible.end + 1);
+    String noGaps = AlignSeq.extractGaps(Comparison.GapChars, seqString);
 
-  /**
-   * @return the caseSensitive
-   */
-  public boolean isCaseSensitive()
-  {
-    return caseSensitive;
-  }
+    if (searchPattern.search(noGaps))
+    {
+      int sequenceStartPosition = seq.findPosition(visible.start);
+      recordMatch(seq, searchPattern, sequenceStartPosition);
+      return true;
+    }
+    else
+    {
+      /*
+       * no match - advance columnIndex past this visible region
+       * so the next visible region (if any) is searched next
+       */
+      columnIndex = visible.end + 1;
+    }
 
-  /**
-   * @param caseSensitive
-   *          the caseSensitive to set
-   */
-  public void setCaseSensitive(boolean caseSensitive)
-  {
-    this.caseSensitive = caseSensitive;
+    return false;
   }
 
   /**
-   * @return the findAll
+   * Adds the match held in the <code>searchPattern</code> Regex to the
+   * <code>searchResults</code>, unless it is a subregion of the last match
+   * recorded. <code>columnIndex</code> is advanced to the position after the
+   * start of the matched region, ready for the next search. Answers true if a
+   * match was added, else false.
+   * 
+   * @param seq
+   * @param searchPattern
+   * @param firstResiduePosition
+   * @return
    */
-  public boolean isFindAll()
+  protected boolean recordMatch(SequenceI seq, Regex searchPattern,
+          int firstResiduePosition)
   {
-    return findAll;
-  }
+    /*
+     * get start/end of the match in sequence coordinates
+     */
+    int offset = searchPattern.matchedFrom();
+    int matchStartPosition = firstResiduePosition + offset;
+    int matchEndPosition = matchStartPosition
+            + searchPattern.charsMatched() - 1;
+
+    /*
+     * update columnIndex to next column after the start of the match
+     * (findIndex returns a value base 1, columnIndex is held base 0)
+     */
+    columnIndex = seq.findIndex(matchStartPosition);
 
-  /**
-   * @param findAll
-   *          the findAll to set
-   */
-  public void setFindAll(boolean findAll)
-  {
-    this.findAll = findAll;
-  }
+    /*
+     * check that this match is not a subset of the previous one (JAL-2302)
+     */
+    List<SearchResultMatchI> matches = searchResults.getResults();
+    SearchResultMatchI lastMatch = matches.isEmpty() ? null
+            : matches.get(matches.size() - 1);
 
-  /**
-   * @return the selection
-   */
-  public jalview.datamodel.SequenceGroup getSelection()
-  {
-    return selection;
-  }
+    if (lastMatch == null || !lastMatch.contains(seq, matchStartPosition,
+            matchEndPosition))
+    {
+      searchResults.addResult(seq, matchStartPosition, matchEndPosition);
+      return true;
+    }
 
-  /**
-   * @param selection
-   *          the selection to set
-   */
-  public void setSelection(jalview.datamodel.SequenceGroup selection)
-  {
-    this.selection = selection;
+    return false;
   }
 
   /**
-   * Returns the (possibly empty) list of matching sequences (when search
-   * includes searching sequence names)
+   * Does searches other than for residue patterns. Currently this includes
+   * <ul>
+   * <li>find residue by position (if search string is a number)</li>
+   * <li>match search string to sequence id</li>
+   * <li>match search string to sequence description (optional)</li>
+   * </ul>
+   * Answers true if a match is found, else false.
    * 
+   * @param seq
+   * @param searchString
+   * @param searchPattern
+   * @param includeDescription
    * @return
    */
-  public Vector<SequenceI> getIdMatch()
+  protected boolean doNonMotifSearches(SequenceI seq, String searchString,
+          Regex searchPattern, boolean includeDescription)
   {
-    return idMatch;
-  }
+    /*
+     * position sequence search to start of sequence
+     */
+    columnIndex = 0;
 
-  /**
-   * @return the regex
-   */
-  public com.stevesoft.pat.Regex getRegex()
-  {
-    return regex;
+    if (searchForResidueNumber(seq, searchString))
+    {
+      return true;
+    }
+    if (searchSequenceName(seq, searchPattern))
+    {
+      return true;
+    }
+    if (includeDescription && searchSequenceDescription(seq, searchPattern))
+    {
+      return true;
+    }
+    return false;
   }
 
   /**
-   * @return the searchResults
+   * Searches for a match with the sequence description, and if found, adds the
+   * sequence to the list of match ids (but not as a duplicate). Answers true if
+   * a match was added, else false.
+   * 
+   * @param seq
+   * @param searchPattern
+   * @return
    */
-  public SearchResultsI getSearchResults()
+  protected boolean searchSequenceDescription(SequenceI seq, Regex searchPattern)
   {
-    return searchResults;
+    String desc = seq.getDescription();
+    if (desc != null && searchPattern.search(desc) && !idMatches.contains(seq))
+    {
+      idMatches.addElement(seq);
+      return true;
+    }
+    return false;
   }
 
   /**
-   * @return the resIndex
+   * Searches for a match with the sequence name, and if found, adds the
+   * sequence to the list of match ids (but not as a duplicate). Answers true if
+   * a match was added, else false.
+   * 
+   * @param seq
+   * @param searchPattern
+   * @return
    */
-  public int getResIndex()
+  protected boolean searchSequenceName(SequenceI seq, Regex searchPattern)
   {
-    return resIndex;
+    if (searchPattern.search(seq.getName()) && !idMatches.contains(seq))
+    {
+      idMatches.addElement(seq);
+      return true;
+    }
+    return false;
   }
 
   /**
-   * @param resIndex
-   *          the resIndex to set
+   * Tries to interpret the search string as a residue position, and if valid,
+   * adds the position to the search results and returns true, else answers
+   * false
    */
-  public void setResIndex(int resIndex)
+  protected boolean searchForResidueNumber(SequenceI seq, String searchString)
   {
-    this.resIndex = resIndex;
+    try
+    {
+      int res = Integer.parseInt(searchString);
+      if (seq.getStart() <= res && seq.getEnd() >= res)
+      {
+        searchResults.addResult(seq, res, res);
+        return true;
+      }
+    } catch (NumberFormatException ex)
+    {
+    }
+    return false;
   }
 
-  /**
-   * @return the seqIndex
+  /* (non-Javadoc)
+   * @see jalview.analysis.FinderI#getIdMatch()
    */
-  public int getSeqIndex()
+  @Override
+  public Vector<SequenceI> getIdMatches()
   {
-    return seqIndex;
+    return idMatches;
   }
 
-  /**
-   * @param seqIndex
-   *          the seqIndex to set
+  /* (non-Javadoc)
+   * @see jalview.analysis.FinderI#getSearchResults()
    */
-  public void setSeqIndex(int seqIndex)
-  {
-    this.seqIndex = seqIndex;
-  }
-
-  public boolean isIncludeDescription()
-  {
-    return includeDescription;
-  }
-
-  public void setIncludeDescription(boolean includeDescription)
+  @Override
+  public SearchResultsI getSearchResults()
   {
-    this.includeDescription = includeDescription;
+    return searchResults;
   }
 }
diff --git a/src/jalview/analysis/GeneticCodeI.java b/src/jalview/analysis/GeneticCodeI.java
new file mode 100644 (file)
index 0000000..daed0ac
--- /dev/null
@@ -0,0 +1,46 @@
+package jalview.analysis;
+
+public interface GeneticCodeI
+{
+  /**
+   * Answers the single letter amino acid code (e.g. "D") for the given codon
+   * (e.g. "GAC"), or "*" for a stop codon, or null for an unknown input. The
+   * codon is not case-sensitive, the return value is upper case.
+   * <p>
+   * If the codon includes any of the standard ambiguity codes
+   * <ul>
+   * <li>if all possible translations are the same, returns that value</li>
+   * <li>else returns null</li>
+   * </ul>
+   * 
+   * @param codon
+   * @return
+   */
+  String translate(String codon);
+
+  /**
+   * Answers the single letter amino acid code (e.g. "D") for the given codon
+   * (e.g. "GAC"), or "*" for a stop codon, or null for an unknown input. The
+   * codon is not case-sensitive, the return value is upper case. If the codon
+   * includes any of the standard ambiguity codes, this method returns null.
+   * 
+   * @param codon
+   * @return
+   */
+  String translateCanonical(String codon);
+
+  /**
+   * Answers a unique identifier for the genetic code (using the numbering
+   * system as on NCBI)
+   * 
+   * @return
+   */
+  String getId();
+
+  /**
+   * Answers a display name suitable for use in menus, reports etc
+   * 
+   * @return
+   */
+  String getName();
+}
diff --git a/src/jalview/analysis/GeneticCodes.java b/src/jalview/analysis/GeneticCodes.java
new file mode 100644 (file)
index 0000000..137b7f8
--- /dev/null
@@ -0,0 +1,426 @@
+package jalview.analysis;
+
+import jalview.bin.Cache;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+/**
+ * A singleton that provides instances of genetic code translation tables
+ * 
+ * @author gmcarstairs
+ * @see https://www.ncbi.nlm.nih.gov/Taxonomy/Utils/wprintgc.cgi
+ */
+public final class GeneticCodes
+{
+  private static final int CODON_LENGTH = 3;
+
+  private static final String QUOTE = "\"";
+
+  /*
+   * nucleotides as ordered in data file
+   */
+  private static final String NUCS = "TCAG";
+
+  private static final int NUCS_COUNT = NUCS.length();
+
+  private static final int NUCS_COUNT_SQUARED = NUCS_COUNT * NUCS_COUNT;
+
+  private static final int NUCS_COUNT_CUBED = NUCS_COUNT * NUCS_COUNT
+          * NUCS_COUNT;
+
+  private static final String AMBIGUITY_CODES_FILE = "/AmbiguityCodes.dat";
+
+  private static final String RESOURCE_FILE = "/GeneticCodes.dat";
+
+  private static GeneticCodes instance = new GeneticCodes();
+
+  private Map<String, String> ambiguityCodes;
+
+  /*
+   * loaded code tables, with keys in order of loading 
+   */
+  private Map<String, GeneticCodeI> codeTables;
+
+  /**
+   * Private constructor enforces singleton
+   */
+  private GeneticCodes()
+  {
+    if (instance == null)
+    {
+      ambiguityCodes = new HashMap<>();
+
+      /*
+       * LinkedHashMap preserves order of addition of entries,
+       * so we can assume the Standard Code Table is the first
+       */
+      codeTables = new LinkedHashMap<>();
+      loadAmbiguityCodes(AMBIGUITY_CODES_FILE);
+      loadCodes(RESOURCE_FILE);
+    }
+  }
+
+  /**
+   * Returns the singleton instance of this class
+   * 
+   * @return
+   */
+  public static GeneticCodes getInstance()
+  {
+    return instance;
+  }
+
+  /**
+   * Returns the known code tables, in order of loading.
+   * 
+   * @return
+   */
+  public Iterable<GeneticCodeI> getCodeTables()
+  {
+    return codeTables.values();
+  }
+
+  /**
+   * Answers the code table with the given id
+   * 
+   * @param id
+   * @return
+   */
+  public GeneticCodeI getCodeTable(String id)
+  {
+    return codeTables.get(id);
+  }
+
+  /**
+   * A convenience method that returns the standard code table (table 1). As
+   * implemented, this has to be the first table defined in the data file.
+   * 
+   * @return
+   */
+  public GeneticCodeI getStandardCodeTable()
+  {
+    return codeTables.values().iterator().next();
+  }
+
+  /**
+   * Loads the code tables from a data file
+   */
+  protected void loadCodes(String fileName)
+  {
+    try
+    {
+      InputStream is = getClass().getResourceAsStream(fileName);
+      if (is == null)
+      {
+        System.err.println("Resource file not found: " + fileName);
+        return;
+      }
+      BufferedReader dataIn = new BufferedReader(new InputStreamReader(is));
+
+      /*
+       * skip comments and start of table
+       */
+      String line = "";
+      while (line != null && !line.startsWith("Genetic-code-table"))
+      {
+        line = readLine(dataIn);
+      }
+      line = readLine(dataIn);
+
+      while (line.startsWith("{"))
+      {
+        line = loadOneTable(dataIn);
+      }
+    } catch (IOException | NullPointerException e)
+    {
+      Cache.log.error(
+              "Error reading genetic codes data file " + fileName + ": "
+              + e.getMessage());
+    }
+    if (codeTables.isEmpty())
+    {
+      System.err.println(
+              "No genetic code tables loaded, check format of file "
+                      + fileName);
+    }
+  }
+
+  /**
+   * Reads and saves Nucleotide ambiguity codes from a data file. The file may
+   * include comment lines (starting with #), a header 'DNA', and one line per
+   * ambiguity code, for example:
+   * <p>
+   * R&lt;tab&gt;AG
+   * <p>
+   * means that R is an ambiguity code meaning "A or G"
+   * 
+   * @param fileName
+   */
+  protected void loadAmbiguityCodes(String fileName)
+  {
+    try
+    {
+      InputStream is = getClass().getResourceAsStream(fileName);
+      if (is == null)
+      {
+        System.err.println("Resource file not found: " + fileName);
+        return;
+      }
+      BufferedReader dataIn = new BufferedReader(new InputStreamReader(is));
+      String line = "";
+      while (line != null)
+      {
+        line = readLine(dataIn);
+        if (line != null && !"DNA".equals(line.toUpperCase()))
+        {
+          String[] tokens = line.split("\\t");
+          if (tokens.length == 2)
+          {
+          ambiguityCodes.put(tokens[0].toUpperCase(),
+                  tokens[1].toUpperCase());
+          }
+          else
+          {
+            System.err.println(
+                    "Unexpected data in " + fileName + ": " + line);
+          }
+        }
+      }
+    } catch (IOException e)
+    {
+      Cache.log.error(
+              "Error reading nucleotide ambiguity codes data file: "
+                      + e.getMessage());
+    }
+  }
+
+  /**
+   * Reads up to and returns the next non-comment line, trimmed. Comment lines
+   * start with a #. Returns null at end of file.
+   * 
+   * @param dataIn
+   * @return
+   * @throws IOException
+   */
+  protected String readLine(BufferedReader dataIn) throws IOException
+  {
+    String line = dataIn.readLine();
+    while (line != null && line.startsWith("#"))
+    {
+      line = readLine(dataIn);
+    }
+    return line == null ? null : line.trim();
+  }
+
+  /**
+   * Reads the lines of the data file describing one translation table, and
+   * creates and stores an instance of GeneticCodeI. Returns the '{' line
+   * starting the next table, or the '}' line at end of all tables. Data format
+   * is
+   * 
+   * <pre>
+   * {
+   *   name "Vertebrate Mitochondrial" ,
+   *   name "SGC1" ,
+   *   id 2 ,
+   *   ncbieaa  "FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIMMTTTTNNKKSS**VVVVAAAADDEEGGGG",
+   *   sncbieaa "----------**--------------------MMMM----------**---M------------"
+   *   -- Base1  TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
+   *   -- Base2  TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
+   *   -- Base3  TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
+   * },
+   * </pre>
+   * 
+   * of which we parse the first name, the id, and the ncbieaa translations for
+   * codons as ordered by the Base1/2/3 lines. Note Base1/2/3 are included for
+   * readability and are in a fixed order, these are not parsed. The sncbieaa
+   * line marks alternative start codons, these are not parsed.
+   * 
+   * @param dataIn
+   * @return
+   * @throws IOException
+   */
+  protected String loadOneTable(BufferedReader dataIn) throws IOException
+  {
+    String name = null;
+    String id = null;
+    Map<String, String> codons = new HashMap<>();
+
+    String line = readLine(dataIn);
+
+    while (line != null && !line.startsWith("}"))
+    {
+      if (line.startsWith("name") && name == null)
+      {
+        name = line.substring(line.indexOf(QUOTE) + 1,
+                line.lastIndexOf(QUOTE));
+      }
+      else if (line.startsWith("id"))
+      {
+        id = new StringTokenizer(line.substring(2)).nextToken();
+      }
+      else if (line.startsWith("ncbieaa"))
+      {
+        String aminos = line.substring(line.indexOf(QUOTE) + 1,
+                line.lastIndexOf(QUOTE));
+        if (aminos.length() != NUCS_COUNT_CUBED) // 4 * 4 * 4 combinations
+        {
+          Cache.log.error("wrong data length in code table: " + line);
+        }
+        else
+        {
+          for (int i = 0; i < aminos.length(); i++)
+          {
+            String peptide = String.valueOf(aminos.charAt(i));
+            char codon1 = NUCS.charAt(i / NUCS_COUNT_SQUARED);
+            char codon2 = NUCS
+                    .charAt((i % NUCS_COUNT_SQUARED) / NUCS_COUNT);
+            char codon3 = NUCS.charAt(i % NUCS_COUNT);
+            String codon = new String(
+                    new char[]
+                    { codon1, codon2, codon3 });
+            codons.put(codon, peptide);
+          }
+        }
+      }
+      line = readLine(dataIn);
+    }
+
+    registerCodeTable(id, name, codons);
+    return readLine(dataIn);
+  }
+
+  /**
+   * Constructs and registers a GeneticCodeI instance with the codon
+   * translations as defined in the data file. For all instances except the
+   * first, any undeclared translations default to those in the standard code
+   * table.
+   * 
+   * @param id
+   * @param name
+   * @param codons
+   */
+  protected void registerCodeTable(final String id, final String name,
+          final Map<String, String> codons)
+  {
+    codeTables.put(id, new GeneticCodeI()
+    {
+      /*
+       * map of ambiguous codons to their 'product'
+       * (null if not all possible translations match)
+       */
+      Map<String, String> ambiguous = new HashMap<>();
+
+      @Override
+      public String translateCanonical(String codon)
+      {
+        return codons.get(codon.toUpperCase());
+      }
+
+      @Override
+      public String translate(String codon)
+      {
+        String upper = codon.toUpperCase();
+        String peptide = translateCanonical(upper);
+
+        /*
+         * if still not translated, check for ambiguity codes
+         */
+        if (peptide == null)
+        {
+          peptide = getAmbiguousTranslation(upper, ambiguous, this);
+        }
+        return peptide;
+      }
+
+      @Override
+      public String getId()
+      {
+        return id;
+      }
+
+      @Override
+      public String getName()
+      {
+        return name;
+      }
+    });
+  }
+
+  /**
+   * Computes all possible translations of a codon including one or more
+   * ambiguity codes, and stores and returns the result (null if not all
+   * translations match). If the codon includes no ambiguity codes, simply
+   * returns null.
+   * 
+   * @param codon
+   * @param ambiguous
+   * @param codeTable
+   * @return
+   */
+  protected String getAmbiguousTranslation(String codon,
+          Map<String, String> ambiguous, GeneticCodeI codeTable)
+  {
+    if (codon.length() != CODON_LENGTH)
+    {
+      return null;
+    }
+
+    boolean isAmbiguous = false;
+
+    char[][] expanded = new char[CODON_LENGTH][];
+    for (int i = 0; i < CODON_LENGTH; i++)
+    {
+      String base = String.valueOf(codon.charAt(i));
+      if (ambiguityCodes.containsKey(base))
+      {
+        isAmbiguous = true;
+        base = ambiguityCodes.get(base);
+      }
+      expanded[i] = base.toCharArray();
+    }
+
+    if (!isAmbiguous)
+    {
+      // no ambiguity code involved here
+      return null;
+    }
+
+    /*
+     * generate and translate all permutations of the ambiguous codon
+     * only return the translation if they all agree, else null
+     */
+    String peptide = null;
+    for (char c1 : expanded[0])
+    {
+      for (char c2 : expanded[1])
+      {
+        for (char c3 : expanded[2])
+        {
+          char[] cdn = new char[] { c1, c2, c3 };
+          String possibleCodon = String.valueOf(cdn);
+          String pep = codeTable.translate(possibleCodon);
+          if (pep == null || (peptide != null && !pep.equals(peptide)))
+          {
+            ambiguous.put(codon, null);
+            return null;
+          }
+          peptide = pep;
+        }
+      }
+    }
+
+    /*
+     * all translations of ambiguous codons matched!
+     */
+    ambiguous.put(codon, peptide);
+    return peptide;
+  }
+}
index 42a168d..d51f00e 100755 (executable)
@@ -22,7 +22,9 @@ package jalview.analysis;
 
 import jalview.api.analysis.ScoreModelI;
 import jalview.api.analysis.SimilarityParamsI;
+import jalview.bin.Cache;
 import jalview.datamodel.AlignmentView;
+import jalview.datamodel.Point;
 import jalview.math.MatrixI;
 
 import java.io.PrintStream;
@@ -32,28 +34,37 @@ import java.io.PrintStream;
  */
 public class PCA implements Runnable
 {
-  MatrixI symm;
-
-  double[] eigenvalue;
+  /*
+   * inputs
+   */
+  final private AlignmentView seqs;
 
-  MatrixI eigenvector;
+  final private ScoreModelI scoreModel;
 
-  StringBuilder details = new StringBuilder(1024);
+  final private SimilarityParamsI similarityParams;
 
-  final private AlignmentView seqs;
+  /*
+   * outputs
+   */
+  private MatrixI pairwiseScores;
 
-  private ScoreModelI scoreModel;
+  private MatrixI tridiagonal;
 
-  private SimilarityParamsI similarityParams;
+  private MatrixI eigenMatrix;
 
-  public PCA(AlignmentView s, ScoreModelI sm, SimilarityParamsI options)
+  /**
+   * Constructor given the sequences to compute for, the similarity model to
+   * use, and a set of parameters for sequence comparison
+   * 
+   * @param sequences
+   * @param sm
+   * @param options
+   */
+  public PCA(AlignmentView sequences, ScoreModelI sm, SimilarityParamsI options)
   {
-    this.seqs = s;
-    this.similarityParams = options;
+    this.seqs = sequences;
     this.scoreModel = sm;
-
-    details.append("PCA calculation using " + sm.getName()
-            + " sequence similarity matrix\n========\n\n");
+    this.similarityParams = options;
   }
 
   /**
@@ -66,7 +77,7 @@ public class PCA implements Runnable
    */
   public double getEigenvalue(int i)
   {
-    return eigenvector.getD()[i];
+    return eigenMatrix.getD()[i];
   }
 
   /**
@@ -83,15 +94,16 @@ public class PCA implements Runnable
    * 
    * @return DOCUMENT ME!
    */
-  public float[][] getComponents(int l, int n, int mm, float factor)
+  public Point[] getComponents(int l, int n, int mm, float factor)
   {
-    float[][] out = new float[getHeight()][3];
+    Point[] out = new Point[getHeight()];
 
     for (int i = 0; i < getHeight(); i++)
     {
-      out[i][0] = (float) component(i, l) * factor;
-      out[i][1] = (float) component(i, n) * factor;
-      out[i][2] = (float) component(i, mm) * factor;
+      float x = (float) component(i, l) * factor;
+      float y = (float) component(i, n) * factor;
+      float z = (float) component(i, mm) * factor;
+      out[i] = new Point(x, y, z);
     }
 
     return out;
@@ -132,84 +144,111 @@ public class PCA implements Runnable
   {
     double out = 0.0;
 
-    for (int i = 0; i < symm.width(); i++)
+    for (int i = 0; i < pairwiseScores.width(); i++)
     {
-      out += (symm.getValue(row, i) * eigenvector.getValue(i, n));
+      out += (pairwiseScores.getValue(row, i) * eigenMatrix.getValue(i, n));
     }
 
-    return out / eigenvector.getD()[n];
+    return out / eigenMatrix.getD()[n];
   }
 
+  /**
+   * Answers a formatted text report of the PCA calculation results (matrices
+   * and eigenvalues) suitable for display
+   * 
+   * @return
+   */
   public String getDetails()
   {
-    return details.toString();
+    StringBuilder sb = new StringBuilder(1024);
+    sb.append("PCA calculation using ").append(scoreModel.getName())
+            .append(" sequence similarity matrix\n========\n\n");
+    PrintStream ps = wrapOutputBuffer(sb);
+    
+    /*
+     * pairwise similarity scores
+     */
+    sb.append(" --- OrigT * Orig ---- \n");
+    pairwiseScores.print(ps, "%8.2f");
+    
+    /*
+     * tridiagonal matrix, with D and E vectors
+     */
+    sb.append(" ---Tridiag transform matrix ---\n");
+    sb.append(" --- D vector ---\n");
+    tridiagonal.printD(ps, "%15.4e");
+    ps.println();
+    sb.append("--- E vector ---\n");
+    tridiagonal.printE(ps, "%15.4e");
+    ps.println();
+    
+    /*
+     * eigenvalues matrix, with D vector
+     */
+    sb.append(" --- New diagonalization matrix ---\n");
+    eigenMatrix.print(ps, "%8.2f");
+    sb.append(" --- Eigenvalues ---\n");
+    eigenMatrix.printD(ps, "%15.4e");
+    ps.println();
+    
+    return sb.toString();
   }
 
   /**
-   * DOCUMENT ME!
+   * Performs the PCA calculation
    */
   @Override
   public void run()
   {
+    try
+    {
+      /*
+       * sequence pairwise similarity scores
+       */
+      pairwiseScores = scoreModel.findSimilarities(seqs, similarityParams);
+
+      /*
+       * tridiagonal matrix
+       */
+      tridiagonal = pairwiseScores.copy();
+      tridiagonal.tred();
+
+      /*
+       * the diagonalization matrix
+       */
+      eigenMatrix = tridiagonal.copy();
+      eigenMatrix.tqli();
+    } catch (Exception q)
+    {
+      Cache.log.error("Error computing PCA:  " + q.getMessage());
+      q.printStackTrace();
+    }
+  }
+
+  /**
+   * Returns a PrintStream that wraps (appends its output to) the given
+   * StringBuilder
+   * 
+   * @param sb
+   * @return
+   */
+  protected PrintStream wrapOutputBuffer(StringBuilder sb)
+  {
     PrintStream ps = new PrintStream(System.out)
     {
       @Override
       public void print(String x)
       {
-        details.append(x);
+        sb.append(x);
       }
 
       @Override
       public void println()
       {
-        details.append("\n");
+        sb.append("\n");
       }
     };
-
-    // long now = System.currentTimeMillis();
-    try
-    {
-      eigenvector = scoreModel.findSimilarities(seqs, similarityParams);
-
-      details.append(" --- OrigT * Orig ---- \n");
-      eigenvector.print(ps, "%8.2f");
-
-      symm = eigenvector.copy();
-
-      eigenvector.tred();
-
-      details.append(" ---Tridiag transform matrix ---\n");
-      details.append(" --- D vector ---\n");
-      eigenvector.printD(ps, "%15.4e");
-      ps.println();
-      details.append("--- E vector ---\n");
-      eigenvector.printE(ps, "%15.4e");
-      ps.println();
-
-      // Now produce the diagonalization matrix
-      eigenvector.tqli();
-    } catch (Exception q)
-    {
-      q.printStackTrace();
-      details.append("\n*** Unexpected exception when performing PCA ***\n"
-              + q.getLocalizedMessage());
-      details.append(
-              "*** Matrices below may not be fully diagonalised. ***\n");
-    }
-
-    details.append(" --- New diagonalization matrix ---\n");
-    eigenvector.print(ps, "%8.2f");
-    details.append(" --- Eigenvalues ---\n");
-    eigenvector.printD(ps, "%15.4e");
-    ps.println();
-    /*
-     * for (int seq=0;seq<symm.rows;seq++) { ps.print("\"Seq"+seq+"\""); for
-     * (int ev=0;ev<symm.rows; ev++) {
-     * 
-     * ps.print(","+component(seq, ev)); } ps.println(); }
-     */
-    // System.out.println(("PCA.run() took "
-    // + (System.currentTimeMillis() - now) + "ms"));
+    return ps;
   }
 
   /**
@@ -221,6 +260,42 @@ public class PCA implements Runnable
   public int getHeight()
   {
     // TODO can any of seqs[] be null?
-    return seqs.getSequences().length;
+    return pairwiseScores.height();// seqs.getSequences().length;
+  }
+
+  /**
+   * Answers the sequence pairwise similarity scores which were the first step
+   * of the PCA calculation
+   * 
+   * @return
+   */
+  public MatrixI getPairwiseScores()
+  {
+    return pairwiseScores;
+  }
+
+  public void setPairwiseScores(MatrixI m)
+  {
+    pairwiseScores = m;
+  }
+
+  public MatrixI getEigenmatrix()
+  {
+    return eigenMatrix;
+  }
+
+  public void setEigenmatrix(MatrixI m)
+  {
+    eigenMatrix = m;
+  }
+
+  public MatrixI getTridiagonal()
+  {
+    return tridiagonal;
+  }
+
+  public void setTridiagonal(MatrixI tridiagonal)
+  {
+    this.tridiagonal = tridiagonal;
   }
 }
index c1e8b42..ddfe5e4 100644 (file)
@@ -152,15 +152,17 @@ public class PIDModel extends SimilarityScoreModel
   protected MatrixI findSimilarities(String[] seqs,
           SimilarityParamsI options)
   {
-    // TODO reuse code in ScoreMatrix instead somehow
-    double[][] values = new double[seqs.length][];
+    /*
+     * calculation is symmetric so just compute lower diagonal
+     */
+    double[][] values = new double[seqs.length][seqs.length];
     for (int row = 0; row < seqs.length; row++)
     {
-      values[row] = new double[seqs.length];
-      for (int col = 0; col < seqs.length; col++)
+      for (int col = row; col < seqs.length; col++)
       {
         double total = computePID(seqs[row], seqs[col], options);
         values[row][col] = total;
+        values[col][row] = total;
       }
     }
     return new Matrix(values);
index 6cdfacb..b206339 100644 (file)
@@ -99,6 +99,8 @@ public class ScoreMatrix extends SimilarityScoreModel
 
   private float maxValue;
 
+  private boolean symmetric;
+
   /**
    * Constructor given a name, symbol alphabet, and matrix of scores for pairs
    * of symbols. The matrix should be square and of the same size as the
@@ -156,6 +158,8 @@ public class ScoreMatrix extends SimilarityScoreModel
 
     findMinMax();
 
+    symmetric = checkSymmetry();
+
     /*
      * crude heuristic for now...
      */
@@ -163,6 +167,27 @@ public class ScoreMatrix extends SimilarityScoreModel
   }
 
   /**
+   * Answers true if the matrix is symmetric, else false. Usually, substitution
+   * matrices are symmetric, which allows calculations to be short cut.
+   * 
+   * @return
+   */
+  private boolean checkSymmetry()
+  {
+    for (int i = 0; i < matrix.length; i++)
+    {
+      for (int j = i; j < matrix.length; j++)
+      {
+        if (matrix[i][j] != matrix[j][i])
+        {
+          return false;
+        }
+      }
+    }
+    return true;
+  }
+
+  /**
    * Record the minimum and maximum score values
    */
   protected void findMinMax()
@@ -457,14 +482,17 @@ public class ScoreMatrix extends SimilarityScoreModel
   protected MatrixI findSimilarities(String[] seqs,
           SimilarityParamsI params)
   {
-    double[][] values = new double[seqs.length][];
+    double[][] values = new double[seqs.length][seqs.length];
     for (int row = 0; row < seqs.length; row++)
     {
-      values[row] = new double[seqs.length];
-      for (int col = 0; col < seqs.length; col++)
+      for (int col = symmetric ? row : 0; col < seqs.length; col++)
       {
         double total = computeSimilarity(seqs[row], seqs[col], params);
         values[row][col] = total;
+        if (symmetric)
+        {
+          values[col][row] = total;
+        }
       }
     }
     return new Matrix(values);
@@ -592,4 +620,9 @@ public class ScoreMatrix extends SimilarityScoreModel
   {
     return this;
   }
+
+  public boolean isSymmetric()
+  {
+    return symmetric;
+  }
 }
index 7262fb8..ebc9a26 100644 (file)
@@ -41,12 +41,22 @@ public class ScoreModels
 
   private final ScoreMatrix DNA;
 
-  private static ScoreModels instance = new ScoreModels();
+  private static ScoreModels instance;
 
   private Map<String, ScoreModelI> models;
 
+  /**
+   * Answers the singleton instance of this class, with lazy initialisation
+   * (built-in score models are loaded on the first call to this method)
+   * 
+   * @return
+   */
   public static ScoreModels getInstance()
   {
+    if (instance == null)
+    {
+      instance = new ScoreModels();
+    }
     return instance;
   }
 
@@ -66,11 +76,11 @@ public class ScoreModels
     /*
      * using LinkedHashMap keeps models ordered as added
      */
-    models = new LinkedHashMap<String, ScoreModelI>();
+    models = new LinkedHashMap<>();
     BLOSUM62 = loadScoreMatrix("scoreModel/blosum62.scm");
     PAM250 = loadScoreMatrix("scoreModel/pam250.scm");
-    registerScoreModel(new PIDModel());
     DNA = loadScoreMatrix("scoreModel/dna.scm");
+    registerScoreModel(new PIDModel());
     registerScoreModel(new FeatureDistanceModel());
   }
 
@@ -139,6 +149,14 @@ public class ScoreModels
   }
 
   /**
+   * Resets to just the built-in score models
+   */
+  public void reset()
+  {
+    instance = new ScoreModels();
+  }
+
+  /**
    * Returns the default peptide or nucleotide score model, currently BLOSUM62
    * or DNA
    * 
index 58b08dd..5c47703 100644 (file)
@@ -147,4 +147,57 @@ public class SimilarityParams implements SimilarityParamsI
   {
     return matchGaps;
   }
+
+  /**
+   * IDE-generated hashCode method
+   */
+  @Override
+  public int hashCode()
+  {
+    final int prime = 31;
+    int result = 1;
+    result = prime * result + (denominateByShortestLength ? 1231 : 1237);
+    result = prime * result + (includeGappedColumns ? 1231 : 1237);
+    result = prime * result + (includeGaps ? 1231 : 1237);
+    result = prime * result + (matchGaps ? 1231 : 1237);
+    return result;
+  }
+
+  /**
+   * IDE-generated equals method
+   */
+  @Override
+  public boolean equals(Object obj)
+  {
+    if (this == obj)
+    {
+      return true;
+    }
+    if (obj == null)
+    {
+      return false;
+    }
+    if (getClass() != obj.getClass())
+    {
+      return false;
+    }
+    SimilarityParams other = (SimilarityParams) obj;
+    if (denominateByShortestLength != other.denominateByShortestLength)
+    {
+      return false;
+    }
+    if (includeGappedColumns != other.includeGappedColumns)
+    {
+      return false;
+    }
+    if (includeGaps != other.includeGaps)
+    {
+      return false;
+    }
+    if (matchGaps != other.matchGaps)
+    {
+      return false;
+    }
+    return true;
+  }
 }
index 931eba6..389d9cf 100644 (file)
@@ -490,4 +490,32 @@ public interface AlignViewportI extends ViewStyleI
   public abstract TreeModel getCurrentTree();
 
   public abstract void setCurrentTree(TreeModel tree);
+
+  /**
+   * @param update
+   *          - set the flag for updating structures on next repaint
+   */
+  void setUpdateStructures(boolean update);
+
+  /**
+   *
+   * @return true if structure views will be updated on next refresh
+   */
+  boolean isUpdateStructures();
+
+  /**
+   * check if structure views need to be updated, and clear the flag afterwards.
+   * 
+   * @return if an update is needed
+   */
+  boolean needToUpdateStructureViews();
+
+  /**
+   * Adds sequencegroup to the alignment in the view. Also adds a group to the
+   * complement view if one is defined.
+   * 
+   * @param sequenceGroup
+   *          - a group defined on sequences in the alignment held by the view
+   */
+  void addSequenceGroup(SequenceGroup sequenceGroup);
 }
index 4dbb1bb..7bfd8a8 100644 (file)
@@ -192,4 +192,24 @@ public interface FeatureColourI
    * @return
    */
   void setAttributeName(String... name);
+
+  /**
+   * Answers true if colour has a threshold set, and the feature score (or other
+   * attribute selected for colouring) is outwith the threshold.
+   * <p>
+   * Answers false if not a graduated colour, or no threshold is set, or value
+   * is not outwith the threshold, or value is null or non-numeric.
+   * 
+   * @param sf
+   * @return
+   */
+  boolean isOutwithThreshold(SequenceFeature sf);
+
+  /*
+   * Answers a human-readable text description of the colour, suitable for
+   * display as a tooltip, possibly internationalised for the user's locale.
+   * 
+   * @return
+   */
+  String getDescription();
 }
index 868f196..404c497 100644 (file)
@@ -265,4 +265,19 @@ public interface FeatureRenderer
    * @return
    */
   Color getColour(SequenceFeature feature);
+
+  /**
+   * Answers true if feature would be shown, else false. A feature is shown if
+   * <ul>
+   * <li>its feature type is set to visible</li>
+   * <li>its feature group is either null, or set to visible</li>
+   * <li>it is not excluded by a colour threshold on score or other numeric
+   * attribute</li>
+   * <li>it is not excluded by a filter condition</li>
+   * </ul>
+   * 
+   * @param feature
+   * @return
+   */
+  boolean isVisible(SequenceFeature feature);
 }
diff --git a/src/jalview/api/FinderI.java b/src/jalview/api/FinderI.java
new file mode 100644 (file)
index 0000000..19f6136
--- /dev/null
@@ -0,0 +1,62 @@
+package jalview.api;
+
+import jalview.datamodel.SearchResultsI;
+import jalview.datamodel.SequenceI;
+
+import java.util.List;
+
+/**
+ * An interface for searching for a pattern in an aligment
+ */
+public interface FinderI
+{
+
+  /**
+   * Performs a find for the given search string (interpreted as a regular
+   * expression). Search may optionally be case-sensitive, and may optionally
+   * including match in sequence description (sequence id is always searched).
+   * If the viewport has an active selection, then the find is restricted to the
+   * selection region. Sequences matched by id or description can be retrieved
+   * by getIdMatches(), and matched residue patterns by getSearchResults().
+   * 
+   * @param theSearchString
+   * @param caseSensitive
+   * @param searchDescription
+   * @return
+   */
+  void findAll(String theSearchString, boolean caseSensitive,
+          boolean searchDescription);
+
+  /**
+   * Finds the next match for the given search string (interpreted as a regular
+   * expression), starting from the position after the last match found. Search
+   * may optionally be case-sensitive, and may optionally including match in
+   * sequence description (sequence id is always searched). If the viewport has
+   * an active selection, then the find is restricted to the selection region.
+   * Sequences matched by id or description can be retrieved by getIdMatches(),
+   * and matched residue patterns by getSearchResults().
+   * 
+   * @param theSearchString
+   * @param caseSensitive
+   * @param searchDescription
+   * @return
+   */
+  void findNext(String theSearchString, boolean caseSensitive,
+          boolean searchDescription);
+
+  /**
+   * Returns the (possibly empty) list of sequences matched on sequence name or
+   * description
+   * 
+   * @return
+   */
+  List<SequenceI> getIdMatches();
+
+  /**
+   * Answers the search results (possibly empty) from the last search
+   * 
+   * @return
+   */
+  SearchResultsI getSearchResults();
+
+}
\ No newline at end of file
index a57bcdb..c6eb6de 100644 (file)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2b1)
+ * Copyright (C) 2014 The Jalview Authors
  * 
  * This file is part of Jalview.
  * 
@@ -22,7 +22,7 @@ package jalview.api;
 
 import jalview.datamodel.SequencePoint;
 
-import java.util.Vector;
+import java.util.List;
 
 /**
  * interface implemented by RotatatableCanvas GUI elements (such as point clouds
@@ -33,7 +33,23 @@ import java.util.Vector;
  */
 public interface RotatableCanvasI
 {
+  void setPoints(List<SequencePoint> points, int rows);
 
-  void setPoints(Vector<SequencePoint> points, int rows);
+  /**
+   * Zoom the view in (or out) by the given factor, which should be >= 0. A
+   * factor greater than 1 zooms in (expands the display), a factor less than 1
+   * zooms out (shrinks the display).
+   * 
+   * @param factor
+   */
+  void zoom(float factor);
 
+  /**
+   * Rotates the view by the specified number of degrees about the x and/or y
+   * axis
+   * 
+   * @param x
+   * @param y
+   */
+  void rotate(float x, float y);
 }
index 5ad212e..85fb03c 100644 (file)
@@ -1447,14 +1447,12 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
     {
       features = formatter.printJalviewFormat(
               viewport.getAlignment().getSequencesArray(),
-              getDisplayedFeatureCols(), null, getDisplayedFeatureGroups(),
-              true);
+              alignPanel.getFeatureRenderer(), true);
     }
     else
     {
       features = formatter.printGffFormat(viewport.getAlignment()
-              .getSequencesArray(), getDisplayedFeatureCols(),
-              getDisplayedFeatureGroups(), true);
+              .getSequencesArray(), alignPanel.getFeatureRenderer(), true);
     }
 
     if (displayTextbox)
index 262948d..055584a 100644 (file)
@@ -25,14 +25,11 @@ import jalview.api.FeatureSettingsModelI;
 import jalview.bin.JalviewLite;
 import jalview.commands.CommandI;
 import jalview.datamodel.AlignmentI;
-import jalview.datamodel.Annotation;
 import jalview.datamodel.ColumnSelection;
 import jalview.datamodel.HiddenColumns;
 import jalview.datamodel.SearchResults;
 import jalview.datamodel.SearchResultsI;
-import jalview.datamodel.Sequence;
 import jalview.datamodel.SequenceGroup;
-import jalview.datamodel.SequenceI;
 import jalview.renderer.ResidueShader;
 import jalview.schemes.ColourSchemeProperty;
 import jalview.schemes.UserColourScheme;
@@ -200,7 +197,8 @@ public class AlignViewport extends AlignmentViewport
       if (colour != null)
       {
         residueShading = new ResidueShader(
-                ColourSchemeProperty.getColourScheme(alignment, colour));
+                ColourSchemeProperty.getColourScheme(this, alignment,
+                        colour));
         if (residueShading != null)
         {
           residueShading.setConsensus(hconsensus);
index 83d8ade..e9081b0 100644 (file)
@@ -669,14 +669,9 @@ public class AlignmentPanel extends Panel
     }
     else
     {
-      int width = av.getAlignment().getWidth();
+      int width = av.getAlignment().getVisibleWidth();
       int height = av.getAlignment().getHeight();
 
-      if (av.hasHiddenColumns())
-      {
-        width = av.getAlignment().getHiddenColumns()
-                .absoluteToVisibleColumn(width);
-      }
       if (x < 0)
       {
         x = 0;
index d9eae11..5569ab0 100644 (file)
@@ -134,7 +134,8 @@ public class FeatureColourChooser extends Panel implements ActionListener,
     if (oldcs.isGraduatedColour())
     {
       threshline.value = oldcs.getThreshold();
-      cs = new FeatureColour((FeatureColour) oldcs, min, max);
+      cs = new FeatureColour(oldcs.getColour(), oldcs.getMinColour(),
+              oldcs.getMaxColour(), oldcs.getNoColour(), min, max);
     }
     else
     {
@@ -145,7 +146,8 @@ public class FeatureColourChooser extends Panel implements ActionListener,
         bl = oldcs.getColour();
       }
       // original colour becomes the maximum colour
-      cs = new FeatureColour(Color.white, bl, mm[0], mm[1]);
+      cs = new FeatureColour(bl, Color.white, bl, Color.white, mm[0],
+              mm[1]);
     }
     minColour.setBackground(cs.getMinColour());
     maxColour.setBackground(cs.getMaxColour());
@@ -411,8 +413,9 @@ public class FeatureColourChooser extends Panel implements ActionListener,
 
     slider.setEnabled(true);
     thresholdValue.setEnabled(true);
-    FeatureColour acg = new FeatureColour(minColour.getBackground(),
-            maxColour.getBackground(), min, max);
+    Color minc = minColour.getBackground();
+    Color maxc = maxColour.getBackground();
+    FeatureColour acg = new FeatureColour(maxc, minc, maxc, minc, min, max);
 
     acg.setColourByLabel(colourFromLabel.getState());
     maxColour.setEnabled(!colourFromLabel.getState());
@@ -448,11 +451,15 @@ public class FeatureColourChooser extends Panel implements ActionListener,
     {
       if (thresholdOption == AnnotationColourGradient.ABOVE_THRESHOLD)
       {
-        acg = new FeatureColour(acg, threshline.value, max);
+        acg = new FeatureColour(acg.getColour(), acg.getMinColour(),
+                acg.getMaxColour(), acg.getNoColour(), threshline.value,
+                max);
       }
       else
       {
-        acg = new FeatureColour(acg, min, threshline.value);
+        acg = new FeatureColour(acg.getColour(), acg.getMinColour(),
+                acg.getMaxColour(), acg.getNoColour(), min,
+                threshline.value);
       }
     }
 
index 675b862..2fc3441 100644 (file)
  */
 package jalview.appletgui;
 
+import jalview.api.AlignViewportI;
+import jalview.api.FinderI;
 import jalview.datamodel.SearchResultMatchI;
 import jalview.datamodel.SearchResultsI;
 import jalview.datamodel.SequenceFeature;
 import jalview.datamodel.SequenceI;
 import jalview.util.MessageManager;
-import jalview.viewmodel.AlignmentViewport;
 
 import java.awt.Button;
 import java.awt.Checkbox;
@@ -42,25 +43,39 @@ import java.awt.event.KeyEvent;
 import java.awt.event.WindowAdapter;
 import java.awt.event.WindowEvent;
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
-import java.util.Vector;
+import java.util.Map;
 
 public class Finder extends Panel implements ActionListener
 {
-  AlignmentViewport av;
+  private AlignViewportI av;
 
-  AlignmentPanel ap;
+  private AlignmentPanel ap;
 
-  Frame frame;
+  private TextField textfield = new TextField();
 
-  SearchResultsI searchResults;
+  private Button findAll = new Button();
 
-  int seqIndex = 0;
+  private Button findNext = new Button();
 
-  int resIndex = -1;
+  private Button createFeatures = new Button();
+
+  private Checkbox caseSensitive = new Checkbox();
+
+  private Checkbox searchDescription = new Checkbox();
+
+  private SearchResultsI searchResults;
+
+  /*
+   * Finder agent per viewport searched
+   */
+  Map<AlignViewportI, FinderI> finders;
 
   public Finder(final AlignmentPanel ap)
   {
+    finders = new HashMap<>();
+
     try
     {
       jbInit();
@@ -72,7 +87,7 @@ public class Finder extends Panel implements ActionListener
 
     this.av = ap.av;
     this.ap = ap;
-    frame = new Frame();
+    Frame frame = new Frame();
     frame.add(this);
     jalview.bin.JalviewLite.addFrame(frame,
             MessageManager.getString("action.find"), 340, 120);
@@ -103,20 +118,18 @@ public class Finder extends Panel implements ActionListener
 
     else if (evt.getSource() == findAll)
     {
-      resIndex = -1;
-      seqIndex = 0;
       doSearch(true);
     }
-    else if (evt.getSource() == createNewGroup)
+    else if (evt.getSource() == createFeatures)
     {
-      createNewGroup_actionPerformed();
+      createFeatures_actionPerformed();
     }
   }
 
-  public void createNewGroup_actionPerformed()
+  public void createFeatures_actionPerformed()
   {
-    List<SequenceI> seqs = new ArrayList<SequenceI>();
-    List<SequenceFeature> features = new ArrayList<SequenceFeature>();
+    List<SequenceI> seqs = new ArrayList<>();
+    List<SequenceFeature> features = new ArrayList<>();
     String searchString = textfield.getText().trim();
 
     for (SearchResultMatchI match : searchResults.getResults())
@@ -135,48 +148,48 @@ public class Finder extends Panel implements ActionListener
     }
   }
 
-  void doSearch(boolean findAll)
+  void doSearch(boolean doFindAll)
   {
     if (ap.av.applet.currentAlignFrame != null)
     {
       ap = ap.av.applet.currentAlignFrame.alignPanel;
       av = ap.av;
     }
-    createNewGroup.setEnabled(false);
-    jalview.analysis.Finder finder = new jalview.analysis.Finder(
-            av.getAlignment(), av.getSelectionGroup(), seqIndex, resIndex);
-    finder.setCaseSensitive(caseSensitive.getState());
-    finder.setIncludeDescription(searchDescription.getState());
-    finder.setFindAll(findAll);
+    createFeatures.setEnabled(false);
+    FinderI finder = finders.get(av);
+    if (finder == null)
+    {
+      /*
+       * first time we searched this viewport
+       */
+      finder = new jalview.analysis.Finder(av);
+      finders.put(av, finder);
+    }
 
     String searchString = textfield.getText();
-
-    finder.find(searchString);
-    seqIndex = finder.getSeqIndex();
-    resIndex = finder.getResIndex();
-    searchResults = finder.getSearchResults();
-    Vector<SequenceI> idMatch = finder.getIdMatch();
-    boolean haveResults = false;
-    // set or reset the GUI
-    if ((idMatch.size() > 0))
+    boolean isCaseSensitive = caseSensitive.getState();
+    boolean doSearchDescription = searchDescription.getState();
+    if (doFindAll)
     {
-      haveResults = true;
-      ap.idPanel.highlightSearchResults(idMatch);
+      finder.findAll(searchString, isCaseSensitive, doSearchDescription);
     }
     else
     {
-      ap.idPanel.highlightSearchResults(null);
+      finder.findNext(searchString, isCaseSensitive, doSearchDescription);
     }
 
-    if (searchResults.getSize() > 0)
-    {
-      haveResults = true;
-      createNewGroup.setEnabled(true);
+    searchResults = finder.getSearchResults();
+
+    List<SequenceI> idMatches = finder.getIdMatches();
+    ap.idPanel.highlightSearchResults(idMatches);
 
+    if (searchResults.isEmpty())
+    {
+      searchResults = null;
     }
     else
     {
-      searchResults = null;
+      createFeatures.setEnabled(true);
     }
 
     // if allResults is null, this effectively switches displaySearch flag in
@@ -184,20 +197,18 @@ public class Finder extends Panel implements ActionListener
     ap.highlightSearchResults(searchResults);
     // TODO: add enablers for 'SelectSequences' or 'SelectColumns' or
     // 'SelectRegion' selection
-    if (!haveResults)
+    if (idMatches.isEmpty() && searchResults == null)
     {
       ap.alignFrame.statusBar.setText(
               MessageManager.getString("label.finished_searching"));
-      resIndex = -1;
-      seqIndex = 0;
     }
     else
     {
-      if (findAll)
+      if (doFindAll)
       {
-        String message = (idMatch.size() > 0) ? "" + idMatch.size() + " IDs"
+        String message = (idMatches.size() > 0) ? "" + idMatches.size() + " IDs"
                 : "";
-        if (idMatch.size() > 0 && searchResults != null
+        if (idMatches.size() > 0 && searchResults != null
                 && searchResults.getSize() > 0)
         {
           message += " and ";
@@ -221,28 +232,10 @@ public class Finder extends Panel implements ActionListener
     }
   }
 
-  Label jLabel1 = new Label();
-
-  protected TextField textfield = new TextField();
-
-  protected Button findAll = new Button();
-
-  protected Button findNext = new Button();
-
-  Panel actionsPanel = new Panel();
-
-  GridLayout gridLayout1 = new GridLayout();
-
-  protected Button createNewGroup = new Button();
-
-  Checkbox caseSensitive = new Checkbox();
-
-  Checkbox searchDescription = new Checkbox();
-
   private void jbInit() throws Exception
   {
+    Label jLabel1 = new Label(MessageManager.getString("action.find"));
     jLabel1.setFont(new java.awt.Font("Verdana", 0, 12));
-    jLabel1.setText(MessageManager.getString("action.find"));
     jLabel1.setBounds(new Rectangle(3, 30, 34, 15));
     this.setLayout(null);
     textfield.setFont(new java.awt.Font("Verdana", Font.PLAIN, 10));
@@ -253,7 +246,7 @@ public class Finder extends Panel implements ActionListener
       @Override
       public void keyTyped(KeyEvent e)
       {
-        textfield_keyTyped(e);
+        textfield_keyTyped();
       }
     });
     textfield.addActionListener(this);
@@ -264,15 +257,18 @@ public class Finder extends Panel implements ActionListener
     findNext.setFont(new java.awt.Font("Verdana", Font.PLAIN, 10));
     findNext.setLabel(MessageManager.getString("action.find_next"));
     findNext.addActionListener(this);
+
+    Panel actionsPanel = new Panel();
     actionsPanel.setBounds(new Rectangle(195, 5, 141, 64));
+    GridLayout gridLayout1 = new GridLayout();
     actionsPanel.setLayout(gridLayout1);
     gridLayout1.setHgap(0);
     gridLayout1.setRows(3);
     gridLayout1.setVgap(2);
-    createNewGroup.setEnabled(false);
-    createNewGroup.setFont(new java.awt.Font("Verdana", Font.PLAIN, 10));
-    createNewGroup.setLabel(MessageManager.getString("label.new_feature"));
-    createNewGroup.addActionListener(this);
+    createFeatures.setEnabled(false);
+    createFeatures.setFont(new java.awt.Font("Verdana", Font.PLAIN, 10));
+    createFeatures.setLabel(MessageManager.getString("label.new_feature"));
+    createFeatures.addActionListener(this);
     caseSensitive.setLabel(MessageManager.getString("label.match_case"));
     caseSensitive.setBounds(new Rectangle(30, 39, 126, 23));
 
@@ -281,7 +277,7 @@ public class Finder extends Panel implements ActionListener
     searchDescription.setBounds(new Rectangle(30, 59, 170, 23));
     actionsPanel.add(findNext, null);
     actionsPanel.add(findAll, null);
-    actionsPanel.add(createNewGroup, null);
+    actionsPanel.add(createFeatures, null);
     this.add(caseSensitive);
     this.add(textfield, null);
     this.add(jLabel1, null);
@@ -289,7 +285,7 @@ public class Finder extends Panel implements ActionListener
     this.add(searchDescription);
   }
 
-  void textfield_keyTyped(KeyEvent e)
+  void textfield_keyTyped()
   {
     findNext.setEnabled(true);
   }
index 296f898..ef80616 100755 (executable)
@@ -280,15 +280,9 @@ public class IdCanvas extends Panel implements ViewportListenerI
   protected void drawIdsWrapped(int starty, final boolean doHiddenCheck,
           boolean hiddenRows)
   {
-    int maxwidth = av.getAlignment().getWidth();
+    int maxwidth = av.getAlignment().getVisibleWidth();
     int alheight = av.getAlignment().getHeight();
 
-    if (av.hasHiddenColumns())
-    {
-      maxwidth = av.getAlignment().getHiddenColumns()
-              .absoluteToVisibleColumn(maxwidth) - 1;
-    }
-
     int annotationHeight = 0;
     AnnotationLabels labels = null;
 
index 15e269c..af1c47b 100755 (executable)
@@ -395,7 +395,7 @@ public class IdPanel extends Panel
   {
     idCanvas.setHighlighted(list);
 
-    if (list == null)
+    if (list == null || list.isEmpty())
     {
       return;
     }
index 5081509..96138bf 100755 (executable)
@@ -126,13 +126,14 @@ public class OverviewPanel extends Panel implements Runnable,
   {
     if (od.isPositionInBox(evt.getX(), evt.getY()))
     {
-      // display drag cursor at mouse position
-      setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));
+      this.getParent()
+              .setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
     }
     else
     {
-      // reset cursor
-      setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
+      this.getParent()
+              .setCursor(
+                      Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR));
     }
   }
 
@@ -162,6 +163,8 @@ public class OverviewPanel extends Panel implements Runnable,
         od.updateViewportFromMouse(evt.getX(), evt.getY(),
                 av.getAlignment().getHiddenSequences(),
                 av.getAlignment().getHiddenColumns());
+        getParent()
+                .setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
       }
       else
       {
index fc1d359..7c0dfa9 100644 (file)
@@ -134,7 +134,7 @@ public class PCAPanel extends EmbmenuFrame
     {
       nuclSetting.setState(pcaModel.isNucleotide());
       protSetting.setState(!pcaModel.isNucleotide());
-      pcaModel.run();
+      pcaModel.calculate();
       // ////////////////
       xCombobox.select(0);
       yCombobox.select(1);
@@ -167,9 +167,7 @@ public class PCAPanel extends EmbmenuFrame
     int dim2 = top - yCombobox.getSelectedIndex();
     int dim3 = top - zCombobox.getSelectedIndex();
     pcaModel.updateRcView(dim1, dim2, dim3);
-    rc.img = null;
-    rc.rotmat.setIdentity();
-    rc.initAxes();
+    rc.resetView();
     rc.paint(rc.getGraphics());
   }
 
@@ -281,7 +279,7 @@ public class PCAPanel extends EmbmenuFrame
     {
     }
     ;
-    Object[] alAndColsel = pcaModel.getSeqtrings()
+    Object[] alAndColsel = pcaModel.getInputData()
             .getAlignmentAndHiddenColumns(gc);
 
     if (alAndColsel != null && alAndColsel[0] != null)
index afb4e95..34f8ea5 100755 (executable)
 package jalview.appletgui;
 
 import jalview.api.RotatableCanvasI;
+import jalview.datamodel.Point;
 import jalview.datamodel.SequenceGroup;
 import jalview.datamodel.SequenceI;
 import jalview.datamodel.SequencePoint;
 import jalview.math.RotatableMatrix;
-import jalview.util.Format;
+import jalview.math.RotatableMatrix.Axis;
 import jalview.util.MessageManager;
 import jalview.viewmodel.AlignmentViewport;
 
@@ -40,32 +41,26 @@ import java.awt.event.KeyListener;
 import java.awt.event.MouseEvent;
 import java.awt.event.MouseListener;
 import java.awt.event.MouseMotionListener;
-import java.util.Vector;
+import java.util.List;
 
 public class RotatableCanvas extends Panel implements MouseListener,
         MouseMotionListener, KeyListener, RotatableCanvasI
 {
-  RotatableMatrix idmat = new RotatableMatrix(3, 3);
-
-  RotatableMatrix objmat = new RotatableMatrix(3, 3);
-
-  RotatableMatrix rotmat = new RotatableMatrix(3, 3);
+  private static final int DIMS = 3;
 
   String tooltip;
 
-  int toolx, tooly;
+  int toolx;
+
+  int tooly;
 
   // RubberbandRectangle rubberband;
 
   boolean drawAxes = true;
 
-  int omx = 0;
-
-  int mx = 0;
-
-  int omy = 0;
+  int mouseX = 0;
 
-  int my = 0;
+  int mouseY = 0;
 
   Image img;
 
@@ -73,13 +68,13 @@ public class RotatableCanvas extends Panel implements MouseListener,
 
   Dimension prefsize;
 
-  float centre[] = new float[3];
+  Point centre;
 
-  float width[] = new float[3];
+  float[] width = new float[DIMS];
 
-  float max[] = new float[3];
+  float[] max = new float[DIMS];
 
-  float min[] = new float[3];
+  float[] min = new float[DIMS];
 
   float maxwidth;
 
@@ -87,11 +82,11 @@ public class RotatableCanvas extends Panel implements MouseListener,
 
   int npoint;
 
-  Vector points;
+  List<SequencePoint> points;
 
-  float[][] orig;
+  Point[] orig;
 
-  float[][] axes;
+  Point[] axisEndPoints;
 
   int startx;
 
@@ -115,9 +110,10 @@ public class RotatableCanvas extends Panel implements MouseListener,
 
   boolean showLabels = false;
 
-  public RotatableCanvas(AlignmentViewport av)
+  public RotatableCanvas(AlignmentViewport viewport)
   {
-    this.av = av;
+    this.av = viewport;
+    axisEndPoints = new Point[DIMS];
   }
 
   public void showLabels(boolean b)
@@ -126,46 +122,23 @@ public class RotatableCanvas extends Panel implements MouseListener,
     repaint();
   }
 
-  public void setPoints(Vector points, int npoint)
+  @Override
+  public void setPoints(List<SequencePoint> points, int npoint)
   {
     this.points = points;
     this.npoint = npoint;
     PaintRefresher.Register(this, av.getSequenceSetId());
 
     prefsize = getPreferredSize();
-    orig = new float[npoint][3];
+    orig = new Point[npoint];
 
     for (int i = 0; i < npoint; i++)
     {
-      SequencePoint sp = (SequencePoint) points.elementAt(i);
-      for (int j = 0; j < 3; j++)
-      {
-        orig[i][j] = sp.coord[j];
-      }
-    }
-    // Initialize the matrices to identity
-
-    for (int i = 0; i < 3; i++)
-    {
-      for (int j = 0; j < 3; j++)
-      {
-        if (i != j)
-        {
-          idmat.addElement(i, j, 0);
-          objmat.addElement(i, j, 0);
-          rotmat.addElement(i, j, 0);
-        }
-        else
-        {
-          idmat.addElement(i, j, 0);
-          objmat.addElement(i, j, 0);
-          rotmat.addElement(i, j, 0);
-        }
-      }
+      SequencePoint sp = points.get(i);
+      orig[i] = sp.coord;
     }
 
-    axes = new float[3][3];
-    initAxes();
+    resetAxes();
 
     findCentre();
     findWidth();
@@ -195,115 +168,93 @@ public class RotatableCanvas extends Panel implements MouseListener,
    * super.removeNotify(); }
    */
 
-  public void initAxes()
+  /**
+   * Resets axes to the initial state: x-axis to the right, y-axis up, z-axis to
+   * back (so obscured in a 2-D display)
+   */
+  public void resetAxes()
   {
-    for (int i = 0; i < 3; i++)
-    {
-      for (int j = 0; j < 3; j++)
-      {
-        if (i != j)
-        {
-          axes[i][j] = 0;
-        }
-        else
-        {
-          axes[i][j] = 1;
-        }
-      }
-    }
+    axisEndPoints[0] = new Point(1f, 0f, 0f);
+    axisEndPoints[1] = new Point(0f, 1f, 0f);
+    axisEndPoints[2] = new Point(0f, 0f, 1f);
   }
 
+  /**
+   * Computes and saves the maximum and minimum (x, y, z) positions of any
+   * sequence point, and also the min-max range (width) for each dimension, and
+   * the maximum width for all dimensions
+   */
   public void findWidth()
   {
     max = new float[3];
     min = new float[3];
 
-    max[0] = (float) -1e30;
-    max[1] = (float) -1e30;
-    max[2] = (float) -1e30;
+    max[0] = Float.MIN_VALUE;
+    max[1] = Float.MIN_VALUE;
+    max[2] = Float.MIN_VALUE;
 
-    min[0] = (float) 1e30;
-    min[1] = (float) 1e30;
-    min[2] = (float) 1e30;
+    min[0] = Float.MAX_VALUE;
+    min[1] = Float.MAX_VALUE;
+    min[2] = Float.MAX_VALUE;
 
-    for (int i = 0; i < 3; i++)
+    for (SequencePoint sp : points)
     {
-      for (int j = 0; j < npoint; j++)
-      {
-        SequencePoint sp = (SequencePoint) points.elementAt(j);
-        if (sp.coord[i] >= max[i])
-        {
-          max[i] = sp.coord[i];
-        }
-        if (sp.coord[i] <= min[i])
-        {
-          min[i] = sp.coord[i];
-        }
-      }
+      max[0] = Math.max(max[0], sp.coord.x);
+      max[1] = Math.max(max[1], sp.coord.y);
+      max[2] = Math.max(max[2], sp.coord.z);
+      min[0] = Math.min(min[0], sp.coord.x);
+      min[1] = Math.min(min[1], sp.coord.y);
+      min[2] = Math.min(min[2], sp.coord.z);
     }
 
-    // System.out.println("xmax " + max[0] + " min " + min[0]);
-    // System.out.println("ymax " + max[1] + " min " + min[1]);
-    // System.out.println("zmax " + max[2] + " min " + min[2]);
-
     width[0] = Math.abs(max[0] - min[0]);
     width[1] = Math.abs(max[1] - min[1]);
     width[2] = Math.abs(max[2] - min[2]);
 
-    maxwidth = width[0];
-
-    if (width[1] > width[0])
-    {
-      maxwidth = width[1];
-    }
-    if (width[2] > width[1])
-    {
-      maxwidth = width[2];
-    }
-
-    // System.out.println("Maxwidth = " + maxwidth);
+    maxwidth = Math.max(width[0], Math.max(width[1], width[2]));
   }
 
   public float findScale()
   {
-    int dim, width, height;
+    int dim, w, height;
     if (getSize().width != 0)
     {
-      width = getSize().width;
+      w = getSize().width;
       height = getSize().height;
     }
     else
     {
-      width = prefsize.width;
+      w = prefsize.width;
       height = prefsize.height;
     }
 
-    if (width < height)
+    if (w < height)
     {
-      dim = width;
+      dim = w;
     }
     else
     {
       dim = height;
     }
 
-    return (float) (dim * scalefactor / (2 * maxwidth));
+    return dim * scalefactor / (2 * maxwidth);
   }
 
+  /**
+   * Computes and saves the position of the centre of the view
+   */
   public void findCentre()
   {
-    // Find centre coordinate
     findWidth();
 
-    centre[0] = (max[0] + min[0]) / 2;
-    centre[1] = (max[1] + min[1]) / 2;
-    centre[2] = (max[2] + min[2]) / 2;
+    float x = (max[0] + min[0]) / 2;
+    float y = (max[1] + min[1]) / 2;
+    float z = (max[2] + min[2]) / 2;
 
-    // System.out.println("Centre x " + centre[0]);
-    // System.out.println("Centre y " + centre[1]);
-    // System.out.println("Centre z " + centre[2]);
+    centre = new Point(x, y, z);
   }
 
+  @Override
   public Dimension getPreferredSize()
   {
     if (prefsize != null)
@@ -316,16 +267,19 @@ public class RotatableCanvas extends Panel implements MouseListener,
     }
   }
 
+  @Override
   public Dimension getMinimumSize()
   {
     return getPreferredSize();
   }
 
+  @Override
   public void update(Graphics g)
   {
     paint(g);
   }
 
+  @Override
   public void paint(Graphics g)
   {
     if (points == null)
@@ -355,7 +309,7 @@ public class RotatableCanvas extends Panel implements MouseListener,
 
       drawBackground(ig, Color.black);
       drawScene(ig);
-      if (drawAxes == true)
+      if (drawAxes)
       {
         drawAxes(ig);
       }
@@ -377,8 +331,8 @@ public class RotatableCanvas extends Panel implements MouseListener,
     for (int i = 0; i < 3; i++)
     {
       g.drawLine(getSize().width / 2, getSize().height / 2,
-              (int) (axes[i][0] * scale * max[0] + getSize().width / 2),
-              (int) (axes[i][1] * scale * max[1] + getSize().height / 2));
+              (int) (axisEndPoints[i].x * scale * max[0] + getSize().width / 2),
+              (int) (axisEndPoints[i].y * scale * max[1] + getSize().height / 2));
     }
   }
 
@@ -390,81 +344,85 @@ public class RotatableCanvas extends Panel implements MouseListener,
 
   public void drawScene(Graphics g)
   {
-    // boolean darker = false;
-
-    int halfwidth = getSize().width / 2;
-    int halfheight = getSize().height / 2;
-
     for (int i = 0; i < npoint; i++)
     {
-      SequencePoint sp = (SequencePoint) points.elementAt(i);
-      int x = (int) ((float) (sp.coord[0] - centre[0]) * scale) + halfwidth;
-      int y = (int) ((float) (sp.coord[1] - centre[1]) * scale)
-              + halfheight;
-      float z = sp.coord[1] - centre[2];
-
-      if (av.getSequenceColour(sp.sequence) == Color.black)
-      {
-        g.setColor(Color.white);
-      }
-      else
-      {
-        g.setColor(av.getSequenceColour(sp.sequence));
-      }
-
+      SequencePoint sp = points.get(i);
+      SequenceI sequence = sp.getSequence();
+      Color sequenceColour = av.getSequenceColour(sequence);
+      g.setColor(
+              sequenceColour == Color.black ? Color.white : sequenceColour);
       if (av.getSelectionGroup() != null)
       {
         if (av.getSelectionGroup().getSequences(null)
-                .contains(((SequencePoint) points.elementAt(i)).sequence))
+                .contains(sequence))
         {
           g.setColor(Color.gray);
         }
       }
-      if (z < 0)
+
+      if (sp.coord.z < centre.z)
       {
         g.setColor(g.getColor().darker());
       }
 
+      int halfwidth = getSize().width / 2;
+      int halfheight = getSize().height / 2;
+      int x = (int) ((sp.coord.x - centre.x) * scale) + halfwidth;
+      int y = (int) ((sp.coord.y - centre.y) * scale) + halfheight;
       g.fillRect(x - 3, y - 3, 6, 6);
+
       if (showLabels)
       {
         g.setColor(Color.red);
-        g.drawString(
-                ((SequencePoint) points.elementAt(i)).sequence.getName(),
-                x - 3, y - 4);
+        g.drawString(sequence.getName(), x - 3, y - 4);
       }
     }
   }
 
-  public Dimension minimumsize()
-  {
-    return prefsize;
-  }
-
-  public Dimension preferredsize()
-  {
-    return prefsize;
-  }
-
+  @Override
   public void keyTyped(KeyEvent evt)
   {
   }
 
+  @Override
   public void keyReleased(KeyEvent evt)
   {
   }
 
+  @Override
   public void keyPressed(KeyEvent evt)
   {
-    if (evt.getKeyCode() == KeyEvent.VK_UP)
+    boolean shiftDown = evt.isShiftDown();
+    int keyCode = evt.getKeyCode();
+    if (keyCode == KeyEvent.VK_UP)
+    {
+      if (shiftDown)
+      {
+        rotate(0f, -1f);
+      }
+      else
+      {
+        zoom(1.1f);
+      }
+    }
+    else if (keyCode == KeyEvent.VK_DOWN)
     {
-      scalefactor = (float) (scalefactor * 1.1);
-      scale = findScale();
+      if (shiftDown)
+      {
+        rotate(0f, 1f);
+      }
+      else
+      {
+        zoom(0.9f);
+      }
     }
-    else if (evt.getKeyCode() == KeyEvent.VK_DOWN)
+    else if (shiftDown && keyCode == KeyEvent.VK_LEFT)
     {
-      scalefactor = (float) (scalefactor * 0.9);
-      scale = findScale();
+      rotate(1f, 0f);
+    }
+    else if (shiftDown && keyCode == KeyEvent.VK_RIGHT)
+    {
+      rotate(-1f, 0f);
     }
     else if (evt.getKeyChar() == 's')
     {
@@ -478,46 +436,34 @@ public class RotatableCanvas extends Panel implements MouseListener,
     repaint();
   }
 
-  public void printPoints()
-  {
-    for (int i = 0; i < npoint; i++)
-    {
-      SequencePoint sp = (SequencePoint) points.elementAt(i);
-      Format.print(System.out, "%5d ", i);
-      for (int j = 0; j < 3; j++)
-      {
-        Format.print(System.out, "%13.3f  ", sp.coord[j]);
-      }
-      System.out.println();
-    }
-  }
-
+  @Override
   public void mouseClicked(MouseEvent evt)
   {
   }
 
+  @Override
   public void mouseEntered(MouseEvent evt)
   {
   }
 
+  @Override
   public void mouseExited(MouseEvent evt)
   {
   }
 
+  @Override
   public void mouseReleased(MouseEvent evt)
   {
   }
 
+  @Override
   public void mousePressed(MouseEvent evt)
   {
     int x = evt.getX();
     int y = evt.getY();
 
-    mx = x;
-    my = y;
-
-    omx = mx;
-    omy = my;
+    mouseX = x;
+    mouseY = y;
 
     startx = x;
     starty = y;
@@ -528,7 +474,7 @@ public class RotatableCanvas extends Panel implements MouseListener,
     rectx2 = -1;
     recty2 = -1;
 
-    SequenceI found = findPoint(x, y);
+    SequenceI found = findSequenceAtPoint(x, y);
 
     if (found != null)
     {
@@ -552,9 +498,10 @@ public class RotatableCanvas extends Panel implements MouseListener,
     repaint();
   }
 
+  @Override
   public void mouseMoved(MouseEvent evt)
   {
-    SequenceI found = findPoint(evt.getX(), evt.getY());
+    SequenceI found = findSequenceAtPoint(evt.getX(), evt.getY());
     if (found == null)
     {
       tooltip = null;
@@ -568,40 +515,22 @@ public class RotatableCanvas extends Panel implements MouseListener,
     repaint();
   }
 
+  @Override
   public void mouseDragged(MouseEvent evt)
   {
-    mx = evt.getX();
-    my = evt.getY();
-
-    rotmat.setIdentity();
+    int xPos = evt.getX();
+    int yPos = evt.getY();
 
-    rotmat.rotate((float) (my - omy), 'x');
-    rotmat.rotate((float) (mx - omx), 'y');
-
-    for (int i = 0; i < npoint; i++)
+    if (xPos == mouseX && yPos == mouseY)
     {
-      SequencePoint sp = (SequencePoint) points.elementAt(i);
-      sp.coord[0] -= centre[0];
-      sp.coord[1] -= centre[1];
-      sp.coord[2] -= centre[2];
-
-      // Now apply the rotation matrix
-      sp.coord = rotmat.vectorMultiply(sp.coord);
-
-      // Now translate back again
-      sp.coord[0] += centre[0];
-      sp.coord[1] += centre[1];
-      sp.coord[2] += centre[2];
+      return;
     }
 
-    for (int i = 0; i < 3; i++)
-    {
-      axes[i] = rotmat.vectorMultiply(axes[i]);
-    }
-    omx = mx;
-    omy = my;
+    int xDelta = xPos - mouseX;
+    int yDelta = yPos - mouseY;
 
-    paint(this.getGraphics());
+    rotate(xDelta, yDelta);
+    repaint();
   }
 
   public void rectSelect(int x1, int y1, int x2, int y2)
@@ -609,29 +538,38 @@ public class RotatableCanvas extends Panel implements MouseListener,
     // boolean changedSel = false;
     for (int i = 0; i < npoint; i++)
     {
-      SequencePoint sp = (SequencePoint) points.elementAt(i);
-      int tmp1 = (int) ((sp.coord[0] - centre[0]) * scale
-              + (float) getSize().width / 2.0);
-      int tmp2 = (int) ((sp.coord[1] - centre[1]) * scale
-              + (float) getSize().height / 2.0);
+      SequencePoint sp = points.get(i);
+      int tmp1 = (int) ((sp.coord.x - centre.x) * scale
+              + getSize().width / 2.0);
+      int tmp2 = (int) ((sp.coord.y - centre.y) * scale
+              + getSize().height / 2.0);
 
+      SequenceI sequence = sp.getSequence();
       if (tmp1 > x1 && tmp1 < x2 && tmp2 > y1 && tmp2 < y2)
       {
         if (av != null)
         {
           if (!av.getSelectionGroup().getSequences(null)
-                  .contains(sp.sequence))
+                  .contains(sequence))
           {
-            av.getSelectionGroup().addSequence(sp.sequence, true);
+            av.getSelectionGroup().addSequence(sequence, true);
           }
         }
       }
     }
   }
 
-  public SequenceI findPoint(int x, int y)
+  /**
+   * Answers the first sequence found whose point on the display is within 2
+   * pixels of the given coordinates, or null if none is found
+   * 
+   * @param x
+   * @param y
+   * 
+   * @return
+   */
+  public SequenceI findSequenceAtPoint(int x, int y)
   {
-
     int halfwidth = getSize().width / 2;
     int halfheight = getSize().height / 2;
 
@@ -640,20 +578,22 @@ public class RotatableCanvas extends Panel implements MouseListener,
     for (int i = 0; i < npoint; i++)
     {
 
-      SequencePoint sp = (SequencePoint) points.elementAt(i);
-      int px = (int) ((float) (sp.coord[0] - centre[0]) * scale)
+      SequencePoint sp = points.get(i);
+      int px = (int) ((sp.coord.x - centre.x) * scale)
               + halfwidth;
-      int py = (int) ((float) (sp.coord[1] - centre[1]) * scale)
+      int py = (int) ((sp.coord.y - centre.y) * scale)
               + halfheight;
 
       if (Math.abs(px - x) < 3 && Math.abs(py - y) < 3)
       {
         found = i;
+        break;
       }
     }
+
     if (found != -1)
     {
-      return ((SequencePoint) points.elementAt(found)).sequence;
+      return points.get(found).getSequence();
     }
     else
     {
@@ -661,4 +601,79 @@ public class RotatableCanvas extends Panel implements MouseListener,
     }
   }
 
+  /**
+   * Resets the view to initial state (no rotation)
+   */
+  public void resetView()
+  {
+    img = null;
+    resetAxes();
+  }
+
+  @Override
+  public void zoom(float factor)
+  {
+    if (factor > 0f)
+    {
+      scalefactor *= factor;
+    }
+    scale = findScale();
+  }
+
+  @Override
+  public void rotate(float x, float y)
+  {
+    if (x == 0f && y == 0f)
+    {
+      return;
+    }
+  
+    /*
+     * get the identity transformation...
+     */
+    RotatableMatrix rotmat = new RotatableMatrix();
+  
+    /*
+     * rotate around the X axis for change in Y
+     * (mouse movement up/down); note we are equating a
+     * number of pixels with degrees of rotation here!
+     */
+    if (y != 0)
+    {
+      rotmat.rotate(y, Axis.X);
+    }
+  
+    /*
+     * rotate around the Y axis for change in X
+     * (mouse movement left/right)
+     */
+    if (x != 0)
+    {
+      rotmat.rotate(x, Axis.Y);
+    }
+  
+    /*
+     * apply the composite transformation to sequence points
+     */
+    for (int i = 0; i < npoint; i++)
+    {
+      SequencePoint sp = points.get(i);
+      sp.translate(-centre.x, -centre.y, -centre.z);
+
+      // Now apply the rotation matrix
+      sp.coord = rotmat.vectorMultiply(sp.coord);
+
+      // Now translate back again
+      sp.translate(centre.x, centre.y, centre.z);
+    }
+  
+    /*
+     * rotate the x/y/z axis positions
+     */
+    for (int i = 0; i < DIMS; i++)
+    {
+      axisEndPoints[i] = rotmat.vectorMultiply(axisEndPoints[i]);
+    }
+  }
+
 }
index 35d73de..96eb6b9 100755 (executable)
@@ -136,13 +136,6 @@ public class SeqCanvas extends Panel implements ViewportListenerI
               .visibleToAbsoluteColumn(endx);
     }
 
-    int maxwidth = av.getAlignment().getWidth();
-    if (av.hasHiddenColumns())
-    {
-      maxwidth = av.getAlignment().getHiddenColumns()
-              .absoluteToVisibleColumn(maxwidth) - 1;
-    }
-
     // WEST SCALE
     for (int i = 0; i < av.getAlignment().getHeight(); i++)
     {
@@ -450,13 +443,7 @@ public class SeqCanvas extends Panel implements ViewportListenerI
     int endx;
     int ypos = hgap;
   
-    int maxwidth = av.getAlignment().getWidth();
-  
-    if (av.hasHiddenColumns())
-    {
-      maxwidth = av.getAlignment().getHiddenColumns()
-              .absoluteToVisibleColumn(maxwidth);
-    }
+    int maxwidth = av.getAlignment().getVisibleWidth();
   
     while ((ypos <= canvasHeight) && (startRes < maxwidth))
     {
@@ -565,7 +552,7 @@ public class SeqCanvas extends Panel implements ViewportListenerI
       int blockEnd;
 
       HiddenColumns hidden = av.getAlignment().getHiddenColumns();
-      VisibleContigsIterator regions = (VisibleContigsIterator) hidden
+      VisibleContigsIterator regions = hidden
               .getVisContigsIterator(startRes, endRes + 1, true);
 
       while (regions.hasNext())
index 6ee75bd..cb26fb5 100755 (executable)
@@ -631,7 +631,7 @@ public class TreeCanvas extends Panel
 
       Vector<SequenceNode> l = tree.findLeaves(groups.get(i));
 
-      Vector<SequenceI> sequences = new Vector<SequenceI>();
+      Vector<SequenceI> sequences = new Vector<>();
       for (int j = 0; j < l.size(); j++)
       {
         SequenceI s1 = (SequenceI) l.elementAt(j).element();
@@ -657,7 +657,8 @@ public class TreeCanvas extends Panel
         }
         else
         {
-          cs = ColourSchemeProperty.getColourScheme(sg, ColourSchemeProperty
+          cs = ColourSchemeProperty.getColourScheme(av, sg,
+                  ColourSchemeProperty
                   .getColourName(av.getGlobalColourScheme()));
         }
         // cs is null if shading is an annotationColourGradient
index 83bc810..19aa800 100755 (executable)
@@ -114,7 +114,6 @@ import org.apache.log4j.SimpleLayout;
  * service</li>
  * <li>USAGESTATS (false - user prompted) Enable google analytics tracker for
  * collecting usage statistics</li>
- * <li>DAS_LOCAL_SOURCE list of local das sources</li>
  * <li>SHOW_OVERVIEW boolean for overview window display</li>
  * <li>ANTI_ALIAS boolean for smooth fonts</li>
  * <li>RIGHT_ALIGN_IDS boolean</li>
@@ -134,9 +133,7 @@ import org.apache.log4j.SimpleLayout;
  * sequence id (must be in SEQUENCE_LINKS or STORED_LINKS)
  * <li>GROUP_LINKS list of name|URL[|&lt;separator&gt;] tuples - see
  * jalview.utils.GroupURLLink for more info</li>
- * <li>DAS_REGISTRY_URL the registry to query</li>
  * <li>DEFAULT_BROWSER for unix</li>
- * <li>DAS_ACTIVE_SOURCE list of active sources</li>
  * <li>SHOW_MEMUSAGE boolean show memory usage and warning indicator on desktop
  * (false)</li>
  * <li>VERSION_CHECK (true) check for the latest release version from
@@ -226,12 +223,6 @@ public class Cache
    */
   public static final String JALVIEWLOGLEVEL = "logs.Jalview.level";
 
-  public static final String DAS_LOCAL_SOURCE = "DAS_LOCAL_SOURCE";
-
-  public static final String DAS_REGISTRY_URL = "DAS_REGISTRY_URL";
-
-  public static final String DAS_ACTIVE_SOURCE = "DAS_ACTIVE_SOURCE";
-
   /**
    * Sifts settings
    */
@@ -600,6 +591,24 @@ public class Cache
     return def;
   }
 
+  public static int getDefault(String property, int def)
+  {
+    String string = getProperty(property);
+    if (string != null)
+    {
+      try
+      {
+        def = Integer.parseInt(string);
+      } catch (NumberFormatException e)
+      {
+        System.out.println("Error parsing int property '" + property
+                + "' with value '" + string + "'");
+      }
+    }
+
+    return def;
+  }
+
   /**
    * These methods are used when checking if the saved preference is different
    * to the default setting
index 3270144..cc41c53 100755 (executable)
@@ -391,10 +391,7 @@ public class Jalview
     FileFormatI format = null;
     DataSourceType protocol = null;
     FileLoader fileLoader = new FileLoader(!headless);
-    Vector<String> getFeatures = null; // vector of das source nicknames to
-                                       // fetch
-    // features from
-    // loading is done.
+
     String groovyscript = null; // script to execute after all loading is
     // completed one way or another
     // extract groovy argument and execute if necessary
@@ -541,7 +538,8 @@ public class Jalview
           data.replaceAll("%20", " ");
 
           ColourSchemeI cs = ColourSchemeProperty
-                  .getColourScheme(af.getViewport().getAlignment(), data);
+                  .getColourScheme(af.getViewport(),
+                          af.getViewport().getAlignment(), data);
 
           if (cs != null)
           {
@@ -625,27 +623,6 @@ public class Jalview
         // TODO - load PDB structure(s) to alignment JAL-629
         // (associate with identical sequence in alignment, or a specified
         // sequence)
-
-        getFeatures = checkDasArguments(aparser);
-        if (af != null && getFeatures != null)
-        {
-          FeatureFetcher ff = startFeatureFetching(getFeatures);
-          if (ff != null)
-          {
-            while (!ff.allFinished() || af.operationInProgress())
-            {
-              // wait around until fetching is finished.
-              try
-              {
-                Thread.sleep(100);
-              } catch (Exception e)
-              {
-
-              }
-            }
-          }
-          getFeatures = null; // have retrieved features - forget them now.
-        }
         if (groovyscript != null)
         {
           // Execute the groovy script after we've done all the rendering stuff
@@ -787,20 +764,9 @@ public class Jalview
 
       startUpAlframe = fileLoader.LoadFileWaitTillLoaded(file, protocol,
               format);
-      getFeatures = checkDasArguments(aparser);
       // extract groovy arguments before anything else.
     }
-    // If the user has specified features to be retrieved,
-    // or a groovy script to be executed, do them if they
-    // haven't been done already
-    // fetch features for the default alignment
-    if (getFeatures != null)
-    {
-      if (startUpAlframe != null)
-      {
-        startFeatureFetching(getFeatures);
-      }
-    }
+
     // Once all other stuff is done, execute any groovy scripts (in order)
     if (groovyscript != null)
     {
@@ -863,9 +829,6 @@ public class Jalview
                     // (quote the 'PROPERTY=VALUE' pair to ensure spaces are
                     // passed in correctly)"
                     + "-jabaws URL\tSpecify URL for Jabaws services (e.g. for a local installation).\n"
-                    + "-dasserver nickname=URL\tAdd and enable a das server with given nickname\n\t\t\t(alphanumeric or underscores only) for retrieval of features for all alignments.\n"
-                    + "\t\t\tSources that also support the sequence command may be specified by prepending the URL with sequence:\n"
-                    + "\t\t\t e.g. sequence:http://localdas.somewhere.org/das/source)\n"
                     + "-fetchfrom nickname\tQuery nickname for features for the alignments and display them.\n"
                     // +
                     // "-vdoc vamsas-document\tImport vamsas document into new
@@ -1024,94 +987,6 @@ public class Jalview
     }
   }
 
-  /**
-   * Check commandline for any das server definitions or any fetchfrom switches
-   * 
-   * @return vector of DAS source nicknames to retrieve from
-   */
-  private static Vector<String> checkDasArguments(ArgsParser aparser)
-  {
-    Vector<String> source = null;
-    String data;
-    String locsources = Cache.getProperty(Cache.DAS_LOCAL_SOURCE);
-    while ((data = aparser.getValue("dasserver", true)) != null)
-    {
-      String nickname = null;
-      String url = null;
-      int pos = data.indexOf('=');
-      // determine capabilities
-      if (pos > 0)
-      {
-        nickname = data.substring(0, pos);
-      }
-      url = data.substring(pos + 1);
-      if (url != null && (url.startsWith("http:")
-              || url.startsWith("sequence:http:")))
-      {
-        if (nickname == null)
-        {
-          nickname = url;
-        }
-        if (locsources == null)
-        {
-          locsources = "";
-        }
-        else
-        {
-          locsources += "\t";
-        }
-        locsources = locsources + nickname + "|" + url;
-        System.err.println(
-                "NOTE! dasserver parameter not yet really supported (got args of "
-                        + nickname + "|" + url);
-        if (source == null)
-        {
-          source = new Vector<>();
-        }
-        source.addElement(nickname);
-      }
-      System.out.println(
-              "CMD [-dasserver " + data + "] executed successfully!");
-    } // loop until no more server entries are found.
-    if (locsources != null && locsources.indexOf('|') > -1)
-    {
-      Cache.log.debug("Setting local source list in properties file to:\n"
-              + locsources);
-      Cache.setProperty(Cache.DAS_LOCAL_SOURCE, locsources);
-    }
-    while ((data = aparser.getValue("fetchfrom", true)) != null)
-    {
-      System.out.println("adding source '" + data + "'");
-      if (source == null)
-      {
-        source = new Vector<>();
-      }
-      source.addElement(data);
-    }
-    return source;
-  }
-
-  /**
-   * start a feature fetcher for every alignment frame
-   * 
-   * @param dasSources
-   */
-  private FeatureFetcher startFeatureFetching(
-          final Vector<String> dasSources)
-  {
-    FeatureFetcher ff = new FeatureFetcher();
-    AlignFrame afs[] = Desktop.getAlignFrames();
-    if (afs == null || afs.length == 0)
-    {
-      return null;
-    }
-    for (int i = 0; i < afs.length; i++)
-    {
-      ff.addFetcher(afs[i], dasSources);
-    }
-    return ff;
-  }
-
   public static boolean isHeadlessMode()
   {
     String isheadless = System.getProperty("java.awt.headless");
diff --git a/src/jalview/binding/Alignment.java b/src/jalview/binding/Alignment.java
deleted file mode 100644 (file)
index 0116b44..0000000
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * 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 -/
-//---------------------------------/
-
-import org.exolab.castor.xml.Marshaller;
-import org.exolab.castor.xml.Unmarshaller;
-
-/**
- * Class Alignment.
- * 
- * @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;
-    }
-    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);
-  }
-
-}
diff --git a/src/jalview/binding/Annotation.java b/src/jalview/binding/Annotation.java
deleted file mode 100644 (file)
index 2c9414b..0000000
+++ /dev/null
@@ -1,459 +0,0 @@
-/*
- * 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 -/
-//---------------------------------/
-
-import org.exolab.castor.xml.Marshaller;
-import org.exolab.castor.xml.Unmarshaller;
-
-/**
- * Class Annotation.
- * 
- * @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(
-              "getAnnotationElement: Index value '" + index
-                      + "' not in range [0.."
-                      + (this._annotationElementList.size() - 1) + "]");
-    }
-
-    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;
-    }
-    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);
-  }
-
-}
diff --git a/src/jalview/binding/AnnotationElement.java b/src/jalview/binding/AnnotationElement.java
deleted file mode 100644 (file)
index 505d91e..0000000
+++ /dev/null
@@ -1,305 +0,0 @@
-/*
- * 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 -/
-//---------------------------------/
-
-import org.exolab.castor.xml.Marshaller;
-import org.exolab.castor.xml.Unmarshaller;
-
-/**
- * Class AnnotationElement.
- * 
- * @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 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 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 validate() throws org.exolab.castor.xml.ValidationException
-  {
-    org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
-    validator.validate(this);
-  }
-
-}
diff --git a/src/jalview/binding/Colour.java b/src/jalview/binding/Colour.java
deleted file mode 100644 (file)
index f51e9af..0000000
+++ /dev/null
@@ -1,707 +0,0 @@
-/*
- * 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 -/
-//---------------------------------/
-
-import org.exolab.castor.xml.Marshaller;
-import org.exolab.castor.xml.Unmarshaller;
-
-/**
- * Class Colour.
- * 
- * @version $Revision$ $Date$
- */
-public class Colour implements java.io.Serializable
-{
-
-  // --------------------------/
-  // - Class/Member Variables -/
-  // --------------------------/
-
-  /**
-   * Single letter residue code for an alignment colour scheme, or feature type
-   * for a feature colour scheme
-   */
-  private java.lang.String _name;
-
-  /**
-   * Field _RGB.
-   */
-  private java.lang.String _RGB;
-
-  /**
-   * Field _minRGB.
-   */
-  private java.lang.String _minRGB;
-
-  /**
-   * Field _noValueColour.
-   */
-  private jalview.binding.types.NoValueColour _noValueColour = jalview.binding.types.NoValueColour
-          .valueOf("Min");
-
-  /**
-   * Field _threshType.
-   */
-  private jalview.binding.types.ColourThreshTypeType _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;
-
-  /**
-   * name of feature attribute to colour by, or attribute and sub-attribute
-   */
-  private java.util.Vector _attributeNameList;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public Colour()
-  {
-    super();
-    setNoValueColour(jalview.binding.types.NoValueColour.valueOf("Min"));
-    this._attributeNameList = new java.util.Vector();
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-   * 
-   * 
-   * @param vAttributeName
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addAttributeName(final java.lang.String vAttributeName)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check for the maximum size
-    if (this._attributeNameList.size() >= 2)
-    {
-      throw new IndexOutOfBoundsException(
-              "addAttributeName has a maximum of 2");
-    }
-
-    this._attributeNameList.addElement(vAttributeName);
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vAttributeName
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addAttributeName(final int index,
-          final java.lang.String vAttributeName)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check for the maximum size
-    if (this._attributeNameList.size() >= 2)
-    {
-      throw new IndexOutOfBoundsException(
-              "addAttributeName has a maximum of 2");
-    }
-
-    this._attributeNameList.add(index, vAttributeName);
-  }
-
-  /**
-   */
-  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;
-  }
-
-  /**
-   * Method enumerateAttributeName.
-   * 
-   * @return an Enumeration over all java.lang.String elements
-   */
-  public java.util.Enumeration enumerateAttributeName()
-  {
-    return this._attributeNameList.elements();
-  }
-
-  /**
-   * Method getAttributeName.
-   * 
-   * @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 getAttributeName(final int index)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._attributeNameList.size())
-    {
-      throw new IndexOutOfBoundsException("getAttributeName: Index value '"
-              + index + "' not in range [0.."
-              + (this._attributeNameList.size() - 1) + "]");
-    }
-
-    return (java.lang.String) _attributeNameList.get(index);
-  }
-
-  /**
-   * Method getAttributeName.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[] getAttributeName()
-  {
-    java.lang.String[] array = new java.lang.String[0];
-    return (java.lang.String[]) this._attributeNameList.toArray(array);
-  }
-
-  /**
-   * Method getAttributeNameCount.
-   * 
-   * @return the size of this collection
-   */
-  public int getAttributeNameCount()
-  {
-    return this._attributeNameList.size();
-  }
-
-  /**
-   * 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'. The field 'name' has the following
-   * description: Single letter residue code for an alignment colour scheme, or
-   * feature type for a feature colour scheme
-   * 
-   * @return the value of field 'Name'.
-   */
-  public java.lang.String getName()
-  {
-    return this._name;
-  }
-
-  /**
-   * Returns the value of field 'noValueColour'.
-   * 
-   * @return the value of field 'NoValueColour'.
-   */
-  public jalview.binding.types.NoValueColour getNoValueColour()
-  {
-    return this._noValueColour;
-  }
-
-  /**
-   * 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'.
-   * 
-   * @return the value of field 'ThreshType'.
-   */
-  public jalview.binding.types.ColourThreshTypeType 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);
-  }
-
-  /**
-   */
-  public void removeAllAttributeName()
-  {
-    this._attributeNameList.clear();
-  }
-
-  /**
-   * Method removeAttributeName.
-   * 
-   * @param vAttributeName
-   * @return true if the object was removed from the collection.
-   */
-  public boolean removeAttributeName(final java.lang.String vAttributeName)
-  {
-    boolean removed = _attributeNameList.remove(vAttributeName);
-    return removed;
-  }
-
-  /**
-   * Method removeAttributeNameAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public java.lang.String removeAttributeNameAt(final int index)
-  {
-    java.lang.Object obj = this._attributeNameList.remove(index);
-    return (java.lang.String) obj;
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vAttributeName
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void setAttributeName(final int index,
-          final java.lang.String vAttributeName)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._attributeNameList.size())
-    {
-      throw new IndexOutOfBoundsException("setAttributeName: Index value '"
-              + index + "' not in range [0.."
-              + (this._attributeNameList.size() - 1) + "]");
-    }
-
-    this._attributeNameList.set(index, vAttributeName);
-  }
-
-  /**
-   * 
-   * 
-   * @param vAttributeNameArray
-   */
-  public void setAttributeName(final java.lang.String[] vAttributeNameArray)
-  {
-    // -- copy array
-    _attributeNameList.clear();
-
-    for (int i = 0; i < vAttributeNameArray.length; i++)
-    {
-      this._attributeNameList.add(vAttributeNameArray[i]);
-    }
-  }
-
-  /**
-   * 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'. The field 'name' has the following
-   * description: Single letter residue code for an alignment colour scheme, or
-   * feature type for a feature colour scheme
-   * 
-   * @param name
-   *          the value of field 'name'.
-   */
-  public void setName(final java.lang.String name)
-  {
-    this._name = name;
-  }
-
-  /**
-   * Sets the value of field 'noValueColour'.
-   * 
-   * @param noValueColour
-   *          the value of field 'noValueColour'.
-   */
-  public void setNoValueColour(
-          final jalview.binding.types.NoValueColour noValueColour)
-  {
-    this._noValueColour = noValueColour;
-  }
-
-  /**
-   * 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'.
-   * 
-   * @param threshType
-   *          the value of field 'threshType'.
-   */
-  public void setThreshType(
-          final jalview.binding.types.ColourThreshTypeType 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);
-  }
-
-}
diff --git a/src/jalview/binding/CompoundMatcher.java b/src/jalview/binding/CompoundMatcher.java
deleted file mode 100644 (file)
index a2d1048..0000000
+++ /dev/null
@@ -1,368 +0,0 @@
-/*
- * 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 -/
-//---------------------------------/
-
-import org.exolab.castor.xml.Marshaller;
-import org.exolab.castor.xml.Unmarshaller;
-
-/**
- * Class CompoundMatcher.
- * 
- * @version $Revision$ $Date$
- */
-public class CompoundMatcher implements java.io.Serializable
-{
-
-  // --------------------------/
-  // - Class/Member Variables -/
-  // --------------------------/
-
-  /**
-   * If true, matchers are AND-ed, if false they are OR-ed
-   */
-  private boolean _and;
-
-  /**
-   * keeps track of state for field: _and
-   */
-  private boolean _has_and;
-
-  /**
-   * Field _matcherSetList.
-   */
-  private java.util.Vector _matcherSetList;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public CompoundMatcher()
-  {
-    super();
-    this._matcherSetList = new java.util.Vector();
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-   * 
-   * 
-   * @param vMatcherSet
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addMatcherSet(final jalview.binding.MatcherSet vMatcherSet)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check for the maximum size
-    if (this._matcherSetList.size() >= 2)
-    {
-      throw new IndexOutOfBoundsException(
-              "addMatcherSet has a maximum of 2");
-    }
-
-    this._matcherSetList.addElement(vMatcherSet);
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vMatcherSet
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addMatcherSet(final int index,
-          final jalview.binding.MatcherSet vMatcherSet)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check for the maximum size
-    if (this._matcherSetList.size() >= 2)
-    {
-      throw new IndexOutOfBoundsException(
-              "addMatcherSet has a maximum of 2");
-    }
-
-    this._matcherSetList.add(index, vMatcherSet);
-  }
-
-  /**
-   */
-  public void deleteAnd()
-  {
-    this._has_and = false;
-  }
-
-  /**
-   * Method enumerateMatcherSet.
-   * 
-   * @return an Enumeration over all jalview.binding.MatcherSet elements
-   */
-  public java.util.Enumeration enumerateMatcherSet()
-  {
-    return this._matcherSetList.elements();
-  }
-
-  /**
-   * Returns the value of field 'and'. The field 'and' has the following
-   * description: If true, matchers are AND-ed, if false they are OR-ed
-   * 
-   * @return the value of field 'And'.
-   */
-  public boolean getAnd()
-  {
-    return this._and;
-  }
-
-  /**
-   * Method getMatcherSet.
-   * 
-   * @param index
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   * @return the value of the jalview.binding.MatcherSet at the given index
-   */
-  public jalview.binding.MatcherSet getMatcherSet(final int index)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._matcherSetList.size())
-    {
-      throw new IndexOutOfBoundsException(
-              "getMatcherSet: Index value '" + index + "' not in range [0.."
-                      + (this._matcherSetList.size() - 1) + "]");
-    }
-
-    return (jalview.binding.MatcherSet) _matcherSetList.get(index);
-  }
-
-  /**
-   * Method getMatcherSet.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.MatcherSet[] getMatcherSet()
-  {
-    jalview.binding.MatcherSet[] array = new jalview.binding.MatcherSet[0];
-    return (jalview.binding.MatcherSet[]) this._matcherSetList
-            .toArray(array);
-  }
-
-  /**
-   * Method getMatcherSetCount.
-   * 
-   * @return the size of this collection
-   */
-  public int getMatcherSetCount()
-  {
-    return this._matcherSetList.size();
-  }
-
-  /**
-   * Method hasAnd.
-   * 
-   * @return true if at least one And has been added
-   */
-  public boolean hasAnd()
-  {
-    return this._has_and;
-  }
-
-  /**
-   * Returns the value of field 'and'. The field 'and' has the following
-   * description: If true, matchers are AND-ed, if false they are OR-ed
-   * 
-   * @return the value of field 'And'.
-   */
-  public boolean isAnd()
-  {
-    return this._and;
-  }
-
-  /**
-   * 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 removeAllMatcherSet()
-  {
-    this._matcherSetList.clear();
-  }
-
-  /**
-   * Method removeMatcherSet.
-   * 
-   * @param vMatcherSet
-   * @return true if the object was removed from the collection.
-   */
-  public boolean removeMatcherSet(
-          final jalview.binding.MatcherSet vMatcherSet)
-  {
-    boolean removed = _matcherSetList.remove(vMatcherSet);
-    return removed;
-  }
-
-  /**
-   * Method removeMatcherSetAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public jalview.binding.MatcherSet removeMatcherSetAt(final int index)
-  {
-    java.lang.Object obj = this._matcherSetList.remove(index);
-    return (jalview.binding.MatcherSet) obj;
-  }
-
-  /**
-   * Sets the value of field 'and'. The field 'and' has the following
-   * description: If true, matchers are AND-ed, if false they are OR-ed
-   * 
-   * @param and
-   *          the value of field 'and'.
-   */
-  public void setAnd(final boolean and)
-  {
-    this._and = and;
-    this._has_and = true;
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vMatcherSet
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void setMatcherSet(final int index,
-          final jalview.binding.MatcherSet vMatcherSet)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._matcherSetList.size())
-    {
-      throw new IndexOutOfBoundsException(
-              "setMatcherSet: Index value '" + index + "' not in range [0.."
-                      + (this._matcherSetList.size() - 1) + "]");
-    }
-
-    this._matcherSetList.set(index, vMatcherSet);
-  }
-
-  /**
-   * 
-   * 
-   * @param vMatcherSetArray
-   */
-  public void setMatcherSet(
-          final jalview.binding.MatcherSet[] vMatcherSetArray)
-  {
-    // -- copy array
-    _matcherSetList.clear();
-
-    for (int i = 0; i < vMatcherSetArray.length; i++)
-    {
-      this._matcherSetList.add(vMatcherSetArray[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.CompoundMatcher
-   */
-  public static jalview.binding.CompoundMatcher unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.binding.CompoundMatcher) Unmarshaller
-            .unmarshal(jalview.binding.CompoundMatcher.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);
-  }
-
-}
diff --git a/src/jalview/binding/Feature.java b/src/jalview/binding/Feature.java
deleted file mode 100644 (file)
index d72b29c..0000000
+++ /dev/null
@@ -1,304 +0,0 @@
-/*
- * 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 -/
-//---------------------------------/
-
-import org.exolab.castor.xml.Marshaller;
-import org.exolab.castor.xml.Unmarshaller;
-
-/**
- * Class Feature.
- * 
- * @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 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 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 validate() throws org.exolab.castor.xml.ValidationException
-  {
-    org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
-    validator.validate(this);
-  }
-
-}
diff --git a/src/jalview/binding/FeatureMatcher.java b/src/jalview/binding/FeatureMatcher.java
deleted file mode 100644 (file)
index e4e52fb..0000000
+++ /dev/null
@@ -1,381 +0,0 @@
-/*
- * 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 -/
-//---------------------------------/
-
-import org.exolab.castor.xml.Marshaller;
-import org.exolab.castor.xml.Unmarshaller;
-
-/**
- * Class FeatureMatcher.
- * 
- * @version $Revision$ $Date$
- */
-public class FeatureMatcher implements java.io.Serializable
-{
-
-  // --------------------------/
-  // - Class/Member Variables -/
-  // --------------------------/
-
-  /**
-   * Field _by.
-   */
-  private jalview.binding.types.FeatureMatcherByType _by;
-
-  /**
-   * name of feature attribute to filter on, or attribute and sub-attribute
-   */
-  private java.util.Vector _attributeNameList;
-
-  /**
-   * Field _condition.
-   */
-  private java.lang.String _condition;
-
-  /**
-   * Field _value.
-   */
-  private java.lang.String _value;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public FeatureMatcher()
-  {
-    super();
-    this._attributeNameList = new java.util.Vector();
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-   * 
-   * 
-   * @param vAttributeName
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addAttributeName(final java.lang.String vAttributeName)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check for the maximum size
-    if (this._attributeNameList.size() >= 2)
-    {
-      throw new IndexOutOfBoundsException(
-              "addAttributeName has a maximum of 2");
-    }
-
-    this._attributeNameList.addElement(vAttributeName);
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vAttributeName
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addAttributeName(final int index,
-          final java.lang.String vAttributeName)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check for the maximum size
-    if (this._attributeNameList.size() >= 2)
-    {
-      throw new IndexOutOfBoundsException(
-              "addAttributeName has a maximum of 2");
-    }
-
-    this._attributeNameList.add(index, vAttributeName);
-  }
-
-  /**
-   * Method enumerateAttributeName.
-   * 
-   * @return an Enumeration over all java.lang.String elements
-   */
-  public java.util.Enumeration enumerateAttributeName()
-  {
-    return this._attributeNameList.elements();
-  }
-
-  /**
-   * Method getAttributeName.
-   * 
-   * @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 getAttributeName(final int index)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._attributeNameList.size())
-    {
-      throw new IndexOutOfBoundsException("getAttributeName: Index value '"
-              + index + "' not in range [0.."
-              + (this._attributeNameList.size() - 1) + "]");
-    }
-
-    return (java.lang.String) _attributeNameList.get(index);
-  }
-
-  /**
-   * Method getAttributeName.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[] getAttributeName()
-  {
-    java.lang.String[] array = new java.lang.String[0];
-    return (java.lang.String[]) this._attributeNameList.toArray(array);
-  }
-
-  /**
-   * Method getAttributeNameCount.
-   * 
-   * @return the size of this collection
-   */
-  public int getAttributeNameCount()
-  {
-    return this._attributeNameList.size();
-  }
-
-  /**
-   * Returns the value of field 'by'.
-   * 
-   * @return the value of field 'By'.
-   */
-  public jalview.binding.types.FeatureMatcherByType getBy()
-  {
-    return this._by;
-  }
-
-  /**
-   * Returns the value of field 'condition'.
-   * 
-   * @return the value of field 'Condition'.
-   */
-  public java.lang.String getCondition()
-  {
-    return this._condition;
-  }
-
-  /**
-   * 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);
-  }
-
-  /**
-   */
-  public void removeAllAttributeName()
-  {
-    this._attributeNameList.clear();
-  }
-
-  /**
-   * Method removeAttributeName.
-   * 
-   * @param vAttributeName
-   * @return true if the object was removed from the collection.
-   */
-  public boolean removeAttributeName(final java.lang.String vAttributeName)
-  {
-    boolean removed = _attributeNameList.remove(vAttributeName);
-    return removed;
-  }
-
-  /**
-   * Method removeAttributeNameAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public java.lang.String removeAttributeNameAt(final int index)
-  {
-    java.lang.Object obj = this._attributeNameList.remove(index);
-    return (java.lang.String) obj;
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vAttributeName
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void setAttributeName(final int index,
-          final java.lang.String vAttributeName)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._attributeNameList.size())
-    {
-      throw new IndexOutOfBoundsException("setAttributeName: Index value '"
-              + index + "' not in range [0.."
-              + (this._attributeNameList.size() - 1) + "]");
-    }
-
-    this._attributeNameList.set(index, vAttributeName);
-  }
-
-  /**
-   * 
-   * 
-   * @param vAttributeNameArray
-   */
-  public void setAttributeName(final java.lang.String[] vAttributeNameArray)
-  {
-    // -- copy array
-    _attributeNameList.clear();
-
-    for (int i = 0; i < vAttributeNameArray.length; i++)
-    {
-      this._attributeNameList.add(vAttributeNameArray[i]);
-    }
-  }
-
-  /**
-   * Sets the value of field 'by'.
-   * 
-   * @param by
-   *          the value of field 'by'.
-   */
-  public void setBy(final jalview.binding.types.FeatureMatcherByType by)
-  {
-    this._by = by;
-  }
-
-  /**
-   * Sets the value of field 'condition'.
-   * 
-   * @param condition
-   *          the value of field 'condition'.
-   */
-  public void setCondition(final java.lang.String condition)
-  {
-    this._condition = condition;
-  }
-
-  /**
-   * 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.FeatureMatcher
-   */
-  public static jalview.binding.FeatureMatcher unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.binding.FeatureMatcher) Unmarshaller
-            .unmarshal(jalview.binding.FeatureMatcher.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);
-  }
-
-}
diff --git a/src/jalview/binding/FeatureMatcherSet.java b/src/jalview/binding/FeatureMatcherSet.java
deleted file mode 100644 (file)
index 7ba5f0e..0000000
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * 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 -/
-//---------------------------------/
-
-import org.exolab.castor.xml.Marshaller;
-import org.exolab.castor.xml.Unmarshaller;
-
-/**
- * A feature match condition, which may be simple or compound
- * 
- * @version $Revision$ $Date$
- */
-public class FeatureMatcherSet implements java.io.Serializable
-{
-
-  // --------------------------/
-  // - Class/Member Variables -/
-  // --------------------------/
-
-  /**
-   * Internal choice value storage
-   */
-  private java.lang.Object _choiceValue;
-
-  /**
-   * Field _matchCondition.
-   */
-  private jalview.binding.MatchCondition _matchCondition;
-
-  /**
-   * Field _compoundMatcher.
-   */
-  private jalview.binding.CompoundMatcher _compoundMatcher;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public FeatureMatcherSet()
-  {
-    super();
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-   * Returns the value of field 'choiceValue'. The field 'choiceValue' has the
-   * following description: Internal choice value storage
-   * 
-   * @return the value of field 'ChoiceValue'.
-   */
-  public java.lang.Object getChoiceValue()
-  {
-    return this._choiceValue;
-  }
-
-  /**
-   * Returns the value of field 'compoundMatcher'.
-   * 
-   * @return the value of field 'CompoundMatcher'.
-   */
-  public jalview.binding.CompoundMatcher getCompoundMatcher()
-  {
-    return this._compoundMatcher;
-  }
-
-  /**
-   * Returns the value of field 'matchCondition'.
-   * 
-   * @return the value of field 'MatchCondition'.
-   */
-  public jalview.binding.MatchCondition getMatchCondition()
-  {
-    return this._matchCondition;
-  }
-
-  /**
-   * 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 'compoundMatcher'.
-   * 
-   * @param compoundMatcher
-   *          the value of field 'compoundMatcher'.
-   */
-  public void setCompoundMatcher(
-          final jalview.binding.CompoundMatcher compoundMatcher)
-  {
-    this._compoundMatcher = compoundMatcher;
-    this._choiceValue = compoundMatcher;
-  }
-
-  /**
-   * Sets the value of field 'matchCondition'.
-   * 
-   * @param matchCondition
-   *          the value of field 'matchCondition'.
-   */
-  public void setMatchCondition(
-          final jalview.binding.MatchCondition matchCondition)
-  {
-    this._matchCondition = matchCondition;
-    this._choiceValue = matchCondition;
-  }
-
-  /**
-   * 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.FeatureMatcherSet
-   */
-  public static jalview.binding.FeatureMatcherSet unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.binding.FeatureMatcherSet) Unmarshaller
-            .unmarshal(jalview.binding.FeatureMatcherSet.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);
-  }
-
-}
diff --git a/src/jalview/binding/FeatureSettings.java b/src/jalview/binding/FeatureSettings.java
deleted file mode 100644 (file)
index 321536d..0000000
+++ /dev/null
@@ -1,289 +0,0 @@
-/*
- * 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 -/
-//---------------------------------/
-
-import org.exolab.castor.xml.Marshaller;
-import org.exolab.castor.xml.Unmarshaller;
-
-/**
- * Class FeatureSettings.
- * 
- * @version $Revision$ $Date$
- */
-public class FeatureSettings implements java.io.Serializable
-{
-
-  // --------------------------/
-  // - Class/Member Variables -/
-  // --------------------------/
-
-  /**
-   * Field _settingList.
-   */
-  private java.util.Vector _settingList;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public FeatureSettings()
-  {
-    super();
-    this._settingList = new java.util.Vector();
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-   * 
-   * 
-   * @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);
-  }
-
-  /**
-   * 
-   * 
-   * @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();
-  }
-
-  /**
-   * 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 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 getSettingCount.
-   * 
-   * @return the size of this collection
-   */
-  public int getSettingCount()
-  {
-    return this._settingList.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 removeAllSetting()
-  {
-    this._settingList.clear();
-  }
-
-  /**
-   * 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;
-  }
-
-  /**
-   * 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 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);
-  }
-
-  /**
-   * 
-   * 
-   * @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);
-  }
-
-  /**
-   * 
-   * 
-   * @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);
-  }
-
-}
diff --git a/src/jalview/binding/Features.java b/src/jalview/binding/Features.java
deleted file mode 100644 (file)
index bf283df..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * 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 -/
-//---------------------------------/
-
-import org.exolab.castor.xml.Marshaller;
-import org.exolab.castor.xml.Unmarshaller;
-
-/**
- * Class Features.
- * 
- * @version $Revision$ $Date$
- */
-public class Features extends Feature implements java.io.Serializable
-{
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public Features()
-  {
-    super();
-  }
-
-  // -----------/
-  // - 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;
-    }
-    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 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);
-  }
-
-}
diff --git a/src/jalview/binding/Filter.java b/src/jalview/binding/Filter.java
deleted file mode 100644 (file)
index 687ae91..0000000
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * 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 -/
-//---------------------------------/
-
-import org.exolab.castor.xml.Marshaller;
-import org.exolab.castor.xml.Unmarshaller;
-
-/**
- * Class Filter.
- * 
- * @version $Revision$ $Date$
- */
-public class Filter implements java.io.Serializable
-{
-
-  // --------------------------/
-  // - Class/Member Variables -/
-  // --------------------------/
-
-  /**
-   * Field _featureType.
-   */
-  private java.lang.String _featureType;
-
-  /**
-   * Field _matcherSet.
-   */
-  private jalview.binding.MatcherSet _matcherSet;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public Filter()
-  {
-    super();
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-   * Returns the value of field 'featureType'.
-   * 
-   * @return the value of field 'FeatureType'.
-   */
-  public java.lang.String getFeatureType()
-  {
-    return this._featureType;
-  }
-
-  /**
-   * Returns the value of field 'matcherSet'.
-   * 
-   * @return the value of field 'MatcherSet'.
-   */
-  public jalview.binding.MatcherSet getMatcherSet()
-  {
-    return this._matcherSet;
-  }
-
-  /**
-   * 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 'featureType'.
-   * 
-   * @param featureType
-   *          the value of field 'featureType'.
-   */
-  public void setFeatureType(final java.lang.String featureType)
-  {
-    this._featureType = featureType;
-  }
-
-  /**
-   * Sets the value of field 'matcherSet'.
-   * 
-   * @param matcherSet
-   *          the value of field 'matcherSet'.
-   */
-  public void setMatcherSet(final jalview.binding.MatcherSet matcherSet)
-  {
-    this._matcherSet = matcherSet;
-  }
-
-  /**
-   * 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.Filter
-   */
-  public static jalview.binding.Filter unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.binding.Filter) Unmarshaller
-            .unmarshal(jalview.binding.Filter.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);
-  }
-
-}
diff --git a/src/jalview/binding/JGroup.java b/src/jalview/binding/JGroup.java
deleted file mode 100644 (file)
index 555c2fd..0000000
+++ /dev/null
@@ -1,761 +0,0 @@
-/*
- * 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 -/
-//---------------------------------/
-
-import org.exolab.castor.xml.Marshaller;
-import org.exolab.castor.xml.Unmarshaller;
-
-/**
- * Class JGroup.
- * 
- * @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("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);
-  }
-
-}
diff --git a/src/jalview/binding/JSeq.java b/src/jalview/binding/JSeq.java
deleted file mode 100644 (file)
index 49334e1..0000000
+++ /dev/null
@@ -1,645 +0,0 @@
-/*
- * 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 -/
-//---------------------------------/
-
-import org.exolab.castor.xml.Marshaller;
-import org.exolab.castor.xml.Unmarshaller;
-
-/**
- * Class JSeq.
- * 
- * @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(
-              "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);
-  }
-
-}
diff --git a/src/jalview/binding/JalviewModel.java b/src/jalview/binding/JalviewModel.java
deleted file mode 100644 (file)
index 28645e0..0000000
+++ /dev/null
@@ -1,233 +0,0 @@
-/*
- * 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 -/
-//---------------------------------/
-
-import org.exolab.castor.xml.Marshaller;
-import org.exolab.castor.xml.Unmarshaller;
-
-/**
- * Class JalviewModel.
- * 
- * @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;
-    }
-    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);
-  }
-
-}
diff --git a/src/jalview/binding/JalviewModelSequence.java b/src/jalview/binding/JalviewModelSequence.java
deleted file mode 100644 (file)
index 9020ce2..0000000
+++ /dev/null
@@ -1,955 +0,0 @@
-/*
- * 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 -/
-//---------------------------------/
-
-import org.exolab.castor.xml.Marshaller;
-import org.exolab.castor.xml.Unmarshaller;
-
-/**
- * Class JalviewModelSequence.
- * 
- * @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(
-              "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);
-  }
-
-}
diff --git a/src/jalview/binding/JalviewUserColours.java b/src/jalview/binding/JalviewUserColours.java
deleted file mode 100644 (file)
index 67ee5a2..0000000
+++ /dev/null
@@ -1,503 +0,0 @@
-/*
- * 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 -/
-//---------------------------------/
-
-import org.exolab.castor.xml.Marshaller;
-import org.exolab.castor.xml.Unmarshaller;
-
-/**
- * Class JalviewUserColours.
- * 
- * @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;
-
-  /**
-   * Field _filterList.
-   */
-  private java.util.Vector _filterList;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public JalviewUserColours()
-  {
-    super();
-    this._colourList = new java.util.Vector();
-    this._filterList = 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);
-  }
-
-  /**
-   * 
-   * 
-   * @param vFilter
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addFilter(final Filter vFilter)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._filterList.addElement(vFilter);
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vFilter
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addFilter(final int index, final Filter vFilter)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._filterList.add(index, vFilter);
-  }
-
-  /**
-   * Method enumerateColour.
-   * 
-   * @return an Enumeration over all Colour elements
-   */
-  public java.util.Enumeration enumerateColour()
-  {
-    return this._colourList.elements();
-  }
-
-  /**
-   * Method enumerateFilter.
-   * 
-   * @return an Enumeration over all Filter elements
-   */
-  public java.util.Enumeration enumerateFilter()
-  {
-    return this._filterList.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);
-  }
-
-  /**
-   * 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();
-  }
-
-  /**
-   * Method getFilter.
-   * 
-   * @param index
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   * @return the value of the Filter at the given index
-   */
-  public Filter getFilter(final int index)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._filterList.size())
-    {
-      throw new IndexOutOfBoundsException(
-              "getFilter: Index value '" + index + "' not in range [0.."
-                      + (this._filterList.size() - 1) + "]");
-    }
-
-    return (Filter) _filterList.get(index);
-  }
-
-  /**
-   * Method getFilter.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 Filter[] getFilter()
-  {
-    Filter[] array = new Filter[0];
-    return (Filter[]) this._filterList.toArray(array);
-  }
-
-  /**
-   * Method getFilterCount.
-   * 
-   * @return the size of this collection
-   */
-  public int getFilterCount()
-  {
-    return this._filterList.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;
-    }
-    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();
-  }
-
-  /**
-   */
-  public void removeAllFilter()
-  {
-    this._filterList.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;
-  }
-
-  /**
-   * Method removeFilter.
-   * 
-   * @param vFilter
-   * @return true if the object was removed from the collection.
-   */
-  public boolean removeFilter(final Filter vFilter)
-  {
-    boolean removed = _filterList.remove(vFilter);
-    return removed;
-  }
-
-  /**
-   * Method removeFilterAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public Filter removeFilterAt(final int index)
-  {
-    java.lang.Object obj = this._filterList.remove(index);
-    return (Filter) 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]);
-    }
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vFilter
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void setFilter(final int index, final Filter vFilter)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._filterList.size())
-    {
-      throw new IndexOutOfBoundsException(
-              "setFilter: Index value '" + index + "' not in range [0.."
-                      + (this._filterList.size() - 1) + "]");
-    }
-
-    this._filterList.set(index, vFilter);
-  }
-
-  /**
-   * 
-   * 
-   * @param vFilterArray
-   */
-  public void setFilter(final Filter[] vFilterArray)
-  {
-    // -- copy array
-    _filterList.clear();
-
-    for (int i = 0; i < vFilterArray.length; i++)
-    {
-      this._filterList.add(vFilterArray[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);
-  }
-
-}
diff --git a/src/jalview/binding/MatchCondition.java b/src/jalview/binding/MatchCondition.java
deleted file mode 100644 (file)
index 44a3d3e..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * 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 -/
-//---------------------------------/
-
-import org.exolab.castor.xml.Marshaller;
-import org.exolab.castor.xml.Unmarshaller;
-
-/**
- * Class MatchCondition.
- * 
- * @version $Revision$ $Date$
- */
-public class MatchCondition extends FeatureMatcher
-        implements java.io.Serializable
-{
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public MatchCondition()
-  {
-    super();
-  }
-
-  // -----------/
-  // - 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;
-    }
-    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 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.FeatureMatcher
-   */
-  public static jalview.binding.FeatureMatcher unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.binding.FeatureMatcher) Unmarshaller
-            .unmarshal(jalview.binding.MatchCondition.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);
-  }
-
-}
diff --git a/src/jalview/binding/MatcherSet.java b/src/jalview/binding/MatcherSet.java
deleted file mode 100644 (file)
index 756d93a..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * 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 -/
-//---------------------------------/
-
-import org.exolab.castor.xml.Marshaller;
-import org.exolab.castor.xml.Unmarshaller;
-
-/**
- * Class MatcherSet.
- * 
- * @version $Revision$ $Date$
- */
-public class MatcherSet extends FeatureMatcherSet
-        implements java.io.Serializable
-{
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public MatcherSet()
-  {
-    super();
-  }
-
-  // -----------/
-  // - 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;
-    }
-    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 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.FeatureMatcherSet
-   */
-  public static jalview.binding.FeatureMatcherSet unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.binding.FeatureMatcherSet) Unmarshaller
-            .unmarshal(jalview.binding.MatcherSet.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);
-  }
-
-}
diff --git a/src/jalview/binding/Pdbentry.java b/src/jalview/binding/Pdbentry.java
deleted file mode 100644 (file)
index 77bb446..0000000
+++ /dev/null
@@ -1,344 +0,0 @@
-/*
- * 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 -/
-//---------------------------------/
-
-import org.exolab.castor.xml.Marshaller;
-import org.exolab.castor.xml.Unmarshaller;
-
-/**
- * Class Pdbentry.
- * 
- * @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("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 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;
-    }
-    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);
-  }
-
-}
diff --git a/src/jalview/binding/PdbentryItem.java b/src/jalview/binding/PdbentryItem.java
deleted file mode 100644 (file)
index 30a0512..0000000
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * This class was automatically generated with 
- * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
- * Schema.
- * $Id$
- */
-
-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(
-              "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();
-  }
-
-  /**
-     */
-  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(
-              "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]);
-    }
-  }
-
-}
diff --git a/src/jalview/binding/Pdbids.java b/src/jalview/binding/Pdbids.java
deleted file mode 100644 (file)
index 79cae6c..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * 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 -/
-//---------------------------------/
-
-import org.exolab.castor.xml.Marshaller;
-import org.exolab.castor.xml.Unmarshaller;
-
-/**
- * Class Pdbids.
- * 
- * @version $Revision$ $Date$
- */
-public class Pdbids extends Pdbentry implements java.io.Serializable
-{
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public Pdbids()
-  {
-    super();
-  }
-
-  // -----------/
-  // - 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;
-    }
-    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 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);
-  }
-
-}
diff --git a/src/jalview/binding/Property.java b/src/jalview/binding/Property.java
deleted file mode 100644 (file)
index 5823fed..0000000
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * 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 -/
-//---------------------------------/
-
-import org.exolab.castor.xml.Marshaller;
-import org.exolab.castor.xml.Unmarshaller;
-
-/**
- * Class Property.
- * 
- * @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;
-    }
-    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);
-  }
-
-}
diff --git a/src/jalview/binding/Sequence.java b/src/jalview/binding/Sequence.java
deleted file mode 100644 (file)
index 845f224..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * 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 -/
-//---------------------------------/
-
-import org.exolab.castor.xml.Marshaller;
-import org.exolab.castor.xml.Unmarshaller;
-
-/**
- * Class Sequence.
- * 
- * @version $Revision$ $Date$
- */
-public class Sequence extends SequenceType implements java.io.Serializable
-{
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public Sequence()
-  {
-    super();
-  }
-
-  // -----------/
-  // - 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;
-    }
-    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 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);
-  }
-
-}
diff --git a/src/jalview/binding/SequenceSet.java b/src/jalview/binding/SequenceSet.java
deleted file mode 100644 (file)
index 3d81bae..0000000
+++ /dev/null
@@ -1,538 +0,0 @@
-/*
- * 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 -/
-//---------------------------------/
-
-import org.exolab.castor.xml.Marshaller;
-import org.exolab.castor.xml.Unmarshaller;
-
-/**
- * Class SequenceSet.
- * 
- * @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(
-              "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);
-  }
-
-}
diff --git a/src/jalview/binding/SequenceType.java b/src/jalview/binding/SequenceType.java
deleted file mode 100644 (file)
index 7f10bca..0000000
+++ /dev/null
@@ -1,206 +0,0 @@
-/*
- * 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 -/
-//---------------------------------/
-
-import org.exolab.castor.xml.Marshaller;
-import org.exolab.castor.xml.Unmarshaller;
-
-/**
- * Class SequenceType.
- * 
- * @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;
-    }
-    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);
-  }
-
-}
diff --git a/src/jalview/binding/Setting.java b/src/jalview/binding/Setting.java
deleted file mode 100644 (file)
index d098303..0000000
+++ /dev/null
@@ -1,262 +0,0 @@
-/*
- * 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 -/
-//---------------------------------/
-
-import org.exolab.castor.xml.Marshaller;
-import org.exolab.castor.xml.Unmarshaller;
-
-/**
- * Class Setting.
- * 
- * @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 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 validate() throws org.exolab.castor.xml.ValidationException
-  {
-    org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
-    validator.validate(this);
-  }
-
-}
diff --git a/src/jalview/binding/Tree.java b/src/jalview/binding/Tree.java
deleted file mode 100644 (file)
index 7005c93..0000000
+++ /dev/null
@@ -1,843 +0,0 @@
-/*
- * 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 -/
-//---------------------------------/
-
-import org.exolab.castor.xml.Marshaller;
-import org.exolab.castor.xml.Unmarshaller;
-
-/**
- * Class Tree.
- * 
- * @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);
-  }
-
-}
diff --git a/src/jalview/binding/UserColourScheme.java b/src/jalview/binding/UserColourScheme.java
deleted file mode 100644 (file)
index e1a1a2f..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * 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 -/
-//---------------------------------/
-
-import org.exolab.castor.xml.Marshaller;
-import org.exolab.castor.xml.Unmarshaller;
-
-/**
- * Class UserColourScheme.
- * 
- * @version $Revision$ $Date$
- */
-public class UserColourScheme extends JalviewUserColours
-        implements java.io.Serializable
-{
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public UserColourScheme()
-  {
-    super();
-  }
-
-  // -----------/
-  // - 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;
-    }
-    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 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);
-  }
-
-}
diff --git a/src/jalview/binding/UserColours.java b/src/jalview/binding/UserColours.java
deleted file mode 100644 (file)
index 9dbcc9e..0000000
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * 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 -/
-//---------------------------------/
-
-import org.exolab.castor.xml.Marshaller;
-import org.exolab.castor.xml.Unmarshaller;
-
-/**
- * Class UserColours.
- * 
- * @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;
-    }
-    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);
-  }
-
-}
diff --git a/src/jalview/binding/VAMSAS.java b/src/jalview/binding/VAMSAS.java
deleted file mode 100644 (file)
index b5a32da..0000000
+++ /dev/null
@@ -1,605 +0,0 @@
-/*
- * 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 -/
-//---------------------------------/
-
-import org.exolab.castor.xml.Marshaller;
-import org.exolab.castor.xml.Unmarshaller;
-
-/**
- * Class VAMSAS.
- * 
- * @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(
-              "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);
-  }
-
-}
diff --git a/src/jalview/binding/VamsasModel.java b/src/jalview/binding/VamsasModel.java
deleted file mode 100644 (file)
index d3c90cf..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * 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 -/
-//---------------------------------/
-
-import org.exolab.castor.xml.Marshaller;
-import org.exolab.castor.xml.Unmarshaller;
-
-/**
- * Class VamsasModel.
- * 
- * @version $Revision$ $Date$
- */
-public class VamsasModel extends VAMSAS implements java.io.Serializable
-{
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public VamsasModel()
-  {
-    super();
-  }
-
-  // -----------/
-  // - 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;
-    }
-    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 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);
-  }
-
-}
diff --git a/src/jalview/binding/Viewport.java b/src/jalview/binding/Viewport.java
deleted file mode 100644 (file)
index 183e048..0000000
+++ /dev/null
@@ -1,1463 +0,0 @@
-/*
- * 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 -/
-//---------------------------------/
-
-import org.exolab.castor.xml.Marshaller;
-import org.exolab.castor.xml.Unmarshaller;
-
-/**
- * Class Viewport.
- * 
- * @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 void deleteConsThreshold()
-  {
-    this._has_consThreshold = false;
-  }
-
-  /**
-     */
-  public void deleteConservationSelected()
-  {
-    this._has_conservationSelected = 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 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);
-  }
-
-}
diff --git a/src/jalview/binding/types/ColourThreshTypeType.java b/src/jalview/binding/types/ColourThreshTypeType.java
deleted file mode 100644 (file)
index 024f2c0..0000000
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * This class was automatically generated with 
- * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
- * Schema.
- * $Id$
- */
-
-package jalview.binding.types;
-
-  //---------------------------------/
- //- Imported classes and packages -/
-//---------------------------------/
-
-import java.util.Hashtable;
-
-/**
- * Class ColourThreshTypeType.
- * 
- * @version $Revision$ $Date$
- */
-public class ColourThreshTypeType implements java.io.Serializable {
-
-
-      //--------------------------/
-     //- Class/Member Variables -/
-    //--------------------------/
-
-    /**
-     * The NONE type
-     */
-    public static final int NONE_TYPE = 0;
-
-    /**
-     * The instance of the NONE type
-     */
-    public static final ColourThreshTypeType NONE = new ColourThreshTypeType(NONE_TYPE, "NONE");
-
-    /**
-     * The ABOVE type
-     */
-    public static final int ABOVE_TYPE = 1;
-
-    /**
-     * The instance of the ABOVE type
-     */
-    public static final ColourThreshTypeType ABOVE = new ColourThreshTypeType(ABOVE_TYPE, "ABOVE");
-
-    /**
-     * The BELOW type
-     */
-    public static final int BELOW_TYPE = 2;
-
-    /**
-     * The instance of the BELOW type
-     */
-    public static final ColourThreshTypeType BELOW = new ColourThreshTypeType(BELOW_TYPE, "BELOW");
-
-    /**
-     * Field _memberTable.
-     */
-    private static java.util.Hashtable _memberTable = init();
-
-    /**
-     * Field type.
-     */
-    private int type = -1;
-
-    /**
-     * Field stringValue.
-     */
-    private java.lang.String stringValue = null;
-
-
-      //----------------/
-     //- Constructors -/
-    //----------------/
-
-    private ColourThreshTypeType(final int type, final java.lang.String value) {
-        super();
-        this.type = type;
-        this.stringValue = value;
-    }
-
-
-      //-----------/
-     //- Methods -/
-    //-----------/
-
-    /**
-     * Method enumerate.Returns an enumeration of all possible
-     * instances of ColourThreshTypeType
-     * 
-     * @return an Enumeration over all possible instances of
-     * ColourThreshTypeType
-     */
-    public static java.util.Enumeration enumerate(
-    ) {
-        return _memberTable.elements();
-    }
-
-    /**
-     * Method getType.Returns the type of this ColourThreshTypeType
-     * 
-     * @return the type of this ColourThreshTypeType
-     */
-    public int getType(
-    ) {
-        return this.type;
-    }
-
-    /**
-     * Method init.
-     * 
-     * @return the initialized Hashtable for the member table
-     */
-    private static java.util.Hashtable init(
-    ) {
-        Hashtable members = new Hashtable();
-        members.put("NONE", NONE);
-        members.put("ABOVE", ABOVE);
-        members.put("BELOW", BELOW);
-        return members;
-    }
-
-    /**
-     * Method readResolve. will be called during deserialization to
-     * replace the deserialized object with the correct constant
-     * instance.
-     * 
-     * @return this deserialized object
-     */
-    private java.lang.Object readResolve(
-    ) {
-        return valueOf(this.stringValue);
-    }
-
-    /**
-     * Method toString.Returns the String representation of this
-     * ColourThreshTypeType
-     * 
-     * @return the String representation of this ColourThreshTypeTyp
-     */
-    public java.lang.String toString(
-    ) {
-        return this.stringValue;
-    }
-
-    /**
-     * Method valueOf.Returns a new ColourThreshTypeType based on
-     * the given String value.
-     * 
-     * @param string
-     * @return the ColourThreshTypeType value of parameter 'string'
-     */
-    public static jalview.binding.types.ColourThreshTypeType valueOf(
-            final java.lang.String string) {
-        java.lang.Object obj = null;
-        if (string != null) {
-            obj = _memberTable.get(string);
-        }
-        if (obj == null) {
-            String err = "" + string + " is not a valid ColourThreshTypeType";
-            throw new IllegalArgumentException(err);
-        }
-        return (ColourThreshTypeType) obj;
-    }
-
-}
diff --git a/src/jalview/binding/types/FeatureMatcherByType.java b/src/jalview/binding/types/FeatureMatcherByType.java
deleted file mode 100644 (file)
index 2185bba..0000000
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * This class was automatically generated with 
- * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
- * Schema.
- * $Id$
- */
-
-package jalview.binding.types;
-
-  //---------------------------------/
- //- Imported classes and packages -/
-//---------------------------------/
-
-import java.util.Hashtable;
-
-/**
- * Class FeatureMatcherByType.
- * 
- * @version $Revision$ $Date$
- */
-public class FeatureMatcherByType implements java.io.Serializable {
-
-
-      //--------------------------/
-     //- Class/Member Variables -/
-    //--------------------------/
-
-    /**
-     * The byLabel type
-     */
-    public static final int BYLABEL_TYPE = 0;
-
-    /**
-     * The instance of the byLabel type
-     */
-    public static final FeatureMatcherByType BYLABEL = new FeatureMatcherByType(BYLABEL_TYPE, "byLabel");
-
-    /**
-     * The byScore type
-     */
-    public static final int BYSCORE_TYPE = 1;
-
-    /**
-     * The instance of the byScore type
-     */
-    public static final FeatureMatcherByType BYSCORE = new FeatureMatcherByType(BYSCORE_TYPE, "byScore");
-
-    /**
-     * The byAttribute type
-     */
-    public static final int BYATTRIBUTE_TYPE = 2;
-
-    /**
-     * The instance of the byAttribute type
-     */
-    public static final FeatureMatcherByType BYATTRIBUTE = new FeatureMatcherByType(BYATTRIBUTE_TYPE, "byAttribute");
-
-    /**
-     * Field _memberTable.
-     */
-    private static java.util.Hashtable _memberTable = init();
-
-    /**
-     * Field type.
-     */
-    private int type = -1;
-
-    /**
-     * Field stringValue.
-     */
-    private java.lang.String stringValue = null;
-
-
-      //----------------/
-     //- Constructors -/
-    //----------------/
-
-    private FeatureMatcherByType(final int type, final java.lang.String value) {
-        super();
-        this.type = type;
-        this.stringValue = value;
-    }
-
-
-      //-----------/
-     //- Methods -/
-    //-----------/
-
-    /**
-     * Method enumerate.Returns an enumeration of all possible
-     * instances of FeatureMatcherByType
-     * 
-     * @return an Enumeration over all possible instances of
-     * FeatureMatcherByType
-     */
-    public static java.util.Enumeration enumerate(
-    ) {
-        return _memberTable.elements();
-    }
-
-    /**
-     * Method getType.Returns the type of this FeatureMatcherByType
-     * 
-     * @return the type of this FeatureMatcherByType
-     */
-    public int getType(
-    ) {
-        return this.type;
-    }
-
-    /**
-     * Method init.
-     * 
-     * @return the initialized Hashtable for the member table
-     */
-    private static java.util.Hashtable init(
-    ) {
-        Hashtable members = new Hashtable();
-        members.put("byLabel", BYLABEL);
-        members.put("byScore", BYSCORE);
-        members.put("byAttribute", BYATTRIBUTE);
-        return members;
-    }
-
-    /**
-     * Method readResolve. will be called during deserialization to
-     * replace the deserialized object with the correct constant
-     * instance.
-     * 
-     * @return this deserialized object
-     */
-    private java.lang.Object readResolve(
-    ) {
-        return valueOf(this.stringValue);
-    }
-
-    /**
-     * Method toString.Returns the String representation of this
-     * FeatureMatcherByType
-     * 
-     * @return the String representation of this FeatureMatcherByTyp
-     */
-    public java.lang.String toString(
-    ) {
-        return this.stringValue;
-    }
-
-    /**
-     * Method valueOf.Returns a new FeatureMatcherByType based on
-     * the given String value.
-     * 
-     * @param string
-     * @return the FeatureMatcherByType value of parameter 'string'
-     */
-    public static jalview.binding.types.FeatureMatcherByType valueOf(
-            final java.lang.String string) {
-        java.lang.Object obj = null;
-        if (string != null) {
-            obj = _memberTable.get(string);
-        }
-        if (obj == null) {
-            String err = "" + string + " is not a valid FeatureMatcherByType";
-            throw new IllegalArgumentException(err);
-        }
-        return (FeatureMatcherByType) obj;
-    }
-
-}
diff --git a/src/jalview/binding/types/NoValueColour.java b/src/jalview/binding/types/NoValueColour.java
deleted file mode 100644 (file)
index c1540f6..0000000
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * This class was automatically generated with 
- * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
- * Schema.
- * $Id$
- */
-
-package jalview.binding.types;
-
-//---------------------------------/
-//- Imported classes and packages -/
-//---------------------------------/
-
-import java.util.Hashtable;
-
-/**
- * Graduated feature colour if no score (or attribute) value
- * 
- * @version $Revision$ $Date$
- */
-public class NoValueColour implements java.io.Serializable
-{
-
-  // --------------------------/
-  // - Class/Member Variables -/
-  // --------------------------/
-
-  /**
-   * The None type
-   */
-  public static final int NONE_TYPE = 0;
-
-  /**
-   * The instance of the None type
-   */
-  public static final NoValueColour NONE = new NoValueColour(NONE_TYPE,
-          "None");
-
-  /**
-   * The Min type
-   */
-  public static final int MIN_TYPE = 1;
-
-  /**
-   * The instance of the Min type
-   */
-  public static final NoValueColour MIN = new NoValueColour(MIN_TYPE,
-          "Min");
-
-  /**
-   * The Max type
-   */
-  public static final int MAX_TYPE = 2;
-
-  /**
-   * The instance of the Max type
-   */
-  public static final NoValueColour MAX = new NoValueColour(MAX_TYPE,
-          "Max");
-
-  /**
-   * Field _memberTable.
-   */
-  private static java.util.Hashtable _memberTable = init();
-
-  /**
-   * Field type.
-   */
-  private int type = -1;
-
-  /**
-   * Field stringValue.
-   */
-  private java.lang.String stringValue = null;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  private NoValueColour(final int type, final java.lang.String value)
-  {
-    super();
-    this.type = type;
-    this.stringValue = value;
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-   * Method enumerate.Returns an enumeration of all possible instances of
-   * NoValueColour
-   * 
-   * @return an Enumeration over all possible instances of NoValueColour
-   */
-  public static java.util.Enumeration enumerate()
-  {
-    return _memberTable.elements();
-  }
-
-  /**
-   * Method getType.Returns the type of this NoValueColour
-   * 
-   * @return the type of this NoValueColour
-   */
-  public int getType()
-  {
-    return this.type;
-  }
-
-  /**
-   * Method init.
-   * 
-   * @return the initialized Hashtable for the member table
-   */
-  private static java.util.Hashtable init()
-  {
-    Hashtable members = new Hashtable();
-    members.put("None", NONE);
-    members.put("Min", MIN);
-    members.put("Max", MAX);
-    return members;
-  }
-
-  /**
-   * Method readResolve. will be called during deserialization to replace the
-   * deserialized object with the correct constant instance.
-   * 
-   * @return this deserialized object
-   */
-  private java.lang.Object readResolve()
-  {
-    return valueOf(this.stringValue);
-  }
-
-  /**
-   * Method toString.Returns the String representation of this NoValueColour
-   * 
-   * @return the String representation of this NoValueColour
-   */
-  public java.lang.String toString()
-  {
-    return this.stringValue;
-  }
-
-  /**
-   * Method valueOf.Returns a new NoValueColour based on the given String value.
-   * 
-   * @param string
-   * @return the NoValueColour value of parameter 'string'
-   */
-  public static jalview.binding.types.NoValueColour valueOf(
-          final java.lang.String string)
-  {
-    java.lang.Object obj = null;
-    if (string != null)
-    {
-      obj = _memberTable.get(string);
-    }
-    if (obj == null)
-    {
-      String err = "" + string + " is not a valid NoValueColour";
-      throw new IllegalArgumentException(err);
-    }
-    return (NoValueColour) obj;
-  }
-
-}
index 1a227c5..b9d32f7 100644 (file)
@@ -24,6 +24,7 @@ import jalview.analysis.AlignSeq;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.Annotation;
+import jalview.datamodel.ContiguousI;
 import jalview.datamodel.Range;
 import jalview.datamodel.Sequence;
 import jalview.datamodel.SequenceFeature;
@@ -526,8 +527,8 @@ public class EditCommand implements CommandI
         command.string[i] = sequence.getSequence(command.position,
                 command.position + command.number);
         SequenceI oldds = sequence.getDatasetSequence();
-        Range cutPositions = sequence.findPositions(command.position + 1,
-                command.position + command.number);
+        ContiguousI cutPositions = sequence.findPositions(
+                command.position + 1, command.position + command.number);
         boolean cutIsInternal = cutPositions != null
                 && sequence.getStart() != cutPositions
                 .getBegin() && sequence.getEnd() != cutPositions.getEnd();
@@ -763,9 +764,9 @@ public class EditCommand implements CommandI
        * EditCommand.PASTE, sequences, 0, alignment.getWidth(), alignment) );
        * 
        */
-
-      Range beforeEditedPositions = command.seqs[i].findPositions(1, start);
-      Range afterEditedPositions = command.seqs[i]
+      ContiguousI beforeEditedPositions = command.seqs[i].findPositions(1,
+              start);
+      ContiguousI afterEditedPositions = command.seqs[i]
               .findPositions(end + 1, command.seqs[i].getLength());
       
       oldstring = command.seqs[i].getSequenceAsString();
@@ -1483,6 +1484,12 @@ public class EditCommand implements CommandI
 
     private char gapChar;
 
+    /*
+     * flag that identifies edits inserted to balance 
+     * user edits in a 'locked editing' region
+     */
+    private boolean systemGenerated;
+
     public Edit(Action cmd, SequenceI[] sqs, int pos, int count,
             char gap)
     {
@@ -1555,6 +1562,16 @@ public class EditCommand implements CommandI
     {
       return gapChar;
     }
+
+    public void setSystemGenerated(boolean b)
+    {
+      systemGenerated = b;
+    }
+
+    public boolean isSystemGenerated()
+    {
+      return systemGenerated;
+    }
   }
 
   /**
index d992e4e..a82b98d 100644 (file)
@@ -35,6 +35,7 @@ import jalview.datamodel.SequenceGroup;
 import jalview.datamodel.SequenceI;
 import jalview.io.DataSourceType;
 import jalview.io.FeaturesFile;
+import jalview.schemes.ColourSchemeI;
 import jalview.util.MessageManager;
 
 import java.awt.Color;
@@ -97,19 +98,22 @@ public class AlignViewController implements AlignViewControllerI
       viewport.getAlignment().deleteAllGroups();
       viewport.clearSequenceColours();
       viewport.setSelectionGroup(null);
+      ColourSchemeI colours = viewport.getGlobalColourScheme();
       // set view properties for each group
       for (int g = 0; g < gps.length; g++)
       {
         // gps[g].setShowunconserved(viewport.getShowUnconserved());
         gps[g].setshowSequenceLogo(viewport.isShowSequenceLogo());
         viewport.getAlignment().addGroup(gps[g]);
-        Color col = new Color((int) (Math.random() * 255),
-                (int) (Math.random() * 255), (int) (Math.random() * 255));
-        col = col.brighter();
-        for (SequenceI sq : gps[g].getSequences(null))
+        if (colours != null)
         {
-          viewport.setSequenceColour(sq, col);
+          gps[g].setColourScheme(colours.getInstance(viewport, gps[g]));
         }
+        Color col = new Color((int) (Math.random() * 255),
+                (int) (Math.random() * 255), (int) (Math.random() * 255));
+        gps[g].idColour = col;
+        viewport.setUpdateStructures(true);
+        viewport.addSequenceGroup(gps[g]);
       }
       return true;
     }
index 3ba35b6..ac00fa2 100755 (executable)
@@ -712,39 +712,21 @@ public class Alignment implements AlignmentI
   
     for (int i = 0; i < sequences.size(); i++)
     {
-      if (getSequenceAt(i).getLength() > maxLength)
-      {
-        maxLength = getSequenceAt(i).getLength();
-      }
+      maxLength = Math.max(maxLength, getSequenceAt(i).getLength());
     }
-  
     return maxLength;
   }
-  /*
+
   @Override
-  public int getWidth()
+  public int getVisibleWidth()
   {
-    final Wrapper temp = new Wrapper();
-  
-    forEachSequence(new Consumer<SequenceI>()
+    int w = getWidth();
+    if (hiddenCols != null)
     {
-      @Override
-      public void accept(SequenceI s)
-      {
-        if (s.getLength() > temp.inner)
-        {
-          temp.inner = s.getLength();
-        }
-      }
-    }, 0, sequences.size() - 1);
-  
-    return temp.inner;
+      w -= hiddenCols.getSize();
+    }
+    return w;
   }
-  
-  public static class Wrapper
-  {
-    public int inner;
-  }*/
 
   /**
    * DOCUMENT ME!
@@ -1922,9 +1904,12 @@ public class Alignment implements AlignmentI
   }
 
   @Override
-  public void setHiddenColumns(HiddenColumns cols)
+  public boolean setHiddenColumns(HiddenColumns cols)
   {
+    boolean changed = cols == null ? hiddenCols != null
+            : !cols.equals(hiddenCols);
     hiddenCols = cols;
+    return changed;
   }
 
   @Override
index 5fb16d6..93a2456 100755 (executable)
@@ -48,15 +48,29 @@ public interface AlignmentI extends AnnotatedCollectionI
 
   /**
    * 
-   * Calculates the maximum width of the alignment, including gaps.
+   * Answers the width of the alignment, including gaps, that is, the length of
+   * the longest sequence, or -1 if there are no sequences. Avoid calling this
+   * method repeatedly where possible, as it has to perform a calculation. Note
+   * that this width includes any hidden columns.
    * 
-   * @return Greatest sequence length within alignment, or -1 if no sequences
-   *         present
+   * @return
+   * @see AlignmentI#getVisibleWidth()
    */
   @Override
   int getWidth();
 
   /**
+   * 
+   * Answers the visible width of the alignment, including gaps, that is, the
+   * length of the longest sequence, excluding any hidden columns. Answers -1 if
+   * there are no sequences. Avoid calling this method repeatedly where
+   * possible, as it has to perform a calculation.
+   * 
+   * @return
+   */
+  int getVisibleWidth();
+
+  /**
    * Calculates if this set of sequences (visible and invisible) are all the
    * same length
    * 
@@ -581,11 +595,13 @@ public interface AlignmentI extends AnnotatedCollectionI
   AlignedCodonFrame getMapping(SequenceI mapFrom, SequenceI mapTo);
 
   /**
-   * Set the hidden columns collection on the alignment
+   * Set the hidden columns collection on the alignment. Answers true if the
+   * hidden column selection changed, else false.
    * 
    * @param cols
+   * @return
    */
-  public void setHiddenColumns(HiddenColumns cols);
+  public boolean setHiddenColumns(HiddenColumns cols);
 
   /**
    * Set the first sequence as representative and hide its insertions. Typically
index d3d1b2b..e6604d1 100644 (file)
@@ -74,7 +74,7 @@ public class AlignmentView
 
     ScGroup()
     {
-      seqs = new ArrayList<SeqCigar>();
+      seqs = new ArrayList<>();
     }
 
     /**
@@ -160,7 +160,6 @@ public class AlignmentView
     SequenceI[] selseqs;
     if (selection != null && selection.getSize() > 0)
     {
-      List<SequenceI> sel = selection.getSequences(null);
       this.selected = new ScGroup();
       selseqs = selection.getSequencesInOrder(alignment,
               selectedRegionOnly);
@@ -170,9 +169,9 @@ public class AlignmentView
       selseqs = alignment.getSequencesArray();
     }
 
-    List<List<SequenceI>> seqsets = new ArrayList<List<SequenceI>>();
+    List<List<SequenceI>> seqsets = new ArrayList<>();
     // get the alignment's group list and make a copy
-    List<SequenceGroup> grps = new ArrayList<SequenceGroup>();
+    List<SequenceGroup> grps = new ArrayList<>();
     List<SequenceGroup> gg = alignment.getGroups();
     grps.addAll(gg);
     ScGroup[] sgrps = null;
@@ -185,7 +184,7 @@ public class AlignmentView
         // strip out any groups that do not actually intersect with the
         // visible and selected region
         int ssel = selection.getStartRes(), esel = selection.getEndRes();
-        List<SequenceGroup> isg = new ArrayList<SequenceGroup>();
+        List<SequenceGroup> isg = new ArrayList<>();
         for (SequenceGroup sg : grps)
         {
           if (!(sg.getStartRes() > esel || sg.getEndRes() < ssel))
@@ -245,7 +244,7 @@ public class AlignmentView
               {
                 if (scGroups == null)
                 {
-                  scGroups = new ArrayList<ScGroup>();
+                  scGroups = new ArrayList<>();
                 }
                 addedgps[sg] = true;
                 scGroups.add(sgrps[sg]);
index 6d620b4..3ccaab8 100644 (file)
@@ -27,6 +27,7 @@ import java.util.ArrayList;
 import java.util.BitSet;
 import java.util.Collections;
 import java.util.List;
+import java.util.regex.PatternSyntaxException;
 
 /**
  * Data class holding the selected columns and hidden column ranges for a view.
@@ -59,7 +60,7 @@ public class ColumnSelection
      */
     IntList()
     {
-      order = new ArrayList<Integer>();
+      order = new ArrayList<>();
       _uorder = Collections.unmodifiableList(order);
       selected = new BitSet();
     }
@@ -230,7 +231,7 @@ public class ColumnSelection
      */
     List<int[]> getRanges()
     {
-      List<int[]> rlist = new ArrayList<int[]>();
+      List<int[]> rlist = new ArrayList<>();
       if (selected.isEmpty())
       {
         return rlist;
@@ -263,7 +264,7 @@ public class ColumnSelection
     }
   }
 
-  IntList selection = new IntList();
+  private IntList selection = new IntList();
 
   /**
    * Add a column to the selection
@@ -533,92 +534,109 @@ public class ColumnSelection
     return (selection != null && selection.size() > 0);
   }
 
-  public boolean filterAnnotations(Annotation[] annotations,
+  /**
+   * Selects columns where the given annotation matches the provided filter
+   * condition(s). Any existing column selections are first cleared. Answers the
+   * number of columns added.
+   * 
+   * @param annotations
+   * @param filterParams
+   * @return
+   */
+  public int filterAnnotations(Annotation[] annotations,
           AnnotationFilterParameter filterParams)
   {
     // JBPNote - this method needs to be refactored to become independent of
     // viewmodel package
     this.clear();
-    int count = 0;
+    int addedCount = 0;
+    int column = 0;
     do
     {
-      if (annotations[count] != null)
+      Annotation ann = annotations[column];
+      if (ann != null)
       {
+        boolean matched = false;
 
-        boolean itemMatched = false;
-
+        /*
+         * filter may have multiple conditions - 
+         * these are or'd until a match is found
+         */
         if (filterParams
                 .getThresholdType() == AnnotationFilterParameter.ThresholdType.ABOVE_THRESHOLD
-                && annotations[count].value >= filterParams
-                        .getThresholdValue())
+                && ann.value > filterParams.getThresholdValue())
         {
-          itemMatched = true;
+          matched = true;
         }
-        if (filterParams
+
+        if (!matched && filterParams
                 .getThresholdType() == AnnotationFilterParameter.ThresholdType.BELOW_THRESHOLD
-                && annotations[count].value <= filterParams
-                        .getThresholdValue())
+                && ann.value < filterParams.getThresholdValue())
         {
-          itemMatched = true;
+          matched = true;
         }
 
-        if (filterParams.isFilterAlphaHelix()
-                && annotations[count].secondaryStructure == 'H')
+        if (!matched && filterParams.isFilterAlphaHelix()
+                && ann.secondaryStructure == 'H')
         {
-          itemMatched = true;
+          matched = true;
         }
 
-        if (filterParams.isFilterBetaSheet()
-                && annotations[count].secondaryStructure == 'E')
+        if (!matched && filterParams.isFilterBetaSheet()
+                && ann.secondaryStructure == 'E')
         {
-          itemMatched = true;
+          matched = true;
         }
 
-        if (filterParams.isFilterTurn()
-                && annotations[count].secondaryStructure == 'S')
+        if (!matched && filterParams.isFilterTurn()
+                && ann.secondaryStructure == 'S')
         {
-          itemMatched = true;
+          matched = true;
         }
 
         String regexSearchString = filterParams.getRegexString();
-        if (regexSearchString != null
-                && !filterParams.getRegexSearchFields().isEmpty())
+        if (!matched && regexSearchString != null)
         {
           List<SearchableAnnotationField> fields = filterParams
                   .getRegexSearchFields();
-          try
+          for (SearchableAnnotationField field : fields)
           {
-            if (fields.contains(SearchableAnnotationField.DISPLAY_STRING)
-                    && annotations[count].displayCharacter
-                            .matches(regexSearchString))
+            String compareTo = field == SearchableAnnotationField.DISPLAY_STRING
+                    ? ann.displayCharacter // match 'Label'
+                    : ann.description; // and/or 'Description'
+            if (compareTo != null)
             {
-              itemMatched = true;
-            }
-          } catch (java.util.regex.PatternSyntaxException pse)
-          {
-            if (annotations[count].displayCharacter
-                    .equals(regexSearchString))
-            {
-              itemMatched = true;
+              try
+              {
+                if (compareTo.matches(regexSearchString))
+                {
+                  matched = true;
+                }
+              } catch (PatternSyntaxException pse)
+              {
+                if (compareTo.equals(regexSearchString))
+                {
+                  matched = true;
+                }
+              }
+              if (matched)
+              {
+                break;
+              }
             }
           }
-          if (fields.contains(SearchableAnnotationField.DESCRIPTION)
-                  && annotations[count].description != null
-                  && annotations[count].description
-                          .matches(regexSearchString))
-          {
-            itemMatched = true;
-          }
         }
 
-        if (itemMatched)
+        if (matched)
         {
-          this.addElement(count);
+          this.addElement(column);
+          addedCount++;
         }
       }
-      count++;
-    } while (count < annotations.length);
-    return false;
+      column++;
+    } while (column < annotations.length);
+
+    return addedCount;
   }
 
   /**
index a7e93da..2d43f02 100644 (file)
@@ -469,6 +469,10 @@ public class HiddenColumns
     }
   }
 
+  /**
+   * Answers true if obj is an instance of HiddenColumns, and holds the same
+   * array of start-end column ranges as this, else answers false
+   */
   @Override
   public boolean equals(Object obj)
   {
diff --git a/src/jalview/datamodel/Point.java b/src/jalview/datamodel/Point.java
new file mode 100644 (file)
index 0000000..e7c77c0
--- /dev/null
@@ -0,0 +1,71 @@
+package jalview.datamodel;
+
+/**
+ * A bean that models an (x, y, z) position in 3-D space
+ */
+public final class Point
+{
+  public final float x;
+
+  public final float y;
+
+  public final float z;
+
+  public Point(float xVal, float yVal, float zVal)
+  {
+    x = xVal;
+    y = yVal;
+    z = zVal;
+  }
+
+  /**
+   * toString for convenience of inspection in debugging or logging
+   */
+  @Override
+  public String toString()
+  {
+    return String.format("[%f, %f, %f]", x, y, z);
+  }
+
+  @Override
+  public int hashCode()
+  {
+    final int prime = 31;
+    int result = 1;
+    result = prime * result + Float.floatToIntBits(x);
+    result = prime * result + Float.floatToIntBits(y);
+    result = prime * result + Float.floatToIntBits(z);
+    return result;
+  }
+
+  @Override
+  public boolean equals(Object obj)
+  {
+    if (this == obj)
+    {
+      return true;
+    }
+    if (obj == null)
+    {
+      return false;
+    }
+    if (getClass() != obj.getClass())
+    {
+      return false;
+    }
+    Point other = (Point) obj;
+    if (Float.floatToIntBits(x) != Float.floatToIntBits(other.x))
+    {
+      return false;
+    }
+    if (Float.floatToIntBits(y) != Float.floatToIntBits(other.y))
+    {
+      return false;
+    }
+    if (Float.floatToIntBits(z) != Float.floatToIntBits(other.z))
+    {
+      return false;
+    }
+    return true;
+  }
+}
index a47ca8b..661ad6c 100644 (file)
@@ -47,4 +47,14 @@ public interface SearchResultMatchI
    */
   int getEnd();
 
+  /**
+   * Answers true if this match is for the given sequence and includes (matches
+   * or encloses) the given start-end range
+   * 
+   * @param seq
+   * @param start
+   * @param end
+   * @return
+   */
+  boolean contains(SequenceI seq, int start, int end);
 }
\ No newline at end of file
index d1e3fcc..31736e5 100755 (executable)
@@ -91,27 +91,18 @@ public class SearchResults implements SearchResultsI
       }
     }
 
-    /* (non-Javadoc)
-     * @see jalview.datamodel.SearchResultMatchI#getSequence()
-     */
     @Override
     public SequenceI getSequence()
     {
       return sequence;
     }
 
-    /* (non-Javadoc)
-     * @see jalview.datamodel.SearchResultMatchI#getStart()
-     */
     @Override
     public int getStart()
     {
       return start;
     }
 
-    /* (non-Javadoc)
-     * @see jalview.datamodel.SearchResultMatchI#getEnd()
-     */
     @Override
     public int getEnd()
     {
@@ -162,22 +153,25 @@ public class SearchResults implements SearchResultsI
       return (sequence == m.getSequence() && start == m.getStart()
               && end == m.getEnd());
     }
+
+    @Override
+    public boolean contains(SequenceI seq, int from, int to)
+    {
+      return (sequence == seq && start <= from && end >= to);
+    }
   }
 
-  /* (non-Javadoc)
-   * @see jalview.datamodel.SearchResultsI#addResult(jalview.datamodel.SequenceI, int, int)
-   */
   @Override
   public SearchResultMatchI addResult(SequenceI seq, int start, int end)
   {
     Match m = new Match(seq, start, end);
-    matches.add(m);
+    if (!matches.contains(m))
+    {
+      matches.add(m);
+    }
     return m;
   }
 
-  /* (non-Javadoc)
-   * @see jalview.datamodel.SearchResultsI#involvesSequence(jalview.datamodel.SequenceI)
-   */
   @Override
   public boolean involvesSequence(SequenceI sequence)
   {
@@ -193,9 +187,6 @@ public class SearchResults implements SearchResultsI
     return false;
   }
 
-  /* (non-Javadoc)
-   * @see jalview.datamodel.SearchResultsI#getResults(jalview.datamodel.SequenceI, int, int)
-   */
   @Override
   public int[] getResults(SequenceI sequence, int start, int end)
   {
@@ -290,27 +281,18 @@ public class SearchResults implements SearchResultsI
     return count;
   }
 
-  /* (non-Javadoc)
-   * @see jalview.datamodel.SearchResultsI#getSize()
-   */
   @Override
   public int getSize()
   {
     return matches.size();
   }
 
-  /* (non-Javadoc)
-   * @see jalview.datamodel.SearchResultsI#isEmpty()
-   */
   @Override
   public boolean isEmpty()
   {
     return matches.isEmpty();
   }
 
-  /* (non-Javadoc)
-   * @see jalview.datamodel.SearchResultsI#getResults()
-   */
   @Override
   public List<SearchResultMatchI> getResults()
   {
index c3dc0e8..3c3ad4e 100644 (file)
@@ -31,14 +31,11 @@ public interface SearchResultsI
 {
 
   /**
-   * Adds one region to the results
+   * Adds one region to the results (unless already added, to avoid duplicates)
    * 
    * @param seq
-   *          Sequence
    * @param start
-   *          int
    * @param end
-   *          int
    * @return
    */
   SearchResultMatchI addResult(SequenceI seq, int start, int end);
index f555855..80310c0 100755 (executable)
@@ -1066,7 +1066,7 @@ public class Sequence extends ASequence implements SequenceI
    * {@inheritDoc}
    */
   @Override
-  public Range findPositions(int fromColumn, int toColumn)
+  public ContiguousI findPositions(int fromColumn, int toColumn)
   {
     if (toColumn < fromColumn || fromColumn < 1)
     {
index f681f11..e2bb5a6 100644 (file)
@@ -25,8 +25,21 @@ import java.util.Map;
 
 public interface SequenceCollectionI
 {
+  /**
+   * 
+   * @return (visible) sequences in this collection. This may be a direct
+   *         reference to the collection so not thread safe
+   */
   List<SequenceI> getSequences();
 
+  /**
+   * FIXME: AlignmentI.getSequences(hiddenReps) doesn't actually obey this
+   * contract!
+   * 
+   * @param hiddenReps
+   * @return the full set of sequences in this collection, including any
+   *         sequences represented by sequences in the collection.
+   */
   List<SequenceI> getSequences(
           Map<SequenceI, SequenceCollectionI> hiddenReps);
 
index fc8ac49..3bf7bc4 100755 (executable)
@@ -88,7 +88,7 @@ public class SequenceGroup implements AnnotatedCollectionI
   /**
    * group members
    */
-  private List<SequenceI> sequences = new ArrayList<>();
+  private List<SequenceI> sequences;
 
   /**
    * representative sequence for this group (if any)
@@ -162,6 +162,7 @@ public class SequenceGroup implements AnnotatedCollectionI
   {
     groupName = "JGroup:" + this.hashCode();
     cs = new ResidueShader();
+    sequences = new ArrayList<>();
   }
 
   /**
@@ -243,6 +244,17 @@ public class SequenceGroup implements AnnotatedCollectionI
     }
   }
 
+  /**
+   * Constructor that copies the given list of sequences
+   * 
+   * @param seqs
+   */
+  public SequenceGroup(List<SequenceI> seqs)
+  {
+    this();
+    this.sequences.addAll(seqs);
+  }
+
   public boolean isShowSequenceLogo()
   {
     return showSequenceLogo;
index 48615f0..15b61d2 100755 (executable)
@@ -112,9 +112,11 @@ public interface SequenceI extends ASequenceI
    * get a range on the sequence as a string
    * 
    * @param start
-   *          position relative to start of sequence including gaps (from 0)
+   *          (inclusive) position relative to start of sequence including gaps
+   *          (from 0)
    * @param end
-   *          position relative to start of sequence including gaps (from 0)
+   *          (exclusive) position relative to start of sequence including gaps
+   *          (from 0)
    * 
    * @return String containing all gap and symbols in specified range
    */
@@ -216,7 +218,7 @@ public interface SequenceI extends ASequenceI
    *          - last column, base 1
    * @return
    */
-  public Range findPositions(int fromColum, int toColumn);
+  public ContiguousI findPositions(int fromColum, int toColumn);
 
   /**
    * Returns an int array where indices correspond to each residue in the
index a6b967e..3db7cee 100755 (executable)
 package jalview.datamodel;
 
 /**
- * DOCUMENT ME!
- * 
- * @author $author$
- * @version $Revision$
+ * A bean that models a set of (x, y, z) values and a reference to a sequence.
+ * As used in Principal Component Analysis, the (x, y, z) values are the
+ * sequence's score for the currently selected first, second and third
+ * dimensions of the PCA.
  */
 public class SequencePoint
 {
-  // SMJS PUBLIC
+  /*
+   * Associated alignment sequence, or dummy sequence object
+   */
+  private final SequenceI sequence;
+
+  /*
+   * x, y, z values
+   */
+  public Point coord;
+
   /**
-   * for points with no real physical association with an alignment sequence
+   * Constructor
+   * 
+   * @param sequence
+   * @param coord
    */
-  public boolean isPlaceholder = false;
+  public SequencePoint(SequenceI sequence, Point pt)
+  {
+    this.sequence = sequence;
+    this.coord = pt;
+  }
 
   /**
-   * Associated alignment sequence, or dummy sequence object.
+   * Constructor given a sequence and an array of x, y, z coordinate positions
+   * 
+   * @param sequence
+   * @param coords
+   * @throws ArrayIndexOutOfBoundsException
+   *           if array length is less than 3
    */
-  public SequenceI sequence;
+  public SequencePoint(SequenceI sequence, float[] coords)
+  {
+    this(sequence, new Point(coords[0], coords[1], coords[2]));
+  }
+
+  public SequenceI getSequence()
+  {
+    return sequence;
+  }
 
   /**
-   * array of coordinates in embedded sequence space.
+   * Applies a translation to the (x, y, z) coordinates
+   * 
+   * @param centre
    */
-  public float[] coord;
+  public void translate(float x, float y, float z)
+  {
+    coord = new Point(coord.x + x, coord.y + y, coord.z + z);
+  }
 
-  // SMJS ENDPUBLIC
-  public SequencePoint(SequenceI sequence, float[] coord)
+  /**
+   * string representation for ease of inspection in debugging or logging only
+   */
+  @Override
+  public String toString()
   {
-    this.sequence = sequence;
-    this.coord = coord;
+    return sequence.getName() + " " + coord.toString();
   }
 }
index 378b8db..535346c 100644 (file)
  */
 package jalview.datamodel.features;
 
-import jalview.datamodel.ContiguousI;
+import intervalstore.api.IntervalI;
 
 /**
- * An extension of ContiguousI that allows start/end values to be interpreted
+ * An extension of IntervalI that allows start/end values to be interpreted
  * instead as two contact positions
  */
-public interface FeatureLocationI extends ContiguousI
+public interface FeatureLocationI extends IntervalI
 {
   boolean isContactFeature();
 }
index 951b7a5..54c0d59 100644 (file)
  */
 package jalview.datamodel.features;
 
-import jalview.datamodel.ContiguousI;
 import jalview.datamodel.SequenceFeature;
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 
+import intervalstore.api.IntervalStoreI;
+import intervalstore.impl.BinarySearcher;
+import intervalstore.impl.IntervalStore;
+
 /**
  * A data store for a set of sequence features that supports efficient lookup of
  * features overlapping a given range. Intended for (but not limited to) storage
@@ -40,80 +42,6 @@ import java.util.Set;
  */
 public class FeatureStore
 {
-  /**
-   * a class providing criteria for performing a binary search of a list
-   */
-  abstract static class SearchCriterion
-  {
-    /**
-     * Answers true if the entry passes the search criterion test
-     * 
-     * @param entry
-     * @return
-     */
-    abstract boolean compare(SequenceFeature entry);
-
-    /**
-     * serves a search condition for finding the first feature whose start
-     * position follows a given target location
-     * 
-     * @param target
-     * @return
-     */
-    static SearchCriterion byStart(final long target)
-    {
-      return new SearchCriterion() {
-
-        @Override
-        boolean compare(SequenceFeature entry)
-        {
-          return entry.getBegin() >= target;
-        }
-      };
-    }
-
-    /**
-     * serves a search condition for finding the first feature whose end
-     * position is at or follows a given target location
-     * 
-     * @param target
-     * @return
-     */
-    static SearchCriterion byEnd(final long target)
-    {
-      return new SearchCriterion()
-      {
-
-        @Override
-        boolean compare(SequenceFeature entry)
-        {
-          return entry.getEnd() >= target;
-        }
-      };
-    }
-
-    /**
-     * serves a search condition for finding the first feature which follows the
-     * given range as determined by a supplied comparator
-     * 
-     * @param target
-     * @return
-     */
-    static SearchCriterion byFeature(final ContiguousI to,
-            final Comparator<ContiguousI> rc)
-    {
-      return new SearchCriterion()
-      {
-
-        @Override
-        boolean compare(SequenceFeature entry)
-        {
-          return rc.compare(entry, to) >= 0;
-        }
-      };
-    }
-  }
-
   /*
    * Non-positional features have no (zero) start/end position.
    * Kept as a separate list in case this criterion changes in future.
@@ -121,14 +49,6 @@ public class FeatureStore
   List<SequenceFeature> nonPositionalFeatures;
 
   /*
-   * An ordered list of features, with the promise that no feature in the list 
-   * properly contains any other. This constraint allows bounded linear search
-   * of the list for features overlapping a region.
-   * Contact features are not included in this list.
-   */
-  List<SequenceFeature> nonNestedFeatures;
-
-  /*
    * contact features ordered by first contact position
    */
   List<SequenceFeature> contactFeatureStarts;
@@ -139,13 +59,10 @@ public class FeatureStore
   List<SequenceFeature> contactFeatureEnds;
 
   /*
-   * Nested Containment List is used to hold any features that are nested 
-   * within (properly contained by) any other feature. This is a recursive tree
-   * which supports depth-first scan for features overlapping a range.
-   * It is used here as a 'catch-all' fallback for features that cannot be put
-   * into a simple ordered list without invalidating the search methods.
+   * IntervalStore holds remaining features and provides efficient
+   * query for features overlapping any given interval
    */
-  NCList<SequenceFeature> nestedFeatures;
+  IntervalStoreI<SequenceFeature> features;
 
   /*
    * Feature groups represented in stored positional features 
@@ -178,16 +95,15 @@ public class FeatureStore
    */
   public FeatureStore()
   {
-    nonNestedFeatures = new ArrayList<SequenceFeature>();
-    positionalFeatureGroups = new HashSet<String>();
-    nonPositionalFeatureGroups = new HashSet<String>();
+    features = new IntervalStore<>();
+    positionalFeatureGroups = new HashSet<>();
+    nonPositionalFeatureGroups = new HashSet<>();
     positionalMinScore = Float.NaN;
     positionalMaxScore = Float.NaN;
     nonPositionalMinScore = Float.NaN;
     nonPositionalMaxScore = Float.NaN;
 
-    // we only construct nonPositionalFeatures, contactFeatures
-    // or the NCList if we need to
+    // we only construct nonPositionalFeatures, contactFeatures if we need to
   }
 
   /**
@@ -213,58 +129,46 @@ public class FeatureStore
       positionalFeatureGroups.add(feature.getFeatureGroup());
     }
 
-    boolean added = false;
-
     if (feature.isContactFeature())
     {
-      added = addContactFeature(feature);
+      addContactFeature(feature);
     }
     else if (feature.isNonPositional())
     {
-      added = addNonPositionalFeature(feature);
+      addNonPositionalFeature(feature);
     }
     else
     {
-      added = addNonNestedFeature(feature);
-      if (!added)
-      {
-        /*
-         * detected a nested feature - put it in the NCList structure
-         */
-        added = addNestedFeature(feature);
-      }
+      addNestedFeature(feature);
     }
 
-    if (added)
-    {
-      /*
-       * record the total extent of positional features, to make
-       * getTotalFeatureLength possible; we count the length of a 
-       * contact feature as 1
-       */
-      totalExtent += getFeatureLength(feature);
+    /*
+     * record the total extent of positional features, to make
+     * getTotalFeatureLength possible; we count the length of a 
+     * contact feature as 1
+     */
+    totalExtent += getFeatureLength(feature);
 
-      /*
-       * record the minimum and maximum score for positional
-       * and non-positional features
-       */
-      float score = feature.getScore();
-      if (!Float.isNaN(score))
+    /*
+     * record the minimum and maximum score for positional
+     * and non-positional features
+     */
+    float score = feature.getScore();
+    if (!Float.isNaN(score))
+    {
+      if (feature.isNonPositional())
       {
-        if (feature.isNonPositional())
-        {
-          nonPositionalMinScore = min(nonPositionalMinScore, score);
-          nonPositionalMaxScore = max(nonPositionalMaxScore, score);
-        }
-        else
-        {
-          positionalMinScore = min(positionalMinScore, score);
-          positionalMaxScore = max(positionalMaxScore, score);
-        }
+        nonPositionalMinScore = min(nonPositionalMinScore, score);
+        nonPositionalMaxScore = max(nonPositionalMaxScore, score);
+      }
+      else
+      {
+        positionalMinScore = min(positionalMinScore, score);
+        positionalMaxScore = max(positionalMaxScore, score);
       }
     }
 
-    return added;
+    return true;
   }
 
   /**
@@ -288,12 +192,7 @@ public class FeatureStore
               contactFeatureStarts, feature);
     }
 
-    if (listContains(nonNestedFeatures, feature))
-    {
-      return true;
-    }
-
-    return nestedFeatures == null ? false : nestedFeatures
+    return features == null ? false : features
             .contains(feature);
   }
 
@@ -330,7 +229,7 @@ public class FeatureStore
   {
     if (nonPositionalFeatures == null)
     {
-      nonPositionalFeatures = new ArrayList<SequenceFeature>();
+      nonPositionalFeatures = new ArrayList<>();
     }
 
     nonPositionalFeatures.add(feature);
@@ -341,91 +240,16 @@ public class FeatureStore
   }
 
   /**
-   * Adds one feature to the NCList that can manage nested features (creating
-   * the NCList if necessary), and returns true. If the feature is already
-   * stored in the NCList (by equality test), then it is not added, and this
-   * method returns false.
-   */
-  protected synchronized boolean addNestedFeature(SequenceFeature feature)
-  {
-    if (nestedFeatures == null)
-    {
-      nestedFeatures = new NCList<>(feature);
-      return true;
-    }
-    return nestedFeatures.add(feature, false);
-  }
-
-  /**
-   * Add a feature to the list of non-nested features, maintaining the ordering
-   * of the list. A check is made for whether the feature is nested in (properly
-   * contained by) an existing feature. If there is no nesting, the feature is
-   * added to the list and the method returns true. If nesting is found, the
-   * feature is not added and the method returns false.
-   * 
-   * @param feature
-   * @return
-   */
-  protected boolean addNonNestedFeature(SequenceFeature feature)
-  {
-    synchronized (nonNestedFeatures)
-    {
-      /*
-       * find the first stored feature which doesn't precede the new one
-       */
-      int insertPosition = binarySearch(nonNestedFeatures,
-              SearchCriterion.byFeature(feature, RangeComparator.BY_START_POSITION));
-
-      /*
-       * fail if we detect feature enclosure - of the new feature by
-       * the one preceding it, or of the next feature by the new one
-       */
-      if (insertPosition > 0)
-      {
-        if (encloses(nonNestedFeatures.get(insertPosition - 1), feature))
-        {
-          return false;
-        }
-      }
-      if (insertPosition < nonNestedFeatures.size())
-      {
-        if (encloses(feature, nonNestedFeatures.get(insertPosition)))
-        {
-          return false;
-        }
-      }
-
-      /*
-       * checks passed - add the feature
-       */
-      nonNestedFeatures.add(insertPosition, feature);
-
-      return true;
-    }
-  }
-
-  /**
-   * Answers true if range1 properly encloses range2, else false
-   * 
-   * @param range1
-   * @param range2
-   * @return
+   * Adds one feature to the IntervalStore that can manage nested features
+   * (creating the IntervalStore if necessary)
    */
-  protected boolean encloses(ContiguousI range1, ContiguousI range2)
+  protected synchronized void addNestedFeature(SequenceFeature feature)
   {
-    int begin1 = range1.getBegin();
-    int begin2 = range2.getBegin();
-    int end1 = range1.getEnd();
-    int end2 = range2.getEnd();
-    if (begin1 == begin2 && end1 > end2)
-    {
-      return true;
-    }
-    if (begin1 < begin2 && end1 >= end2)
+    if (features == null)
     {
-      return true;
+      features = new IntervalStore<>();
     }
-    return false;
+    features.add(feature);
   }
 
   /**
@@ -441,28 +265,29 @@ public class FeatureStore
   {
     if (contactFeatureStarts == null)
     {
-      contactFeatureStarts = new ArrayList<SequenceFeature>();
+      contactFeatureStarts = new ArrayList<>();
     }
     if (contactFeatureEnds == null)
     {
-      contactFeatureEnds = new ArrayList<SequenceFeature>();
+      contactFeatureEnds = new ArrayList<>();
     }
 
     /*
+     * insert into list sorted by start (first contact position):
      * binary search the sorted list to find the insertion point
      */
-    int insertPosition = binarySearch(contactFeatureStarts,
-            SearchCriterion.byFeature(feature,
-                    RangeComparator.BY_START_POSITION));
+    int insertPosition = BinarySearcher.findFirst(contactFeatureStarts,
+            f -> f.getBegin() >= feature.getBegin());
     contactFeatureStarts.add(insertPosition, feature);
-    // and resort to mak siccar...just in case insertion point not quite right
-    Collections.sort(contactFeatureStarts, RangeComparator.BY_START_POSITION);
 
-    insertPosition = binarySearch(contactFeatureStarts,
-            SearchCriterion.byFeature(feature,
-                    RangeComparator.BY_END_POSITION));
-    contactFeatureEnds.add(feature);
-    Collections.sort(contactFeatureEnds, RangeComparator.BY_END_POSITION);
+
+    /*
+     * insert into list sorted by end (second contact position):
+     * binary search the sorted list to find the insertion point
+     */
+    insertPosition = BinarySearcher.findFirst(contactFeatureEnds,
+            f -> f.getEnd() >= feature.getEnd());
+    contactFeatureEnds.add(insertPosition, feature);
 
     return true;
   }
@@ -487,8 +312,10 @@ public class FeatureStore
     /*
      * locate the first entry in the list which does not precede the feature
      */
-    int pos = binarySearch(features,
-            SearchCriterion.byFeature(feature, RangeComparator.BY_START_POSITION));
+    // int pos = binarySearch(features,
+    // SearchCriterion.byFeature(feature, RangeComparator.BY_START_POSITION));
+    int pos = BinarySearcher.findFirst(features,
+            val -> val.getBegin() >= feature.getBegin());
     int len = features.size();
     while (pos < len)
     {
@@ -521,13 +348,11 @@ public class FeatureStore
   {
     List<SequenceFeature> result = new ArrayList<>();
 
-    findNonNestedFeatures(start, end, result);
-
     findContactFeatures(start, end, result);
 
-    if (nestedFeatures != null)
+    if (features != null)
     {
-      result.addAll(nestedFeatures.findOverlaps(start, end));
+      result.addAll(features.findOverlaps(start, end));
     }
 
     return result;
@@ -546,11 +371,11 @@ public class FeatureStore
   {
     if (contactFeatureStarts != null)
     {
-      findContactStartFeatures(from, to, result);
+      findContactStartOverlaps(from, to, result);
     }
     if (contactFeatureEnds != null)
     {
-      findContactEndFeatures(from, to, result);
+      findContactEndOverlaps(from, to, result);
     }
   }
 
@@ -563,22 +388,24 @@ public class FeatureStore
    * @param to
    * @param result
    */
-  protected void findContactEndFeatures(long from, long to,
+  protected void findContactEndOverlaps(long from, long to,
           List<SequenceFeature> result)
   {
     /*
-     * find the first contact feature (if any) that does not lie 
-     * entirely before the target range
+     * find the first contact feature (if any) 
+     * whose end point is not before the target range
      */
-    int startPosition = binarySearch(contactFeatureEnds,
-            SearchCriterion.byEnd(from));
-    for (; startPosition < contactFeatureEnds.size(); startPosition++)
+    int index = BinarySearcher.findFirst(contactFeatureEnds,
+            f -> f.getEnd() >= from);
+
+    while (index < contactFeatureEnds.size())
     {
-      SequenceFeature sf = contactFeatureEnds.get(startPosition);
+      SequenceFeature sf = contactFeatureEnds.get(index);
       if (!sf.isContactFeature())
       {
         System.err.println("Error! non-contact feature type "
                 + sf.getType() + " in contact features list");
+        index++;
         continue;
       }
 
@@ -589,54 +416,24 @@ public class FeatureStore
          * this feature's first contact position lies in the search range
          * so we don't include it in results a second time
          */
+        index++;
         continue;
       }
 
-      int end = sf.getEnd();
-      if (end >= from && end <= to)
-      {
-        result.add(sf);
-      }
-      if (end > to)
+      if (sf.getEnd() > to)
       {
+        /*
+         * this feature (and all following) has end point after the target range
+         */
         break;
       }
-    }
-  }
-
-  /**
-   * Adds non-nested features to the result list that lie within the target
-   * range. Non-positional features (start=end=0), contact features and nested
-   * features are excluded.
-   * 
-   * @param from
-   * @param to
-   * @param result
-   */
-  protected void findNonNestedFeatures(long from, long to,
-          List<SequenceFeature> result)
-  {
-    /*
-     * find the first feature whose end position is
-     * after the target range start
-     */
-    int startIndex = binarySearch(nonNestedFeatures,
-            SearchCriterion.byEnd(from));
 
-    final int startIndex1 = startIndex;
-    int i = startIndex1;
-    while (i < nonNestedFeatures.size())
-    {
-      SequenceFeature sf = nonNestedFeatures.get(i);
-      if (sf.getBegin() > to)
-      {
-        break;
-      }
-      if (sf.getBegin() <= to && sf.getEnd() >= from)
-      {
-        result.add(sf);
-      }
-      i++;
+      /*
+       * feature has end >= from and end <= to
+       * i.e. contact end point lies within overlap search range
+       */
+      result.add(sf);
+      index++;
     }
   }
 
@@ -648,26 +445,36 @@ public class FeatureStore
    * @param to
    * @param result
    */
-  protected void findContactStartFeatures(long from, long to,
+  protected void findContactStartOverlaps(long from, long to,
           List<SequenceFeature> result)
   {
-    int startPosition = binarySearch(contactFeatureStarts,
-            SearchCriterion.byStart(from));
+    int index = BinarySearcher.findFirst(contactFeatureStarts,
+            f -> f.getBegin() >= from);
 
-    for (; startPosition < contactFeatureStarts.size(); startPosition++)
+    while (index < contactFeatureStarts.size())
     {
-      SequenceFeature sf = contactFeatureStarts.get(startPosition);
+      SequenceFeature sf = contactFeatureStarts.get(index);
       if (!sf.isContactFeature())
       {
-        System.err.println("Error! non-contact feature type "
-                + sf.getType() + " in contact features list");
+        System.err.println("Error! non-contact feature " + sf.toString()
+                + " in contact features list");
+        index++;
         continue;
       }
-      int begin = sf.getBegin();
-      if (begin >= from && begin <= to)
+      if (sf.getBegin() > to)
       {
-        result.add(sf);
+        /*
+         * this feature's start (and all following) follows the target range
+         */
+        break;
       }
+
+      /*
+       * feature has begin >= from and begin <= to
+       * i.e. contact start point lies within overlap search range
+       */
+      result.add(sf);
+      index++;
     }
   }
 
@@ -678,11 +485,7 @@ public class FeatureStore
    */
   public List<SequenceFeature> getPositionalFeatures()
   {
-    /*
-     * add non-nested features (may be all features for many cases)
-     */
     List<SequenceFeature> result = new ArrayList<>();
-    result.addAll(nonNestedFeatures);
 
     /*
      * add any contact features - from the list by start position
@@ -695,9 +498,9 @@ public class FeatureStore
     /*
      * add any nested features
      */
-    if (nestedFeatures != null)
+    if (features != null)
     {
-      result.addAll(nestedFeatures.getEntries());
+      result.addAll(features);
     }
 
     return result;
@@ -743,13 +546,10 @@ public class FeatureStore
    */
   public synchronized boolean delete(SequenceFeature sf)
   {
-    /*
-     * try the non-nested positional features first
-     */
-    boolean removed = nonNestedFeatures.remove(sf);
+    boolean removed = false;
 
     /*
-     * if not found, try contact positions (and if found, delete
+     * try contact positions (and if found, delete
      * from both lists of contact positions)
      */
     if (!removed && contactFeatureStarts != null)
@@ -775,9 +575,9 @@ public class FeatureStore
     /*
      * if not found, try nested features
      */
-    if (!removed && nestedFeatures != null)
+    if (!removed && features != null)
     {
-      removed = nestedFeatures.delete(sf);
+      removed = features.remove(sf);
     }
 
     if (removed)
@@ -874,12 +674,12 @@ public class FeatureStore
    */
   public boolean isEmpty()
   {
-    boolean hasFeatures = !nonNestedFeatures.isEmpty()
-            || (contactFeatureStarts != null && !contactFeatureStarts
+    boolean hasFeatures = (contactFeatureStarts != null
+            && !contactFeatureStarts
                     .isEmpty())
             || (nonPositionalFeatures != null && !nonPositionalFeatures
                     .isEmpty())
-            || (nestedFeatures != null && nestedFeatures.size() > 0);
+            || (features != null && features.size() > 0);
 
     return !hasFeatures;
   }
@@ -907,41 +707,6 @@ public class FeatureStore
   }
 
   /**
-   * Performs a binary search of the (sorted) list to find the index of the
-   * first entry which returns true for the given comparator function. Returns
-   * the length of the list if there is no such entry.
-   * 
-   * @param features
-   * @param sc
-   * @return
-   */
-  protected static int binarySearch(List<SequenceFeature> features,
-          SearchCriterion sc)
-  {
-    int start = 0;
-    int end = features.size() - 1;
-    int matched = features.size();
-
-    while (start <= end)
-    {
-      int mid = (start + end) / 2;
-      SequenceFeature entry = features.get(mid);
-      boolean compare = sc.compare(entry);
-      if (compare)
-      {
-        matched = mid;
-        end = mid - 1;
-      }
-      else
-      {
-        start = mid + 1;
-      }
-    }
-
-    return matched;
-  }
-
-  /**
    * Answers the number of positional (or non-positional) features stored.
    * Contact features count as 1.
    * 
@@ -956,7 +721,7 @@ public class FeatureStore
               .size();
     }
 
-    int size = nonNestedFeatures.size();
+    int size = 0;
 
     if (contactFeatureStarts != null)
     {
@@ -964,9 +729,9 @@ public class FeatureStore
       size += contactFeatureStarts.size();
     }
 
-    if (nestedFeatures != null)
+    if (features != null)
     {
-      size += nestedFeatures.size();
+      size += features.size();
     }
 
     return size;
diff --git a/src/jalview/datamodel/features/NCList.java b/src/jalview/datamodel/features/NCList.java
deleted file mode 100644 (file)
index ae58a69..0000000
+++ /dev/null
@@ -1,646 +0,0 @@
-/*
- * 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.datamodel.features;
-
-import jalview.datamodel.ContiguousI;
-import jalview.datamodel.Range;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * An adapted implementation of NCList as described in the paper
- * 
- * <pre>
- * Nested Containment List (NCList): a new algorithm for accelerating
- * interval query of genome alignment and interval databases
- * - Alexander V. Alekseyenko, Christopher J. Lee
- * https://doi.org/10.1093/bioinformatics/btl647
- * </pre>
- */
-public class NCList<T extends ContiguousI>
-{
-  /*
-   * the number of ranges represented
-   */
-  private int size;
-
-  /*
-   * a list, in start position order, of sublists of ranges ordered so 
-   * that each contains (or is the same as) the one that follows it
-   */
-  private List<NCNode<T>> subranges;
-
-  /**
-   * Constructor given a list of things that are each located on a contiguous
-   * interval. Note that the constructor may reorder the list.
-   * <p>
-   * We assume here that for each range, start &lt;= end. Behaviour for reverse
-   * ordered ranges is undefined.
-   * 
-   * @param ranges
-   */
-  public NCList(List<T> ranges)
-  {
-    this();
-    build(ranges);
-  }
-
-  /**
-   * Sort and group ranges into sublists where each sublist represents a region
-   * and its contained subregions
-   * 
-   * @param ranges
-   */
-  protected void build(List<T> ranges)
-  {
-    /*
-     * sort by start ascending so that contained intervals 
-     * follow their containing interval
-     */
-    Collections.sort(ranges, RangeComparator.BY_START_POSITION);
-
-    List<Range> sublists = buildSubranges(ranges);
-
-    /*
-     * convert each subrange to an NCNode consisting of a range and
-     * (possibly) its contained NCList
-     */
-    for (Range sublist : sublists)
-    {
-      subranges.add(new NCNode<T>(ranges.subList(sublist.start,
-              sublist.end + 1)));
-    }
-
-    size = ranges.size();
-  }
-
-  public NCList(T entry)
-  {
-    this();
-    subranges.add(new NCNode<>(entry));
-    size = 1;
-  }
-
-  public NCList()
-  {
-    subranges = new ArrayList<NCNode<T>>();
-  }
-
-  /**
-   * Traverses the sorted ranges to identify sublists, within which each
-   * interval contains the one that follows it
-   * 
-   * @param ranges
-   * @return
-   */
-  protected List<Range> buildSubranges(List<T> ranges)
-  {
-    List<Range> sublists = new ArrayList<>();
-    
-    if (ranges.isEmpty())
-    {
-      return sublists;
-    }
-
-    int listStartIndex = 0;
-    long lastEndPos = Long.MAX_VALUE;
-
-    for (int i = 0; i < ranges.size(); i++)
-    {
-      ContiguousI nextInterval = ranges.get(i);
-      long nextStart = nextInterval.getBegin();
-      long nextEnd = nextInterval.getEnd();
-      if (nextStart > lastEndPos || nextEnd > lastEndPos)
-      {
-        /*
-         * this interval is not contained in the preceding one 
-         * close off the last sublist
-         */
-        sublists.add(new Range(listStartIndex, i - 1));
-        listStartIndex = i;
-      }
-      lastEndPos = nextEnd;
-    }
-
-    sublists.add(new Range(listStartIndex, ranges.size() - 1));
-    return sublists;
-  }
-
-  /**
-   * Adds one entry to the stored set (with duplicates allowed)
-   * 
-   * @param entry
-   */
-  public void add(T entry)
-  {
-    add(entry, true);
-  }
-
-  /**
-   * Adds one entry to the stored set, and returns true, unless allowDuplicates
-   * is set to false and it is already contained (by object equality test), in
-   * which case it is not added and this method returns false.
-   * 
-   * @param entry
-   * @param allowDuplicates
-   * @return
-   */
-  public synchronized boolean add(T entry, boolean allowDuplicates)
-  {
-    if (!allowDuplicates && contains(entry))
-    {
-      return false;
-    }
-
-    size++;
-    long start = entry.getBegin();
-    long end = entry.getEnd();
-
-    /*
-     * cases:
-     * - precedes all subranges: add as NCNode on front of list
-     * - follows all subranges: add as NCNode on end of list
-     * - enclosed by a subrange - add recursively to subrange
-     * - encloses one or more subranges - push them inside it
-     * - none of the above - add as a new node and resort nodes list (?)
-     */
-
-    /*
-     * find the first subrange whose end does not precede entry's start
-     */
-    int candidateIndex = findFirstOverlap(start);
-    if (candidateIndex == -1)
-    {
-      /*
-       * all subranges precede this one - add it on the end
-       */
-      subranges.add(new NCNode<>(entry));
-      return true;
-    }
-
-    /*
-     * search for maximal span of subranges i-k that the new entry
-     * encloses; or a subrange that encloses the new entry
-     */
-    boolean enclosing = false;
-    int firstEnclosed = 0;
-    int lastEnclosed = 0;
-    boolean overlapping = false;
-
-    for (int j = candidateIndex; j < subranges.size(); j++)
-    {
-      NCNode<T> subrange = subranges.get(j);
-
-      if (end < subrange.getBegin() && !overlapping && !enclosing)
-      {
-        /*
-         * new entry lies between subranges j-1 j
-         */
-        subranges.add(j, new NCNode<>(entry));
-        return true;
-      }
-
-      if (subrange.getBegin() <= start && subrange.getEnd() >= end)
-      {
-        /*
-         * push new entry inside this subrange as it encloses it
-         */
-        subrange.add(entry);
-        return true;
-      }
-      
-      if (start <= subrange.getBegin())
-      {
-        if (end >= subrange.getEnd())
-        {
-          /*
-           * new entry encloses this subrange (and possibly preceding ones);
-           * continue to find the maximal list it encloses
-           */
-          if (!enclosing)
-          {
-            firstEnclosed = j;
-          }
-          lastEnclosed = j;
-          enclosing = true;
-          continue;
-        }
-        else
-        {
-          /*
-           * entry spans from before this subrange to inside it
-           */
-          if (enclosing)
-          {
-            /*
-             * entry encloses one or more preceding subranges
-             */
-            addEnclosingRange(entry, firstEnclosed, lastEnclosed);
-            return true;
-          }
-          else
-          {
-            /*
-             * entry spans two subranges but doesn't enclose any
-             * so just add it 
-             */
-            subranges.add(j, new NCNode<>(entry));
-            return true;
-          }
-        }
-      }
-      else
-      {
-        overlapping = true;
-      }
-    }
-
-    /*
-     * drops through to here if new range encloses all others
-     * or overlaps the last one
-     */
-    if (enclosing)
-    {
-      addEnclosingRange(entry, firstEnclosed, lastEnclosed);
-    }
-    else
-    {
-      subranges.add(new NCNode<>(entry));
-    }
-
-    return true;
-  }
-  
-  /**
-   * Answers true if this NCList contains the given entry (by object equality
-   * test), else false
-   * 
-   * @param entry
-   * @return
-   */
-  public boolean contains(T entry)
-  {
-    /*
-     * find the first sublist that might overlap, i.e. 
-     * the first whose end position is >= from
-     */
-    int candidateIndex = findFirstOverlap(entry.getBegin());
-
-    if (candidateIndex == -1)
-    {
-      return false;
-    }
-
-    int to = entry.getEnd();
-
-    for (int i = candidateIndex; i < subranges.size(); i++)
-    {
-      NCNode<T> candidate = subranges.get(i);
-      if (candidate.getBegin() > to)
-      {
-        /*
-         * we are past the end of our target range
-         */
-        break;
-      }
-      if (candidate.contains(entry))
-      {
-        return true;
-      }
-    }
-    return false;
-  }
-
-  /**
-   * Update the tree so that the range of the new entry encloses subranges i to
-   * j (inclusive). That is, replace subranges i-j (inclusive) with a new
-   * subrange that contains them.
-   * 
-   * @param entry
-   * @param i
-   * @param j
-   */
-  protected synchronized void addEnclosingRange(T entry, final int i,
-          final int j)
-  {
-    NCList<T> newNCList = new NCList<>();
-    newNCList.addNodes(subranges.subList(i, j + 1));
-    NCNode<T> newNode = new NCNode<>(entry, newNCList);
-    for (int k = j; k >= i; k--)
-    {
-      subranges.remove(k);
-    }
-    subranges.add(i, newNode);
-  }
-
-  protected void addNodes(List<NCNode<T>> nodes)
-  {
-    for (NCNode<T> node : nodes)
-    {
-      subranges.add(node);
-      size += node.size();
-    }
-  }
-
-  /**
-   * Returns a (possibly empty) list of items whose extent overlaps the given
-   * range
-   * 
-   * @param from
-   *          start of overlap range (inclusive)
-   * @param to
-   *          end of overlap range (inclusive)
-   * @return
-   */
-  public List<T> findOverlaps(long from, long to)
-  {
-    List<T> result = new ArrayList<>();
-
-    findOverlaps(from, to, result);
-    
-    return result;
-  }
-
-  /**
-   * Recursively searches the NCList adding any items that overlap the from-to
-   * range to the result list
-   * 
-   * @param from
-   * @param to
-   * @param result
-   */
-  protected void findOverlaps(long from, long to, List<T> result)
-  {
-    /*
-     * find the first sublist that might overlap, i.e. 
-     * the first whose end position is >= from
-     */
-    int candidateIndex = findFirstOverlap(from);
-
-    if (candidateIndex == -1)
-    {
-      return;
-    }
-
-    for (int i = candidateIndex; i < subranges.size(); i++)
-    {
-      NCNode<T> candidate = subranges.get(i);
-      if (candidate.getBegin() > to)
-      {
-        /*
-         * we are past the end of our target range
-         */
-        break;
-      }
-      candidate.findOverlaps(from, to, result);
-    }
-
-  }
-
-  /**
-   * Search subranges for the first one whose end position is not before the
-   * target range's start position, i.e. the first one that may overlap the
-   * target range. Returns the index in the list of the first such range found,
-   * or -1 if none found.
-   * 
-   * @param from
-   * @return
-   */
-  protected int findFirstOverlap(long from)
-  {
-    /*
-     * The NCList paper describes binary search for this step,
-     * but this not implemented here as (a) I haven't understood it yet
-     * and (b) it seems to imply complications for adding to an NCList
-     */
-
-    int i = 0;
-    if (subranges != null)
-    {
-      for (NCNode<T> subrange : subranges)
-      {
-        if (subrange.getEnd() >= from)
-        {
-          return i;
-        }
-        i++;
-      }
-    }
-    return -1;
-  }
-
-  /**
-   * Formats the tree as a bracketed list e.g.
-   * 
-   * <pre>
-   * [1-100 [10-30 [10-20]], 15-30 [20-20]]
-   * </pre>
-   */
-  @Override
-  public String toString()
-  {
-    return subranges.toString();
-  }
-
-  /**
-   * Returns a string representation of the data where containment is shown by
-   * indentation on new lines
-   * 
-   * @return
-   */
-  public String prettyPrint()
-  {
-    StringBuilder sb = new StringBuilder(512);
-    int offset = 0;
-    int indent = 2;
-    prettyPrint(sb, offset, indent);
-    sb.append(System.lineSeparator());
-    return sb.toString();
-  }
-
-  /**
-   * @param sb
-   * @param offset
-   * @param indent
-   */
-  void prettyPrint(StringBuilder sb, int offset, int indent)
-  {
-    boolean first = true;
-    for (NCNode<T> subrange : subranges)
-    {
-      if (!first)
-      {
-        sb.append(System.lineSeparator());
-      }
-      first = false;
-      subrange.prettyPrint(sb, offset, indent);
-    }
-  }
-
-  /**
-   * Answers true if the data held satisfy the rules of construction of an
-   * NCList, else false.
-   * 
-   * @return
-   */
-  public boolean isValid()
-  {
-    return isValid(Integer.MIN_VALUE, Integer.MAX_VALUE);
-  }
-
-  /**
-   * Answers true if the data held satisfy the rules of construction of an
-   * NCList bounded within the given start-end range, else false.
-   * <p>
-   * Each subrange must lie within start-end (inclusive). Subranges must be
-   * ordered by start position ascending.
-   * <p>
-   * 
-   * @param start
-   * @param end
-   * @return
-   */
-  boolean isValid(final int start, final int end)
-  {
-    int lastStart = start;
-    for (NCNode<T> subrange : subranges)
-    {
-      if (subrange.getBegin() < lastStart)
-      {
-        System.err.println("error in NCList: range " + subrange.toString()
-                + " starts before " + lastStart);
-        return false;
-      }
-      if (subrange.getEnd() > end)
-      {
-        System.err.println("error in NCList: range " + subrange.toString()
-                + " ends after " + end);
-        return false;
-      }
-      lastStart = subrange.getBegin();
-
-      if (!subrange.isValid())
-      {
-        return false;
-      }
-    }
-    return true;
-  }
-
-  /**
-   * Answers the lowest start position enclosed by the ranges
-   * 
-   * @return
-   */
-  public int getStart()
-  {
-    return subranges.isEmpty() ? 0 : subranges.get(0).getBegin();
-  }
-
-  /**
-   * Returns the number of ranges held (deep count)
-   * 
-   * @return
-   */
-  public int size()
-  {
-    return size;
-  }
-
-  /**
-   * Returns a list of all entries stored
-   * 
-   * @return
-   */
-  public List<T> getEntries()
-  {
-    List<T> result = new ArrayList<>();
-    getEntries(result);
-    return result;
-  }
-
-  /**
-   * Adds all contained entries to the given list
-   * 
-   * @param result
-   */
-  void getEntries(List<T> result)
-  {
-    for (NCNode<T> subrange : subranges)
-    {
-      subrange.getEntries(result);
-    }
-  }
-
-  /**
-   * Deletes the given entry from the store, returning true if it was found (and
-   * deleted), else false. This method makes no assumption that the entry is in
-   * the 'expected' place in the store, in case it has been modified since it
-   * was added. Only the first 'same object' match is deleted, not 'equal' or
-   * multiple objects.
-   * 
-   * @param entry
-   */
-  public synchronized boolean delete(T entry)
-  {
-    if (entry == null)
-    {
-      return false;
-    }
-    for (int i = 0; i < subranges.size(); i++)
-    {
-      NCNode<T> subrange = subranges.get(i);
-      NCList<T> subRegions = subrange.getSubRegions();
-
-      if (subrange.getRegion() == entry)
-      {
-        /*
-         * if the subrange is rooted on this entry, promote its
-         * subregions (if any) to replace the subrange here;
-         * NB have to resort subranges after doing this since e.g.
-         * [10-30 [12-20 [16-18], 13-19]]
-         * after deleting 12-20, 16-18 is promoted to sibling of 13-19
-         * but should follow it in the list of subranges of 10-30 
-         */
-        subranges.remove(i);
-        if (subRegions != null)
-        {
-          subranges.addAll(subRegions.subranges);
-          Collections.sort(subranges, RangeComparator.BY_START_POSITION);
-        }
-        size--;
-        return true;
-      }
-      else
-      {
-        if (subRegions != null && subRegions.delete(entry))
-        {
-          size--;
-          subrange.deleteSubRegionsIfEmpty();
-          return true;
-        }
-      }
-    }
-    return false;
-  }
-}
diff --git a/src/jalview/datamodel/features/NCNode.java b/src/jalview/datamodel/features/NCNode.java
deleted file mode 100644 (file)
index b991750..0000000
+++ /dev/null
@@ -1,275 +0,0 @@
-/*
- * 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.datamodel.features;
-
-import jalview.datamodel.ContiguousI;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Each node of the NCList tree consists of a range, and (optionally) the NCList
- * of ranges it encloses
- *
- * @param <V>
- */
-class NCNode<V extends ContiguousI> implements ContiguousI
-{
-  /*
-   * deep size (number of ranges included)
-   */
-  private int size;
-
-  private V region;
-
-  /*
-   * null, or an object holding contained subregions of this nodes region
-   */
-  private NCList<V> subregions;
-
-  /**
-   * Constructor given a list of ranges
-   * 
-   * @param ranges
-   */
-  NCNode(List<V> ranges)
-  {
-    build(ranges);
-  }
-
-  /**
-   * Constructor given a single range
-   * 
-   * @param range
-   */
-  NCNode(V range)
-  {
-    List<V> ranges = new ArrayList<>();
-    ranges.add(range);
-    build(ranges);
-  }
-
-  NCNode(V entry, NCList<V> newNCList)
-  {
-    region = entry;
-    subregions = newNCList;
-    size = 1 + newNCList.size();
-  }
-
-  /**
-   * @param ranges
-   */
-  protected void build(List<V> ranges)
-  {
-    size = ranges.size();
-
-    if (!ranges.isEmpty())
-    {
-      region = ranges.get(0);
-    }
-    if (ranges.size() > 1)
-    {
-      subregions = new NCList<V>(ranges.subList(1, ranges.size()));
-    }
-  }
-
-  @Override
-  public int getBegin()
-  {
-    return region.getBegin();
-  }
-
-  @Override
-  public int getEnd()
-  {
-    return region.getEnd();
-  }
-
-  /**
-   * Formats the node as a bracketed list e.g.
-   * 
-   * <pre>
-   * [1-100 [10-30 [10-20]], 15-30 [20-20]]
-   * </pre>
-   */
-  @Override
-  public String toString() {
-    StringBuilder sb = new StringBuilder(10 * size);
-    sb.append(region.getBegin()).append("-").append(region.getEnd());
-    if (subregions != null)
-    {
-      sb.append(" ").append(subregions.toString());
-    }
-    return sb.toString();
-  }
-
-  void prettyPrint(StringBuilder sb, int offset, int indent) {
-    for (int i = 0 ; i < offset ; i++) {
-      sb.append(" ");
-    }
-    sb.append(region.getBegin()).append("-").append(region.getEnd());
-    if (subregions != null)
-    {
-      sb.append(System.lineSeparator());
-      subregions.prettyPrint(sb, offset + 2, indent);
-    }
-  }
-  /**
-   * Add any ranges that overlap the from-to range to the result list
-   * 
-   * @param from
-   * @param to
-   * @param result
-   */
-  void findOverlaps(long from, long to, List<V> result)
-  {
-    if (region.getBegin() <= to && region.getEnd() >= from)
-    {
-      result.add(region);
-    }
-    if (subregions != null)
-    {
-      subregions.findOverlaps(from, to, result);
-    }
-  }
-
-  /**
-   * Add one range to this subrange
-   * 
-   * @param entry
-   */
-  synchronized void add(V entry)
-  {
-    if (entry.getBegin() < region.getBegin() || entry.getEnd() > region.getEnd()) {
-      throw new IllegalArgumentException(String.format(
-              "adding improper subrange %d-%d to range %d-%d",
-              entry.getBegin(), entry.getEnd(), region.getBegin(),
-              region.getEnd()));
-    }
-    if (subregions == null)
-    {
-      subregions = new NCList<V>(entry);
-    }
-    else
-    {
-      subregions.add(entry);
-    }
-    size++;
-  }
-
-  /**
-   * Answers true if the data held satisfy the rules of construction of an
-   * NCList, else false.
-   * 
-   * @return
-   */
-  boolean isValid()
-  {
-    /*
-     * we don't handle reverse ranges
-     */
-    if (region != null && region.getBegin() > region.getEnd())
-    {
-      return false;
-    }
-    if (subregions == null)
-    {
-      return true;
-    }
-    return subregions.isValid(getBegin(), getEnd());
-  }
-
-  /**
-   * Adds all contained entries to the given list
-   * 
-   * @param entries
-   */
-  void getEntries(List<V> entries)
-  {
-    entries.add(region);
-    if (subregions != null)
-    {
-      subregions.getEntries(entries);
-    }
-  }
-
-  /**
-   * Answers true if this object contains the given entry (by object equals
-   * test), else false
-   * 
-   * @param entry
-   * @return
-   */
-  boolean contains(V entry)
-  {
-    if (entry == null)
-    {
-      return false;
-    }
-    if (entry.equals(region))
-    {
-      return true;
-    }
-    return subregions == null ? false : subregions.contains(entry);
-  }
-
-  /**
-   * Answers the 'root' region modelled by this object
-   * 
-   * @return
-   */
-  V getRegion()
-  {
-    return region;
-  }
-
-  /**
-   * Answers the (possibly null) contained regions within this object
-   * 
-   * @return
-   */
-  NCList<V> getSubRegions()
-  {
-    return subregions;
-  }
-
-  /**
-   * Nulls the subregion reference if it is empty (after a delete entry
-   * operation)
-   */
-  void deleteSubRegionsIfEmpty()
-  {
-    if (subregions != null && subregions.size() == 0)
-    {
-      subregions = null;
-    }
-  }
-
-  /**
-   * Answers the (deep) size of this node i.e. the number of ranges it models
-   * 
-   * @return
-   */
-  int size()
-  {
-    return size;
-  }
-}
diff --git a/src/jalview/datamodel/features/RangeComparator.java b/src/jalview/datamodel/features/RangeComparator.java
deleted file mode 100644 (file)
index b7d702d..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * 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.datamodel.features;
-
-import jalview.datamodel.ContiguousI;
-
-import java.util.Comparator;
-
-/**
- * A comparator that orders ranges by either start position or end position
- * ascending. If the position matches, ordering is resolved by end position (or
- * start position).
- * 
- * @author gmcarstairs
- *
- */
-public class RangeComparator implements Comparator<ContiguousI>
-{
-  public static final Comparator<ContiguousI> BY_START_POSITION = new RangeComparator(
-          true);
-
-  public static final Comparator<ContiguousI> BY_END_POSITION = new RangeComparator(
-          false);
-
-  boolean byStart;
-
-  /**
-   * Constructor
-   * 
-   * @param byStartPosition
-   *          if true, order based on start position, if false by end position
-   */
-  RangeComparator(boolean byStartPosition)
-  {
-    byStart = byStartPosition;
-  }
-
-  @Override
-  public int compare(ContiguousI o1, ContiguousI o2)
-  {
-    int len1 = o1.getEnd() - o1.getBegin();
-    int len2 = o2.getEnd() - o2.getBegin();
-
-    if (byStart)
-    {
-      return compare(o1.getBegin(), o2.getBegin(), len1, len2);
-    }
-    else
-    {
-      return compare(o1.getEnd(), o2.getEnd(), len1, len2);
-    }
-  }
-
-  /**
-   * Compares two ranges for ordering
-   * 
-   * @param pos1
-   *          first range positional ordering criterion
-   * @param pos2
-   *          second range positional ordering criterion
-   * @param len1
-   *          first range length ordering criterion
-   * @param len2
-   *          second range length ordering criterion
-   * @return
-   */
-  public int compare(long pos1, long pos2, int len1, int len2)
-  {
-    int order = Long.compare(pos1, pos2);
-    if (order == 0)
-    {
-      /*
-       * if tied on position order, longer length sorts to left
-       * i.e. the negation of normal ordering by length
-       */
-      order = -Integer.compare(len1, len2);
-    }
-    return order;
-  }
-}
index 8f965b4..ba8396a 100644 (file)
  */
 package jalview.datamodel.features;
 
-import jalview.datamodel.ContiguousI;
 import jalview.datamodel.SequenceFeature;
 import jalview.io.gff.SequenceOntologyFactory;
 import jalview.io.gff.SequenceOntologyI;
 
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Collections;
-import java.util.Comparator;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
@@ -36,6 +33,8 @@ import java.util.Map.Entry;
 import java.util.Set;
 import java.util.TreeMap;
 
+import intervalstore.api.IntervalI;
+
 /**
  * A class that stores sequence features in a way that supports efficient
  * querying by type and location (overlap). Intended for (but not limited to)
@@ -46,29 +45,6 @@ import java.util.TreeMap;
  */
 public class SequenceFeatures implements SequenceFeaturesI
 {
-  /**
-   * a comparator for sorting features by start position ascending
-   */
-  private static Comparator<ContiguousI> FORWARD_STRAND = new Comparator<ContiguousI>()
-  {
-    @Override
-    public int compare(ContiguousI o1, ContiguousI o2)
-    {
-      return Integer.compare(o1.getBegin(), o2.getBegin());
-    }
-  };
-
-  /**
-   * a comparator for sorting features by end position descending
-   */
-  private static Comparator<ContiguousI> REVERSE_STRAND = new Comparator<ContiguousI>()
-  {
-    @Override
-    public int compare(ContiguousI o1, ContiguousI o2)
-    {
-      return Integer.compare(o2.getEnd(), o1.getEnd());
-    }
-  };
 
   /*
    * map from feature type to structured store of features for that type
@@ -435,11 +411,10 @@ public class SequenceFeatures implements SequenceFeaturesI
    * @param features
    * @param forwardStrand
    */
-  public static void sortFeatures(List<SequenceFeature> features,
+  public static void sortFeatures(List<? extends IntervalI> features,
           final boolean forwardStrand)
   {
-    Collections.sort(features, forwardStrand ? FORWARD_STRAND
-            : REVERSE_STRAND);
+    IntervalI.sortIntervals(features, forwardStrand);
   }
 
   /**
diff --git a/src/jalview/datamodel/xdb/embl/EmblEntry.java b/src/jalview/datamodel/xdb/embl/EmblEntry.java
deleted file mode 100644 (file)
index bbe6a20..0000000
+++ /dev/null
@@ -1,872 +0,0 @@
-/*
- * 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.datamodel.xdb.embl;
-
-import jalview.analysis.SequenceIdMatcher;
-import jalview.bin.Cache;
-import jalview.datamodel.DBRefEntry;
-import jalview.datamodel.DBRefSource;
-import jalview.datamodel.FeatureProperties;
-import jalview.datamodel.Mapping;
-import jalview.datamodel.Sequence;
-import jalview.datamodel.SequenceFeature;
-import jalview.datamodel.SequenceI;
-import jalview.util.DBRefUtils;
-import jalview.util.DnaUtils;
-import jalview.util.MapList;
-import jalview.util.MappingUtils;
-import jalview.util.StringUtils;
-
-import java.text.ParseException;
-import java.util.Arrays;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Vector;
-import java.util.regex.Pattern;
-
-/**
- * Data model for one entry returned from an EMBL query, as marshalled by a
- * Castor binding file
- * 
- * For example: http://www.ebi.ac.uk/ena/data/view/J03321&display=xml
- * 
- * @see embl_mapping.xml
- */
-public class EmblEntry
-{
-  private static final Pattern SPACE_PATTERN = Pattern.compile(" ");
-
-  String accession;
-
-  String entryVersion;
-
-  String sequenceVersion;
-
-  String dataClass;
-
-  String moleculeType;
-
-  String topology;
-
-  String sequenceLength;
-
-  String taxonomicDivision;
-
-  String description;
-
-  String firstPublicDate;
-
-  String firstPublicRelease;
-
-  String lastUpdatedDate;
-
-  String lastUpdatedRelease;
-
-  Vector<String> keywords;
-
-  Vector<DBRefEntry> dbRefs;
-
-  Vector<EmblFeature> features;
-
-  EmblSequence sequence;
-
-  /**
-   * @return the accession
-   */
-  public String getAccession()
-  {
-    return accession;
-  }
-
-  /**
-   * @param accession
-   *          the accession to set
-   */
-  public void setAccession(String accession)
-  {
-    this.accession = accession;
-  }
-
-  /**
-   * @return the dbRefs
-   */
-  public Vector<DBRefEntry> getDbRefs()
-  {
-    return dbRefs;
-  }
-
-  /**
-   * @param dbRefs
-   *          the dbRefs to set
-   */
-  public void setDbRefs(Vector<DBRefEntry> dbRefs)
-  {
-    this.dbRefs = dbRefs;
-  }
-
-  /**
-   * @return the features
-   */
-  public Vector<EmblFeature> getFeatures()
-  {
-    return features;
-  }
-
-  /**
-   * @param features
-   *          the features to set
-   */
-  public void setFeatures(Vector<EmblFeature> features)
-  {
-    this.features = features;
-  }
-
-  /**
-   * @return the keywords
-   */
-  public Vector<String> getKeywords()
-  {
-    return keywords;
-  }
-
-  /**
-   * @param keywords
-   *          the keywords to set
-   */
-  public void setKeywords(Vector<String> keywords)
-  {
-    this.keywords = keywords;
-  }
-
-  /**
-   * @return the sequence
-   */
-  public EmblSequence getSequence()
-  {
-    return sequence;
-  }
-
-  /**
-   * @param sequence
-   *          the sequence to set
-   */
-  public void setSequence(EmblSequence sequence)
-  {
-    this.sequence = sequence;
-  }
-
-  /**
-   * Recover annotated sequences from EMBL file
-   * 
-   * @param sourceDb
-   * @param peptides
-   *          a list of protein products found so far (to add to)
-   * @return dna dataset sequence with DBRefs and features
-   */
-  public SequenceI getSequence(String sourceDb, List<SequenceI> peptides)
-  {
-    SequenceI dna = makeSequence(sourceDb);
-    if (dna == null)
-    {
-      return null;
-    }
-    dna.setDescription(description);
-    DBRefEntry retrievedref = new DBRefEntry(sourceDb, getSequenceVersion(),
-            accession);
-    dna.addDBRef(retrievedref);
-    // add map to indicate the sequence is a valid coordinate frame for the
-    // dbref
-    retrievedref
-            .setMap(new Mapping(null, new int[]
-            { 1, dna.getLength() }, new int[] { 1, dna.getLength() }, 1,
-                    1));
-
-    /*
-     * transform EMBL Database refs to canonical form
-     */
-    if (dbRefs != null)
-    {
-      for (DBRefEntry dbref : dbRefs)
-      {
-        dbref.setSource(DBRefUtils.getCanonicalName(dbref.getSource()));
-        dna.addDBRef(dbref);
-      }
-    }
-
-    SequenceIdMatcher matcher = new SequenceIdMatcher(peptides);
-    try
-    {
-      for (EmblFeature feature : features)
-      {
-        if (FeatureProperties.isCodingFeature(sourceDb, feature.getName()))
-        {
-          parseCodingFeature(feature, sourceDb, dna, peptides, matcher);
-        }
-      }
-    } catch (Exception e)
-    {
-      System.err.println("EMBL Record Features parsing error!");
-      System.err
-              .println("Please report the following to help@jalview.org :");
-      System.err.println("EMBL Record " + accession);
-      System.err.println("Resulted in exception: " + e.getMessage());
-      e.printStackTrace(System.err);
-    }
-
-    return dna;
-  }
-
-  /**
-   * @param sourceDb
-   * @return
-   */
-  SequenceI makeSequence(String sourceDb)
-  {
-    if (sequence == null)
-    {
-      System.err.println(
-              "No sequence was returned for ENA accession " + accession);
-      return null;
-    }
-    SequenceI dna = new Sequence(sourceDb + "|" + accession,
-            sequence.getSequence());
-    return dna;
-  }
-
-  /**
-   * Extracts coding region and product from a CDS feature and properly decorate
-   * it with annotations.
-   * 
-   * @param feature
-   *          coding feature
-   * @param sourceDb
-   *          source database for the EMBLXML
-   * @param dna
-   *          parent dna sequence for this record
-   * @param peptides
-   *          list of protein product sequences for Embl entry
-   * @param matcher
-   *          helper to match xrefs in already retrieved sequences
-   */
-  void parseCodingFeature(EmblFeature feature, String sourceDb,
-          SequenceI dna, List<SequenceI> peptides,
-          SequenceIdMatcher matcher)
-  {
-    boolean isEmblCdna = sourceDb.equals(DBRefSource.EMBLCDS);
-
-    int[] exons = getCdsRanges(feature);
-
-    String translation = null;
-    String proteinName = "";
-    String proteinId = null;
-    Map<String, String> vals = new Hashtable<>();
-
-    /*
-     * codon_start 1/2/3 in EMBL corresponds to phase 0/1/2 in CDS
-     * (phase is required for CDS features in GFF3 format)
-     */
-    int codonStart = 1;
-
-    /*
-     * parse qualifiers, saving protein translation, protein id,
-     * codon start position, product (name), and 'other values'
-     */
-    if (feature.getQualifiers() != null)
-    {
-      for (Qualifier q : feature.getQualifiers())
-      {
-        String qname = q.getName();
-        if (qname.equals("translation"))
-        {
-          // remove all spaces (precompiled String.replaceAll(" ", ""))
-          translation = SPACE_PATTERN.matcher(q.getValues()[0])
-                  .replaceAll("");
-        }
-        else if (qname.equals("protein_id"))
-        {
-          proteinId = q.getValues()[0].trim();
-        }
-        else if (qname.equals("codon_start"))
-        {
-          try
-          {
-            codonStart = Integer.parseInt(q.getValues()[0].trim());
-          } catch (NumberFormatException e)
-          {
-            System.err.println("Invalid codon_start in XML for " + accession
-                    + ": " + e.getMessage());
-          }
-        }
-        else if (qname.equals("product"))
-        {
-          // sometimes name is returned e.g. for V00488
-          proteinName = q.getValues()[0].trim();
-        }
-        else
-        {
-          // throw anything else into the additional properties hash
-          String[] qvals = q.getValues();
-          if (qvals != null)
-          {
-            String commaSeparated = StringUtils.arrayToSeparatorList(qvals,
-                    ",");
-            vals.put(qname, commaSeparated);
-          }
-        }
-      }
-    }
-
-    DBRefEntry proteinToEmblProteinRef = null;
-    exons = MappingUtils.removeStartPositions(codonStart - 1, exons);
-
-    SequenceI product = null;
-    Mapping dnaToProteinMapping = null;
-    if (translation != null && proteinName != null && proteinId != null)
-    {
-      int translationLength = translation.length();
-
-      /*
-       * look for product in peptides list, if not found, add it
-       */
-      product = matcher.findIdMatch(proteinId);
-      if (product == null)
-      {
-        product = new Sequence(proteinId, translation, 1,
-                translationLength);
-        product.setDescription(((proteinName.length() == 0)
-                ? "Protein Product from " + sourceDb
-                : proteinName));
-        peptides.add(product);
-        matcher.add(product);
-      }
-
-      // we have everything - create the mapping and perhaps the protein
-      // sequence
-      if (exons == null || exons.length == 0)
-      {
-        /*
-         * workaround until we handle dna location for CDS sequence
-         * e.g. location="X53828.1:60..1058" correctly
-         */
-        System.err.println(
-                "Implementation Notice: EMBLCDS records not properly supported yet - Making up the CDNA region of this sequence... may be incorrect ("
-                        + sourceDb + ":" + getAccession() + ")");
-        int dnaLength = dna.getLength();
-        if (translationLength * 3 == (1 - codonStart + dnaLength))
-        {
-          System.err.println(
-                  "Not allowing for additional stop codon at end of cDNA fragment... !");
-          // this might occur for CDS sequences where no features are marked
-          exons = new int[] { dna.getStart() + (codonStart - 1),
-              dna.getEnd() };
-          dnaToProteinMapping = new Mapping(product, exons,
-                  new int[]
-                  { 1, translationLength }, 3, 1);
-        }
-        if ((translationLength + 1) * 3 == (1 - codonStart + dnaLength))
-        {
-          System.err.println(
-                  "Allowing for additional stop codon at end of cDNA fragment... will probably cause an error in VAMSAs!");
-          exons = new int[] { dna.getStart() + (codonStart - 1),
-              dna.getEnd() - 3 };
-          dnaToProteinMapping = new Mapping(product, exons,
-                  new int[]
-                  { 1, translationLength }, 3, 1);
-        }
-      }
-      else
-      {
-        // Trim the exon mapping if necessary - the given product may only be a
-        // fragment of a larger protein. (EMBL:AY043181 is an example)
-
-        if (isEmblCdna)
-        {
-          // TODO: Add a DbRef back to the parent EMBL sequence with the exon
-          // map
-          // if given a dataset reference, search dataset for parent EMBL
-          // sequence if it exists and set its map
-          // make a new feature annotating the coding contig
-        }
-        else
-        {
-          // final product length truncation check
-          int[] cdsRanges = adjustForProteinLength(translationLength,
-                  exons);
-          dnaToProteinMapping = new Mapping(product, cdsRanges,
-                  new int[]
-                  { 1, translationLength }, 3, 1);
-          if (product != null)
-          {
-            /*
-             * make xref with mapping from protein to EMBL dna
-             */
-            DBRefEntry proteinToEmblRef = new DBRefEntry(DBRefSource.EMBL,
-                    getSequenceVersion(), proteinId,
-                    new Mapping(dnaToProteinMapping.getMap().getInverse()));
-            product.addDBRef(proteinToEmblRef);
-
-            /*
-             * make xref from protein to EMBLCDS; we assume here that the 
-             * CDS sequence version is same as dna sequence (?!)
-             */
-            MapList proteinToCdsMapList = new MapList(
-                    new int[]
-                    { 1, translationLength },
-                    new int[]
-                    { 1 + (codonStart - 1),
-                        (codonStart - 1) + 3 * translationLength },
-                    1, 3);
-            DBRefEntry proteinToEmblCdsRef = new DBRefEntry(
-                    DBRefSource.EMBLCDS, getSequenceVersion(), proteinId,
-                    new Mapping(proteinToCdsMapList));
-            product.addDBRef(proteinToEmblCdsRef);
-
-            /*
-             * make 'direct' xref from protein to EMBLCDSPROTEIN
-             */
-            proteinToEmblProteinRef = new DBRefEntry(proteinToEmblCdsRef);
-            proteinToEmblProteinRef.setSource(DBRefSource.EMBLCDSProduct);
-            proteinToEmblProteinRef.setMap(null);
-            product.addDBRef(proteinToEmblProteinRef);
-          }
-        }
-      }
-
-      /*
-       * add cds features to dna sequence
-       */
-      String cds = feature.getName(); // "CDS"
-      for (int xint = 0; exons != null && xint < exons.length - 1; xint += 2)
-      {
-        int exonStart = exons[xint];
-        int exonEnd = exons[xint + 1];
-        int begin = Math.min(exonStart, exonEnd);
-        int end = Math.max(exonStart, exonEnd);
-        int exonNumber = xint / 2 + 1;
-        String desc = String.format("Exon %d for protein '%s' EMBLCDS:%s",
-                exonNumber, proteinName, proteinId);
-
-        SequenceFeature sf = makeCdsFeature(cds, desc, begin, end,
-                sourceDb, vals);
-
-        sf.setEnaLocation(feature.getLocation());
-        boolean forwardStrand = exonStart <= exonEnd;
-        sf.setStrand(forwardStrand ? "+" : "-");
-        sf.setPhase(String.valueOf(codonStart - 1));
-        sf.setValue(FeatureProperties.EXONPOS, exonNumber);
-        sf.setValue(FeatureProperties.EXONPRODUCT, proteinName);
-
-        dna.addSequenceFeature(sf);
-      }
-    }
-
-    /*
-     * add feature dbRefs to sequence, and mappings for Uniprot xrefs
-     */
-    boolean hasUniprotDbref = false;
-    if (feature.dbRefs != null)
-    {
-      boolean mappingUsed = false;
-      for (DBRefEntry ref : feature.dbRefs)
-      {
-        /*
-         * ensure UniProtKB/Swiss-Prot converted to UNIPROT
-         */
-        String source = DBRefUtils.getCanonicalName(ref.getSource());
-        ref.setSource(source);
-        DBRefEntry proteinDbRef = new DBRefEntry(ref.getSource(),
-                ref.getVersion(), ref.getAccessionId());
-        if (source.equals(DBRefSource.UNIPROT))
-        {
-          String proteinSeqName = DBRefSource.UNIPROT + "|"
-                  + ref.getAccessionId();
-          if (dnaToProteinMapping != null
-                  && dnaToProteinMapping.getTo() != null)
-          {
-            if (mappingUsed)
-            {
-              /*
-               * two or more Uniprot xrefs for the same CDS - 
-               * each needs a distinct Mapping (as to a different sequence)
-               */
-              dnaToProteinMapping = new Mapping(dnaToProteinMapping);
-            }
-            mappingUsed = true;
-
-            /*
-             * try to locate the protein mapped to (possibly by a 
-             * previous CDS feature); if not found, construct it from
-             * the EMBL translation
-             */
-            SequenceI proteinSeq = matcher.findIdMatch(proteinSeqName);
-            if (proteinSeq == null)
-            {
-              proteinSeq = new Sequence(proteinSeqName,
-                      product.getSequenceAsString());
-              matcher.add(proteinSeq);
-              peptides.add(proteinSeq);
-            }
-            dnaToProteinMapping.setTo(proteinSeq);
-            dnaToProteinMapping.setMappedFromId(proteinId);
-            proteinSeq.addDBRef(proteinDbRef);
-            ref.setMap(dnaToProteinMapping);
-          }
-          hasUniprotDbref = true;
-        }
-        if (product != null)
-        {
-          /*
-           * copy feature dbref to our protein product
-           */
-          DBRefEntry pref = proteinDbRef;
-          pref.setMap(null); // reference is direct
-          product.addDBRef(pref);
-          // Add converse mapping reference
-          if (dnaToProteinMapping != null)
-          {
-            Mapping pmap = new Mapping(dna,
-                    dnaToProteinMapping.getMap().getInverse());
-            pref = new DBRefEntry(sourceDb, getSequenceVersion(),
-                    this.getAccession());
-            pref.setMap(pmap);
-            if (dnaToProteinMapping.getTo() != null)
-            {
-              dnaToProteinMapping.getTo().addDBRef(pref);
-            }
-          }
-        }
-        dna.addDBRef(ref);
-      }
-    }
-
-    /*
-     * if we have a product (translation) but no explicit Uniprot dbref
-     * (example: EMBL AAFI02000057 protein_id EAL65544.1)
-     * then construct mappings to an assumed EMBLCDSPROTEIN accession
-     */
-    if (!hasUniprotDbref && product != null)
-    {
-      if (proteinToEmblProteinRef == null)
-      {
-        // assuming CDSPROTEIN sequence version = dna version (?!)
-        proteinToEmblProteinRef = new DBRefEntry(DBRefSource.EMBLCDSProduct,
-                getSequenceVersion(), proteinId);
-      }
-      product.addDBRef(proteinToEmblProteinRef);
-
-      if (dnaToProteinMapping != null
-              && dnaToProteinMapping.getTo() != null)
-      {
-        DBRefEntry dnaToEmblProteinRef = new DBRefEntry(
-                DBRefSource.EMBLCDSProduct, getSequenceVersion(),
-                proteinId);
-        dnaToEmblProteinRef.setMap(dnaToProteinMapping);
-        dnaToProteinMapping.setMappedFromId(proteinId);
-        dna.addDBRef(dnaToEmblProteinRef);
-      }
-    }
-  }
-
-  /**
-   * Helper method to construct a SequenceFeature for one cds range
-   * 
-   * @param type
-   *          feature type ("CDS")
-   * @param desc
-   *          description
-   * @param begin
-   *          start position
-   * @param end
-   *          end position
-   * @param group
-   *          feature group
-   * @param vals
-   *          map of 'miscellaneous values' for feature
-   * @return
-   */
-  protected SequenceFeature makeCdsFeature(String type, String desc,
-          int begin, int end, String group, Map<String, String> vals)
-  {
-    SequenceFeature sf = new SequenceFeature(type, desc, begin, end, group);
-    if (!vals.isEmpty())
-    {
-      StringBuilder sb = new StringBuilder();
-      boolean first = true;
-      for (Entry<String, String> val : vals.entrySet())
-      {
-        if (!first)
-        {
-          sb.append(";");
-        }
-        sb.append(val.getKey()).append("=").append(val.getValue());
-        first = false;
-        sf.setValue(val.getKey(), val.getValue());
-      }
-      sf.setAttributes(sb.toString());
-    }
-    return sf;
-  }
-
-  /**
-   * Returns the CDS positions as a single array of [start, end, start, end...]
-   * positions. If on the reverse strand, these will be in descending order.
-   * 
-   * @param feature
-   * @return
-   */
-  protected int[] getCdsRanges(EmblFeature feature)
-  {
-    if (feature.location == null)
-    {
-      return new int[] {};
-    }
-
-    try
-    {
-      List<int[]> ranges = DnaUtils.parseLocation(feature.location);
-      return listToArray(ranges);
-    } catch (ParseException e)
-    {
-      Cache.log.warn(
-              String.format("Not parsing inexact CDS location %s in ENA %s",
-                      feature.location, this.accession));
-      return new int[] {};
-    }
-  }
-
-  /**
-   * Converts a list of [start, end] ranges to a single array of [start, end,
-   * start, end ...]
-   * 
-   * @param ranges
-   * @return
-   */
-  int[] listToArray(List<int[]> ranges)
-  {
-    int[] result = new int[ranges.size() * 2];
-    int i = 0;
-    for (int[] range : ranges)
-    {
-      result[i++] = range[0];
-      result[i++] = range[1];
-    }
-    return result;
-  }
-
-  /**
-   * Truncates (if necessary) the exon intervals to match 3 times the length of
-   * the protein; also accepts 3 bases longer (for stop codon not included in
-   * protein)
-   * 
-   * @param proteinLength
-   * @param exon
-   *          an array of [start, end, start, end...] intervals
-   * @return the same array (if unchanged) or a truncated copy
-   */
-  static int[] adjustForProteinLength(int proteinLength, int[] exon)
-  {
-    if (proteinLength <= 0 || exon == null)
-    {
-      return exon;
-    }
-    int expectedCdsLength = proteinLength * 3;
-    int exonLength = MappingUtils.getLength(Arrays.asList(exon));
-
-    /*
-     * if exon length matches protein, or is shorter, or longer by the 
-     * length of a stop codon (3 bases), then leave it unchanged
-     */
-    if (expectedCdsLength >= exonLength
-            || expectedCdsLength == exonLength - 3)
-    {
-      return exon;
-    }
-
-    int origxon[];
-    int sxpos = -1;
-    int endxon = 0;
-    origxon = new int[exon.length];
-    System.arraycopy(exon, 0, origxon, 0, exon.length);
-    int cdspos = 0;
-    for (int x = 0; x < exon.length; x += 2)
-    {
-      cdspos += Math.abs(exon[x + 1] - exon[x]) + 1;
-      if (expectedCdsLength <= cdspos)
-      {
-        // advanced beyond last codon.
-        sxpos = x;
-        if (expectedCdsLength != cdspos)
-        {
-          // System.err
-          // .println("Truncating final exon interval on region by "
-          // + (cdspos - cdslength));
-        }
-
-        /*
-         * shrink the final exon - reduce end position if forward
-         * strand, increase it if reverse
-         */
-        if (exon[x + 1] >= exon[x])
-        {
-          endxon = exon[x + 1] - cdspos + expectedCdsLength;
-        }
-        else
-        {
-          endxon = exon[x + 1] + cdspos - expectedCdsLength;
-        }
-        break;
-      }
-    }
-
-    if (sxpos != -1)
-    {
-      // and trim the exon interval set if necessary
-      int[] nxon = new int[sxpos + 2];
-      System.arraycopy(exon, 0, nxon, 0, sxpos + 2);
-      nxon[sxpos + 1] = endxon; // update the end boundary for the new exon
-                                // set
-      exon = nxon;
-    }
-    return exon;
-  }
-
-  public String getSequenceVersion()
-  {
-    return sequenceVersion;
-  }
-
-  public void setSequenceVersion(String sequenceVersion)
-  {
-    this.sequenceVersion = sequenceVersion;
-  }
-
-  public String getSequenceLength()
-  {
-    return sequenceLength;
-  }
-
-  public void setSequenceLength(String sequenceLength)
-  {
-    this.sequenceLength = sequenceLength;
-  }
-
-  public String getEntryVersion()
-  {
-    return entryVersion;
-  }
-
-  public void setEntryVersion(String entryVersion)
-  {
-    this.entryVersion = entryVersion;
-  }
-
-  public String getMoleculeType()
-  {
-    return moleculeType;
-  }
-
-  public void setMoleculeType(String moleculeType)
-  {
-    this.moleculeType = moleculeType;
-  }
-
-  public String getTopology()
-  {
-    return topology;
-  }
-
-  public void setTopology(String topology)
-  {
-    this.topology = topology;
-  }
-
-  public String getTaxonomicDivision()
-  {
-    return taxonomicDivision;
-  }
-
-  public void setTaxonomicDivision(String taxonomicDivision)
-  {
-    this.taxonomicDivision = taxonomicDivision;
-  }
-
-  public String getDescription()
-  {
-    return description;
-  }
-
-  public void setDescription(String description)
-  {
-    this.description = description;
-  }
-
-  public String getFirstPublicDate()
-  {
-    return firstPublicDate;
-  }
-
-  public void setFirstPublicDate(String firstPublicDate)
-  {
-    this.firstPublicDate = firstPublicDate;
-  }
-
-  public String getFirstPublicRelease()
-  {
-    return firstPublicRelease;
-  }
-
-  public void setFirstPublicRelease(String firstPublicRelease)
-  {
-    this.firstPublicRelease = firstPublicRelease;
-  }
-
-  public String getLastUpdatedDate()
-  {
-    return lastUpdatedDate;
-  }
-
-  public void setLastUpdatedDate(String lastUpdatedDate)
-  {
-    this.lastUpdatedDate = lastUpdatedDate;
-  }
-
-  public String getLastUpdatedRelease()
-  {
-    return lastUpdatedRelease;
-  }
-
-  public void setLastUpdatedRelease(String lastUpdatedRelease)
-  {
-    this.lastUpdatedRelease = lastUpdatedRelease;
-  }
-
-  public String getDataClass()
-  {
-    return dataClass;
-  }
-
-  public void setDataClass(String dataClass)
-  {
-    this.dataClass = dataClass;
-  }
-}
diff --git a/src/jalview/datamodel/xdb/embl/EmblError.java b/src/jalview/datamodel/xdb/embl/EmblError.java
deleted file mode 100644 (file)
index 94de28f..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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.datamodel.xdb.embl;
-
-/**
- * Data model mapped from any &lt;error&gt; elements returned from an EMBL query
- * 
- * @see embl_mapping.xml
- */
-public class EmblError
-{
-  String accession;
-
-  /**
-   * @return the accession
-   */
-  public String getAccession()
-  {
-    return accession;
-  }
-
-  /**
-   * @param accession
-   *          the accession to set
-   */
-  public void setAccession(String accession)
-  {
-    this.accession = accession;
-  }
-}
diff --git a/src/jalview/datamodel/xdb/embl/EmblFeature.java b/src/jalview/datamodel/xdb/embl/EmblFeature.java
deleted file mode 100644 (file)
index 51d740b..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * 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.datamodel.xdb.embl;
-
-import jalview.datamodel.DBRefEntry;
-
-import java.util.Vector;
-
-/**
- * Data model for a &lt;feature&gt; element returned from an EMBL query reply
- * 
- * @see embl_mapping.xml
- */
-public class EmblFeature
-{
-  String name;
-
-  Vector<DBRefEntry> dbRefs;
-
-  Vector<Qualifier> qualifiers;
-
-  String location;
-
-  /**
-   * @return the dbRefs
-   */
-  public Vector<DBRefEntry> getDbRefs()
-  {
-    return dbRefs;
-  }
-
-  /**
-   * @param dbRefs
-   *          the dbRefs to set
-   */
-  public void setDbRefs(Vector<DBRefEntry> dbRefs)
-  {
-    this.dbRefs = dbRefs;
-  }
-
-  /**
-   * @return the location
-   */
-  public String getLocation()
-  {
-    return location;
-  }
-
-  /**
-   * @param loc
-   */
-  public void setLocation(String loc)
-  {
-    this.location = loc;
-  }
-
-  /**
-   * @return the name
-   */
-  public String getName()
-  {
-    return name;
-  }
-
-  /**
-   * @param name
-   *          the name to set
-   */
-  public void setName(String name)
-  {
-    this.name = name;
-  }
-
-  /**
-   * @return the qualifiers
-   */
-  public Vector<Qualifier> getQualifiers()
-  {
-    return qualifiers;
-  }
-
-  /**
-   * @param qualifiers
-   *          the qualifiers to set
-   */
-  public void setQualifiers(Vector<Qualifier> qualifiers)
-  {
-    this.qualifiers = qualifiers;
-  }
-}
diff --git a/src/jalview/datamodel/xdb/embl/EmblFile.java b/src/jalview/datamodel/xdb/embl/EmblFile.java
deleted file mode 100644 (file)
index 8a32c13..0000000
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * 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.datamodel.xdb.embl;
-
-import jalview.datamodel.DBRefEntry;
-import jalview.ws.dbsources.Uniprot;
-
-import java.io.File;
-import java.io.FileReader;
-import java.io.PrintWriter;
-import java.io.Reader;
-import java.util.Vector;
-
-import org.exolab.castor.mapping.Mapping;
-import org.exolab.castor.xml.Unmarshaller;
-
-/**
- * Data model for entries returned from an EMBL query, as marshalled by a Castor
- * binding file
- * 
- * For example: http://www.ebi.ac.uk/Tools/dbfetch/dbfetch/embl/x53828/emblxml
- * 
- * @see embl_mapping.xml
- */
-public class EmblFile
-{
-  Vector<EmblEntry> entries;
-
-  Vector<EmblError> errors;
-
-  String text;
-
-  /**
-   * @return the entries
-   */
-  public Vector<EmblEntry> getEntries()
-  {
-    return entries;
-  }
-
-  /**
-   * @param entries
-   *          the entries to set
-   */
-  public void setEntries(Vector<EmblEntry> entries)
-  {
-    this.entries = entries;
-  }
-
-  /**
-   * @return the errors
-   */
-  public Vector<EmblError> getErrors()
-  {
-    return errors;
-  }
-
-  /**
-   * @param errors
-   *          the errors to set
-   */
-  public void setErrors(Vector<EmblError> errors)
-  {
-    this.errors = errors;
-  }
-
-  /**
-   * Parse an EmblXML file into an EmblFile object
-   * 
-   * @param file
-   * @return parsed EmblXML or null if exceptions were raised
-   */
-  public static EmblFile getEmblFile(File file)
-  {
-    if (file == null)
-    {
-      return null;
-    }
-    try
-    {
-      return EmblFile.getEmblFile(new FileReader(file));
-    } catch (Exception e)
-    {
-      System.err.println("Exception whilst reading EMBLfile from " + file);
-      e.printStackTrace(System.err);
-    }
-    return null;
-  }
-
-  public static EmblFile getEmblFile(Reader file)
-  {
-    EmblFile record = new EmblFile();
-    try
-    {
-      // 1. Load the mapping information from the file
-      Mapping map = new Mapping(record.getClass().getClassLoader());
-
-      java.net.URL url = record.getClass().getResource("/embl_mapping.xml");
-      map.loadMapping(url);
-
-      // 2. Unmarshal the data
-      Unmarshaller unmar = new Unmarshaller(record);
-      try
-      {
-        // uncomment to DEBUG EMBLFile reading
-        if (jalview.bin.Cache
-                .getDefault(jalview.bin.Cache.CASTORLOGLEVEL, "debug")
-                .equalsIgnoreCase("DEBUG"))
-        {
-          unmar.setDebug(jalview.bin.Cache.log.isDebugEnabled());
-        }
-      } catch (Exception e)
-      {
-      }
-      unmar.setIgnoreExtraElements(true);
-      unmar.setIgnoreExtraAttributes(true);
-      unmar.setMapping(map);
-      unmar.setLogWriter(new PrintWriter(System.out));
-      record = (EmblFile) unmar.unmarshal(file);
-
-      canonicaliseDbRefs(record);
-    } catch (Exception e)
-    {
-      e.printStackTrace(System.err);
-      record = null;
-    }
-
-    return record;
-  }
-
-  /**
-   * Change blank version to "0" in any DBRefEntry, to ensure consistent
-   * comparison with other DBRefEntry in Jalview
-   * 
-   * @param record
-   * @see Uniprot#getDbVersion
-   */
-  static void canonicaliseDbRefs(EmblFile record)
-  {
-    if (record.getEntries() == null)
-    {
-      return;
-    }
-    for (EmblEntry entry : record.getEntries())
-    {
-      if (entry.getDbRefs() != null)
-      {
-        for (DBRefEntry dbref : entry.getDbRefs())
-        {
-          if ("".equals(dbref.getVersion()))
-          {
-            dbref.setVersion("0");
-          }
-        }
-      }
-
-      if (entry.getFeatures() != null)
-      {
-        for (EmblFeature feature : entry.getFeatures())
-        {
-          if (feature.getDbRefs() != null)
-          {
-            for (DBRefEntry dbref : feature.getDbRefs())
-            {
-              if ("".equals(dbref.getVersion()))
-              {
-                dbref.setVersion("0");
-              }
-            }
-          }
-        }
-      }
-    }
-  }
-
-  public String getText()
-  {
-    return text;
-  }
-
-  public void setText(String text)
-  {
-    this.text = text;
-  }
-}
diff --git a/src/jalview/datamodel/xdb/embl/EmblSequence.java b/src/jalview/datamodel/xdb/embl/EmblSequence.java
deleted file mode 100644 (file)
index 92c424b..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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.datamodel.xdb.embl;
-
-/**
- * Data model for the sequence extracted from an EMBL query reply
- * 
- * @see embl_mapping.xml
- */
-public class EmblSequence
-{
-  String sequence;
-
-  /**
-   * @return the sequence
-   */
-  public String getSequence()
-  {
-    return sequence;
-  }
-
-  /**
-   * @param sequence
-   *          the sequence to set
-   */
-  public void setSequence(String sequence)
-  {
-    // remove spaces introduced by unmarshalling of newline characters
-    this.sequence = sequence.replace(" ", "");
-  }
-}
diff --git a/src/jalview/datamodel/xdb/embl/Qualifier.java b/src/jalview/datamodel/xdb/embl/Qualifier.java
deleted file mode 100644 (file)
index 851dd48..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * 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.datamodel.xdb.embl;
-
-/**
- * Data model for a &lt;qualifier&gt; child element of a &lt;feature&gt; read
- * from an EMBL query reply
- * 
- * @see embl_mapping.xml
- */
-public class Qualifier
-{
-  String name;
-
-  String[] values;
-
-  String[] evidence;
-
-  /**
-   * @return the name
-   */
-  public String getName()
-  {
-    return name;
-  }
-
-  /**
-   * @param name
-   *          the name to set
-   */
-  public void setName(String name)
-  {
-    this.name = name;
-  }
-
-  /**
-   * @return the values
-   */
-  public String[] getValues()
-  {
-    return values;
-  }
-
-  /**
-   * @param values
-   *          the values to set
-   */
-  public void setValues(String[] values)
-  {
-    this.values = values;
-  }
-
-  public void addEvidence(String qevidence)
-  {
-    // TODO - not used? can remove?
-    if (evidence == null)
-    {
-      evidence = new String[1];
-    }
-    else
-    {
-      String[] temp = new String[evidence.length + 1];
-      System.arraycopy(evidence, 0, temp, 0, evidence.length);
-      evidence = temp;
-    }
-    evidence[evidence.length - 1] = qevidence;
-  }
-
-  public void addValues(String value)
-  {
-    // TODO - not used? can remove?
-    if (values == null)
-    {
-      values = new String[1];
-    }
-    else
-    {
-      String[] temp = new String[values.length + 1];
-      System.arraycopy(values, 0, temp, 0, values.length);
-      values = temp;
-    }
-    values[values.length - 1] = value;
-  }
-
-  /**
-   * @return the evidence
-   */
-  public String[] getEvidence()
-  {
-    return evidence;
-  }
-
-  /**
-   * @param evidence
-   *          the evidence to set
-   */
-  public void setEvidence(String[] evidence)
-  {
-    this.evidence = evidence;
-  }
-}
diff --git a/src/jalview/datamodel/xdb/uniprot/UniprotEntry.java b/src/jalview/datamodel/xdb/uniprot/UniprotEntry.java
deleted file mode 100755 (executable)
index a3537c9..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * 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.datamodel.xdb.uniprot;
-
-import jalview.datamodel.PDBEntry;
-
-import java.util.Vector;
-
-/**
- * Data model for an entry returned from a Uniprot query
- * 
- * @see uniprot_mapping.xml
- */
-public class UniprotEntry
-{
-
-  UniprotSequence sequence;
-
-  Vector<String> name;
-
-  Vector<String> accession;
-
-  Vector<UniprotFeature> feature;
-
-  Vector<PDBEntry> dbrefs;
-
-  UniprotProteinName protName;
-
-  public void setAccession(Vector<String> items)
-  {
-    accession = items;
-  }
-
-  public void setFeature(Vector<UniprotFeature> items)
-  {
-    feature = items;
-  }
-
-  public Vector<UniprotFeature> getFeature()
-  {
-    return feature;
-  }
-
-  public Vector<String> getAccession()
-  {
-    return accession;
-  }
-
-  public void setProtein(UniprotProteinName names)
-  {
-    protName = names;
-  }
-
-  public UniprotProteinName getProtein()
-  {
-    return protName;
-  }
-
-  public void setName(Vector<String> na)
-  {
-    name = na;
-  }
-
-  public Vector<String> getName()
-  {
-    return name;
-  }
-
-  public UniprotSequence getUniprotSequence()
-  {
-    return sequence;
-  }
-
-  public void setUniprotSequence(UniprotSequence seq)
-  {
-    sequence = seq;
-  }
-
-  public Vector<PDBEntry> getDbReference()
-  {
-    return dbrefs;
-  }
-
-  public void setDbReference(Vector<PDBEntry> dbref)
-  {
-    this.dbrefs = dbref;
-  }
-
-}
diff --git a/src/jalview/datamodel/xdb/uniprot/UniprotFeature.java b/src/jalview/datamodel/xdb/uniprot/UniprotFeature.java
deleted file mode 100644 (file)
index 8bd5652..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * 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.datamodel.xdb.uniprot;
-
-import java.util.Vector;
-
-/**
- * A data model class for binding from Uniprot XML via uniprot_mapping.xml
- */
-public class UniprotFeature
-{
-  private String type;
-
-  private String description = null;
-
-  private String original = null;
-
-  private Vector<String> variation = null;
-
-  private String status;
-
-  private int begin;
-
-  private int end;
-
-  public String getType()
-  {
-    return type;
-  }
-
-  public void setType(String t)
-  {
-    this.type = t;
-  }
-
-  public String getDescription()
-  {
-    return description;
-  }
-
-  public void setDescription(String d)
-  {
-    this.description = d;
-  }
-
-  public String getStatus()
-  {
-    return status;
-  }
-
-  public void setStatus(String s)
-  {
-    this.status = s;
-  }
-
-  public int getBegin()
-  {
-    return begin;
-  }
-
-  public void setBegin(int b)
-  {
-    this.begin = b;
-  }
-
-  public int getEnd()
-  {
-    return end;
-  }
-
-  public void setEnd(int e)
-  {
-    this.end = e;
-  }
-
-  public int getPosition()
-  {
-    return begin;
-  }
-
-  public void setPosition(int p)
-  {
-    this.begin = p;
-    this.end = p;
-  }
-
-  public String getOriginal()
-  {
-    return original;
-  }
-
-  public void setOriginal(String original)
-  {
-    this.original = original;
-  }
-
-  public Vector<String> getVariation()
-  {
-    return variation;
-  }
-
-  public void setVariation(Vector<String> variant)
-  {
-    this.variation = variant;
-  }
-}
diff --git a/src/jalview/datamodel/xdb/uniprot/UniprotFile.java b/src/jalview/datamodel/xdb/uniprot/UniprotFile.java
deleted file mode 100755 (executable)
index 9cc0391..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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.datamodel.xdb.uniprot;
-
-import java.util.Vector;
-
-/**
- * Data model of a retrieved Uniprot entry, as unmarshalled by Castor using a
- * binding file (uniprot_mapping.xml)
- */
-public class UniprotFile
-{
-  Vector<UniprotEntry> _items;
-
-  public void setUniprotEntries(Vector<UniprotEntry> items)
-  {
-    _items = items;
-  }
-
-  public Vector<UniprotEntry> getUniprotEntries()
-  {
-    return _items;
-  }
-}
diff --git a/src/jalview/datamodel/xdb/uniprot/UniprotProteinName.java b/src/jalview/datamodel/xdb/uniprot/UniprotProteinName.java
deleted file mode 100755 (executable)
index 2335e71..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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.datamodel.xdb.uniprot;
-
-import java.util.Vector;
-
-/**
- * Data model for protein name returned from a Uniprot query
- * 
- * Protein names are read from the Uniprot XML element
- * uniprot/entry/protein/recommendedName/fullName
- * 
- * @see uniprot_mapping.xml
- */
-public class UniprotProteinName
-{
-  private Vector<String> names;
-
-  public void setName(Vector<String> names)
-  {
-    this.names = names;
-  }
-
-  public Vector<String> getName()
-  {
-    return names;
-  }
-
-}
diff --git a/src/jalview/datamodel/xdb/uniprot/UniprotSequence.java b/src/jalview/datamodel/xdb/uniprot/UniprotSequence.java
deleted file mode 100755 (executable)
index bdba73f..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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.datamodel.xdb.uniprot;
-
-/**
- * Data model for the sequence returned by a Uniprot query
- * 
- * @see uniprot_mapping.xml
- */
-public class UniprotSequence
-{
-  private String _content = "";
-
-  /**
-   * Sets the content string, omitting any space characters
-   * 
-   * @param seq
-   */
-  public void setContent(String seq)
-  {
-    if (seq != null)
-    {
-      StringBuilder sb = new StringBuilder(seq.length());
-      for (int i = 0; i < seq.length(); i++)
-      {
-        if (seq.charAt(i) != ' ')
-        {
-          sb.append(seq.charAt(i));
-        }
-      }
-      _content = sb.toString();
-    }
-  }
-
-  public String getContent()
-  {
-    return _content;
-  }
-
-}
index 7384327..e01ad17 100644 (file)
@@ -22,7 +22,6 @@ package jalview.ext.ensembl;
 
 import jalview.datamodel.SequenceFeature;
 import jalview.datamodel.SequenceI;
-import jalview.io.gff.SequenceOntologyFactory;
 import jalview.io.gff.SequenceOntologyI;
 
 import java.util.ArrayList;
@@ -127,7 +126,7 @@ public class EnsemblCdna extends EnsemblSeqProxy
     for (SequenceFeature sf : sfs)
     {
       String parentFeature = (String) sf.getValue(PARENT);
-      if (("transcript:" + accId).equals(parentFeature))
+      if (accId.equals(parentFeature))
       {
         result.add(sf);
       }
index 8a71b64..8f13d99 100644 (file)
@@ -116,7 +116,7 @@ public class EnsemblCds extends EnsemblSeqProxy
     for (SequenceFeature sf : sfs)
     {
       String parentFeature = (String) sf.getValue(PARENT);
-      if (("transcript:" + accId).equals(parentFeature))
+      if ( accId.equals(parentFeature))
       {
         result.add(sf);
       }
index 582eac6..744191d 100644 (file)
@@ -22,17 +22,25 @@ package jalview.ext.ensembl;
 
 import jalview.datamodel.Alignment;
 import jalview.datamodel.AlignmentI;
-import jalview.io.DataSourceType;
-import jalview.io.FeaturesFile;
-import jalview.io.FileParse;
+import jalview.datamodel.Sequence;
+import jalview.datamodel.SequenceFeature;
+import jalview.datamodel.SequenceI;
+import jalview.io.gff.SequenceOntologyI;
+import jalview.util.JSONUtils;
 
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.ArrayList;
+import java.util.Iterator;
 import java.util.List;
 
+import org.json.simple.JSONArray;
+import org.json.simple.JSONObject;
+import org.json.simple.parser.JSONParser;
+import org.json.simple.parser.ParseException;
+
 /**
  * A client for fetching and processing Ensembl feature data in GFF format by
  * calling the overlap REST service
@@ -91,9 +99,128 @@ class EnsemblFeatures extends EnsemblRestClient
     {
       return null;
     }
-    FeaturesFile fr = new FeaturesFile(
-            new FileParse(fp, null, DataSourceType.URL));
-    return new Alignment(fr.getSeqsAsArray());
+
+    SequenceI seq = parseFeaturesJson(fp);
+    return new Alignment(new SequenceI[] { seq });
+  }
+
+  /**
+   * Parses the JSON response into Jalview sequence features and attaches them
+   * to a dummy sequence
+   * 
+   * @param br
+   * @return
+   */
+  private SequenceI parseFeaturesJson(BufferedReader br)
+  {
+    SequenceI seq = new Sequence("Dummy", "");
+
+    JSONParser jp = new JSONParser();
+    try
+    {
+      JSONArray responses = (JSONArray) jp.parse(br);
+      Iterator rvals = responses.iterator();
+      while (rvals.hasNext())
+      {
+        try
+        {
+          JSONObject obj = (JSONObject) rvals.next();
+          String type = obj.get("feature_type").toString();
+          int start = Integer.parseInt(obj.get("start").toString());
+          int end = Integer.parseInt(obj.get("end").toString());
+          String source = obj.get("source").toString();
+          String strand = obj.get("strand").toString();
+          String alleles = JSONUtils
+                  .arrayToList((JSONArray) obj.get("alleles"));
+          String clinSig = JSONUtils
+                  .arrayToList(
+                          (JSONArray) obj.get("clinical_significance"));
+
+          /*
+           * convert 'variation' to 'sequence_variant', and 'cds' to 'CDS'
+           * so as to have a valid SO term for the feature type
+           * ('gene', 'exon', 'transcript' don't need any conversion)
+           */
+          if ("variation".equals(type))
+          {
+            type = SequenceOntologyI.SEQUENCE_VARIANT;
+          }
+          else if (SequenceOntologyI.CDS.equalsIgnoreCase((type)))
+          {
+            type = SequenceOntologyI.CDS;
+          }
+          
+          String desc = getFirstNotNull(obj, "alleles", "external_name",
+                  JSON_ID);
+          SequenceFeature sf = new SequenceFeature(type, desc, start, end,
+                  source);
+          sf.setStrand("1".equals(strand) ? "+" : "-");
+          setFeatureAttribute(sf, obj, "id");
+          setFeatureAttribute(sf, obj, "Parent");
+          setFeatureAttribute(sf, obj, "consequence_type");
+          sf.setValue("alleles", alleles);
+          sf.setValue("clinical_significance", clinSig);
+
+          seq.addSequenceFeature(sf);
+        } catch (Throwable t)
+        {
+          // ignore - keep trying other features
+        }
+      }
+    } catch (ParseException | IOException e)
+    {
+      // ignore
+    }
+
+    return seq;
+  }
+
+  /**
+   * Returns the first non-null attribute found (if any) as a string, formatted
+   * suitably for display as feature description or tooltip. Answers null if
+   * none of the attribute keys is present.
+   * 
+   * @param obj
+   * @param keys
+   * @return
+   */
+  protected String getFirstNotNull(JSONObject obj, String... keys)
+  {
+    String desc = null;
+
+    for (String key : keys)
+    {
+      Object val = obj.get(key);
+      if (val != null)
+      {
+        String s = val instanceof JSONArray
+                ? JSONUtils.arrayToList((JSONArray) val)
+                : val.toString();
+        if (!s.isEmpty())
+        {
+          return s;
+        }
+      }
+    }
+    return desc;
+  }
+
+  /**
+   * A helper method that reads the 'key' entry in the JSON object, and if not
+   * null, sets its string value as an attribute on the sequence feature
+   * 
+   * @param sf
+   * @param obj
+   * @param key
+   */
+  protected void setFeatureAttribute(SequenceFeature sf, JSONObject obj,
+          String key)
+  {
+    Object object = obj.get(key);
+    if (object != null)
+    {
+      sf.setValue(key, object.toString());
+    }
   }
 
   /**
@@ -109,7 +236,7 @@ class EnsemblFeatures extends EnsemblRestClient
     urlstring.append(getDomain()).append("/overlap/id/").append(ids.get(0));
 
     // @see https://github.com/Ensembl/ensembl-rest/wiki/Output-formats
-    urlstring.append("?content-type=text/x-gff3");
+    urlstring.append("?content-type=" + getResponseMimeType());
 
     /*
      * specify object_type=gene in case is shared by transcript and/or protein;
@@ -145,16 +272,16 @@ class EnsemblFeatures extends EnsemblRestClient
   @Override
   protected String getRequestMimeType()
   {
-    return "text/x-gff3";
+    return "application/json";
   }
 
   /**
-   * Returns the MIME type for GFF3
+   * Returns the MIME type wanted for the response
    */
   @Override
   protected String getResponseMimeType()
   {
-    return "text/x-gff3";
+    return "application/json";
   }
 
   /**
index 36b19e2..7648536 100644 (file)
@@ -51,8 +51,6 @@ import com.stevesoft.pat.Regex;
  */
 public class EnsemblGene extends EnsemblSeqProxy
 {
-  private static final String GENE_PREFIX = "gene:";
-
   /*
    * accepts anything as we will attempt lookup of gene or 
    * transcript id or gene name
@@ -368,7 +366,7 @@ public class EnsemblGene extends EnsemblSeqProxy
      * look for exon features of the transcript, failing that for CDS
      * (for example ENSG00000124610 has 1 CDS but no exon features)
      */
-    String parentId = "transcript:" + accId;
+    String parentId = accId;
     List<SequenceFeature> splices = findFeatures(gene,
             SequenceOntologyI.EXON, parentId);
     if (splices.isEmpty())
@@ -399,7 +397,7 @@ public class EnsemblGene extends EnsemblSeqProxy
      * Ensembl has gene name as transcript Name
      * EnsemblGenomes doesn't, but has a url-encoded description field
      */
-    String description = (String) transcriptFeature.getValue(NAME);
+    String description = transcriptFeature.getDescription();
     if (description == null)
     {
       description = (String) transcriptFeature.getValue(DESCRIPTION);
@@ -488,7 +486,7 @@ public class EnsemblGene extends EnsemblSeqProxy
    */
   protected String getTranscriptId(SequenceFeature feature)
   {
-    return (String) feature.getValue("transcript_id");
+    return (String) feature.getValue(JSON_ID);
   }
 
   /**
@@ -510,7 +508,7 @@ public class EnsemblGene extends EnsemblSeqProxy
   {
     List<SequenceFeature> transcriptFeatures = new ArrayList<>();
 
-    String parentIdentifier = GENE_PREFIX + accId;
+    String parentIdentifier = accId;
 
     List<SequenceFeature> sfs = geneSequence.getFeatures()
             .getFeaturesByOntology(SequenceOntologyI.TRANSCRIPT);
@@ -561,9 +559,8 @@ public class EnsemblGene extends EnsemblSeqProxy
             .getFeaturesByOntology(SequenceOntologyI.GENE);
     for (SequenceFeature sf : sfs)
     {
-      // NB features as gff use 'ID'; rest services return as 'id'
-      String id = (String) sf.getValue("ID");
-      if ((GENE_PREFIX + accId).equalsIgnoreCase(id))
+      String id = (String) sf.getValue(JSON_ID);
+      if (accId.equalsIgnoreCase(id))
       {
         result.add(sf);
       }
@@ -590,7 +587,7 @@ public class EnsemblGene extends EnsemblSeqProxy
     if (isTranscript(type))
     {
       String parent = (String) sf.getValue(PARENT);
-      if (!(GENE_PREFIX + accessionId).equalsIgnoreCase(parent))
+      if (!accessionId.equalsIgnoreCase(parent))
       {
         return false;
       }
index 6684e20..4f59bc5 100644 (file)
@@ -117,9 +117,8 @@ public class EnsemblGenome extends EnsemblSeqProxy
             SequenceOntologyI.NMD_TRANSCRIPT_VARIANT);
     for (SequenceFeature sf : sfs)
     {
-      // NB features as gff use 'ID'; rest services return as 'id'
-      String id = (String) sf.getValue("ID");
-      if (("transcript:" + accId).equals(id))
+      String id = (String) sf.getValue(JSON_ID);
+      if (accId.equals(id))
       {
         result.add(sf);
       }
index 9e01cc4..e64c51a 100644 (file)
@@ -60,13 +60,13 @@ abstract class EnsemblRestClient extends EnsemblSequenceFetcher
 
   /*
    * update these constants when Jalview has been checked / updated for
-   * changes to Ensembl REST API (ref JAL-2105)
+   * changes to Ensembl REST API, and updated JAL-3018
    * @see https://github.com/Ensembl/ensembl-rest/wiki/Change-log
    * @see http://rest.ensembl.org/info/rest?content-type=application/json
    */
-  private static final String LATEST_ENSEMBLGENOMES_REST_VERSION = "7.0";
+  private static final String LATEST_ENSEMBLGENOMES_REST_VERSION = "9.0";
 
-  private static final String LATEST_ENSEMBL_REST_VERSION = "7.0";
+  private static final String LATEST_ENSEMBL_REST_VERSION = "9.0";
 
   private static final String REST_CHANGE_LOG = "https://github.com/Ensembl/ensembl-rest/wiki/Change-log";
 
index 7b448fd..5dc701d 100644 (file)
@@ -62,8 +62,6 @@ import org.json.simple.parser.ParseException;
  */
 public abstract class EnsemblSeqProxy extends EnsemblRestClient
 {
-  protected static final String NAME = "Name";
-
   protected static final String DESCRIPTION = "description";
 
   /*
@@ -867,9 +865,8 @@ public abstract class EnsemblSeqProxy extends EnsemblRestClient
   protected boolean featureMayBelong(SequenceFeature sf, String identifier)
   {
     String parent = (String) sf.getValue(PARENT);
-    // using contains to allow for prefix "gene:", "transcript:" etc
     if (parent != null
-            && !parent.toUpperCase().contains(identifier.toUpperCase()))
+            && !parent.equalsIgnoreCase(identifier))
     {
       // this genomic feature belongs to a different transcript
       return false;
@@ -877,6 +874,9 @@ public abstract class EnsemblSeqProxy extends EnsemblRestClient
     return true;
   }
 
+  /**
+   * Answers a short description of the sequence fetcher
+   */
   @Override
   public String getDescription()
   {
@@ -915,10 +915,14 @@ public abstract class EnsemblSeqProxy extends EnsemblRestClient
 
   /**
    * Answers true if the feature type is either 'NMD_transcript_variant' or
-   * 'transcript' or one of its sub-types in the Sequence Ontology. This is
-   * needed because NMD_transcript_variant behaves like 'transcript' in Ensembl
+   * 'transcript' (or one of its sub-types in the Sequence Ontology). This is
+   * because NMD_transcript_variant behaves like 'transcript' in Ensembl
    * although strictly speaking it is not (it is a sub-type of
    * sequence_variant).
+   * <p>
+   * (This test was needed when fetching transcript features as GFF. As we are
+   * now fetching as JSON, all features have type 'transcript' so the check for
+   * NMD_transcript_variant is redundant. Left in for any future case arising.)
    * 
    * @param featureType
    * @return
index 9e3fef4..8296985 100644 (file)
@@ -20,6 +20,7 @@
  */
 package jalview.ext.ensembl;
 
+import jalview.analysis.AlignmentUtils;
 import jalview.bin.Cache;
 import jalview.datamodel.DBRefSource;
 import jalview.ws.seqfetcher.DbSourceProxyImpl;
@@ -64,7 +65,7 @@ abstract class EnsemblSequenceFetcher extends DbSourceProxyImpl
 
   protected static final String PARENT = "Parent";
 
-  protected static final String JSON_ID = "id";
+  protected static final String JSON_ID = AlignmentUtils.VARIANT_ID; // "id";
 
   protected static final String OBJECT_TYPE = "object_type";
 
@@ -91,9 +92,9 @@ abstract class EnsemblSequenceFetcher extends DbSourceProxyImpl
      * this allows an easy change from http to https in future if needed
      */
     ensemblDomain = Cache.getDefault(ENSEMBL_BASEURL,
-            DEFAULT_ENSEMBL_BASEURL);
+            DEFAULT_ENSEMBL_BASEURL).trim();
     ensemblGenomesDomain = Cache.getDefault(ENSEMBL_GENOMES_BASEURL,
-            DEFAULT_ENSEMBL_GENOMES_BASEURL);
+            DEFAULT_ENSEMBL_GENOMES_BASEURL).trim();
     domain = ensemblDomain;
   }
 
@@ -168,6 +169,6 @@ abstract class EnsemblSequenceFetcher extends DbSourceProxyImpl
 
   protected void setDomain(String d)
   {
-    domain = d;
+    domain = d == null ? null : d.trim();
   }
 }
index 86710e1..232561c 100644 (file)
@@ -34,6 +34,7 @@ import jalview.util.MessageManager;
 import java.awt.BorderLayout;
 import java.awt.CardLayout;
 import java.awt.Dimension;
+import java.awt.Font;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.awt.event.FocusAdapter;
@@ -86,6 +87,8 @@ import javax.swing.text.JTextComponent;
 @SuppressWarnings("serial")
 public abstract class GFTSPanel extends JPanel implements GFTSPanelI
 {
+  private static final Font VERDANA_12 = new Font("Verdana", 0, 12);
+
   protected JInternalFrame mainFrame = new JInternalFrame(
           getFTSFrameTitle());
 
@@ -300,11 +303,11 @@ public abstract class GFTSPanel extends JPanel implements GFTSPanelI
     Integer height = getTempUserPrefs().get("FTSPanel.height") == null ? 400
             : getTempUserPrefs().get("FTSPanel.height");
     lbl_warning.setVisible(false);
-    lbl_warning.setFont(new java.awt.Font("Verdana", 0, 12));
+    lbl_warning.setFont(VERDANA_12);
     lbl_loading.setVisible(false);
-    lbl_loading.setFont(new java.awt.Font("Verdana", 0, 12));
+    lbl_loading.setFont(VERDANA_12);
     lbl_blank.setVisible(true);
-    lbl_blank.setFont(new java.awt.Font("Verdana", 0, 12));
+    lbl_blank.setFont(VERDANA_12);
 
     tbl_summary.setAutoCreateRowSorter(true);
     tbl_summary.getTableHeader().setReorderingAllowed(false);
@@ -357,6 +360,19 @@ public abstract class GFTSPanel extends JPanel implements GFTSPanelI
       }
     });
 
+    JButton txt_help = new JButton("?");
+    txt_help.setFont(VERDANA_12);
+    txt_help.setPreferredSize(new Dimension(15, 15));
+    txt_help.setToolTipText(MessageManager.getString("action.help"));
+    txt_help.addActionListener(new ActionListener()
+    {
+      @Override
+      public void actionPerformed(ActionEvent e)
+      {
+        showHelp();
+      }
+    });
+
     btn_autosearch.setText(MessageManager.getString("option.autosearch"));
     btn_autosearch.setToolTipText(
             MessageManager.getString("option.enable_disable_autosearch"));
@@ -371,7 +387,7 @@ public abstract class GFTSPanel extends JPanel implements GFTSPanelI
                 Boolean.toString(btn_autosearch.isSelected()));
       }
     });
-    btn_back.setFont(new java.awt.Font("Verdana", 0, 12));
+    btn_back.setFont(VERDANA_12);
     btn_back.setText(MessageManager.getString("action.back"));
     btn_back.addActionListener(new java.awt.event.ActionListener()
     {
@@ -394,7 +410,7 @@ public abstract class GFTSPanel extends JPanel implements GFTSPanelI
     });
 
     btn_ok.setEnabled(false);
-    btn_ok.setFont(new java.awt.Font("Verdana", 0, 12));
+    btn_ok.setFont(VERDANA_12);
     btn_ok.setText(MessageManager.getString("action.ok"));
     btn_ok.addActionListener(new java.awt.event.ActionListener()
     {
@@ -418,7 +434,7 @@ public abstract class GFTSPanel extends JPanel implements GFTSPanelI
     btn_next_page.setEnabled(false);
     btn_next_page.setToolTipText(
             MessageManager.getString("label.next_page_tooltip"));
-    btn_next_page.setFont(new java.awt.Font("Verdana", 0, 12));
+    btn_next_page.setFont(VERDANA_12);
     btn_next_page.setText(MessageManager.getString("action.next_page"));
     btn_next_page.addActionListener(new java.awt.event.ActionListener()
     {
@@ -443,7 +459,7 @@ public abstract class GFTSPanel extends JPanel implements GFTSPanelI
     btn_prev_page.setEnabled(false);
     btn_prev_page.setToolTipText(
             MessageManager.getString("label.prev_page_tooltip"));
-    btn_prev_page.setFont(new java.awt.Font("Verdana", 0, 12));
+    btn_prev_page.setFont(VERDANA_12);
     btn_prev_page.setText(MessageManager.getString("action.prev_page"));
     btn_prev_page.addActionListener(new java.awt.event.ActionListener()
     {
@@ -476,7 +492,7 @@ public abstract class GFTSPanel extends JPanel implements GFTSPanelI
       btn_next_page.setVisible(false);
     }
 
-    btn_cancel.setFont(new java.awt.Font("Verdana", 0, 12));
+    btn_cancel.setFont(VERDANA_12);
     btn_cancel.setText(MessageManager.getString("action.cancel"));
     btn_cancel.addActionListener(new java.awt.event.ActionListener()
     {
@@ -499,7 +515,7 @@ public abstract class GFTSPanel extends JPanel implements GFTSPanelI
     });
     scrl_searchResult.setPreferredSize(new Dimension(width, height));
 
-    cmb_searchTarget.setFont(new java.awt.Font("Verdana", 0, 12));
+    cmb_searchTarget.setFont(VERDANA_12);
     cmb_searchTarget.addItemListener(new ItemListener()
     {
       @Override
@@ -532,7 +548,7 @@ public abstract class GFTSPanel extends JPanel implements GFTSPanelI
       }
     });
 
-    txt_search.setFont(new java.awt.Font("Verdana", 0, 12));
+    txt_search.setFont(VERDANA_12);
 
     txt_search.getEditor().getEditorComponent()
             .addKeyListener(new KeyAdapter()
@@ -666,6 +682,7 @@ public abstract class GFTSPanel extends JPanel implements GFTSPanelI
     pnl_results.add(tabbedPane);
     pnl_inputs.add(cmb_searchTarget);
     pnl_inputs.add(txt_search);
+    pnl_inputs.add(txt_help);
     pnl_inputs.add(btn_autosearch);
     pnl_inputs.add(lbl_loading);
     pnl_inputs.add(lbl_warning);
@@ -710,6 +727,8 @@ public abstract class GFTSPanel extends JPanel implements GFTSPanelI
     Desktop.addInternalFrame(mainFrame, getFTSFrameTitle(), width, height);
   }
 
+  abstract protected void showHelp();
+
   protected void closeAction()
   {
     getTempUserPrefs().put("FTSPanel.width", this.getWidth());
index 053d91b..da164f0 100644 (file)
@@ -26,6 +26,8 @@ import jalview.fts.api.FTSRestClientI;
 import jalview.fts.core.FTSRestRequest;
 import jalview.fts.core.FTSRestResponse;
 import jalview.fts.core.GFTSPanel;
+import jalview.gui.Help;
+import jalview.gui.Help.HelpId;
 import jalview.gui.SequenceFetcher;
 import jalview.util.MessageManager;
 
@@ -33,13 +35,15 @@ import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
 
+import javax.help.HelpSetException;
+
 @SuppressWarnings("serial")
 public class PDBFTSPanel extends GFTSPanel
 {
   private static String defaultFTSFrameTitle = MessageManager
           .getString("label.pdb_sequence_fetcher");
 
-  private static Map<String, Integer> tempUserPrefs = new HashMap<String, Integer>();
+  private static Map<String, Integer> tempUserPrefs = new HashMap<>();
 
   private static final String PDB_FTS_CACHE_KEY = "CACHE.PDB_FTS";
 
@@ -190,7 +194,7 @@ public class PDBFTSPanel extends GFTSPanel
     // mainFrame.dispose();
     disableActionButtons();
     StringBuilder selectedIds = new StringBuilder();
-    HashSet<String> selectedIdsSet = new HashSet<String>();
+    HashSet<String> selectedIdsSet = new HashSet<>();
     int primaryKeyColIndex = 0;
     try
     {
@@ -288,4 +292,16 @@ public class PDBFTSPanel extends GFTSPanel
   {
     return PDB_AUTOSEARCH;
   }
+
+  @Override
+  protected void showHelp()
+  {
+    try
+    {
+      Help.showHelpWindow(HelpId.PdbFts);
+    } catch (HelpSetException e1)
+    {
+      e1.printStackTrace();
+    }
+ }
 }
\ No newline at end of file
index df54dea..977abfa 100644 (file)
@@ -26,6 +26,8 @@ import jalview.fts.api.FTSRestClientI;
 import jalview.fts.core.FTSRestRequest;
 import jalview.fts.core.FTSRestResponse;
 import jalview.fts.core.GFTSPanel;
+import jalview.gui.Help;
+import jalview.gui.Help.HelpId;
 import jalview.gui.SequenceFetcher;
 import jalview.util.MessageManager;
 
@@ -33,6 +35,8 @@ import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
 
+import javax.help.HelpSetException;
+
 @SuppressWarnings("serial")
 public class UniprotFTSPanel extends GFTSPanel
 {
@@ -245,4 +249,16 @@ public class UniprotFTSPanel extends GFTSPanel
   {
     return UNIPROT_AUTOSEARCH;
   }
+
+  @Override
+  protected void showHelp()
+  {
+    try
+    {
+      Help.showHelpWindow(HelpId.UniprotFts);
+    } catch (HelpSetException e1)
+    {
+      e1.printStackTrace();
+    }
+  }
 }
index 94b38ed..0239bb4 100644 (file)
@@ -24,6 +24,7 @@ import jalview.analysis.AlignmentSorter;
 import jalview.analysis.AlignmentUtils;
 import jalview.analysis.CrossRef;
 import jalview.analysis.Dna;
+import jalview.analysis.GeneticCodeI;
 import jalview.analysis.ParseProperties;
 import jalview.analysis.SequenceIdMatcher;
 import jalview.api.AlignExportSettingI;
@@ -64,6 +65,7 @@ import jalview.gui.ColourMenuHelper.ColourChangeListener;
 import jalview.gui.ViewSelectionMenu.ViewSetProvider;
 import jalview.io.AlignmentProperties;
 import jalview.io.AnnotationFile;
+import jalview.io.BackupFiles;
 import jalview.io.BioJsHTMLOutput;
 import jalview.io.DataSourceType;
 import jalview.io.FileFormat;
@@ -134,6 +136,7 @@ import java.util.Hashtable;
 import java.util.List;
 import java.util.Vector;
 
+import javax.swing.ButtonGroup;
 import javax.swing.JCheckBoxMenuItem;
 import javax.swing.JEditorPane;
 import javax.swing.JInternalFrame;
@@ -733,9 +736,9 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
 
     int aSize = alignPanels.size();
 
-    tabbedPane.setVisible(aSize > 1 || ap.av.viewName != null);
+    tabbedPane.setVisible(aSize > 1 || ap.av.getViewName() != null);
 
-    if (aSize == 1 && ap.av.viewName == null)
+    if (aSize == 1 && ap.av.getViewName() == null)
     {
       this.getContentPane().add(ap, BorderLayout.CENTER);
     }
@@ -748,7 +751,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
 
       expandViews.setEnabled(true);
       gatherViews.setEnabled(true);
-      tabbedPane.addTab(ap.av.viewName, ap);
+      tabbedPane.addTab(ap.av.getViewName(), ap);
 
       ap.setVisible(false);
     }
@@ -771,7 +774,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
     gatherViews.setEnabled(true);
     tabbedPane.setVisible(true);
     AlignmentPanel first = alignPanels.get(0);
-    tabbedPane.addTab(first.av.viewName, first);
+    tabbedPane.addTab(first.av.getViewName(), first);
     this.getContentPane().add(tabbedPane, BorderLayout.CENTER);
   }
 
@@ -872,7 +875,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
    * @param av
    *          AlignViewport
    */
-  void setMenusFromViewport(AlignViewport av)
+  public void setMenusFromViewport(AlignViewport av)
   {
     padGapsMenuitem.setSelected(av.isPadGaps());
     colourTextMenuItem.setSelected(av.isShowColourText());
@@ -963,10 +966,15 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
     return progressBar.operationInProgress();
   }
 
+  /**
+   * Sets the text of the status bar. Note that setting a null or empty value
+   * will cause the status bar to be hidden, with possibly undesirable flicker
+   * of the screen layout.
+   */
   @Override
   public void setStatus(String text)
   {
-    statusBar.setText(text);
+    statusBar.setText(text == null || text.isEmpty() ? " " : text);
   }
 
   /*
@@ -1154,7 +1162,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
                 shortName.lastIndexOf(java.io.File.separatorChar) + 1);
       }
 
-      success = new Jalview2XML().saveAlignment(this, file, shortName);
+      success = new jalview.project.Jalview2XML().saveAlignment(this, file,
+              shortName);
 
       statusBar.setText(MessageManager.formatMessage(
               "label.successfully_saved_to_file_in_format", new Object[]
@@ -1186,9 +1195,13 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
       }
       else
       {
+        // create backupfiles object and get new temp filename destination
+        BackupFiles backupfiles = new BackupFiles(file);
+
         try
         {
-          PrintWriter out = new PrintWriter(new FileWriter(file));
+          PrintWriter out = new PrintWriter(
+                  new FileWriter(backupfiles.getTempFilePath()));
 
           out.print(output);
           out.close();
@@ -1201,6 +1214,11 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
           success = false;
           ex.printStackTrace();
         }
+
+        backupfiles.setWriteSuccess(success);
+        // do the backup file roll and rename the temp file to actual file
+        success = backupfiles.rollBackupsAndRenameTempFile();
+
       }
     }
 
@@ -2397,15 +2415,12 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
   @Override
   public void selectAllSequenceMenuItem_actionPerformed(ActionEvent e)
   {
-    SequenceGroup sg = new SequenceGroup();
-
-    for (int i = 0; i < viewport.getAlignment().getSequences().size(); i++)
-    {
-      sg.addSequence(viewport.getAlignment().getSequenceAt(i), false);
-    }
+    SequenceGroup sg = new SequenceGroup(
+            viewport.getAlignment().getSequences());
 
     sg.setEndRes(viewport.getAlignment().getWidth() - 1);
     viewport.setSelectionGroup(sg);
+    viewport.isSelectionGroupChanged(true);
     viewport.sendSelection();
     // JAL-2034 - should delegate to
     // alignPanel to decide if overview needs
@@ -2701,7 +2716,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
     /*
      * Create a new AlignmentPanel (with its own, new Viewport)
      */
-    AlignmentPanel newap = new Jalview2XML().copyAlignPanel(alignPanel);
+    AlignmentPanel newap = new jalview.project.Jalview2XML()
+            .copyAlignPanel(alignPanel);
     if (!copyAnnotation)
     {
       /*
@@ -2713,10 +2729,10 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
 
     newap.av.setGatherViewsHere(false);
 
-    if (viewport.viewName == null)
+    if (viewport.getViewName() == null)
     {
-      viewport.viewName = MessageManager
-              .getString("label.view_name_original");
+      viewport.setViewName(MessageManager
+              .getString("label.view_name_original"));
     }
 
     /*
@@ -2726,6 +2742,12 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
     newap.av.setRedoList(viewport.getRedoList());
 
     /*
+     * copy any visualisation settings that are not saved in the project
+     */
+    newap.av.setColourAppliesToAllGroups(
+            viewport.getColourAppliesToAllGroups());
+
+    /*
      * Views share the same mappings; need to deregister any new mappings
      * created by copyAlignPanel, and register the new reference to the shared
      * mappings
@@ -2740,7 +2762,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
       newap.refresh(true); // adjust layout of annotations
     }
 
-    newap.av.viewName = getNewViewName(viewTitle);
+    newap.av.setViewName(getNewViewName(viewTitle));
 
     addAlignmentPanel(newap, true);
     newap.alignmentChanged();
@@ -2803,9 +2825,9 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
       if (comp instanceof AlignmentPanel)
       {
         AlignmentPanel ap = (AlignmentPanel) comp;
-        if (!existingNames.contains(ap.av.viewName))
+        if (!existingNames.contains(ap.av.getViewName()))
         {
-          existingNames.add(ap.av.viewName);
+          existingNames.add(ap.av.getViewName());
         }
       }
     }
@@ -2888,7 +2910,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
     viewport.setFollowHighlight(state);
     if (state)
     {
-      alignPanel.scrollToPosition(viewport.getSearchResults(), false);
+      alignPanel.scrollToPosition(viewport.getSearchResults());
     }
   }
 
@@ -3035,6 +3057,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
     viewport.expandColSelection(sg, false);
     viewport.hideAllSelectedSeqs();
     viewport.hideSelectedColumns();
+    alignPanel.updateLayout();
     alignPanel.paintAlignment(true, true);
     viewport.sendSelection();
   }
@@ -3059,6 +3082,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
   public void hideSelColumns_actionPerformed(ActionEvent e)
   {
     viewport.hideSelectedColumns();
+    alignPanel.updateLayout();
     alignPanel.paintAlignment(true, true);
     viewport.sendSelection();
   }
@@ -3080,7 +3104,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
   protected void scaleAbove_actionPerformed(ActionEvent e)
   {
     viewport.setScaleAboveWrapped(scaleAbove.isSelected());
-    // TODO: do we actually need to update overview for scale above change ?
+    alignPanel.updateLayout();
     alignPanel.paintAlignment(true, false);
   }
 
@@ -3094,6 +3118,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
   protected void scaleLeft_actionPerformed(ActionEvent e)
   {
     viewport.setScaleLeftWrapped(scaleLeft.isSelected());
+    alignPanel.updateLayout();
     alignPanel.paintAlignment(true, false);
   }
 
@@ -3107,6 +3132,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
   protected void scaleRight_actionPerformed(ActionEvent e)
   {
     viewport.setScaleRightWrapped(scaleRight.isSelected());
+    alignPanel.updateLayout();
     alignPanel.paintAlignment(true, false);
   }
 
@@ -3328,6 +3354,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
      * otherwise set the chosen colour scheme (or null for 'None')
      */
     ColourSchemeI cs = ColourSchemes.getInstance().getColourScheme(name,
+            viewport,
             viewport.getAlignment(), viewport.getHiddenRepSequences());
     changeColour(cs);
   }
@@ -3597,9 +3624,9 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
 
     frameTitle += " from ";
 
-    if (viewport.viewName != null)
+    if (viewport.getViewName() != null)
     {
-      frameTitle += viewport.viewName + " of ";
+      frameTitle += viewport.getViewName() + " of ";
     }
 
     frameTitle += this.title;
@@ -4260,14 +4287,14 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
    * frame's DNA sequences to their aligned protein (amino acid) equivalents.
    */
   @Override
-  public void showTranslation_actionPerformed(ActionEvent e)
+  public void showTranslation_actionPerformed(GeneticCodeI codeTable)
   {
     AlignmentI al = null;
     try
     {
       Dna dna = new Dna(viewport, viewport.getViewAsVisibleContigs(true));
 
-      al = dna.translateCdna();
+      al = dna.translateCdna(codeTable);
     } catch (Exception ex)
     {
       jalview.bin.Cache.log.error(
@@ -4296,7 +4323,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
       af.setFileFormat(this.currentFileFormat);
       final String newTitle = MessageManager
               .formatMessage("label.translation_of_params", new Object[]
-              { this.getTitle() });
+              { this.getTitle(), codeTable.getId() });
       af.setTitle(newTitle);
       if (Cache.getDefault(Preferences.ENABLE_SPLIT_FRAME, true))
       {
@@ -4767,7 +4794,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
 
       if (reply != null)
       {
-        viewport.viewName = reply;
+        viewport.setViewName(reply);
         // TODO warn if reply is in getExistingViewNames()?
         tabbedPane.setTitleAt(tabbedPane.getSelectedIndex(), reply);
       }
@@ -5284,7 +5311,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
     {
       PaintRefresher.Refresh(this, viewport.getSequenceSetId());
       alignPanel.updateAnnotation();
-      alignPanel.paintAlignment(true, true);
+      alignPanel.paintAlignment(true,
+              viewport.needToUpdateStructureViews());
     }
   }
 
@@ -5399,7 +5427,9 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
    */
   public List<? extends AlignmentViewPanel> getAlignPanels()
   {
-    return alignPanels == null ? Arrays.asList(alignPanel) : alignPanels;
+    // alignPanels is never null
+    // return alignPanels == null ? Arrays.asList(alignPanel) : alignPanels;
+    return alignPanels;
   }
 
   /**
@@ -5568,15 +5598,16 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
     colourMenu.add(textColour);
     colourMenu.addSeparator();
 
-    ColourMenuHelper.addMenuItems(colourMenu, this, viewport.getAlignment(),
-            false);
+    ButtonGroup bg = ColourMenuHelper.addMenuItems(colourMenu, this,
+            viewport.getAlignment(), false);
 
+    colourMenu.add(annotationColour);
+    bg.add(annotationColour);
     colourMenu.addSeparator();
     colourMenu.add(conservationMenuItem);
     colourMenu.add(modifyConservation);
     colourMenu.add(abovePIDThreshold);
     colourMenu.add(modifyPID);
-    colourMenu.add(annotationColour);
 
     ColourSchemeI colourScheme = viewport.getGlobalColourScheme();
     ColourMenuHelper.setColourSelected(colourMenu, colourScheme);
index 7e77bec..bc668fd 100644 (file)
@@ -79,7 +79,7 @@ public class AlignViewport extends AlignmentViewport
 
   private Rectangle explodedGeometry;
 
-  String viewName;
+  private String viewName;
 
   /*
    * Flag set true on the view that should 'gather' multiple views of the same
@@ -290,7 +290,7 @@ public class AlignViewport extends AlignmentViewport
               ResidueColourScheme.NONE);
     }
     ColourSchemeI colourScheme = ColourSchemeProperty
-            .getColourScheme(alignment, schemeName);
+            .getColourScheme(this, alignment, schemeName);
     residueShading = new ResidueShader(colourScheme);
 
     if (colourScheme instanceof UserColourScheme)
@@ -304,6 +304,7 @@ public class AlignViewport extends AlignmentViewport
     {
       residueShading.setConsensus(hconsensus);
     }
+    setColourAppliesToAllGroups(true);
   }
 
   boolean validCharWidth;
@@ -795,7 +796,7 @@ public class AlignViewport extends AlignmentViewport
     AlignFrame newAlignFrame = new AlignFrame(al, AlignFrame.DEFAULT_WIDTH,
             AlignFrame.DEFAULT_HEIGHT);
     newAlignFrame.setTitle(title);
-    newAlignFrame.statusBar.setText(MessageManager
+    newAlignFrame.setStatus(MessageManager
             .formatMessage("label.successfully_loaded_file", new Object[]
             { title }));
 
@@ -1032,4 +1033,14 @@ public class AlignViewport extends AlignmentViewport
     }
     fr.setTransparency(featureSettings.getTransparency());
   }
+
+  public String getViewName()
+  {
+    return viewName;
+  }
+
+  public void setViewName(String viewName)
+  {
+    this.viewName = viewName;
+  }
 }
index 60ef480..92b9a50 100644 (file)
@@ -328,12 +328,12 @@ public class AlignmentPanel extends GAlignmentPanel implements
   }
 
   /**
-   * Highlight the given results on the alignment.
+   * Highlight the given results on the alignment
    * 
    */
   public void highlightSearchResults(SearchResultsI results)
   {
-    boolean scrolled = scrollToPosition(results, 0, true, false);
+    boolean scrolled = scrollToPosition(results, 0, false);
 
     boolean noFastPaint = scrolled && av.getWrapAlignment();
 
@@ -345,13 +345,11 @@ public class AlignmentPanel extends GAlignmentPanel implements
    * (if any)
    * 
    * @param searchResults
-   * @param redrawOverview
    * @return
    */
-  public boolean scrollToPosition(SearchResultsI searchResults,
-          boolean redrawOverview)
+  public boolean scrollToPosition(SearchResultsI searchResults)
   {
-    return scrollToPosition(searchResults, 0, redrawOverview, false);
+    return scrollToPosition(searchResults, 0, false);
   }
 
   /**
@@ -364,14 +362,12 @@ public class AlignmentPanel extends GAlignmentPanel implements
    * @param verticalOffset
    *          if greater than zero, allows scrolling to a position below the
    *          first displayed sequence
-   * @param redrawOverview
-   *          - when set, the overview will be recalculated (takes longer)
    * @param centre
    *          if true, try to centre the search results horizontally in the view
    * @return
    */
   protected boolean scrollToPosition(SearchResultsI results,
-          int verticalOffset, boolean redrawOverview, boolean centre)
+          int verticalOffset, boolean centre)
   {
     int startv, endv, starts, ends;
     ViewportRanges ranges = av.getRanges();
@@ -477,7 +473,7 @@ public class AlignmentPanel extends GAlignmentPanel implements
       scrollNeeded = ranges.scrollToWrappedVisible(start);
     }
 
-    paintAlignment(redrawOverview, false);
+    paintAlignment(false, false);
 
     return scrollNeeded;
   }
@@ -536,7 +532,7 @@ public class AlignmentPanel extends GAlignmentPanel implements
     addNotify();
     // TODO: many places call this method and also paintAlignment with various
     // different settings. this means multiple redraws are triggered...
-    paintAlignment(true, false);
+    paintAlignment(true, av.needToUpdateStructureViews());
   }
 
   /**
@@ -641,16 +637,9 @@ public class AlignmentPanel extends GAlignmentPanel implements
     }
     else
     {
-      int width = av.getAlignment().getWidth();
+      int width = av.getAlignment().getVisibleWidth();
       int height = av.getAlignment().getHeight();
 
-      if (av.hasHiddenColumns())
-      {
-        // reset the width to exclude hidden columns
-        width = av.getAlignment().getHiddenColumns()
-                .absoluteToVisibleColumn(width);
-      }
-
       hextent = getSeqPanel().seqCanvas.getWidth() / av.getCharWidth();
       vextent = getSeqPanel().seqCanvas.getHeight() / av.getCharHeight();
 
@@ -962,8 +951,8 @@ public class AlignmentPanel extends GAlignmentPanel implements
 
     final int totalSeq = (pageHeight - scaleHeight) / charHeight - 1;
 
-    final int alignmentWidth = av.getAlignment().getWidth();
-    final int pagesWide = (alignmentWidth / totalRes) + 1;
+    final int alignmentWidth = av.getAlignment().getVisibleWidth();
+    int pagesWide = (alignmentWidth / totalRes) + 1;
 
     final int startRes = (pageIndex % pagesWide) * totalRes;
     final int endRes = Math.min(startRes + totalRes - 1,
@@ -1080,12 +1069,7 @@ public class AlignmentPanel extends GAlignmentPanel implements
 
     int idWidth = getVisibleIdWidth(false);
 
-    int maxwidth = av.getAlignment().getWidth();
-    if (av.hasHiddenColumns())
-    {
-      maxwidth = av.getAlignment().getHiddenColumns()
-              .absoluteToVisibleColumn(maxwidth) - 1;
-    }
+    int maxwidth = av.getAlignment().getVisibleWidth();
 
     int resWidth = getSeqPanel().seqCanvas
             .getWrappedCanvasWidth(pageWidth - idWidth);
@@ -1247,12 +1231,7 @@ public class AlignmentPanel extends GAlignmentPanel implements
 
   public AlignmentDimension getAlignmentDimension()
   {
-    int maxwidth = av.getAlignment().getWidth();
-    if (av.hasHiddenColumns())
-    {
-      maxwidth = av.getAlignment().getHiddenColumns()
-              .absoluteToVisibleColumn(maxwidth);
-    }
+    int maxwidth = av.getAlignment().getVisibleWidth();
 
     int height = ((av.getAlignment().getHeight() + 1) * av.getCharHeight())
             + getScalePanel().getHeight();
@@ -1567,7 +1546,7 @@ public class AlignmentPanel extends GAlignmentPanel implements
   @Override
   public String getViewName()
   {
-    return av.viewName;
+    return av.getViewName();
   }
 
   /**
@@ -1698,7 +1677,7 @@ public class AlignmentPanel extends GAlignmentPanel implements
    */
   protected void scrollToCentre(SearchResultsI sr, int verticalOffset)
   {
-    scrollToPosition(sr, verticalOffset, true, true);
+    scrollToPosition(sr, verticalOffset, true);
   }
 
   /**
index 84883d7..791421d 100644 (file)
@@ -195,14 +195,7 @@ public class AnnotationChooser extends JPanel
   {
     setAnnotationVisibility(true);
 
-    // copied from AnnotationLabel.actionPerformed (after show/hide row)...
-    // TODO should drive this functionality into AlignmentPanel
     ap.updateAnnotation();
-    // this.ap.annotationPanel.adjustPanelHeight();
-    // this.ap.alabels.setSize(this.ap.alabels.getSize().width,
-    // this.ap.annotationPanel.getSize().height);
-    // this.ap.validate();
-    this.ap.paintAlignment(true, false);
   }
 
   /**
@@ -229,11 +222,6 @@ public class AnnotationChooser extends JPanel
       }
     }
     ap.updateAnnotation();
-    // // this.ap.annotationPanel.adjustPanelHeight();
-    // this.ap.alabels.setSize(this.ap.alabels.getSize().width,
-    // this.ap.annotationPanel.getSize().height);
-    // this.ap.validate();
-    this.ap.paintAlignment(true, false);
   }
 
   /**
@@ -249,9 +237,7 @@ public class AnnotationChooser extends JPanel
   {
     setAnnotationVisibility(false);
 
-    this.ap.updateAnnotation();
-    // this.ap.annotationPanel.adjustPanelHeight();
-    this.ap.paintAlignment(true, false);
+    ap.updateAnnotation();
   }
 
   /**
index 384635b..60ad75d 100644 (file)
@@ -317,7 +317,7 @@ public class AnnotationColourChooser extends AnnotationRowFilter
   @Override
   public void reset()
   {
-    av.setGlobalColourScheme(oldcs);
+    this.ap.alignFrame.changeColour(oldcs);
     if (av.getAlignment().getGroups() != null)
     {
 
@@ -442,7 +442,7 @@ public class AnnotationColourChooser extends AnnotationRowFilter
 
     acg.setThresholdIsMinMax(thresholdIsMin.isSelected());
 
-    av.setGlobalColourScheme(acg);
+    this.ap.alignFrame.changeColour(acg);
 
     if (av.getAlignment().getGroups() != null)
     {
@@ -454,7 +454,7 @@ public class AnnotationColourChooser extends AnnotationRowFilter
           continue;
         }
         sg.setColourScheme(
-                acg.getInstance(sg, ap.av.getHiddenRepSequences()));
+                acg.getInstance(av, sg));
       }
     }
   }
@@ -465,5 +465,4 @@ public class AnnotationColourChooser extends AnnotationRowFilter
     super.sliderDragReleased();
     ap.paintAlignment(true, true);
   }
-
 }
index 6924b63..5adecad 100644 (file)
@@ -33,6 +33,8 @@ import java.awt.Color;
 import java.awt.Dimension;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
+import java.awt.event.FocusAdapter;
+import java.awt.event.FocusEvent;
 import java.awt.event.ItemEvent;
 import java.awt.event.ItemListener;
 import java.awt.event.KeyEvent;
@@ -744,6 +746,15 @@ public class AnnotationColumnChooser extends AnnotationRowFilter
                   }
                 }
               });
+      searchBox.getEditor().getEditorComponent()
+              .addFocusListener(new FocusAdapter()
+      {
+        @Override
+        public void focusLost(FocusEvent e)
+        {
+          searchStringAction();
+        }
+      });
 
       JvSwingUtils.jvInitComponent(displayName, "label.label");
       displayName.addActionListener(new ActionListener()
@@ -761,7 +772,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter
         @Override
         public void actionPerformed(ActionEvent actionEvent)
         {
-          discriptionCheckboxAction();
+          descriptionCheckboxAction();
         }
       });
 
@@ -777,7 +788,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter
       aColChooser.updateView();
     }
 
-    public void discriptionCheckboxAction()
+    public void descriptionCheckboxAction()
     {
       aColChooser.setCurrentSearchPanel(this);
       aColChooser.updateView();
index 6fefbd0..fac531e 100644 (file)
  */
 package jalview.gui;
 
-import jalview.api.FeatureColourI;
+import jalview.api.FeatureRenderer;
 import jalview.bin.Cache;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.SequenceI;
-import jalview.datamodel.features.FeatureMatcherSetI;
 import jalview.io.AnnotationFile;
 import jalview.io.FeaturesFile;
 import jalview.io.JalviewFileChooser;
@@ -38,8 +37,6 @@ import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.io.FileWriter;
 import java.io.PrintWriter;
-import java.util.List;
-import java.util.Map;
 
 import javax.swing.BorderFactory;
 import javax.swing.ButtonGroup;
@@ -214,24 +211,18 @@ public class AnnotationExporter extends JPanel
   {
     String text;
     SequenceI[] sequences = ap.av.getAlignment().getSequencesArray();
-    Map<String, FeatureColourI> featureColours = ap.getFeatureRenderer()
-            .getDisplayedFeatureCols();
-    Map<String, FeatureMatcherSetI> featureFilters = ap.getFeatureRenderer()
-            .getFeatureFilters();
-    List<String> featureGroups = ap.getFeatureRenderer()
-            .getDisplayedFeatureGroups();
     boolean includeNonPositional = ap.av.isShowNPFeats();
 
     FeaturesFile formatter = new FeaturesFile();
+    final FeatureRenderer fr = ap.getFeatureRenderer();
     if (GFFFormat.isSelected())
     {
-      text = formatter.printGffFormat(sequences, featureColours,
-              featureGroups, includeNonPositional);
+      text = formatter.printGffFormat(sequences, fr, includeNonPositional);
     }
     else
     {
-      text = formatter.printJalviewFormat(sequences, featureColours,
-              featureFilters, featureGroups, includeNonPositional);
+      text = formatter.printJalviewFormat(sequences, fr,
+              includeNonPositional);
     }
     return text;
   }
index 6f8b225..6da6cc3 100755 (executable)
@@ -51,12 +51,9 @@ import java.awt.event.MouseEvent;
 import java.awt.event.MouseListener;
 import java.awt.event.MouseMotionListener;
 import java.awt.geom.AffineTransform;
-import java.awt.image.BufferedImage;
-import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.Iterator;
-import java.util.regex.Pattern;
 
 import javax.swing.JCheckBoxMenuItem;
 import javax.swing.JMenuItem;
@@ -73,6 +70,10 @@ import javax.swing.ToolTipManager;
 public class AnnotationLabels extends JPanel
         implements MouseListener, MouseMotionListener, ActionListener
 {
+  private static final String HTML_END_TAG = "</html>";
+
+  private static final String HTML_START_TAG = "<html>";
+
   /**
    * width in pixels within which height adjuster arrows are shown and active
    */
@@ -83,9 +84,6 @@ public class AnnotationLabels extends JPanel
    */
   private static int HEIGHT_ADJUSTER_HEIGHT = 10;
 
-  private static final Pattern LEFT_ANGLE_BRACKET_PATTERN = Pattern
-          .compile("<");
-
   private static final Font font = new Font("Arial", Font.PLAIN, 11);
 
   private static final String TOGGLE_LABELSCALE = MessageManager
@@ -378,15 +376,6 @@ public class AnnotationLabels extends JPanel
             AlignmentUtils.showOrHideSequenceAnnotations(
                     ap.av.getAlignment(), Collections.singleton(label),
                     null, false, false);
-            // for (AlignmentAnnotation ann : ap.av.getAlignment()
-            // .getAlignmentAnnotation())
-            // {
-            // if (ann.sequenceRef != null && ann.label != null
-            // && ann.label.equals(label))
-            // {
-            // ann.visible = false;
-            // }
-            // }
             ap.refresh(true);
           }
         });
@@ -425,174 +414,154 @@ public class AnnotationLabels extends JPanel
       }
       else if (label.indexOf("Consensus") > -1)
       {
-        pop.addSeparator();
-        // av and sequencegroup need to implement same interface for
-        final JCheckBoxMenuItem cbmi = new JCheckBoxMenuItem(
-                MessageManager.getString("label.ignore_gaps_consensus"),
-                (aa[selectedRow].groupRef != null)
-                        ? aa[selectedRow].groupRef.getIgnoreGapsConsensus()
-                        : ap.av.isIgnoreGapsConsensus());
-        final AlignmentAnnotation aaa = aa[selectedRow];
-        cbmi.addActionListener(new ActionListener()
-        {
-          @Override
-          public void actionPerformed(ActionEvent e)
-          {
-            if (aaa.groupRef != null)
-            {
-              // TODO: pass on reference to ap so the view can be updated.
-              aaa.groupRef.setIgnoreGapsConsensus(cbmi.getState());
-              ap.getAnnotationPanel()
-                      .paint(ap.getAnnotationPanel().getGraphics());
-            }
-            else
-            {
-              ap.av.setIgnoreGapsConsensus(cbmi.getState(), ap);
-            }
-            ap.alignmentChanged();
-          }
-        });
-        pop.add(cbmi);
-        // av and sequencegroup need to implement same interface for
+        addConsensusMenuOptions(ap, aa[selectedRow], pop);
+
+        final JMenuItem consclipbrd = new JMenuItem(COPYCONS_SEQ);
+        consclipbrd.addActionListener(this);
+        pop.add(consclipbrd);
+      }
+    }
+    pop.show(this, evt.getX(), evt.getY());
+  }
+
+  /**
+   * A helper method that adds menu options for calculation and visualisation of
+   * group and/or alignment consensus annotation to a popup menu. This is
+   * designed to be reusable for either unwrapped mode (popup menu is shown on
+   * component AnnotationLabels), or wrapped mode (popup menu is shown on
+   * IdPanel when the mouse is over an annotation label).
+   * 
+   * @param ap
+   * @param ann
+   * @param pop
+   */
+  static void addConsensusMenuOptions(AlignmentPanel ap,
+          AlignmentAnnotation ann,
+          JPopupMenu pop)
+  {
+    pop.addSeparator();
+
+    final JCheckBoxMenuItem cbmi = new JCheckBoxMenuItem(
+            MessageManager.getString("label.ignore_gaps_consensus"),
+            (ann.groupRef != null) ? ann.groupRef.getIgnoreGapsConsensus()
+                    : ap.av.isIgnoreGapsConsensus());
+    final AlignmentAnnotation aaa = ann;
+    cbmi.addActionListener(new ActionListener()
+    {
+      @Override
+      public void actionPerformed(ActionEvent e)
+      {
         if (aaa.groupRef != null)
         {
-          final JCheckBoxMenuItem chist = new JCheckBoxMenuItem(
-                  MessageManager.getString("label.show_group_histogram"),
-                  aa[selectedRow].groupRef.isShowConsensusHistogram());
-          chist.addActionListener(new ActionListener()
-          {
-            @Override
-            public void actionPerformed(ActionEvent e)
-            {
-              // TODO: pass on reference
-              // to ap
-              // so the
-              // view
-              // can be
-              // updated.
-              aaa.groupRef.setShowConsensusHistogram(chist.getState());
-              ap.repaint();
-              // ap.annotationPanel.paint(ap.annotationPanel.getGraphics());
-            }
-          });
-          pop.add(chist);
-          final JCheckBoxMenuItem cprofl = new JCheckBoxMenuItem(
-                  MessageManager.getString("label.show_group_logo"),
-                  aa[selectedRow].groupRef.isShowSequenceLogo());
-          cprofl.addActionListener(new ActionListener()
-          {
-            @Override
-            public void actionPerformed(ActionEvent e)
-            {
-              // TODO: pass on reference
-              // to ap
-              // so the
-              // view
-              // can be
-              // updated.
-              aaa.groupRef.setshowSequenceLogo(cprofl.getState());
-              ap.repaint();
-              // ap.annotationPanel.paint(ap.annotationPanel.getGraphics());
-            }
-          });
-          pop.add(cprofl);
-          final JCheckBoxMenuItem cproflnorm = new JCheckBoxMenuItem(
-                  MessageManager.getString("label.normalise_group_logo"),
-                  aa[selectedRow].groupRef.isNormaliseSequenceLogo());
-          cproflnorm.addActionListener(new ActionListener()
-          {
-            @Override
-            public void actionPerformed(ActionEvent e)
-            {
-
-              // TODO: pass on reference
-              // to ap
-              // so the
-              // view
-              // can be
-              // updated.
-              aaa.groupRef.setNormaliseSequenceLogo(cproflnorm.getState());
-              // automatically enable logo display if we're clicked
-              aaa.groupRef.setshowSequenceLogo(true);
-              ap.repaint();
-              // ap.annotationPanel.paint(ap.annotationPanel.getGraphics());
-            }
-          });
-          pop.add(cproflnorm);
+          aaa.groupRef.setIgnoreGapsConsensus(cbmi.getState());
+          ap.getAnnotationPanel()
+                  .paint(ap.getAnnotationPanel().getGraphics());
         }
         else
         {
-          final JCheckBoxMenuItem chist = new JCheckBoxMenuItem(
-                  MessageManager.getString("label.show_histogram"),
-                  av.isShowConsensusHistogram());
-          chist.addActionListener(new ActionListener()
-          {
-            @Override
-            public void actionPerformed(ActionEvent e)
-            {
-              // TODO: pass on reference
-              // to ap
-              // so the
-              // view
-              // can be
-              // updated.
-              av.setShowConsensusHistogram(chist.getState());
-              ap.alignFrame.setMenusForViewport();
-              ap.repaint();
-              // ap.annotationPanel.paint(ap.annotationPanel.getGraphics());
-            }
-          });
-          pop.add(chist);
-          final JCheckBoxMenuItem cprof = new JCheckBoxMenuItem(
-                  MessageManager.getString("label.show_logo"),
-                  av.isShowSequenceLogo());
-          cprof.addActionListener(new ActionListener()
-          {
-            @Override
-            public void actionPerformed(ActionEvent e)
-            {
-              // TODO: pass on reference
-              // to ap
-              // so the
-              // view
-              // can be
-              // updated.
-              av.setShowSequenceLogo(cprof.getState());
-              ap.alignFrame.setMenusForViewport();
-              ap.repaint();
-              // ap.annotationPanel.paint(ap.annotationPanel.getGraphics());
-            }
-          });
-          pop.add(cprof);
-          final JCheckBoxMenuItem cprofnorm = new JCheckBoxMenuItem(
-                  MessageManager.getString("label.normalise_logo"),
-                  av.isNormaliseSequenceLogo());
-          cprofnorm.addActionListener(new ActionListener()
-          {
-            @Override
-            public void actionPerformed(ActionEvent e)
-            {
-              // TODO: pass on reference
-              // to ap
-              // so the
-              // view
-              // can be
-              // updated.
-              av.setShowSequenceLogo(true);
-              av.setNormaliseSequenceLogo(cprofnorm.getState());
-              ap.alignFrame.setMenusForViewport();
-              ap.repaint();
-              // ap.annotationPanel.paint(ap.annotationPanel.getGraphics());
-            }
-          });
-          pop.add(cprofnorm);
+          ap.av.setIgnoreGapsConsensus(cbmi.getState(), ap);
         }
-        final JMenuItem consclipbrd = new JMenuItem(COPYCONS_SEQ);
-        consclipbrd.addActionListener(this);
-        pop.add(consclipbrd);
+        ap.alignmentChanged();
       }
+    });
+    pop.add(cbmi);
+
+    if (aaa.groupRef != null)
+    {
+      /*
+       * group consensus options
+       */
+      final JCheckBoxMenuItem chist = new JCheckBoxMenuItem(
+              MessageManager.getString("label.show_group_histogram"),
+              ann.groupRef.isShowConsensusHistogram());
+      chist.addActionListener(new ActionListener()
+      {
+        @Override
+        public void actionPerformed(ActionEvent e)
+        {
+          aaa.groupRef.setShowConsensusHistogram(chist.getState());
+          ap.repaint();
+        }
+      });
+      pop.add(chist);
+      final JCheckBoxMenuItem cprofl = new JCheckBoxMenuItem(
+              MessageManager.getString("label.show_group_logo"),
+              ann.groupRef.isShowSequenceLogo());
+      cprofl.addActionListener(new ActionListener()
+      {
+        @Override
+        public void actionPerformed(ActionEvent e)
+        {
+          aaa.groupRef.setshowSequenceLogo(cprofl.getState());
+          ap.repaint();
+        }
+      });
+      pop.add(cprofl);
+      final JCheckBoxMenuItem cproflnorm = new JCheckBoxMenuItem(
+              MessageManager.getString("label.normalise_group_logo"),
+              ann.groupRef.isNormaliseSequenceLogo());
+      cproflnorm.addActionListener(new ActionListener()
+      {
+        @Override
+        public void actionPerformed(ActionEvent e)
+        {
+          aaa.groupRef.setNormaliseSequenceLogo(cproflnorm.getState());
+          // automatically enable logo display if we're clicked
+          aaa.groupRef.setshowSequenceLogo(true);
+          ap.repaint();
+        }
+      });
+      pop.add(cproflnorm);
+    }
+    else
+    {
+      /*
+       * alignment consensus options
+       */
+      final JCheckBoxMenuItem chist = new JCheckBoxMenuItem(
+              MessageManager.getString("label.show_histogram"),
+              ap.av.isShowConsensusHistogram());
+      chist.addActionListener(new ActionListener()
+      {
+        @Override
+        public void actionPerformed(ActionEvent e)
+        {
+          ap.av.setShowConsensusHistogram(chist.getState());
+          ap.alignFrame.setMenusForViewport();
+          ap.repaint();
+        }
+      });
+      pop.add(chist);
+      final JCheckBoxMenuItem cprof = new JCheckBoxMenuItem(
+              MessageManager.getString("label.show_logo"),
+              ap.av.isShowSequenceLogo());
+      cprof.addActionListener(new ActionListener()
+      {
+        @Override
+        public void actionPerformed(ActionEvent e)
+        {
+          ap.av.setShowSequenceLogo(cprof.getState());
+          ap.alignFrame.setMenusForViewport();
+          ap.repaint();
+        }
+      });
+      pop.add(cprof);
+      final JCheckBoxMenuItem cprofnorm = new JCheckBoxMenuItem(
+              MessageManager.getString("label.normalise_logo"),
+              ap.av.isNormaliseSequenceLogo());
+      cprofnorm.addActionListener(new ActionListener()
+      {
+        @Override
+        public void actionPerformed(ActionEvent e)
+        {
+          ap.av.setShowSequenceLogo(true);
+          ap.av.setNormaliseSequenceLogo(cprofnorm.getState());
+          ap.alignFrame.setMenusForViewport();
+          ap.repaint();
+        }
+      });
+      pop.add(cprofnorm);
     }
-    pop.show(this, evt.getX(), evt.getY());
   }
 
   /**
@@ -705,73 +674,123 @@ public class AnnotationLabels extends JPanel
     if (selectedRow > -1 && ap.av.getAlignment()
             .getAlignmentAnnotation().length > selectedRow)
     {
-      AlignmentAnnotation aa = ap.av.getAlignment()
-              .getAlignmentAnnotation()[selectedRow];
+      AlignmentAnnotation[] anns = ap.av.getAlignment()
+              .getAlignmentAnnotation();
+      AlignmentAnnotation aa = anns[selectedRow];
+
+      String desc = getTooltip(aa);
+      this.setToolTipText(desc);
+      String msg = getStatusMessage(aa, anns);
+      ap.alignFrame.setStatus(msg);
+    }
+  }
+
+  /**
+   * Constructs suitable text to show in the status bar when over an annotation
+   * label, containing the associated sequence name (if any), and the annotation
+   * labels (or all labels for a graph group annotation)
+   * 
+   * @param aa
+   * @param anns
+   * @return
+   */
+  static String getStatusMessage(AlignmentAnnotation aa,
+          AlignmentAnnotation[] anns)
+  {
+    if (aa == null)
+    {
+      return null;
+    }
 
-      StringBuffer desc = new StringBuffer();
-      if (aa.description != null
-              && !aa.description.equals("New description"))
+    StringBuilder msg = new StringBuilder(32);
+    if (aa.sequenceRef != null)
+    {
+      msg.append(aa.sequenceRef.getName()).append(" : ");
+    }
+
+    if (aa.graphGroup == -1)
+    {
+      msg.append(aa.label);
+    }
+    else if (anns != null)
+    {
+      boolean first = true;
+      for (int i = anns.length - 1; i >= 0; i--)
       {
-        // TODO: we could refactor and merge this code with the code in
-        // jalview.gui.SeqPanel.mouseMoved(..) that formats sequence feature
-        // tooltips
-        desc.append(aa.getDescription(true).trim());
-        // check to see if the description is an html fragment.
-        if (desc.length() < 6 || (desc.substring(0, 6).toLowerCase()
-                .indexOf("<html>") < 0))
+        if (anns[i].graphGroup == aa.graphGroup)
         {
-          // clean the description ready for embedding in html
-          desc = new StringBuffer(LEFT_ANGLE_BRACKET_PATTERN.matcher(desc)
-                  .replaceAll("&lt;"));
-          desc.insert(0, "<html>");
-        }
-        else
-        {
-          // remove terminating html if any
-          int i = desc.substring(desc.length() - 7).toLowerCase()
-                  .lastIndexOf("</html>");
-          if (i > -1)
+          if (!first)
           {
-            desc.setLength(desc.length() - 7 + i);
+            msg.append(", ");
           }
+          msg.append(anns[i].label);
+          first = false;
         }
-        if (aa.hasScore())
-        {
-          desc.append("<br/>");
-        }
-        // if (aa.hasProperties())
-        // {
-        // desc.append("<table>");
-        // for (String prop : aa.getProperties())
-        // {
-        // desc.append("<tr><td>" + prop + "</td><td>"
-        // + aa.getProperty(prop) + "</td><tr>");
-        // }
-        // desc.append("</table>");
-        // }
       }
-      else
+    }
+
+    return msg.toString();
+  }
+
+  /**
+   * Answers a tooltip, formatted as html, containing the annotation description
+   * (prefixed by associated sequence id if applicable), and the annotation
+   * (non-positional) score if it has one. Answers null if neither description
+   * nor score is found.
+   * 
+   * @param aa
+   * @return
+   */
+  static String getTooltip(AlignmentAnnotation aa)
+  {
+    if (aa == null)
+    {
+      return null;
+    }
+    StringBuilder tooltip = new StringBuilder();
+    if (aa.description != null && !aa.description.equals("New description"))
+    {
+      // TODO: we could refactor and merge this code with the code in
+      // jalview.gui.SeqPanel.mouseMoved(..) that formats sequence feature
+      // tooltips
+      String desc = aa.getDescription(true).trim();
+      if (!desc.toLowerCase().startsWith(HTML_START_TAG))
       {
-        // begin the tooltip's html fragment
-        desc.append("<html>");
-        if (aa.hasScore())
-        {
-          // TODO: limit precision of score to avoid noise from imprecise
-          // doubles
-          // (64.7 becomes 64.7+/some tiny value).
-          desc.append(" Score: " + aa.score);
-        }
+        tooltip.append(HTML_START_TAG);
+        desc = desc.replace("<", "&lt;");
       }
-      if (desc.length() > 6)
+      else if (desc.toLowerCase().endsWith(HTML_END_TAG))
       {
-        desc.append("</html>");
-        this.setToolTipText(desc.toString());
+        desc = desc.substring(0, desc.length() - HTML_END_TAG.length());
       }
-      else
+      tooltip.append(desc);
+    }
+    else
+    {
+      // begin the tooltip's html fragment
+      tooltip.append(HTML_START_TAG);
+    }
+    if (aa.hasScore())
+    {
+      if (tooltip.length() > HTML_START_TAG.length())
       {
-        this.setToolTipText(null);
+        tooltip.append("<br/>");
       }
+      // TODO: limit precision of score to avoid noise from imprecise
+      // doubles
+      // (64.7 becomes 64.7+/some tiny value).
+      tooltip.append(" Score: ").append(String.valueOf(aa.score));
+    }
+
+    if (tooltip.length() > HTML_START_TAG.length())
+    {
+      return tooltip.append(HTML_END_TAG).toString();
     }
+
+    /*
+     * nothing in the tooltip (except "<html>")
+     */
+    return null;
   }
 
   /**
index 50971c7..16db94c 100755 (executable)
@@ -21,6 +21,7 @@
 package jalview.gui;
 
 import jalview.datamodel.AlignmentAnnotation;
+import jalview.datamodel.AlignmentI;
 import jalview.datamodel.Annotation;
 import jalview.datamodel.ColumnSelection;
 import jalview.datamodel.HiddenColumns;
@@ -76,6 +77,11 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
         MouseListener, MouseWheelListener, MouseMotionListener,
         ActionListener, AdjustmentListener, Scrollable, ViewportListenerI
 {
+  enum DragMode
+  {
+    Select, Resize, Undefined
+  };
+
   String HELIX = MessageManager.getString("label.helix");
 
   String SHEET = MessageManager.getString("label.sheet");
@@ -119,11 +125,11 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
   // Used For mouse Dragging and resizing graphs
   int graphStretch = -1;
 
-  int graphStretchY = -1;
+  int mouseDragLastX = -1;
 
-  int min; // used by mouseDragged to see if user
+  int mouseDragLastY = -1;
 
-  int max; // used by mouseDragged to see if user
+  DragMode dragMode = DragMode.Undefined;
 
   boolean mouseDragging = false;
 
@@ -499,10 +505,11 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
   }
 
   /**
-   * DOCUMENT ME!
+   * Action on right mouse pressed on Mac is to show a pop-up menu for the
+   * annotation. Action on left mouse pressed is to find which annotation is
+   * pressed and mark the start of a column selection or graph resize operation.
    * 
    * @param evt
-   *          DOCUMENT ME!
    */
   @Override
   public void mousePressed(MouseEvent evt)
@@ -513,7 +520,13 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
     {
       return;
     }
+    mouseDragLastX = evt.getX();
+    mouseDragLastY = evt.getY();
 
+    /*
+     * add visible annotation heights until we reach the y
+     * position, to find which annotation it is in
+     */
     int height = 0;
     activeRow = -1;
 
@@ -533,11 +546,11 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
         }
         else if (aa[i].graph > 0)
         {
-          // Stretch Graph
+          /*
+           * we have clicked on a resizable graph annotation
+           */
           graphStretch = i;
-          graphStretchY = y;
         }
-
         break;
       }
     }
@@ -603,17 +616,20 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
   }
 
   /**
-   * DOCUMENT ME!
+   * Action on mouse up is to clear mouse drag data and call mouseReleased on
+   * ScalePanel, to deal with defining the selection group (if any) defined by
+   * the mouse drag
    * 
    * @param evt
-   *          DOCUMENT ME!
    */
   @Override
   public void mouseReleased(MouseEvent evt)
   {
     graphStretch = -1;
-    graphStretchY = -1;
+    mouseDragLastX = -1;
+    mouseDragLastY = -1;
     mouseDragging = false;
+    dragMode = DragMode.Undefined;
     ap.getScalePanel().mouseReleased(evt);
 
     /*
@@ -660,24 +676,73 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
   @Override
   public void mouseDragged(MouseEvent evt)
   {
-    if (graphStretch > -1)
+    /*
+     * todo: if dragMode is Undefined:
+     * - set to Select if dx > dy
+     * - set to Resize if dy > dx
+     * - do nothing if dx == dy
+     */
+    final int x = evt.getX();
+    final int y = evt.getY();
+    if (dragMode == DragMode.Undefined)
     {
-      av.getAlignment()
-              .getAlignmentAnnotation()[graphStretch].graphHeight += graphStretchY
-                      - evt.getY();
-      if (av.getAlignment()
-              .getAlignmentAnnotation()[graphStretch].graphHeight < 0)
+      int dx = Math.abs(x - mouseDragLastX);
+      int dy = Math.abs(y - mouseDragLastY);
+      if (graphStretch == -1 || dx > dy)
       {
-        av.getAlignment()
-                .getAlignmentAnnotation()[graphStretch].graphHeight = 0;
+        /*
+         * mostly horizontal drag, or not a graph annotation
+         */
+        dragMode = DragMode.Select;
+      }
+      else if (dy > dx)
+      {
+        /*
+         * mostly vertical drag
+         */
+        dragMode = DragMode.Resize;
       }
-      graphStretchY = evt.getY();
-      adjustPanelHeight();
-      ap.paintAlignment(false, false);
     }
-    else
+
+    if (dragMode == DragMode.Undefined)
     {
-      ap.getScalePanel().mouseDragged(evt);
+      /*
+       * drag is diagonal - defer deciding whether to
+       * treat as up/down or left/right
+       */
+      return;
+    }
+
+    try
+    {
+      if (dragMode == DragMode.Resize)
+      {
+        /*
+         * resize graph annotation if mouse was dragged up or down
+         */
+        int deltaY = mouseDragLastY - evt.getY();
+        if (deltaY != 0)
+        {
+          AlignmentAnnotation graphAnnotation = av.getAlignment()
+                  .getAlignmentAnnotation()[graphStretch];
+          int newHeight = Math.max(0, graphAnnotation.graphHeight + deltaY);
+          graphAnnotation.graphHeight = newHeight;
+          adjustPanelHeight();
+          ap.paintAlignment(false, false);
+        }
+      }
+      else
+      {
+        /*
+         * for mouse drag left or right, delegate to 
+         * ScalePanel to adjust the column selection
+         */
+        ap.getScalePanel().mouseDragged(evt);
+      }
+    } finally
+    {
+      mouseDragLastX = x;
+      mouseDragLastY = y;
     }
   }
 
@@ -690,30 +755,10 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
   @Override
   public void mouseMoved(MouseEvent evt)
   {
+    int yPos = evt.getY();
     AlignmentAnnotation[] aa = av.getAlignment().getAlignmentAnnotation();
 
-    if (aa == null)
-    {
-      this.setToolTipText(null);
-      return;
-    }
-
-    int row = -1;
-    int height = 0;
-
-    for (int i = 0; i < aa.length; i++)
-    {
-      if (aa[i].visible)
-      {
-        height += aa[i].height;
-      }
-
-      if (evt.getY() < height)
-      {
-        row = i;
-        break;
-      }
-    }
+    int row = getRowIndex(yPos, aa);
 
     if (row == -1)
     {
@@ -723,6 +768,7 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
 
     int column = (evt.getX() / av.getCharWidth())
             + av.getRanges().getStartRes();
+    column = Math.min(column, av.getRanges().getEndRes());
 
     if (av.hasHiddenColumns())
     {
@@ -734,26 +780,63 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
     if (row > -1 && ann.annotations != null
             && column < ann.annotations.length)
     {
-      buildToolTip(ann, column, aa);
-      setStatusMessage(column, ann);
+      setToolTipText(buildToolTip(ann, column, aa));
+      String msg = getStatusMessage(av.getAlignment(), column, ann);
+      ap.alignFrame.setStatus(msg);
     }
     else
     {
       this.setToolTipText(null);
-      ap.alignFrame.statusBar.setText(" ");
+      ap.alignFrame.setStatus(" ");
+    }
+  }
+
+  /**
+   * Answers the index in the annotations array of the visible annotation at the
+   * given y position. This is done by adding the heights of visible annotations
+   * until the y position has been exceeded. Answers -1 if no annotations are
+   * visible, or the y position is below all annotations.
+   * 
+   * @param yPos
+   * @param aa
+   * @return
+   */
+  static int getRowIndex(int yPos, AlignmentAnnotation[] aa)
+  {
+    if (aa == null)
+    {
+      return -1;
     }
+    int row = -1;
+    int height = 0;
+
+    for (int i = 0; i < aa.length; i++)
+    {
+      if (aa[i].visible)
+      {
+        height += aa[i].height;
+      }
+
+      if (height > yPos)
+      {
+        row = i;
+        break;
+      }
+    }
+    return row;
   }
 
   /**
-   * Builds a tooltip for the annotation at the current mouse position.
+   * Answers a tooltip for the annotation at the current mouse position
    * 
    * @param ann
    * @param column
    * @param anns
    */
-  void buildToolTip(AlignmentAnnotation ann, int column,
+  static String buildToolTip(AlignmentAnnotation ann, int column,
           AlignmentAnnotation[] anns)
   {
+    String tooltip = null;
     if (ann.graphGroup > -1)
     {
       StringBuilder tip = new StringBuilder(32);
@@ -775,35 +858,39 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
       if (tip.length() != 6)
       {
         tip.setLength(tip.length() - 4);
-        this.setToolTipText(tip.toString() + "</html>");
+        tooltip = tip.toString() + "</html>";
       }
     }
-    else if (ann.annotations[column] != null)
+    else if (column < ann.annotations.length
+            && ann.annotations[column] != null)
     {
       String description = ann.annotations[column].description;
       if (description != null && description.length() > 0)
       {
-        this.setToolTipText(JvSwingUtils.wrapTooltip(true, description));
+        tooltip = JvSwingUtils.wrapTooltip(true, description);
       }
       else
       {
-        this.setToolTipText(null); // no tooltip if null or empty description
+        tooltip = null; // no tooltip if null or empty description
       }
     }
     else
     {
       // clear the tooltip.
-      this.setToolTipText(null);
+      tooltip = null;
     }
+    return tooltip;
   }
 
   /**
-   * Constructs and displays the status bar message
+   * Constructs and returns the status bar message
    * 
+   * @param al
    * @param column
    * @param ann
    */
-  void setStatusMessage(int column, AlignmentAnnotation ann)
+  static String getStatusMessage(AlignmentI al, int column,
+          AlignmentAnnotation ann)
   {
     /*
      * show alignment column and annotation description if any
@@ -812,7 +899,7 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
     text.append(MessageManager.getString("label.column")).append(" ")
             .append(column + 1);
 
-    if (ann.annotations[column] != null)
+    if (column < ann.annotations.length && ann.annotations[column] != null)
     {
       String description = ann.annotations[column].description;
       if (description != null && description.trim().length() > 0)
@@ -828,7 +915,7 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
     SequenceI seqref = ann.sequenceRef;
     if (seqref != null)
     {
-      int seqIndex = av.getAlignment().findIndex(seqref);
+      int seqIndex = al.findIndex(seqref);
       if (seqIndex != -1)
       {
         text.append(", ").append(MessageManager.getString("label.sequence"))
@@ -838,7 +925,7 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
         {
           text.append(" ");
           String name;
-          if (av.getAlignment().isNucleotide())
+          if (al.isNucleotide())
           {
             name = ResidueProperties.nucleotideName
                     .get(String.valueOf(residue));
@@ -859,7 +946,7 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
       }
     }
 
-    ap.alignFrame.statusBar.setText(text.toString());
+    return text.toString();
   }
 
   /**
index f674c7e..336a312 100644 (file)
@@ -25,6 +25,7 @@ import jalview.analysis.scoremodels.ScoreModels;
 import jalview.analysis.scoremodels.SimilarityParams;
 import jalview.api.analysis.ScoreModelI;
 import jalview.api.analysis.SimilarityParamsI;
+import jalview.bin.Cache;
 import jalview.datamodel.SequenceGroup;
 import jalview.util.MessageManager;
 
@@ -103,7 +104,7 @@ public class CalculationChooser extends JPanel
 
   final ComboBoxTooltipRenderer renderer = new ComboBoxTooltipRenderer();
 
-  List<String> tips = new ArrayList<String>();
+  List<String> tips = new ArrayList<>();
 
   /*
    * the most recently opened PCA results panel
@@ -270,9 +271,9 @@ public class CalculationChooser extends JPanel
 
     setMinimumSize(new Dimension(325, height - 10));
     String title = MessageManager.getString("label.choose_calculation");
-    if (af.getViewport().viewName != null)
+    if (af.getViewport().getViewName() != null)
     {
-      title = title + " (" + af.getViewport().viewName + ")";
+      title = title + " (" + af.getViewport().getViewName() + ")";
     }
 
     Desktop.addInternalFrame(frame, title, width, height, false);
@@ -375,7 +376,7 @@ public class CalculationChooser extends JPanel
    */
   protected JComboBox<String> buildModelOptionsList()
   {
-    final JComboBox<String> scoreModelsCombo = new JComboBox<String>();
+    final JComboBox<String> scoreModelsCombo = new JComboBox<>();
     scoreModelsCombo.setRenderer(renderer);
 
     /*
@@ -418,39 +419,42 @@ public class CalculationChooser extends JPanel
   {
     Object curSel = comboBox.getSelectedItem();
     toolTips.clear();
-    DefaultComboBoxModel<String> model = new DefaultComboBoxModel<String>();
+    DefaultComboBoxModel<String> model = new DefaultComboBoxModel<>();
+
+    /*
+     * select the score models applicable to the alignment type
+     */
+    boolean nucleotide = af.getViewport().getAlignment().isNucleotide();
+    List<ScoreModelI> models = getApplicableScoreModels(nucleotide,
+            pca.isSelected());
 
     /*
      * now we can actually add entries to the combobox,
      * remembering their descriptions for tooltips
      */
-    ScoreModels scoreModels = ScoreModels.getInstance();
     boolean selectedIsPresent = false;
-    for (ScoreModelI sm : scoreModels.getModels())
+    for (ScoreModelI sm : models)
     {
-      boolean nucleotide = af.getViewport().getAlignment().isNucleotide();
-      if (sm.isDNA() && nucleotide || sm.isProtein() && !nucleotide)
+      if (curSel != null && sm.getName().equals(curSel))
+      {
+        selectedIsPresent = true;
+        curSel = sm.getName();
+      }
+      model.addElement(sm.getName());
+
+      /*
+       * tooltip is description if provided, else text lookup with
+       * fallback on the model name
+       */
+      String tooltip = sm.getDescription();
+      if (tooltip == null)
       {
-        if (curSel != null && sm.getName().equals(curSel))
-        {
-          selectedIsPresent = true;
-          curSel = sm.getName();
-        }
-        model.addElement(sm.getName());
-
-        /*
-         * tooltip is description if provided, else text lookup with
-         * fallback on the model name
-         */
-        String tooltip = sm.getDescription();
-        if (tooltip == null)
-        {
-          tooltip = MessageManager.getStringOrReturn("label.score_model_",
-                  sm.getName());
-        }
-        toolTips.add(tooltip);
+        tooltip = MessageManager.getStringOrReturn("label.score_model_",
+                sm.getName());
       }
+      toolTips.add(tooltip);
     }
+
     if (selectedIsPresent)
     {
       model.setSelectedItem(curSel);
@@ -460,6 +464,47 @@ public class CalculationChooser extends JPanel
   }
 
   /**
+   * Builds a list of score models which are applicable for the alignment and
+   * calculation type (peptide or generic models for protein, nucleotide or
+   * generic models for nucleotide).
+   * <p>
+   * As a special case, includes BLOSUM62 as an extra option for nucleotide PCA.
+   * This is for backwards compatibility with Jalview prior to 2.8 when BLOSUM62
+   * was the only score matrix supported. This is included if property
+   * BLOSUM62_PCA_FOR_NUCLEOTIDE is set to true in the Jalview properties file.
+   * 
+   * @param nucleotide
+   * @param forPca
+   * @return
+   */
+  protected static List<ScoreModelI> getApplicableScoreModels(
+          boolean nucleotide, boolean forPca)
+  {
+    List<ScoreModelI> filtered = new ArrayList<>();
+
+    ScoreModels scoreModels = ScoreModels.getInstance();
+    for (ScoreModelI sm : scoreModels.getModels())
+    {
+      if (!nucleotide && sm.isProtein() || nucleotide && sm.isDNA())
+      {
+        filtered.add(sm);
+      }
+    }
+
+    /*
+     * special case: add BLOSUM62 as last option for nucleotide PCA, 
+     * for backwards compatibility with Jalview < 2.8 (JAL-2962)
+     */
+    if (nucleotide && forPca
+            && Cache.getDefault("BLOSUM62_PCA_FOR_NUCLEOTIDE", false))
+    {
+      filtered.add(scoreModels.getBlosum62());
+    }
+
+    return filtered;
+  }
+
+  /**
    * Open and calculate the selected tree or PCA on 'OK'
    */
   protected void calculate_actionPerformed()
@@ -539,7 +584,13 @@ public class CalculationChooser extends JPanel
               JvOptionPane.WARNING_MESSAGE);
       return;
     }
+
+    /*
+     * construct the panel and kick off its calculation thread
+     */
     pcaPanel = new PCAPanel(af.alignPanel, modelName, params);
+    new Thread(pcaPanel).start();
+
   }
 
   /**
index 8f0b88c..6eab07d 100644 (file)
@@ -121,8 +121,7 @@ public class ColourMenuHelper
        */
       final String name = scheme.getSchemeName();
       String label = MessageManager.getStringOrReturn(
-              "label.colourScheme_" + name.toLowerCase().replace(" ", "_"),
-              name);
+              "label.colourScheme_", name);
       final JRadioButtonMenuItem radioItem = new JRadioButtonMenuItem(
               label);
       radioItem.setName(name);
index 2a96daf..b3bff0d 100644 (file)
@@ -322,7 +322,7 @@ public class CutAndPasteTransfer extends GCutAndPasteTransfer
         af.currentFileFormat = format;
         Desktop.addInternalFrame(af, title, AlignFrame.DEFAULT_WIDTH,
                 AlignFrame.DEFAULT_HEIGHT);
-        af.statusBar.setText(MessageManager
+        af.setStatus(MessageManager
                 .getString("label.successfully_pasted_alignment_file"));
 
         try
index 8d9e366..5071918 100644 (file)
@@ -26,6 +26,7 @@ import jalview.api.AlignViewportI;
 import jalview.api.AlignmentViewPanel;
 import jalview.bin.Cache;
 import jalview.bin.Jalview;
+import jalview.io.BackupFiles;
 import jalview.io.DataSourceType;
 import jalview.io.FileFormat;
 import jalview.io.FileFormatException;
@@ -38,6 +39,7 @@ import jalview.io.JalviewFileChooser;
 import jalview.io.JalviewFileView;
 import jalview.jbgui.GSplitFrame;
 import jalview.jbgui.GStructureViewer;
+import jalview.project.Jalview2XML;
 import jalview.structure.StructureSelectionManager;
 import jalview.urls.IdOrgSettings;
 import jalview.util.ImageMaker;
@@ -363,13 +365,12 @@ public class Desktop extends jalview.jbgui.GDesktop
 
     // This line prevents Windows Look&Feel resizing all new windows to maximum
     // if previous window was maximised
-    desktop.setDesktopManager(
-            new MyDesktopManager(
-                    (Platform.isWindows() ? new DefaultDesktopManager()
-                            : Platform.isAMac()
-                                    ? new AquaInternalFrameManager(
-                                            desktop.getDesktopManager())
-                                    : desktop.getDesktopManager())));
+    desktop.setDesktopManager(new MyDesktopManager(
+            (Platform.isWindows() ? new DefaultDesktopManager()
+                    : Platform.isAMac()
+                            ? new AquaInternalFrameManager(
+                                    desktop.getDesktopManager())
+                            : desktop.getDesktopManager())));
 
     Rectangle dims = getLastKnownDimensions("");
     if (dims != null)
@@ -1086,7 +1087,7 @@ public class Desktop extends jalview.jbgui.GDesktop
   {
     String fileFormat = Cache.getProperty("DEFAULT_FILE_FORMAT");
     JalviewFileChooser chooser = JalviewFileChooser
-            .forRead(Cache.getProperty("LAST_DIRECTORY"), fileFormat);
+            .forRead(Cache.getProperty("LAST_DIRECTORY"), fileFormat, true);
 
     chooser.setFileView(new JalviewFileView());
     chooser.setDialogTitle(
@@ -1599,28 +1600,49 @@ public class Desktop extends jalview.jbgui.GDesktop
   }
 
   /**
-   * DOCUMENT ME!
-   * 
-   * @param e
-   *          DOCUMENT ME!
+   * Shows a file chooser dialog and writes out the current session as a Jalview
+   * project file
    */
   @Override
-  public void saveState_actionPerformed(ActionEvent e)
+  public void saveState_actionPerformed()
   {
-    JalviewFileChooser chooser = new JalviewFileChooser("jvp",
-            "Jalview Project");
+    saveState_actionPerformed(false);
+  }
 
-    chooser.setFileView(new JalviewFileView());
-    chooser.setDialogTitle(MessageManager.getString("label.save_state"));
+  public void saveState_actionPerformed(boolean saveAs)
+  {
+    java.io.File projectFile = getProjectFile();
+    // autoSave indicates we already have a file and don't need to ask
+    boolean autoSave = projectFile != null && !saveAs
+            && BackupFiles.getEnabled();
 
-    int value = chooser.showSaveDialog(this);
+    // System.out.println("autoSave="+autoSave+", projectFile='"+projectFile+"',
+    // saveAs="+saveAs+", Backups
+    // "+(BackupFiles.getEnabled()?"enabled":"disabled"));
 
-    if (value == JalviewFileChooser.APPROVE_OPTION)
+    boolean approveSave = false;
+    if (!autoSave)
     {
-      final Desktop me = this;
-      final java.io.File choice = chooser.getSelectedFile();
-      setProjectFile(choice);
+      JalviewFileChooser chooser = new JalviewFileChooser("jvp",
+              "Jalview Project");
 
+      chooser.setFileView(new JalviewFileView());
+      chooser.setDialogTitle(MessageManager.getString("label.save_state"));
+
+      int value = chooser.showSaveDialog(this);
+
+      if (value == JalviewFileChooser.APPROVE_OPTION)
+      {
+        projectFile = chooser.getSelectedFile();
+        setProjectFile(projectFile);
+        approveSave = true;
+      }
+    }
+
+    if (approveSave || autoSave)
+    {
+      final Desktop me = this;
+      final java.io.File chosenFile = projectFile;
       new Thread(new Runnable()
       {
         @Override
@@ -1629,38 +1651,47 @@ public class Desktop extends jalview.jbgui.GDesktop
           // TODO: refactor to Jalview desktop session controller action.
           setProgressBar(MessageManager.formatMessage(
                   "label.saving_jalview_project", new Object[]
-                  { choice.getName() }), choice.hashCode());
+                  { chosenFile.getName() }), chosenFile.hashCode());
           jalview.bin.Cache.setProperty("LAST_DIRECTORY",
-                  choice.getParent());
+                  chosenFile.getParent());
           // TODO catch and handle errors for savestate
           // TODO prevent user from messing with the Desktop whilst we're saving
           try
           {
-            new Jalview2XML().saveState(choice);
+            BackupFiles backupfiles = new BackupFiles(chosenFile);
+
+            new Jalview2XML().saveState(backupfiles.getTempFile());
+
+            backupfiles.setWriteSuccess(true);
+            backupfiles.rollBackupsAndRenameTempFile();
           } catch (OutOfMemoryError oom)
           {
-            new OOMWarning(
-                    "Whilst saving current state to " + choice.getName(),
-                    oom);
+            new OOMWarning("Whilst saving current state to "
+                    + chosenFile.getName(), oom);
           } catch (Exception ex)
           {
-            Cache.log.error(
-                    "Problems whilst trying to save to " + choice.getName(),
-                    ex);
+            Cache.log.error("Problems whilst trying to save to "
+                    + chosenFile.getName(), ex);
             JvOptionPane.showMessageDialog(me,
                     MessageManager.formatMessage(
                             "label.error_whilst_saving_current_state_to",
                             new Object[]
-                            { choice.getName() }),
+                            { chosenFile.getName() }),
                     MessageManager.getString("label.couldnt_save_project"),
                     JvOptionPane.WARNING_MESSAGE);
           }
-          setProgressBar(null, choice.hashCode());
+          setProgressBar(null, chosenFile.hashCode());
         }
       }).start();
     }
   }
 
+  @Override
+  public void saveAsState_actionPerformed(ActionEvent e)
+  {
+    saveState_actionPerformed(true);
+  }
+
   private void setProjectFile(File choice)
   {
     this.projectFile = choice;
@@ -1672,20 +1703,19 @@ public class Desktop extends jalview.jbgui.GDesktop
   }
 
   /**
-   * DOCUMENT ME!
-   * 
-   * @param e
-   *          DOCUMENT ME!
+   * Shows a file chooser dialog and tries to read in the selected file as a
+   * Jalview project
    */
   @Override
-  public void loadState_actionPerformed(ActionEvent e)
+  public void loadState_actionPerformed()
   {
+    final String[] suffix = new String[] { "jvp", "jar" };
+    final String[] desc = new String[] { "Jalview Project",
+        "Jalview Project (old)" };
     JalviewFileChooser chooser = new JalviewFileChooser(
-            Cache.getProperty("LAST_DIRECTORY"), new String[]
-            { "jvp", "jar" },
-            new String[]
-            { "Jalview Project", "Jalview Project (old)" },
-            "Jalview Project");
+            Cache.getProperty("LAST_DIRECTORY"), suffix, desc,
+            "Jalview Project", true, true); // last two booleans: allFiles,
+                                            // allowBackupFiles
     chooser.setFileView(new JalviewFileView());
     chooser.setDialogTitle(MessageManager.getString("label.restore_state"));
 
@@ -2535,7 +2565,6 @@ public class Desktop extends jalview.jbgui.GDesktop
     }
   }
 
-
   /**
    * Accessor method to quickly get all the AlignmentFrames loaded.
    * 
@@ -3373,15 +3402,15 @@ public class Desktop extends jalview.jbgui.GDesktop
 
       try
       {
-      java.net.URL url = (URL) t.getTransferData(urlFlavour);
+        java.net.URL url = (URL) t.getTransferData(urlFlavour);
         // nb: java 8 osx bug https://bugs.openjdk.java.net/browse/JDK-8156099
         // means url may be null.
-      if (url != null)
-      {
-        protocols.add(DataSourceType.URL);
-        files.add(url.toString());
-        Cache.log.debug("Drop handled as URL dataflavor "
-                + files.get(files.size() - 1));
+        if (url != null)
+        {
+          protocols.add(DataSourceType.URL);
+          files.add(url.toString());
+          Cache.log.debug("Drop handled as URL dataflavor "
+                  + files.get(files.size() - 1));
           return;
         }
         else
@@ -3392,7 +3421,7 @@ public class Desktop extends jalview.jbgui.GDesktop
                     "Please ignore plist error - occurs due to problem with java 8 on OSX");
           }
           ;
-      }
+        }
       } catch (Throwable ex)
       {
         Cache.log.debug("URL drop handler failed.", ex);
@@ -3516,7 +3545,8 @@ public class Desktop extends jalview.jbgui.GDesktop
                 && (source.endsWith(".lnk") || source.endsWith(".url")
                         || source.endsWith(".site")))
         {
-          try {
+          try
+          {
             File lf = new File(files.get(f));
             // process link file to get a URL
             Cache.log.debug("Found potential link file: " + lf);
@@ -3526,10 +3556,11 @@ public class Desktop extends jalview.jbgui.GDesktop
             files.set(f, fullname);
             Cache.log.debug("Parsed real filename " + fullname
                     + " to extract protocol: " + protocols.get(f));
-          }
-          catch (Exception ex)
+          } catch (Exception ex)
           {
-            Cache.log.error("Couldn't parse "+files.get(f)+" as a link file.",ex);
+            Cache.log.error(
+                    "Couldn't parse " + files.get(f) + " as a link file.",
+                    ex);
           }
         }
       }
index 1358c8f..4526517 100644 (file)
@@ -24,19 +24,21 @@ import jalview.api.FeatureColourI;
 import jalview.api.FeatureSettingsControllerI;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.SequenceI;
+import jalview.datamodel.features.FeatureMatcher;
 import jalview.datamodel.features.FeatureMatcherI;
 import jalview.datamodel.features.FeatureMatcherSet;
 import jalview.datamodel.features.FeatureMatcherSetI;
 import jalview.gui.Help.HelpId;
 import jalview.io.JalviewFileChooser;
 import jalview.io.JalviewFileView;
-import jalview.schemabinding.version2.Filter;
-import jalview.schemabinding.version2.JalviewUserColours;
-import jalview.schemabinding.version2.MatcherSet;
 import jalview.schemes.FeatureColour;
 import jalview.util.MessageManager;
 import jalview.util.Platform;
 import jalview.viewmodel.seqfeatures.FeatureRendererModel.FeatureSettingsBean;
+import jalview.xml.binding.jalview.JalviewUserColours;
+import jalview.xml.binding.jalview.JalviewUserColours.Colour;
+import jalview.xml.binding.jalview.JalviewUserColours.Filter;
+import jalview.xml.binding.jalview.ObjectFactory;
 
 import java.awt.BorderLayout;
 import java.awt.Color;
@@ -78,7 +80,6 @@ import javax.swing.BorderFactory;
 import javax.swing.Icon;
 import javax.swing.JButton;
 import javax.swing.JCheckBox;
-import javax.swing.JCheckBoxMenuItem;
 import javax.swing.JColorChooser;
 import javax.swing.JDialog;
 import javax.swing.JInternalFrame;
@@ -92,12 +93,19 @@ import javax.swing.JSlider;
 import javax.swing.JTable;
 import javax.swing.ListSelectionModel;
 import javax.swing.SwingConstants;
+import javax.swing.border.Border;
 import javax.swing.event.ChangeEvent;
 import javax.swing.event.ChangeListener;
 import javax.swing.table.AbstractTableModel;
+import javax.swing.table.JTableHeader;
 import javax.swing.table.TableCellEditor;
 import javax.swing.table.TableCellRenderer;
 import javax.swing.table.TableColumn;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.Marshaller;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamReader;
 
 public class FeatureSettings extends JPanel
         implements FeatureSettingsControllerI
@@ -122,6 +130,8 @@ public class FeatureSettings extends JPanel
 
   private static final int MIN_HEIGHT = 400;
 
+  private final static String BASE_TOOLTIP = MessageManager.getString("label.click_to_edit");
+
   final FeatureRenderer fr;
 
   public final AlignFrame af;
@@ -152,12 +162,6 @@ public class FeatureSettings extends JPanel
 
   int selectedRow = -1;
 
-  JButton fetchDAS = new JButton();
-
-  JButton saveDAS = new JButton();
-
-  JButton cancelDAS = new JButton();
-
   boolean resettingTable = false;
 
   /*
@@ -202,32 +206,54 @@ public class FeatureSettings extends JPanel
       {
         String tip = null;
         int column = table.columnAtPoint(e.getPoint());
+        int row = table.rowAtPoint(e.getPoint());
+
         switch (column)
         {
         case TYPE_COLUMN:
           tip = JvSwingUtils.wrapTooltip(true, MessageManager
                   .getString("label.feature_settings_click_drag"));
           break;
+        case COLOUR_COLUMN:
+          FeatureColourI colour = (FeatureColourI) table.getValueAt(row,
+                  column);
+          tip = getColorTooltip(colour, true);
+          break;
         case FILTER_COLUMN:
-          int row = table.rowAtPoint(e.getPoint());
           FeatureMatcherSet o = (FeatureMatcherSet) table.getValueAt(row,
                   column);
           tip = o.isEmpty()
-                  ? MessageManager.getString("label.filters_tooltip")
+                  ? MessageManager
+                          .getString("label.configure_feature_tooltip")
                   : o.toString();
           break;
         default:
           break;
         }
+        
         return tip;
       }
+
+      /**
+       * Position the tooltip near the bottom edge of, and half way across, the
+       * current cell
+       */
+      @Override
+      public Point getToolTipLocation(MouseEvent e)
+      {
+        Point point = e.getPoint();
+        int column = table.columnAtPoint(point);
+        int row = table.rowAtPoint(point);
+        Rectangle r = getCellRect(row, column, false);
+        Point loc = new Point(r.x + r.width / 2, r.y + r.height - 3);
+        return loc;
+      }
     };
-    table.getTableHeader().setFont(new Font("Verdana", Font.PLAIN, 12));
+    JTableHeader tableHeader = table.getTableHeader();
+    tableHeader.setFont(new Font("Verdana", Font.PLAIN, 12));
+    tableHeader.setReorderingAllowed(false);
     table.setFont(new Font("Verdana", Font.PLAIN, 12));
 
-    // table.setDefaultRenderer(Color.class, new ColorRenderer());
-    // table.setDefaultEditor(Color.class, new ColorEditor(this));
-    //
     table.setDefaultEditor(FeatureColour.class, new ColorEditor(this));
     table.setDefaultRenderer(FeatureColour.class, new ColorRenderer());
 
@@ -409,69 +435,6 @@ public class FeatureSettings extends JPanel
     });
     men.add(dens);
 
-    /*
-     * variable colour options include colour by label, by score,
-     * by selected attribute text, or attribute value
-     */
-    final JCheckBoxMenuItem mxcol = new JCheckBoxMenuItem(
-            MessageManager.getString("label.variable_colour"));
-    mxcol.setSelected(!featureColour.isSimpleColour());
-    men.add(mxcol);
-    mxcol.addActionListener(new ActionListener()
-    {
-      JColorChooser colorChooser;
-
-      @Override
-      public void actionPerformed(ActionEvent e)
-      {
-        if (e.getSource() == mxcol)
-        {
-          if (featureColour.isSimpleColour())
-          {
-            FeatureTypeSettings fc = new FeatureTypeSettings(me.fr, type);
-            fc.addActionListener(this);
-          }
-          else
-          {
-            // bring up simple color chooser
-            colorChooser = new JColorChooser();
-            String title = MessageManager
-                    .getString("label.select_colour");
-            JDialog dialog = JColorChooser.createDialog(me,
-                    title, true, // modal
-                    colorChooser, this, // OK button handler
-                    null); // no CANCEL button handler
-            colorChooser.setColor(featureColour.getMaxColour());
-            dialog.setVisible(true);
-          }
-        }
-        else
-        {
-          if (e.getSource() instanceof FeatureTypeSettings)
-          {
-            /*
-             * update after OK in feature colour dialog; the updated
-             * colour will have already been set in the FeatureRenderer
-             */
-            FeatureColourI fci = fr.getFeatureColours().get(type);
-            table.setValueAt(fci, rowSelected, 1);
-            table.validate();
-          }
-          else
-          {
-            // probably the color chooser!
-            table.setValueAt(new FeatureColour(colorChooser.getColor()),
-                    rowSelected, 1);
-            table.validate();
-            me.updateFeatureRenderer(
-                    ((FeatureTableModel) table.getModel()).getData(),
-                    false);
-          }
-        }
-      }
-
-    });
-
     JMenuItem selCols = new JMenuItem(
             MessageManager.getString("label.select_columns_containing"));
     selCols.addActionListener(new ActionListener()
@@ -874,30 +837,39 @@ public class FeatureSettings extends JPanel
       InputStreamReader in = new InputStreamReader(
               new FileInputStream(file), "UTF-8");
 
-      JalviewUserColours jucs = JalviewUserColours.unmarshal(in);
+      JAXBContext jc = JAXBContext
+              .newInstance("jalview.xml.binding.jalview");
+      javax.xml.bind.Unmarshaller um = jc.createUnmarshaller();
+      XMLStreamReader streamReader = XMLInputFactory.newInstance()
+              .createXMLStreamReader(in);
+      JAXBElement<JalviewUserColours> jbe = um.unmarshal(streamReader,
+              JalviewUserColours.class);
+      JalviewUserColours jucs = jbe.getValue();
+
+      // JalviewUserColours jucs = JalviewUserColours.unmarshal(in);
 
       /*
        * load feature colours
        */
-      for (int i = jucs.getColourCount() - 1; i >= 0; i--)
+      for (int i = jucs.getColour().size() - 1; i >= 0; i--)
       {
-        jalview.schemabinding.version2.Colour newcol = jucs.getColour(i);
-        FeatureColourI colour = Jalview2XML.unmarshalColour(newcol);
+        Colour newcol = jucs.getColour().get(i);
+        FeatureColourI colour = jalview.project.Jalview2XML
+                .parseColour(newcol);
         fr.setColour(newcol.getName(), colour);
-        fr.setOrder(newcol.getName(), i / (float) jucs.getColourCount());
+        fr.setOrder(newcol.getName(), i / (float) jucs.getColour().size());
       }
 
       /*
        * load feature filters; loaded filters will replace any that are
        * currently defined, other defined filters are left unchanged 
        */
-      for (int i = 0; i < jucs.getFilterCount(); i++)
+      for (int i = 0; i < jucs.getFilter().size(); i++)
       {
-        jalview.schemabinding.version2.Filter filterModel = jucs
-                .getFilter(i);
+        Filter filterModel = jucs.getFilter().get(i);
         String featureType = filterModel.getFeatureType();
-        FeatureMatcherSetI filter = Jalview2XML.unmarshalFilter(featureType,
-                filterModel.getMatcherSet());
+        FeatureMatcherSetI filter = jalview.project.Jalview2XML
+                .parseFilter(featureType, filterModel.getMatcherSet());
         if (!filter.isEmpty())
         {
           fr.setFeatureFilter(featureType, filter);
@@ -979,9 +951,9 @@ public class FeatureSettings extends JPanel
       for (String featureType : sortedTypes)
       {
         FeatureColourI fcol = fr.getFeatureStyle(featureType);
-        jalview.schemabinding.version2.Colour col = Jalview2XML.marshalColour(
-                featureType, fcol);
-        ucs.addColour(col);
+        Colour col = jalview.project.Jalview2XML.marshalColour(featureType,
+                fcol);
+        ucs.getColour().add(col);
       }
 
       /*
@@ -994,16 +966,26 @@ public class FeatureSettings extends JPanel
         {
           Iterator<FeatureMatcherI> iterator = filter.getMatchers().iterator();
           FeatureMatcherI firstMatcher = iterator.next();
-          MatcherSet ms = Jalview2XML.marshalFilter(firstMatcher, iterator,
+          jalview.xml.binding.jalview.FeatureMatcherSet ms = jalview.project.Jalview2XML
+                  .marshalFilter(firstMatcher, iterator,
                   filter.isAnded());
           Filter filterModel = new Filter();
           filterModel.setFeatureType(featureType);
           filterModel.setMatcherSet(ms);
-          ucs.addFilter(filterModel);
+          ucs.getFilter().add(filterModel);
         }
       }
+      JAXBContext jaxbContext = JAXBContext
+              .newInstance(JalviewUserColours.class);
+      Marshaller jaxbMarshaller = jaxbContext.createMarshaller();
+      jaxbMarshaller.marshal(
+              new ObjectFactory().createJalviewUserColours(ucs), out);
+
+      // jaxbMarshaller.marshal(object, pout);
+      // marshaller.marshal(object);
+      out.flush();
 
-      ucs.marshal(out);
+      // ucs.marshal(out);
       out.close();
     } catch (Exception ex)
     {
@@ -1212,22 +1194,6 @@ public class FeatureSettings extends JPanel
         }
       }
     });
-    help.setFont(JvSwingUtils.getLabelFont());
-    help.setText(MessageManager.getString("action.help"));
-    help.addActionListener(new ActionListener()
-    {
-      @Override
-      public void actionPerformed(ActionEvent e)
-      {
-        try
-        {
-          Help.showHelpWindow(HelpId.SequenceFeatureSettings);
-        } catch (HelpSetException e1)
-        {
-          e1.printStackTrace();
-        }
-      }
-    });
 
     JButton cancel = new JButton(MessageManager.getString("action.cancel"));
     cancel.setFont(JvSwingUtils.getLabelFont());
@@ -1321,6 +1287,90 @@ public class FeatureSettings extends JPanel
     this.add(settingsPane);
   }
 
+  /**
+   * Answers a suitable tooltip to show on the colour cell of the table
+   * 
+   * @param fcol
+   * @param withHint
+   *          if true include 'click to edit' and similar text
+   * @return
+   */
+  public static String getColorTooltip(FeatureColourI fcol,
+          boolean withHint)
+  {
+    if (fcol == null)
+    {
+      return null;
+    }
+    if (fcol.isSimpleColour())
+    {
+      return withHint ? BASE_TOOLTIP : null;
+    }
+    String description = fcol.getDescription();
+    description = description.replaceAll("<", "&lt;");
+    description = description.replaceAll(">", "&gt;");
+    StringBuilder tt = new StringBuilder(description);
+    if (withHint)
+    {
+      tt.append("<br>").append(BASE_TOOLTIP).append("</br>");
+    }
+    return JvSwingUtils.wrapTooltip(true, tt.toString());
+  }
+
+  public static void renderGraduatedColor(JLabel comp, FeatureColourI gcol,
+          int w, int h)
+  {
+    boolean thr = false;
+    StringBuilder tx = new StringBuilder();
+  
+    if (gcol.isColourByAttribute())
+    {
+      tx.append(FeatureMatcher
+              .toAttributeDisplayName(gcol.getAttributeName()));
+    }
+    else if (!gcol.isColourByLabel())
+    {
+      tx.append(MessageManager.getString("label.score"));
+    }
+    tx.append(" ");
+    if (gcol.isAboveThreshold())
+    {
+      thr = true;
+      tx.append(">");
+    }
+    if (gcol.isBelowThreshold())
+    {
+      thr = true;
+      tx.append("<");
+    }
+    if (gcol.isColourByLabel())
+    {
+      if (thr)
+      {
+        tx.append(" ");
+      }
+      if (!gcol.isColourByAttribute())
+      {
+        tx.append("Label");
+      }
+      comp.setIcon(null);
+    }
+    else
+    {
+      Color newColor = gcol.getMaxColour();
+      comp.setBackground(newColor);
+      // System.err.println("Width is " + w / 2);
+      Icon ficon = new FeatureIcon(gcol, comp.getBackground(), w, h, thr);
+      comp.setIcon(ficon);
+      // tt+="RGB value: Max (" + newColor.getRed() + ", "
+      // + newColor.getGreen() + ", " + newColor.getBlue()
+      // + ")\nMin (" + minCol.getRed() + ", " + minCol.getGreen()
+      // + ", " + minCol.getBlue() + ")");
+    }
+    comp.setHorizontalAlignment(SwingConstants.CENTER);
+    comp.setText(tx.toString());
+  }
+
   // ///////////////////////////////////////////////////////////////////////
   // http://java.sun.com/docs/books/tutorial/uiswing/components/table.html
   // ///////////////////////////////////////////////////////////////////////
@@ -1329,7 +1379,7 @@ public class FeatureSettings extends JPanel
     private String[] columnNames = {
         MessageManager.getString("label.feature_type"),
         MessageManager.getString("action.colour"),
-        MessageManager.getString("label.filter"),
+        MessageManager.getString("label.configuration"),
         MessageManager.getString("label.show") };
 
     private Object[][] data;
@@ -1406,11 +1456,9 @@ public class FeatureSettings extends JPanel
 
   class ColorRenderer extends JLabel implements TableCellRenderer
   {
-    javax.swing.border.Border unselectedBorder = null;
+    Border unselectedBorder = null;
 
-    javax.swing.border.Border selectedBorder = null;
-
-    final String baseTT = "Click to edit, right/apple click for menu.";
+    Border selectedBorder = null;
 
     public ColorRenderer()
     {
@@ -1425,7 +1473,6 @@ public class FeatureSettings extends JPanel
     {
       FeatureColourI cellColour = (FeatureColourI) color;
       setOpaque(true);
-      setToolTipText(baseTT);
       setBackground(tbl.getBackground());
       if (!cellColour.isSimpleColour())
       {
@@ -1532,77 +1579,6 @@ public class FeatureSettings extends JPanel
     renderGraduatedColor(comp, gcol, w, h);
   }
 
-  public static void renderGraduatedColor(JLabel comp, FeatureColourI gcol,
-          int w, int h)
-  {
-    boolean thr = false;
-    StringBuilder tt = new StringBuilder();
-    StringBuilder tx = new StringBuilder();
-
-    if (gcol.isColourByAttribute())
-    {
-      tx.append(String.join(":", gcol.getAttributeName()));
-    }
-    else if (!gcol.isColourByLabel())
-    {
-      tx.append(MessageManager.getString("label.score"));
-    }
-    tx.append(" ");
-    if (gcol.isAboveThreshold())
-    {
-      thr = true;
-      tx.append(">");
-      tt.append("Thresholded (Above ").append(gcol.getThreshold())
-              .append(") ");
-    }
-    if (gcol.isBelowThreshold())
-    {
-      thr = true;
-      tx.append("<");
-      tt.append("Thresholded (Below ").append(gcol.getThreshold())
-              .append(") ");
-    }
-    if (gcol.isColourByLabel())
-    {
-      tt.append("Coloured by label text. ").append(tt);
-      if (thr)
-      {
-        tx.append(" ");
-      }
-      if (!gcol.isColourByAttribute())
-      {
-        tx.append("Label");
-      }
-      comp.setIcon(null);
-    }
-    else
-    {
-      Color newColor = gcol.getMaxColour();
-      comp.setBackground(newColor);
-      // System.err.println("Width is " + w / 2);
-      Icon ficon = new FeatureIcon(gcol, comp.getBackground(), w, h, thr);
-      comp.setIcon(ficon);
-      // tt+="RGB value: Max (" + newColor.getRed() + ", "
-      // + newColor.getGreen() + ", " + newColor.getBlue()
-      // + ")\nMin (" + minCol.getRed() + ", " + minCol.getGreen()
-      // + ", " + minCol.getBlue() + ")");
-    }
-    comp.setHorizontalAlignment(SwingConstants.CENTER);
-    comp.setText(tx.toString());
-    if (tt.length() > 0)
-    {
-      if (comp.getToolTipText() == null)
-      {
-        comp.setToolTipText(tt.toString());
-      }
-      else
-      {
-        comp.setToolTipText(
-                tt.append(" ").append(comp.getToolTipText()).toString());
-      }
-    }
-  }
-
   class ColorEditor extends AbstractCellEditor
           implements TableCellEditor, ActionListener
   {
@@ -1838,7 +1814,6 @@ public class FeatureSettings extends JPanel
       button.setOpaque(true);
       button.setBackground(me.getBackground());
       button.setText(currentFilter.toString());
-      button.setToolTipText(currentFilter.toString());
       button.setIcon(null);
       return button;
     }
index 55bc519..82e826f 100644 (file)
@@ -242,8 +242,7 @@ public class FeatureTypeSettings extends JalviewDialog
     String title = MessageManager
             .formatMessage("label.display_settings_for", new String[]
             { theType });
-    initDialogFrame(this, true, false, title, 500, 500);
-    
+    initDialogFrame(this, true, false, title, 580, 500);
     waitForInput();
   }
 
@@ -366,7 +365,7 @@ public class FeatureTypeSettings extends JalviewDialog
                         : BELOW_THRESHOLD_OPTION);
         slider.setEnabled(true);
         slider.setValue((int) (fc.getThreshold() * scaleFactor));
-        thresholdValue.setText(String.valueOf(getRoundedSliderValue()));
+        thresholdValue.setText(String.valueOf(fc.getThreshold()));
         thresholdValue.setEnabled(true);
         thresholdIsMin.setEnabled(true);
       }
@@ -563,13 +562,20 @@ public class FeatureTypeSettings extends JalviewDialog
     maxColour.setBorder(new LineBorder(Color.black));
 
     /*
-     * default max colour to last plain colour;
-     * make min colour a pale version of max colour
+     * if not set, default max colour to last plain colour,
+     * and make min colour a pale version of max colour
      */
-    FeatureColourI fc = fr.getFeatureColours().get(featureType);
-    Color bg = fc.getColour() == null ? Color.BLACK : fc.getColour();
-    maxColour.setBackground(bg);
-    minColour.setBackground(ColorUtils.bleachColour(bg, 0.9f));
+    Color max = originalColour.getMaxColour();
+    if (max == null)
+    {
+      max = originalColour.getColour();
+      minColour.setBackground(ColorUtils.bleachColour(max, 0.9f));
+    }
+    else
+    {
+      maxColour.setBackground(max);
+      minColour.setBackground(originalColour.getMinColour());
+    }
 
     noValueCombo = new JComboBox<>();
     noValueCombo.addItem(MessageManager.getString("label.no_colour"));
@@ -652,6 +658,7 @@ public class FeatureTypeSettings extends JalviewDialog
         {
           thresholdValue
                   .setText(String.valueOf(slider.getValue() / scaleFactor));
+          thresholdValue.setBackground(Color.white); // to reset red for invalid
           sliderValueChanged();
         }
       }
@@ -747,16 +754,16 @@ public class FeatureTypeSettings extends JalviewDialog
     singleColour.setFont(JvSwingUtils.getLabelFont());
     singleColour.setBorder(BorderFactory.createLineBorder(Color.black));
     singleColour.setPreferredSize(new Dimension(40, 20));
-    if (originalColour.isGraduatedColour())
-    {
-      singleColour.setBackground(originalColour.getMaxColour());
-      singleColour.setForeground(originalColour.getMaxColour());
-    }
-    else
-    {
+    // if (originalColour.isGraduatedColour())
+    // {
+    // singleColour.setBackground(originalColour.getMaxColour());
+    // singleColour.setForeground(originalColour.getMaxColour());
+    // }
+    // else
+    // {
       singleColour.setBackground(originalColour.getColour());
       singleColour.setForeground(originalColour.getColour());
-    }
+    // }
     singleColour.addMouseListener(new MouseAdapter()
     {
       @Override
@@ -881,42 +888,9 @@ public class FeatureTypeSettings extends JalviewDialog
   private FeatureColourI makeColourFromInputs()
   {
     /*
-     * easiest case - a single colour
-     */
-    if (simpleColour.isSelected())
-    {
-      return new FeatureColour(singleColour.getBackground());
-    }
-
-    /*
-     * next easiest case - colour by Label, or attribute text
-     */
-    if (byCategory.isSelected())
-    {
-      Color c = singleColour.getBackground();
-      FeatureColourI fc = new FeatureColour(c);
-      fc.setColourByLabel(true);
-      String byWhat = (String) colourByTextCombo.getSelectedItem();
-      if (!LABEL_18N.equals(byWhat))
-      {
-        fc.setAttributeName(
-                FeatureMatcher.fromAttributeDisplayName(byWhat));
-      }
-      return fc;
-    }
-
-    /*
-     * remaining case - graduated colour by score, or attribute value
+     * min-max range is to (or from) threshold value if 
+     * 'threshold is min/max' is selected 
      */
-    Color noColour = null;
-    if (noValueCombo.getSelectedIndex() == MIN_COLOUR_OPTION)
-    {
-      noColour = minColour.getBackground();
-    }
-    else if (noValueCombo.getSelectedIndex() == MAX_COLOUR_OPTION)
-    {
-      noColour = maxColour.getBackground();
-    }
 
     float thresh = 0f;
     try
@@ -926,11 +900,6 @@ public class FeatureTypeSettings extends JalviewDialog
     {
       // invalid inputs are already handled on entry
     }
-
-    /*
-     * min-max range is to (or from) threshold value if 
-     * 'threshold is min/max' is selected 
-     */
     float minValue = min;
     float maxValue = max;
     final int thresholdOption = threshold.getSelectedIndex();
@@ -944,14 +913,50 @@ public class FeatureTypeSettings extends JalviewDialog
     {
       maxValue = thresh;
     }
+    Color noColour = null;
+    if (noValueCombo.getSelectedIndex() == MIN_COLOUR_OPTION)
+    {
+      noColour = minColour.getBackground();
+    }
+    else if (noValueCombo.getSelectedIndex() == MAX_COLOUR_OPTION)
+    {
+      noColour = maxColour.getBackground();
+    }
 
     /*
-     * make the graduated colour
+     * construct a colour that 'remembers' all the options, including
+     * those not currently selected
      */
-    FeatureColourI fc = new FeatureColour(minColour.getBackground(),
-            maxColour.getBackground(), noColour, minValue, maxValue);
+    FeatureColourI fc = new FeatureColour(singleColour.getBackground(),
+            minColour.getBackground(), maxColour.getBackground(), noColour,
+            minValue, maxValue);
 
     /*
+     * easiest case - a single colour
+     */
+    if (simpleColour.isSelected())
+    {
+      ((FeatureColour) fc).setGraduatedColour(false);
+      return fc;
+    }
+
+    /*
+     * next easiest case - colour by Label, or attribute text
+     */
+    if (byCategory.isSelected())
+    {
+      fc.setColourByLabel(true);
+      String byWhat = (String) colourByTextCombo.getSelectedItem();
+      if (!LABEL_18N.equals(byWhat))
+      {
+        fc.setAttributeName(
+                FeatureMatcher.fromAttributeDisplayName(byWhat));
+      }
+      return fc;
+    }
+
+    /*
+     * remaining case - graduated colour by score, or attribute value;
      * set attribute to colour by if selected
      */
     String byWhat = (String) colourByRangeCombo.getSelectedItem();
@@ -1019,21 +1024,23 @@ public class FeatureTypeSettings extends JalviewDialog
   {
     try
     {
+      /*
+       * set 'adjusting' flag while moving the slider, so it 
+       * doesn't then in turn change the value (with rounding)
+       */
       adjusting = true;
       float f = Float.parseFloat(thresholdValue.getText());
+      f = Float.max(f,  this.min);
+      f = Float.min(f, this.max);
+      thresholdValue.setText(String.valueOf(f));
       slider.setValue((int) (f * scaleFactor));
       threshline.value = f;
       thresholdValue.setBackground(Color.white); // ok
-
-      /*
-       * force repaint of any Overview window or structure
-       */
-      ap.paintAlignment(true, true);
+      adjusting = false;
+      colourChanged(true);
     } catch (NumberFormatException ex)
     {
       thresholdValue.setBackground(Color.red); // not ok
-    } finally
-    {
       adjusting = false;
     }
   }
index 84540f4..a4d7ad0 100755 (executable)
@@ -20,6 +20,8 @@
  */
 package jalview.gui;
 
+import jalview.api.AlignViewportI;
+import jalview.api.FinderI;
 import jalview.datamodel.SearchResultMatchI;
 import jalview.datamodel.SearchResultsI;
 import jalview.datamodel.SequenceFeature;
@@ -32,8 +34,9 @@ import java.awt.Dimension;
 import java.awt.event.ActionEvent;
 import java.awt.event.KeyEvent;
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
-import java.util.Vector;
+import java.util.Map;
 import java.util.regex.Pattern;
 import java.util.regex.PatternSyntaxException;
 
@@ -42,6 +45,7 @@ import javax.swing.JComponent;
 import javax.swing.JInternalFrame;
 import javax.swing.JLayeredPane;
 import javax.swing.KeyStroke;
+import javax.swing.event.InternalFrameAdapter;
 import javax.swing.event.InternalFrameEvent;
 
 /**
@@ -57,33 +61,39 @@ import javax.swing.event.InternalFrameEvent;
  */
 public class Finder extends GFinder
 {
-  private static final int MY_HEIGHT = 120;
+  private static final int MIN_WIDTH = 350;
 
-  private static final int MY_WIDTH = 400;
+  private static final int MIN_HEIGHT = 120;
 
-  AlignmentViewport av;
+  private static final int MY_HEIGHT = 120;
 
-  AlignmentPanel ap;
+  private static final int MY_WIDTH = 400;
 
-  private static final int MIN_WIDTH = 350;
+  private AlignViewportI av;
 
-  private static final int MIN_HEIGHT = 120;
+  private AlignmentPanel ap;
 
-  JInternalFrame frame;
+  private JInternalFrame frame;
 
-  int seqIndex = 0;
+  /*
+   * Finder agent per viewport searched
+   */
+  private Map<AlignViewportI, FinderI> finders;
 
-  int resIndex = -1;
+  private SearchResultsI searchResults;
 
-  SearchResultsI searchResults;
+  /*
+   * true if we only search a given alignment view
+   */
+  private boolean focusfixed;
 
   /**
-   * Creates a new Finder object with no associated viewport or panel.
+   * Creates a new Finder object with no associated viewport or panel. Each Find
+   * or Find Next action will act on whichever viewport has focus at the time.
    */
   public Finder()
   {
     this(null, null);
-    focusfixed = false;
   }
 
   /**
@@ -97,12 +107,13 @@ public class Finder extends GFinder
   {
     av = viewport;
     ap = alignPanel;
-    focusfixed = true;
+    finders = new HashMap<>();
+    focusfixed = viewport != null;
     frame = new JInternalFrame();
     frame.setContentPane(this);
     frame.setLayer(JLayeredPane.PALETTE_LAYER);
     frame.addInternalFrameListener(
-            new javax.swing.event.InternalFrameAdapter()
+            new InternalFrameAdapter()
             {
               @Override
               public void internalFrameClosing(InternalFrameEvent e)
@@ -135,12 +146,10 @@ public class Finder extends GFinder
   }
 
   /**
-   * Performs the 'Find Next' action.
-   * 
-   * @param e
+   * Performs the 'Find Next' action on the alignment panel with focus
    */
   @Override
-  public void findNext_actionPerformed(ActionEvent e)
+  public void findNext_actionPerformed()
   {
     if (getFocusedViewport())
     {
@@ -149,27 +158,18 @@ public class Finder extends GFinder
   }
 
   /**
-   * Performs the 'Find All' action.
-   * 
-   * @param e
+   * Performs the 'Find All' action on the alignment panel with focus
    */
   @Override
-  public void findAll_actionPerformed(ActionEvent e)
+  public void findAll_actionPerformed()
   {
     if (getFocusedViewport())
     {
-      resIndex = -1;
-      seqIndex = 0;
       doSearch(true);
     }
   }
 
   /**
-   * do we only search a given alignment view ?
-   */
-  private boolean focusfixed;
-
-  /**
    * if !focusfixed and not in a desktop environment, checks that av and ap are
    * valid. Otherwise, gets the topmost alignment window and sets av and ap
    * accordingly
@@ -193,7 +193,8 @@ public class Finder extends GFinder
     for (int f = 0; f < frames.length; f++)
     {
       JInternalFrame alignFrame = frames[f];
-      if (alignFrame != null && alignFrame instanceof AlignFrame)
+      if (alignFrame != null && alignFrame instanceof AlignFrame
+              && !alignFrame.isIcon())
       {
         av = ((AlignFrame) alignFrame).viewport;
         ap = ((AlignFrame) alignFrame).alignPanel;
@@ -210,8 +211,8 @@ public class Finder extends GFinder
   @Override
   public void createFeatures_actionPerformed()
   {
-    List<SequenceI> seqs = new ArrayList<SequenceI>();
-    List<SequenceFeature> features = new ArrayList<SequenceFeature>();
+    List<SequenceI> seqs = new ArrayList<>();
+    List<SequenceFeature> features = new ArrayList<>();
 
     String searchString = searchBox.getEditor().getItem().toString().trim();
     String desc = "Search Results";
@@ -261,55 +262,48 @@ public class Finder extends GFinder
     // other stuff
     // TODO: add switches to control what is searched - sequences, IDS,
     // descriptions, features
-    jalview.analysis.Finder finder = new jalview.analysis.Finder(
-            av.getAlignment(), av.getSelectionGroup(), seqIndex, resIndex);
-    finder.setCaseSensitive(caseSensitive.isSelected());
-    finder.setIncludeDescription(searchDescription.isSelected());
-
-    finder.setFindAll(doFindAll);
-
-    finder.find(searchString); // returns true if anything was actually found
-
-    seqIndex = finder.getSeqIndex();
-    resIndex = finder.getResIndex();
+    FinderI finder = finders.get(av);
+    if (finder == null)
+    {
+      /*
+       * first time we've searched this viewport
+       */
+      finder = new jalview.analysis.Finder(av);
+      finders.put(av, finder);
+    }
 
-    searchResults = finder.getSearchResults(); // find(regex,
-    // caseSensitive.isSelected(), )
-    Vector<SequenceI> idMatch = finder.getIdMatch();
-    boolean haveResults = false;
-    // set or reset the GUI
-    if ((idMatch.size() > 0))
+    boolean isCaseSensitive = caseSensitive.isSelected();
+    boolean doSearchDescription = searchDescription.isSelected();
+    if (doFindAll)
     {
-      haveResults = true;
-      ap.getIdPanel().highlightSearchResults(idMatch);
+      finder.findAll(searchString, isCaseSensitive, doSearchDescription);
     }
     else
     {
-      ap.getIdPanel().highlightSearchResults(null);
+      finder.findNext(searchString, isCaseSensitive, doSearchDescription);
     }
 
-    if (searchResults.getSize() > 0)
+    searchResults = finder.getSearchResults();
+    List<SequenceI> idMatch = finder.getIdMatches();
+    ap.getIdPanel().highlightSearchResults(idMatch);
+
+    if (searchResults.isEmpty())
     {
-      haveResults = true;
-      createFeatures.setEnabled(true);
+      searchResults = null;
     }
     else
     {
-      searchResults = null;
+      createFeatures.setEnabled(true);
     }
 
-    // if allResults is null, this effectively switches displaySearch flag in
-    // seqCanvas
     ap.highlightSearchResults(searchResults);
     // TODO: add enablers for 'SelectSequences' or 'SelectColumns' or
     // 'SelectRegion' selection
-    if (!haveResults)
+    if (idMatch.isEmpty() && searchResults == null)
     {
       JvOptionPane.showInternalMessageDialog(this,
               MessageManager.getString("label.finished_searching"), null,
               JvOptionPane.INFORMATION_MESSAGE);
-      resIndex = -1;
-      seqIndex = 0;
     }
     else
     {
@@ -329,8 +323,6 @@ public class Finder extends GFinder
         }
         JvOptionPane.showInternalMessageDialog(this, message, null,
                 JvOptionPane.INFORMATION_MESSAGE);
-        resIndex = -1;
-        seqIndex = 0;
       }
     }
     searchBox.updateCache();
index c66f304..92cc4c6 100755 (executable)
@@ -87,7 +87,7 @@ public class FontChooser extends GFontChooser
   public FontChooser(TreePanel treePanel)
   {
     this.tp = treePanel;
-    ap = treePanel.treeCanvas.ap;
+    ap = treePanel.getTreeCanvas().getAssociatedPanel();
     oldFont = treePanel.getTreeFont();
     defaultButton.setVisible(false);
     smoothFont.setEnabled(false);
index f2d8113..810fc92 100644 (file)
@@ -20,6 +20,7 @@
  */
 package jalview.gui;
 
+import java.awt.Point;
 import java.net.URL;
 
 import javax.help.BadIDException;
@@ -28,17 +29,17 @@ import javax.help.HelpSet;
 import javax.help.HelpSetException;
 
 /**
- * Utility class to show the help documentation window.
+ * Utility class to show the help documentation window
  * 
  * @author gmcarstairs
- *
  */
 public class Help
 {
   public enum HelpId
   {
     Home("home"), SequenceFeatureSettings("seqfeatures.settings"),
-    StructureViewer("viewingpdbs");
+    StructureViewer("viewingpdbs"), PdbFts("pdbfts"),
+    UniprotFts("uniprotfts");
 
     private String id;
 
@@ -54,9 +55,7 @@ public class Help
     }
   }
 
-  private static final long HALF_A_MO = 500; // half a second
-
-  private static long lastOpenedTime = 0L;
+  private static HelpBroker hb;
 
   /**
    * Not instantiable
@@ -67,42 +66,50 @@ public class Help
   }
 
   /**
-   * Show help text in a new window. But do nothing if within half a second of
-   * the last invocation.
-   * 
-   * This is a workaround for issue JAL-914 - both Desktop and AlignFrame
-   * responding to F1 key, resulting in duplicate help windows opened.
+   * Shows the help window, at the entry specified by the given helpId
    * 
    * @param id
-   *          TODO
    * 
    * @throws HelpSetException
    */
   public static void showHelpWindow(HelpId id) throws HelpSetException
   {
-    long timeNow = System.currentTimeMillis();
+    ClassLoader cl = Desktop.class.getClassLoader();
+    URL url = HelpSet.findHelpSet(cl, "help/help"); // $NON-NLS-$
+    HelpSet hs = new HelpSet(cl, url);
 
-    if (timeNow - lastOpenedTime > HALF_A_MO)
+    if (hb == null)
     {
-      lastOpenedTime = timeNow;
-      ClassLoader cl = Desktop.class.getClassLoader();
-      URL url = HelpSet.findHelpSet(cl, "help/help"); // $NON-NLS-$
-      HelpSet hs = new HelpSet(cl, url);
+      /*
+       * create help broker first time (only)
+       */
+      hb = hs.createHelpBroker();
+    }
 
-      HelpBroker hb = hs.createHelpBroker();
-      try
-      {
-        hb.setCurrentID(id.toString());
-      } catch (BadIDException bad)
-      {
-        System.out.println("Bad help link: " + id.toString()
-                + ": must match a target in help.jhm");
-        throw bad;
-      }
-      hb.setDisplayed(true);
+    try
+    {
+      hb.setCurrentID(id.toString());
+    } catch (BadIDException bad)
+    {
+      System.out.println("Bad help link: " + id.toString()
+              + ": must match a target in help.jhm");
+      throw bad;
     }
+
+    /*
+     * set Help visible - at its current location if it is already shown,
+     * else at a location as determined by the window manager
+     */
+    Point p = hb.getLocation();
+    hb.setLocation(p);
+    hb.setDisplayed(true);
   }
 
+  /**
+   * Show the Help window at the root entry
+   * 
+   * @throws HelpSetException
+   */
   public static void showHelpWindow() throws HelpSetException
   {
     showHelpWindow(HelpId.Home);
index cf88c90..951db78 100755 (executable)
@@ -380,12 +380,6 @@ public class IdCanvas extends JPanel implements ViewportListenerI
     int alignmentWidth = alignViewport.getAlignment().getWidth();
     final int alheight = alignViewport.getAlignment().getHeight();
 
-    if (alignViewport.hasHiddenColumns())
-    {
-      alignmentWidth = alignViewport.getAlignment().getHiddenColumns()
-              .absoluteToVisibleColumn(alignmentWidth) - 1;
-    }
-
     int annotationHeight = 0;
 
     AnnotationLabels labels = null;
index a183144..d11d7a1 100755 (executable)
  */
 package jalview.gui;
 
+import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.Sequence;
 import jalview.datamodel.SequenceFeature;
 import jalview.datamodel.SequenceGroup;
 import jalview.datamodel.SequenceI;
+import jalview.gui.SeqPanel.MousePos;
 import jalview.io.SequenceAnnotationReport;
 import jalview.util.MessageManager;
 import jalview.util.Platform;
 import jalview.viewmodel.AlignmentViewport;
+import jalview.viewmodel.ViewportRanges;
 
 import java.awt.BorderLayout;
 import java.awt.event.MouseEvent;
@@ -38,6 +41,7 @@ import java.awt.event.MouseWheelListener;
 import java.util.List;
 
 import javax.swing.JPanel;
+import javax.swing.JPopupMenu;
 import javax.swing.SwingUtilities;
 import javax.swing.ToolTipManager;
 
@@ -92,25 +96,46 @@ public class IdPanel extends JPanel
   }
 
   /**
-   * Respond to mouse movement by constructing tooltip text for the sequence id
-   * under the mouse.
+   * Responds to mouse movement by setting tooltip text for the sequence id
+   * under the mouse (or possibly annotation label, when in wrapped mode)
    * 
    * @param e
-   *          DOCUMENT ME!
    */
   @Override
   public void mouseMoved(MouseEvent e)
   {
     SeqPanel sp = alignPanel.getSeqPanel();
-    int seq = Math.max(0, sp.findSeq(e));
-    if (seq > -1 && seq < av.getAlignment().getHeight())
+    MousePos pos = sp.findMousePosition(e);
+    if (pos.isOverAnnotation())
+    {
+      /*
+       * mouse is over an annotation label in wrapped mode
+       */
+      AlignmentAnnotation[] anns = av.getAlignment()
+              .getAlignmentAnnotation();
+      AlignmentAnnotation annotation = anns[pos.annotationIndex];
+      setToolTipText(AnnotationLabels.getTooltip(annotation));
+      alignPanel.alignFrame.setStatus(
+              AnnotationLabels.getStatusMessage(annotation, anns));
+    }
+    else
     {
-      SequenceI sequence = av.getAlignment().getSequenceAt(seq);
-      StringBuilder tip = new StringBuilder(64);
-      seqAnnotReport.createTooltipAnnotationReport(tip, sequence,
-              av.isShowDBRefs(), av.isShowNPFeats(), sp.seqCanvas.fr);
-      setToolTipText(JvSwingUtils.wrapTooltip(true,
-              sequence.getDisplayId(true) + " " + tip.toString()));
+      int seq = Math.max(0, pos.seqIndex);
+      if (seq < av.getAlignment().getHeight())
+      {
+        SequenceI sequence = av.getAlignment().getSequenceAt(seq);
+        StringBuilder tip = new StringBuilder(64);
+        tip.append(sequence.getDisplayId(true)).append(" ");
+        seqAnnotReport.createTooltipAnnotationReport(tip, sequence,
+                av.isShowDBRefs(), av.isShowNPFeats(), sp.seqCanvas.fr);
+        setToolTipText(JvSwingUtils.wrapTooltip(true, tip.toString()));
+
+        StringBuilder text = new StringBuilder();
+        text.append("Sequence ").append(String.valueOf(seq + 1))
+                .append(" ID: ")
+                .append(sequence.getName());
+        alignPanel.alignFrame.setStatus(text.toString());
+      }
     }
   }
 
@@ -125,7 +150,14 @@ public class IdPanel extends JPanel
   {
     mouseDragging = true;
 
-    int seq = Math.max(0, alignPanel.getSeqPanel().findSeq(e));
+    MousePos pos = alignPanel.getSeqPanel().findMousePosition(e);
+    if (pos.isOverAnnotation())
+    {
+      // mouse is over annotation label in wrapped mode
+      return;
+    }
+
+    int seq = Math.max(0, pos.seqIndex);
 
     if (seq < lastid)
     {
@@ -196,7 +228,13 @@ public class IdPanel extends JPanel
       return;
     }
 
-    int seq = alignPanel.getSeqPanel().findSeq(e);
+    MousePos pos = alignPanel.getSeqPanel().findMousePosition(e);
+    int seq = pos.seqIndex;
+    if (pos.isOverAnnotation() || seq < 0)
+    {
+      return;
+    }
+
     String id = av.getAlignment().getSequenceAt(seq).getName();
     String url = Preferences.sequenceUrlLinks.getPrimaryUrl(id);
 
@@ -224,7 +262,7 @@ public class IdPanel extends JPanel
   {
     if (scrollThread != null)
     {
-      scrollThread.running = false;
+      scrollThread.stopScrolling();
     }
   }
 
@@ -276,9 +314,11 @@ public class IdPanel extends JPanel
       return;
     }
 
+    MousePos pos = alignPanel.getSeqPanel().findMousePosition(e);
+    
     if (e.isPopupTrigger()) // Mac reports this in mousePressed
     {
-      showPopupMenu(e);
+      showPopupMenu(e, pos);
       return;
     }
 
@@ -301,14 +341,13 @@ public class IdPanel extends JPanel
       av.getSelectionGroup().setEndRes(av.getAlignment().getWidth() - 1);
     }
 
-    int seq = alignPanel.getSeqPanel().findSeq(e);
     if (e.isShiftDown() && (lastid != -1))
     {
-      selectSeqs(lastid, seq);
+      selectSeqs(lastid, pos.seqIndex);
     }
     else
     {
-      selectSeq(seq);
+      selectSeq(pos.seqIndex);
     }
 
     av.isSelectionGroupChanged(true);
@@ -321,27 +360,33 @@ public class IdPanel extends JPanel
    * 
    * @param e
    */
-  void showPopupMenu(MouseEvent e)
+  void showPopupMenu(MouseEvent e, MousePos pos)
   {
-    int seq2 = alignPanel.getSeqPanel().findSeq(e);
-    Sequence sq = (Sequence) av.getAlignment().getSequenceAt(seq2);
+    if (pos.isOverAnnotation())
+    {
+      showAnnotationMenu(e, pos);
+      return;
+    }
+
+    Sequence sq = (Sequence) av.getAlignment().getSequenceAt(pos.seqIndex);
 
     /*
      *  build a new links menu based on the current links
      *  and any non-positional features
      */
+    List<SequenceFeature> features = null;
+    if (sq != null)
+    {
     List<String> nlinks = Preferences.sequenceUrlLinks.getLinksForMenu();
-    List<SequenceFeature> features = sq.getFeatures().getNonPositionalFeatures();
+      features = sq.getFeatures().getNonPositionalFeatures();
     for (SequenceFeature sf : features)
     {
       if (sf.links != null)
       {
-        for (String link : sf.links)
-        {
-          nlinks.add(link);
-        }
+        nlinks.addAll(sf.links);
       }
     }
+    }
 
     PopupMenu pop = new PopupMenu(alignPanel, sq, features,
             Preferences.getGroupURLLinks());
@@ -349,6 +394,38 @@ public class IdPanel extends JPanel
   }
 
   /**
+   * On right mouse click on a Consensus annotation label, shows a limited popup
+   * menu, with options to configure the consensus calculation and rendering.
+   * 
+   * @param e
+   * @param pos
+   * @see AnnotationLabels#showPopupMenu(MouseEvent)
+   */
+  void showAnnotationMenu(MouseEvent e, MousePos pos)
+  {
+    if (pos.annotationIndex == -1)
+    {
+      return;
+    }
+    AlignmentAnnotation[] anns = this.av.getAlignment()
+            .getAlignmentAnnotation();
+    if (anns == null || pos.annotationIndex >= anns.length)
+    {
+      return;
+    }
+    AlignmentAnnotation ann = anns[pos.annotationIndex];
+    if (!ann.label.contains("Consensus"))
+    {
+      return;
+    }
+
+    JPopupMenu pop = new JPopupMenu(
+            MessageManager.getString("label.annotations"));
+    AnnotationLabels.addConsensusMenuOptions(this.alignPanel, ann, pop);
+    pop.show(this, e.getX(), e.getY());
+  }
+
+  /**
    * Toggle whether the sequence is part of the current selection group.
    * 
    * @param seq
@@ -358,7 +435,7 @@ public class IdPanel extends JPanel
     lastid = seq;
 
     SequenceI pickedSeq = av.getAlignment().getSequenceAt(seq);
-    av.getSelectionGroup().addOrRemove(pickedSeq, true);
+    av.getSelectionGroup().addOrRemove(pickedSeq, false);
   }
 
   /**
@@ -393,7 +470,7 @@ public class IdPanel extends JPanel
     for (int i = start; i <= end; i++)
     {
       av.getSelectionGroup().addSequence(av.getAlignment().getSequenceAt(i),
-              i == end);
+              false);
     }
   }
 
@@ -408,8 +485,9 @@ public class IdPanel extends JPanel
   {
     if (scrollThread != null)
     {
-      scrollThread.running = false;
+      scrollThread.stopScrolling();
     }
+    MousePos pos = alignPanel.getSeqPanel().findMousePosition(e);
 
     mouseDragging = false;
     PaintRefresher.Refresh(this, av.getSequenceSetId());
@@ -418,7 +496,7 @@ public class IdPanel extends JPanel
 
     if (e.isPopupTrigger()) // Windows reports this in mouseReleased
     {
-      showPopupMenu(e);
+      showPopupMenu(e, pos);
     }
   }
 
@@ -432,7 +510,7 @@ public class IdPanel extends JPanel
   {
     getIdCanvas().setHighlighted(list);
 
-    if (list == null)
+    if (list == null || list.isEmpty())
     {
       return;
     }
@@ -457,24 +535,42 @@ public class IdPanel extends JPanel
     this.idCanvas = idCanvas;
   }
 
-  // this class allows scrolling off the bottom of the visible alignment
+  /**
+   * Performs scrolling of the visible alignment up or down, adding newly
+   * visible sequences to the current selection
+   */
   class ScrollThread extends Thread
   {
-    boolean running = false;
+    private boolean running = false;
 
-    boolean up = true;
+    private boolean up;
 
+    /**
+     * Constructor for a thread that scrolls either up or down
+     * 
+     * @param up
+     */
     public ScrollThread(boolean up)
     {
       this.up = up;
+      setName("IdPanel$ScrollThread$" + String.valueOf(up));
       start();
     }
 
+    /**
+     * Sets a flag to stop the scrolling
+     */
     public void stopScrolling()
     {
       running = false;
     }
 
+    /**
+     * Scrolls the alignment either up or down, one row at a time, adding newly
+     * visible sequences to the current selection. Speed is limited to a maximum
+     * of ten rows per second. The thread exits when the end of the alignment is
+     * reached or a flag is set to stop it.
+     */
     @Override
     public void run()
     {
@@ -482,29 +578,20 @@ public class IdPanel extends JPanel
 
       while (running)
       {
-        if (av.getRanges().scrollUp(up))
+        ViewportRanges ranges = IdPanel.this.av.getRanges();
+        if (ranges.scrollUp(up))
         {
-          // scroll was ok, so add new sequence to selection
-          int seq = av.getRanges().getStartSeq();
-
-          if (!up)
-          {
-            seq = av.getRanges().getEndSeq();
-          }
-
-          if (seq < lastid)
-          {
-            selectSeqs(lastid - 1, seq);
-          }
-          else if (seq > lastid)
-          {
-            selectSeqs(lastid + 1, seq);
-          }
-
-          lastid = seq;
+          int toSeq = up ? ranges.getStartSeq() : ranges.getEndSeq();
+          int fromSeq = toSeq < lastid ? lastid - 1 : lastid + 1;
+          IdPanel.this.selectSeqs(fromSeq, toSeq);
+
+          lastid = toSeq;
         }
         else
         {
+          /*
+           * scroll did nothing - reached limit of visible alignment
+           */
           running = false;
         }
 
diff --git a/src/jalview/gui/Jalview2XML_V1.java b/src/jalview/gui/Jalview2XML_V1.java
deleted file mode 100755 (executable)
index 331e738..0000000
+++ /dev/null
@@ -1,513 +0,0 @@
-/*
- * 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 jalview.analysis.Conservation;
-import jalview.binding.Annotation;
-import jalview.binding.AnnotationElement;
-import jalview.binding.Features;
-import jalview.binding.JGroup;
-import jalview.binding.JSeq;
-import jalview.binding.JalviewModel;
-import jalview.binding.JalviewModelSequence;
-import jalview.binding.Pdbids;
-import jalview.binding.Sequence;
-import jalview.binding.SequenceSet;
-import jalview.binding.Setting;
-import jalview.binding.Tree;
-import jalview.binding.UserColours;
-import jalview.binding.Viewport;
-import jalview.datamodel.PDBEntry;
-import jalview.datamodel.SequenceFeature;
-import jalview.io.FileFormat;
-import jalview.schemes.ColourSchemeI;
-import jalview.schemes.ColourSchemeProperty;
-import jalview.structure.StructureSelectionManager;
-import jalview.util.MessageManager;
-import jalview.util.jarInputStreamProvider;
-import jalview.viewmodel.seqfeatures.FeatureRendererSettings;
-
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.net.UnknownHostException;
-import java.util.Hashtable;
-import java.util.Vector;
-import java.util.jar.JarEntry;
-import java.util.jar.JarInputStream;
-
-/**
- * DOCUMENT ME!
- * 
- * @author $author$
- * @version $Revision$
- */
-public class Jalview2XML_V1
-{
-  boolean raiseGUI = true;
-
-  public Jalview2XML_V1()
-  {
-
-  };
-
-  public Jalview2XML_V1(boolean raiseGUI)
-  {
-    this.raiseGUI = raiseGUI;
-  };
-
-  jalview.schemes.UserColourScheme GetUserColourScheme(
-          JalviewModelSequence jms, String id)
-  {
-    UserColours[] uc = jms.getUserColours();
-    UserColours colours = null;
-
-    for (int i = 0; i < uc.length; i++)
-    {
-      if (uc[i].getId().equals(id))
-      {
-        colours = uc[i];
-
-        break;
-      }
-    }
-
-    int csize = colours.getUserColourScheme().getColourCount();
-    java.awt.Color[] newColours = new java.awt.Color[csize];
-
-    for (int i = 0; i < csize; i++)
-    {
-      newColours[i] = new java.awt.Color(Integer.parseInt(
-              colours.getUserColourScheme().getColour(i).getRGB(), 16));
-    }
-
-    return new jalview.schemes.UserColourScheme(newColours);
-  }
-
-  /**
-   * DOCUMENT ME!
-   * 
-   * @param file
-   *          DOCUMENT ME!
-   */
-  public AlignFrame LoadJalviewAlign(final jarInputStreamProvider jprovider)
-  {
-    final String file = jprovider.getFilename();
-    jalview.gui.AlignFrame af = null;
-
-    try
-    {
-      JarInputStream jin = null;
-      JarEntry jarentry = null;
-      int entryCount = 1;
-
-      do
-      {
-        jin = jprovider.getJarInputStream();
-
-        for (int i = 0; i < entryCount; i++)
-        {
-          jarentry = jin.getNextJarEntry();
-        }
-
-        if (jarentry != null)
-        {
-          entryCount++;
-          if (jarentry.getName().endsWith(".xml"))
-          {
-            Reader in = new InputStreamReader(jin, "UTF-8");
-            JalviewModel object = new JalviewModel();
-
-            object = object.unmarshal(in);
-
-            af = LoadFromObject(object, file);
-          }
-        }
-        jin.close();
-      } while (jarentry != null);
-    } catch (final UnknownHostException ex)
-    {
-      ex.printStackTrace();
-      if (raiseGUI)
-      {
-        javax.swing.SwingUtilities.invokeLater(new Runnable()
-        {
-          @Override
-          public void run()
-          {
-
-            System.err.println(
-                    "Couldn't locate Jalview XML file : " + ex + "\n");
-            JvOptionPane.showInternalMessageDialog(Desktop.desktop,
-                    MessageManager.formatMessage("label.couldnt_locate",
-                            new String[]
-                            { file }),
-                    MessageManager.getString("label.url_not_found"),
-                    JvOptionPane.WARNING_MESSAGE);
-          }
-        });
-      }
-      ;
-    } catch (Exception ex)
-    {
-      System.err.println("Exception whilst loading jalview XML file : ");
-      ex.printStackTrace();
-      if (raiseGUI)
-      {
-        javax.swing.SwingUtilities.invokeLater(new Runnable()
-        {
-          @Override
-          public void run()
-          {
-
-            JvOptionPane.showInternalMessageDialog(Desktop.desktop,
-                    MessageManager.formatMessage(
-                            "label.error_loading_file_params", new String[]
-                            { file }),
-                    MessageManager
-                            .getString("label.error_loading_jalview_file"),
-                    JvOptionPane.WARNING_MESSAGE);
-          }
-        });
-      }
-    }
-
-    return af;
-  }
-
-  AlignFrame LoadFromObject(JalviewModel object, String file)
-  {
-    Vector seqids = new Vector();
-    SequenceSet vamsasSet = object.getVamsasModel().getSequenceSet(0);
-    Sequence[] vamsasSeq = vamsasSet.getSequence();
-
-    JalviewModelSequence jms = object.getJalviewModelSequence();
-
-    // ////////////////////////////////
-    // LOAD SEQUENCES
-    jalview.datamodel.Sequence[] jseqs = new jalview.datamodel.Sequence[vamsasSeq.length];
-    JSeq[] JSEQ = object.getJalviewModelSequence().getJSeq();
-    for (int i = 0; i < vamsasSeq.length; i++)
-    {
-      jseqs[i] = new jalview.datamodel.Sequence(vamsasSeq[i].getName(),
-              vamsasSeq[i].getSequence());
-      jseqs[i].setStart(JSEQ[i].getStart());
-      jseqs[i].setEnd(JSEQ[i].getEnd());
-      seqids.add(jseqs[i]);
-    }
-
-    // /SequenceFeatures are added to the DatasetSequence,
-    // so we must create the dataset before loading features
-    // ///////////////////////////////
-    jalview.datamodel.Alignment al = new jalview.datamodel.Alignment(jseqs);
-    al.setDataset(null);
-    // ///////////////////////////////
-
-    for (int i = 0; i < vamsasSeq.length; i++)
-    {
-      if (JSEQ[i].getFeaturesCount() > 0)
-      {
-        Features[] features = JSEQ[i].getFeatures();
-        for (int f = 0; f < features.length; f++)
-        {
-          SequenceFeature sf = new SequenceFeature(features[f].getType(),
-                  features[f].getDescription(), features[f].getBegin(),
-                  features[f].getEnd(), null);
-          sf.setStatus(features[f].getStatus());
-          al.getSequenceAt(i).getDatasetSequence().addSequenceFeature(sf);
-        }
-      }
-      if (JSEQ[i].getPdbidsCount() > 0)
-      {
-        Pdbids[] ids = JSEQ[i].getPdbids();
-        for (int p = 0; p < ids.length; p++)
-        {
-          jalview.datamodel.PDBEntry entry = new jalview.datamodel.PDBEntry();
-          entry.setId(ids[p].getId());
-          if (ids[p].getType() != null)
-          {
-            if (ids[p].getType().equalsIgnoreCase("PDB"))
-            {
-              entry.setType(PDBEntry.Type.PDB);
-            }
-            else
-            {
-              entry.setType(PDBEntry.Type.FILE);
-            }
-          }
-          al.getSequenceAt(i).getDatasetSequence().addPDBId(entry);
-          StructureSelectionManager
-                  .getStructureSelectionManager(Desktop.instance)
-                  .registerPDBEntry(entry);
-        }
-
-      }
-    }
-
-    // ///////////////////////////////
-    // ////////////////////////////////
-    // LOAD ANNOTATIONS
-    if (vamsasSet.getAnnotation() != null)
-    {
-      Annotation[] an = vamsasSet.getAnnotation();
-
-      for (int i = 0; i < an.length; i++)
-      {
-        AnnotationElement[] ae = an[i].getAnnotationElement();
-        jalview.datamodel.Annotation[] anot = new jalview.datamodel.Annotation[al
-                .getWidth()];
-
-        for (int aa = 0; aa < ae.length; aa++)
-        {
-          anot[ae[aa].getPosition()] = new jalview.datamodel.Annotation(
-                  ae[aa].getDisplayCharacter(), ae[aa].getDescription(),
-                  ae[aa].getSecondaryStructure().charAt(0),
-                  ae[aa].getValue());
-        }
-
-        jalview.datamodel.AlignmentAnnotation jaa = null;
-
-        if (an[i].getGraph())
-        {
-          jaa = new jalview.datamodel.AlignmentAnnotation(an[i].getLabel(),
-                  an[i].getDescription(), anot, 0, 0,
-                  jalview.datamodel.AlignmentAnnotation.BAR_GRAPH);
-        }
-        else
-        {
-          jaa = new jalview.datamodel.AlignmentAnnotation(an[i].getLabel(),
-                  an[i].getDescription(), anot);
-        }
-
-        al.addAnnotation(jaa);
-      }
-    }
-
-    // ///////////////////////////////
-    // LOAD VIEWPORT
-    Viewport[] views = jms.getViewport();
-    Viewport view = views[0]; // DEAL WITH MULTIPLE VIEWPORTS LATER
-
-    AlignFrame af = new AlignFrame(al, view.getWidth(), view.getHeight());
-
-    af.setFileName(file, FileFormat.Jalview);
-
-    for (int i = 0; i < JSEQ.length; i++)
-    {
-      af.viewport.setSequenceColour(
-              af.viewport.getAlignment().getSequenceAt(i),
-              new java.awt.Color(JSEQ[i].getColour()));
-    }
-
-    // af.changeColour() );
-    // ///////////////////////
-    // LOAD GROUPS
-    if (jms.getJGroupCount() > 0)
-    {
-      JGroup[] groups = jms.getJGroup();
-
-      for (int i = 0; i < groups.length; i++)
-      {
-        ColourSchemeI cs = null;
-
-        if (groups[i].getColour() != null)
-        {
-          if (groups[i].getColour().startsWith("ucs"))
-          {
-            cs = GetUserColourScheme(jms, groups[i].getColour());
-          }
-          else
-          {
-            cs = ColourSchemeProperty.getColourScheme(al,
-                    groups[i].getColour());
-          }
-        }
-        int pidThreshold = groups[i].getPidThreshold();
-
-        Vector seqs = new Vector();
-        int[] ids = groups[i].getSeq();
-
-        for (int s = 0; s < ids.length; s++)
-        {
-          seqs.addElement(seqids.elementAt(ids[s]));
-        }
-
-        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());
-        sg.getGroupColourScheme().setThreshold(pidThreshold, true);
-
-        sg.setOutlineColour(
-                new java.awt.Color(groups[i].getOutlineColour()));
-
-        if (groups[i].getConsThreshold() != 0)
-        {
-          Conservation c = new Conservation("All", sg.getSequences(null), 0,
-                  sg.getWidth() - 1);
-          c.calculate();
-          c.verdict(false, 25);
-          sg.cs.setConservation(c);
-        }
-
-        al.addGroup(sg);
-      }
-    }
-
-    af.setBounds(view.getXpos(), view.getYpos(), view.getWidth(),
-            view.getHeight());
-    af.viewport.getRanges().setStartRes(view.getStartRes());
-    // startSeq set in af.alignPanel.updateLayout below
-    af.viewport.setShowAnnotation(view.getShowAnnotation());
-    af.viewport.setAbovePIDThreshold(view.getPidSelected());
-    af.viewport.setColourText(view.getShowColourText());
-    af.viewport.setConservationSelected(view.getConservationSelected());
-    af.viewport.setShowJVSuffix(view.getShowFullId());
-    af.viewport.setFont(new java.awt.Font(view.getFontName(),
-            view.getFontStyle(), view.getFontSize()), true);
-
-    af.viewport.setRenderGaps(view.getRenderGaps());
-    af.viewport.setWrapAlignment(view.getWrapAlignment());
-
-    af.viewport.setShowAnnotation(view.isShowAnnotation());
-    af.viewport.setShowBoxes(view.getShowBoxes());
-    af.viewport.setShowText(view.getShowText());
-
-    ColourSchemeI cs = null;
-
-    if (view.getBgColour() != null)
-    {
-      if (view.getBgColour().startsWith("ucs"))
-      {
-        cs = GetUserColourScheme(jms, view.getBgColour());
-      }
-      else
-      {
-        cs = ColourSchemeProperty.getColourScheme(al, view.getBgColour());
-      }
-
-      // if (cs != null)
-      // {
-      // cs.setThreshold(view.getPidThreshold(), true);
-      // cs.setConsensus(af.viewport.getSequenceConsensusHash());
-      // }
-    }
-
-    af.viewport.getResidueShading().setThreshold(view.getPidThreshold(),
-            true);
-    af.viewport.getResidueShading()
-            .setConsensus(af.viewport.getSequenceConsensusHash());
-    af.viewport.setColourAppliesToAllGroups(false);
-    af.alignPanel.updateLayout();
-    af.changeColour(cs);
-    if (view.getConservationSelected() && cs != null)
-    {
-      af.viewport.getResidueShading()
-              .setConservationInc(view.getConsThreshold());
-    }
-
-    af.viewport.setColourAppliesToAllGroups(true);
-    af.viewport.setShowSequenceFeatures(view.getShowSequenceFeatures());
-
-    if (jms.getFeatureSettings() != null)
-    {
-      Hashtable featuresDisplayed = new Hashtable();
-      Hashtable featureColours = new Hashtable();
-      String[] renderOrder = new String[jms.getFeatureSettings()
-              .getSettingCount()];
-      for (int fs = 0; fs < jms.getFeatureSettings()
-              .getSettingCount(); fs++)
-      {
-        Setting setting = jms.getFeatureSettings().getSetting(fs);
-
-        featureColours.put(setting.getType(),
-                new java.awt.Color(setting.getColour()));
-
-        renderOrder[fs] = setting.getType();
-
-        if (setting.getDisplay())
-        {
-          featuresDisplayed.put(setting.getType(),
-                  new Integer(setting.getColour()));
-        }
-      }
-      FeatureRendererSettings frs = new FeatureRendererSettings(renderOrder,
-              new Hashtable(), featureColours, 1.0f, null);
-      af.alignPanel.getSeqPanel().seqCanvas.getFeatureRenderer()
-              .transferSettings(frs);
-    }
-
-    af.setMenusFromViewport(af.viewport);
-
-    Desktop.addInternalFrame(af, view.getTitle(), view.getWidth(),
-            view.getHeight());
-
-    // LOAD TREES
-    // /////////////////////////////////////
-    if (jms.getTreeCount() > 0)
-    {
-      try
-      {
-        for (int t = 0; t < jms.getTreeCount(); t++)
-        {
-
-          Tree tree = jms.getTree(t);
-
-          TreePanel tp = af.showNewickTree(
-                  new jalview.io.NewickFile(tree.getNewick()),
-                  tree.getTitle(), tree.getWidth(), tree.getHeight(),
-                  tree.getXpos(), tree.getYpos());
-
-          tp.fitToWindow.setState(tree.getFitToWindow());
-          tp.fitToWindow_actionPerformed(null);
-
-          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()));
-          }
-
-          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());
-          }
-        }
-
-      } catch (Exception ex)
-      {
-        ex.printStackTrace();
-      }
-
-    }
-
-    return af;
-  }
-}
diff --git a/src/jalview/gui/JalviewBooleanRadioButtons.java b/src/jalview/gui/JalviewBooleanRadioButtons.java
new file mode 100644 (file)
index 0000000..1f0c35a
--- /dev/null
@@ -0,0 +1,107 @@
+package jalview.gui;
+
+import java.awt.Font;
+import java.awt.event.ActionListener;
+
+import javax.swing.AbstractButton;
+import javax.swing.ButtonGroup;
+import javax.swing.JRadioButton;
+
+public class JalviewBooleanRadioButtons extends AbstractButton
+{
+  private static final Font LABEL_FONT = JvSwingUtils.getLabelFont();
+
+  private ButtonGroup buttonGroup = new ButtonGroup();
+
+  private JRadioButton buttonTrue = new JRadioButton();
+
+  private JRadioButton buttonFalse = new JRadioButton();
+
+  public JalviewBooleanRadioButtons(boolean value, String trueLabel,
+          String falseLabel)
+  {
+    init();
+    this.setLabels(trueLabel, falseLabel);
+  }
+
+  public JalviewBooleanRadioButtons(boolean value)
+  {
+    init();
+    setSelected(value);
+  }
+
+  public JalviewBooleanRadioButtons()
+  {
+    init();
+  }
+
+  protected void init()
+  {
+    buttonTrue.setFont(LABEL_FONT);
+    buttonFalse.setFont(LABEL_FONT);
+    buttonGroup.add(buttonTrue);
+    buttonGroup.add(buttonFalse);
+  }
+
+  public void setLabels(String trueLabel, String falseLabel)
+  {
+    buttonTrue.setText(trueLabel);
+    buttonFalse.setText(falseLabel);
+  }
+
+  @Override
+  public void setSelected(boolean b)
+  {
+    buttonFalse.setSelected(!b);
+    // this should probably happen automatically, no harm in forcing the issue!
+    // setting them this way round so the last setSelected is on buttonTrue
+    buttonTrue.setSelected(b);
+  }
+
+  @Override
+  public boolean isSelected()
+  {
+    // unambiguous selection
+    return buttonTrue.isSelected() && !buttonFalse.isSelected();
+  }
+
+  @Override
+  public void setEnabled(boolean b)
+  {
+    buttonTrue.setEnabled(b);
+    buttonFalse.setEnabled(b);
+  }
+
+  @Override
+  public boolean isEnabled()
+  {
+    return buttonTrue.isEnabled() && buttonFalse.isEnabled();
+  }
+
+  public JRadioButton getTrueButton()
+  {
+    return buttonTrue;
+  }
+
+  public JRadioButton getFalseButton()
+  {
+    return buttonFalse;
+  }
+  
+  @Override
+  public void addActionListener(ActionListener l)
+  {
+    buttonTrue.addActionListener(l);
+    buttonFalse.addActionListener(l);
+  }
+
+  public void addTrueActionListener(ActionListener l)
+  {
+    buttonTrue.addActionListener(l);
+  }
+
+  public void addFalseActionListener(ActionListener l)
+  {
+    buttonFalse.addActionListener(l);
+  }
+}
index 02d54a8..9d0a55d 100755 (executable)
@@ -86,7 +86,7 @@ public class OverviewPanel extends JPanel
     this.ap = alPanel;
 
     showHidden = Cache.getDefault(Preferences.SHOW_OV_HIDDEN_AT_START,
-            true);
+            false);
     if (showHidden)
     {
       od = new OverviewDimensionsShowHidden(av.getRanges(),
@@ -112,7 +112,7 @@ public class OverviewPanel extends JPanel
 
     // without this the overview window does not size to fit the overview canvas
     setPreferredSize(new Dimension(od.getWidth(), od.getHeight()));
-
+    
     addComponentListener(new ComponentAdapter()
     {
       @Override
@@ -170,22 +170,23 @@ public class OverviewPanel extends JPanel
       @Override
       public void mouseMoved(MouseEvent evt)
       {
-        if (!draggingBox)
-        // don't bother changing the cursor if we're dragging the box
-        // as we can't have moved inside or out of the box in that case
+        if (od.isPositionInBox(evt.getX(), evt.getY()))
         {
-          if (od.isPositionInBox(evt.getX(), evt.getY()))
-          {
-            // display drag cursor at mouse position
-            setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));
-          }
-          else
-          {
-            // reset cursor
-            setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
-          }
+          /*
+           * using HAND_CURSOR rather than DRAG_CURSOR 
+           * as the latter is not supported on Mac
+           */
+          getParent().setCursor(
+                  Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
+        }
+        else
+        {
+          // reset cursor
+          getParent().setCursor(
+                  Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR));
         }
       }
+
     });
 
     addMouseListener(new MouseAdapter()
@@ -215,6 +216,8 @@ public class OverviewPanel extends JPanel
             od.updateViewportFromMouse(evt.getX(), evt.getY(),
                     av.getAlignment().getHiddenSequences(),
                     av.getAlignment().getHiddenColumns());
+            getParent().setCursor(
+                    Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
           }
           else
           {
index 7ceceee..3388d4d 100644 (file)
 package jalview.gui;
 
 import jalview.analysis.scoremodels.ScoreModels;
-import jalview.analysis.scoremodels.SimilarityParams;
+import jalview.api.AlignViewportI;
 import jalview.api.analysis.ScoreModelI;
 import jalview.api.analysis.SimilarityParamsI;
+import jalview.bin.Cache;
 import jalview.datamodel.Alignment;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.AlignmentView;
 import jalview.datamodel.HiddenColumns;
 import jalview.datamodel.SequenceI;
 import jalview.jbgui.GPCAPanel;
+import jalview.math.RotatableMatrix.Axis;
+import jalview.util.ImageMaker;
 import jalview.util.MessageManager;
 import jalview.viewmodel.AlignmentViewport;
 import jalview.viewmodel.PCAModel;
@@ -46,7 +49,6 @@ import java.awt.print.PrinterException;
 import java.awt.print.PrinterJob;
 
 import javax.swing.ButtonGroup;
-import javax.swing.JCheckBoxMenuItem;
 import javax.swing.JColorChooser;
 import javax.swing.JMenuItem;
 import javax.swing.JRadioButtonMenuItem;
@@ -54,49 +56,30 @@ import javax.swing.event.InternalFrameAdapter;
 import javax.swing.event.InternalFrameEvent;
 
 /**
- * DOCUMENT ME!
- * 
- * @author $author$
- * @version $Revision$
+ * The panel holding the Principal Component Analysis 3-D visualisation
  */
 public class PCAPanel extends GPCAPanel
         implements Runnable, IProgressIndicator
 {
+  private static final int MIN_WIDTH = 470;
 
-  private IProgressIndicator progressBar;
+  private static final int MIN_HEIGHT = 250;
 
-  RotatableCanvas rc;
+  private RotatableCanvas rc;
 
   AlignmentPanel ap;
 
   AlignmentViewport av;
 
-  PCAModel pcaModel;
+  private PCAModel pcaModel;
 
-  private static final int MIN_WIDTH = 470;
-
-  private static final int MIN_HEIGHT = 250;
+  private int top = 0;
 
-  int top = 0;
+  private IProgressIndicator progressBar;
 
   private boolean working;
 
   /**
-   * Creates a new PCAPanel object using default score model and parameters
-   * 
-   * @param alignPanel
-   */
-  public PCAPanel(AlignmentPanel alignPanel)
-  {
-    this(alignPanel,
-            ScoreModels.getInstance()
-                    .getDefaultModel(
-                            !alignPanel.av.getAlignment().isNucleotide())
-                    .getName(),
-            SimilarityParams.SeqSpace);
-  }
-
-  /**
    * Constructor given sequence data, a similarity (or distance) score model
    * name, and score calculation parameters
    * 
@@ -138,14 +121,17 @@ public class PCAPanel extends GPCAPanel
 
     ScoreModelI scoreModel = ScoreModels.getInstance()
             .getScoreModel(modelName, ap);
-    pcaModel = new PCAModel(seqstrings, seqs, nucleotide, scoreModel,
-            params);
+    setPcaModel(new PCAModel(seqstrings, seqs, nucleotide, scoreModel,
+            params));
     PaintRefresher.Register(this, av.getSequenceSetId());
 
-    rc = new RotatableCanvas(alignPanel);
-    this.getContentPane().add(rc, BorderLayout.CENTER);
-    Thread worker = new Thread(this);
-    worker.start();
+    setRotatableCanvas(new RotatableCanvas(alignPanel));
+    this.getContentPane().add(getRotatableCanvas(), BorderLayout.CENTER);
+
+    addKeyListener(getRotatableCanvas());
+    validate();
+
+    this.setMinimumSize(new Dimension(MIN_WIDTH, MIN_HEIGHT));
   }
 
   /**
@@ -154,79 +140,30 @@ public class PCAPanel extends GPCAPanel
    */
   protected void close_actionPerformed()
   {
-    pcaModel = null;
-  }
-
-  /**
-   * Repopulate the options and actions under the score model menu when it is
-   * selected. Options will depend on whether 'nucleotide' or 'peptide'
-   * modelling is selected (and also possibly on whether any additional score
-   * models have been added).
-   */
-  @Override
-  protected void scoreModel_menuSelected()
-  {
-    scoreModelMenu.removeAll();
-    for (final ScoreModelI sm : ScoreModels.getInstance().getModels())
-    {
-      final String name = sm.getName();
-      JCheckBoxMenuItem jm = new JCheckBoxMenuItem(name);
-
-      /*
-       * if the score model doesn't provide a description, try to look one
-       * up in the text bundle, falling back on its name
-       */
-      String tooltip = sm.getDescription();
-      if (tooltip == null)
-      {
-        tooltip = MessageManager.getStringOrReturn("label.score_model_",
-                name);
-      }
-      jm.setToolTipText(tooltip);
-      jm.setSelected(pcaModel.getScoreModelName().equals(name));
-      if ((pcaModel.isNucleotide() && sm.isDNA())
-              || (!pcaModel.isNucleotide() && sm.isProtein()))
-      {
-        jm.addActionListener(new ActionListener()
-        {
-          @Override
-          public void actionPerformed(ActionEvent e)
-          {
-            if (!pcaModel.getScoreModelName().equals(name))
-            {
-              ScoreModelI sm2 = ScoreModels.getInstance()
-                      .getScoreModel(name, ap);
-              pcaModel.setScoreModel(sm2);
-              Thread worker = new Thread(PCAPanel.this);
-              worker.start();
-            }
-          }
-        });
-        scoreModelMenu.add(jm);
-      }
-    }
+    setPcaModel(null);
   }
 
   @Override
-  public void bgcolour_actionPerformed(ActionEvent e)
+  protected void bgcolour_actionPerformed()
   {
     Color col = JColorChooser.showDialog(this,
             MessageManager.getString("label.select_background_colour"),
-            rc.bgColour);
+            getRotatableCanvas().getBgColour());
 
     if (col != null)
     {
-      rc.bgColour = col;
+      getRotatableCanvas().setBgColour(col);
     }
-    rc.repaint();
+    getRotatableCanvas().repaint();
   }
 
   /**
-   * DOCUMENT ME!
+   * Calculates the PCA and displays the results
    */
   @Override
   public void run()
   {
+    working = true;
     long progId = System.currentTimeMillis();
     IProgressIndicator progress = this;
     String message = MessageManager.getString("label.pca_recalculating");
@@ -236,21 +173,17 @@ public class PCAPanel extends GPCAPanel
       message = MessageManager.getString("label.pca_calculating");
     }
     progress.setProgressBar(message, progId);
-    working = true;
     try
     {
-      calcSettings.setEnabled(false);
-      pcaModel.run();
-      // ////////////////
+      getPcaModel().calculate();
+
       xCombobox.setSelectedIndex(0);
       yCombobox.setSelectedIndex(1);
       zCombobox.setSelectedIndex(2);
 
-      pcaModel.updateRc(rc);
+      getPcaModel().updateRc(getRotatableCanvas());
       // rc.invalidate();
-      nuclSetting.setSelected(pcaModel.isNucleotide());
-      protSetting.setSelected(!pcaModel.isNucleotide());
-      top = pcaModel.getTop();
+      setTop(getPcaModel().getTop());
 
     } catch (OutOfMemoryError er)
     {
@@ -261,109 +194,68 @@ public class PCAPanel extends GPCAPanel
     {
       progress.setProgressBar("", progId);
     }
-    calcSettings.setEnabled(true);
+
     repaint();
     if (getParent() == null)
     {
-      addKeyListener(rc);
-      Desktop.addInternalFrame(this, MessageManager
-              .getString("label.principal_component_analysis"), 475, 450);
-      this.setMinimumSize(new Dimension(MIN_WIDTH, MIN_HEIGHT));
+      Desktop.addInternalFrame(this,
+              MessageManager.formatMessage("label.calc_title", "PCA",
+                      getPcaModel().getScoreModelName()),
+              475, 450);
     }
     working = false;
   }
 
-  @Override
-  protected void nuclSetting_actionPerfomed(ActionEvent arg0)
-  {
-    if (!pcaModel.isNucleotide())
-    {
-      pcaModel.setNucleotide(true);
-      pcaModel.setScoreModel(
-              ScoreModels.getInstance().getDefaultModel(false));
-      Thread worker = new Thread(this);
-      worker.start();
-    }
-
-  }
-
-  @Override
-  protected void protSetting_actionPerfomed(ActionEvent arg0)
-  {
-
-    if (pcaModel.isNucleotide())
-    {
-      pcaModel.setNucleotide(false);
-      pcaModel.setScoreModel(
-              ScoreModels.getInstance().getDefaultModel(true));
-      Thread worker = new Thread(this);
-      worker.start();
-    }
-  }
-
   /**
-   * DOCUMENT ME!
+   * Updates the PCA display after a change of component to use for x, y or z
+   * axis
    */
-  void doDimensionChange()
+  @Override
+  protected void doDimensionChange()
   {
-    if (top == 0)
+    if (getTop() == 0)
     {
       return;
     }
 
-    int dim1 = top - xCombobox.getSelectedIndex();
-    int dim2 = top - yCombobox.getSelectedIndex();
-    int dim3 = top - zCombobox.getSelectedIndex();
-    pcaModel.updateRcView(dim1, dim2, dim3);
-    rc.img = null;
-    rc.rotmat.setIdentity();
-    rc.initAxes();
-    rc.paint(rc.getGraphics());
-  }
-
-  /**
-   * DOCUMENT ME!
-   * 
-   * @param e
-   *          DOCUMENT ME!
-   */
-  @Override
-  protected void xCombobox_actionPerformed(ActionEvent e)
-  {
-    doDimensionChange();
-  }
-
-  /**
-   * DOCUMENT ME!
-   * 
-   * @param e
-   *          DOCUMENT ME!
-   */
-  @Override
-  protected void yCombobox_actionPerformed(ActionEvent e)
-  {
-    doDimensionChange();
+    int dim1 = getTop() - xCombobox.getSelectedIndex();
+    int dim2 = getTop() - yCombobox.getSelectedIndex();
+    int dim3 = getTop() - zCombobox.getSelectedIndex();
+    getPcaModel().updateRcView(dim1, dim2, dim3);
+    getRotatableCanvas().resetView();
   }
 
   /**
-   * DOCUMENT ME!
+   * Sets the selected checkbox item index for PCA dimension (1, 2, 3...) for
+   * the given axis (X/Y/Z)
    * 
-   * @param e
-   *          DOCUMENT ME!
+   * @param index
+   * @param axis
    */
-  @Override
-  protected void zCombobox_actionPerformed(ActionEvent e)
+  public void setSelectedDimensionIndex(int index, Axis axis)
   {
-    doDimensionChange();
+    switch (axis)
+    {
+    case X:
+      xCombobox.setSelectedIndex(index);
+      break;
+    case Y:
+      yCombobox.setSelectedIndex(index);
+      break;
+    case Z:
+      zCombobox.setSelectedIndex(index);
+      break;
+    default:
+    }
   }
 
   @Override
-  public void outputValues_actionPerformed(ActionEvent e)
+  protected void outputValues_actionPerformed()
   {
     CutAndPasteTransfer cap = new CutAndPasteTransfer();
     try
     {
-      cap.setText(pcaModel.getDetails());
+      cap.setText(getPcaModel().getDetails());
       Desktop.addInternalFrame(cap,
               MessageManager.getString("label.pca_details"), 500, 500);
     } catch (OutOfMemoryError oom)
@@ -374,32 +266,35 @@ public class PCAPanel extends GPCAPanel
   }
 
   @Override
-  public void showLabels_actionPerformed(ActionEvent e)
+  protected void showLabels_actionPerformed()
   {
-    rc.showLabels(showLabels.getState());
+    getRotatableCanvas().showLabels(showLabels.getState());
   }
 
   @Override
-  public void print_actionPerformed(ActionEvent e)
+  protected void print_actionPerformed()
   {
     PCAPrinter printer = new PCAPrinter();
     printer.start();
   }
 
+  /**
+   * If available, shows the data which formed the inputs for the PCA as a new
+   * alignment
+   */
   @Override
-  public void originalSeqData_actionPerformed(ActionEvent e)
+  public void originalSeqData_actionPerformed()
   {
-    // this was cut'n'pasted from the equivalent TreePanel method - we should
-    // make this an abstract function of all jalview analysis windows
-    if (pcaModel.getSeqtrings() == null)
+    // JAL-2647 disabled after load from project (until save to project done)
+    if (getPcaModel().getInputData() == null)
     {
-      jalview.bin.Cache.log.info(
+      Cache.log.info(
               "Unexpected call to originalSeqData_actionPerformed - should have hidden this menu action.");
       return;
     }
     // decide if av alignment is sufficiently different to original data to
     // warrant a new window to be created
-    // create new alignmnt window with hidden regions (unhiding hidden regions
+    // create new alignment window with hidden regions (unhiding hidden regions
     // yields unaligned seqs)
     // or create a selection box around columns in alignment view
     // test Alignment(SeqCigar[])
@@ -412,8 +307,8 @@ public class PCAPanel extends GPCAPanel
     } catch (Exception ex)
     {
     }
-    ;
-    Object[] alAndColsel = pcaModel.getSeqtrings()
+
+    Object[] alAndColsel = getPcaModel().getInputData()
             .getAlignmentAndHiddenColumns(gc);
 
     if (alAndColsel != null && alAndColsel[0] != null)
@@ -495,11 +390,11 @@ public class PCAPanel extends GPCAPanel
     {
       pg.translate((int) pf.getImageableX(), (int) pf.getImageableY());
 
-      rc.drawBackground(pg, rc.bgColour);
-      rc.drawScene(pg);
-      if (rc.drawAxes == true)
+      getRotatableCanvas().drawBackground(pg);
+      getRotatableCanvas().drawScene(pg);
+      if (getRotatableCanvas().drawAxes)
       {
-        rc.drawAxes(pg);
+        getRotatableCanvas().drawAxes(pg);
       }
 
       if (pi == 0)
@@ -514,79 +409,75 @@ public class PCAPanel extends GPCAPanel
   }
 
   /**
-   * DOCUMENT ME!
-   * 
-   * @param e
-   *          DOCUMENT ME!
+   * Handler for 'Save as EPS' option
    */
   @Override
-  public void eps_actionPerformed(ActionEvent e)
+  protected void eps_actionPerformed()
   {
-    makePCAImage(jalview.util.ImageMaker.TYPE.EPS);
+    makePCAImage(ImageMaker.TYPE.EPS);
   }
 
   /**
-   * DOCUMENT ME!
-   * 
-   * @param e
-   *          DOCUMENT ME!
+   * Handler for 'Save as PNG' option
    */
   @Override
-  public void png_actionPerformed(ActionEvent e)
+  protected void png_actionPerformed()
   {
-    makePCAImage(jalview.util.ImageMaker.TYPE.PNG);
+    makePCAImage(ImageMaker.TYPE.PNG);
   }
 
-  void makePCAImage(jalview.util.ImageMaker.TYPE type)
+  void makePCAImage(ImageMaker.TYPE type)
   {
-    int width = rc.getWidth();
-    int height = rc.getHeight();
-
-    jalview.util.ImageMaker im;
-
-    if (type == jalview.util.ImageMaker.TYPE.PNG)
-    {
-      im = new jalview.util.ImageMaker(this,
-              jalview.util.ImageMaker.TYPE.PNG, "Make PNG image from PCA",
-              width, height, null, null, null, 0, false);
-    }
-    else if (type == jalview.util.ImageMaker.TYPE.EPS)
-    {
-      im = new jalview.util.ImageMaker(this,
-              jalview.util.ImageMaker.TYPE.EPS, "Make EPS file from PCA",
-              width, height, null, this.getTitle(), null, 0, false);
-    }
-    else
-    {
-      im = new jalview.util.ImageMaker(this,
-              jalview.util.ImageMaker.TYPE.SVG, "Make SVG file from PCA",
-              width, height, null, this.getTitle(), null, 0, false);
-
+    int width = getRotatableCanvas().getWidth();
+    int height = getRotatableCanvas().getHeight();
+
+    ImageMaker im;
+
+    switch (type)
+    {
+    case PNG:
+      im = new ImageMaker(this, ImageMaker.TYPE.PNG,
+              "Make PNG image from PCA", width, height, null, null, null, 0,
+              false);
+      break;
+    case EPS:
+      im = new ImageMaker(this, ImageMaker.TYPE.EPS,
+              "Make EPS file from PCA", width, height, null,
+              this.getTitle(), null, 0, false);
+      break;
+    default:
+      im = new ImageMaker(this, ImageMaker.TYPE.SVG,
+              "Make SVG file from PCA", width, height, null,
+              this.getTitle(), null, 0, false);
     }
 
     if (im.getGraphics() != null)
     {
-      rc.drawBackground(im.getGraphics(), Color.black);
-      rc.drawScene(im.getGraphics());
-      if (rc.drawAxes == true)
+      getRotatableCanvas().drawBackground(im.getGraphics());
+      getRotatableCanvas().drawScene(im.getGraphics());
+      if (getRotatableCanvas().drawAxes)
       {
-        rc.drawAxes(im.getGraphics());
+        getRotatableCanvas().drawAxes(im.getGraphics());
       }
       im.writeImage();
     }
   }
 
   @Override
-  public void viewMenu_menuSelected()
+  protected void viewMenu_menuSelected()
   {
     buildAssociatedViewMenu();
   }
 
+  /**
+   * Builds the menu showing the choice of possible views (for the associated
+   * sequence data) to which the PCA may be linked
+   */
   void buildAssociatedViewMenu()
   {
     AlignmentPanel[] aps = PaintRefresher
             .getAssociatedPanels(av.getSequenceSetId());
-    if (aps.length == 1 && rc.av == aps[0].av)
+    if (aps.length == 1 && getRotatableCanvas().av == aps[0].av)
     {
       associateViewsMenu.setVisible(false);
       return;
@@ -604,22 +495,20 @@ public class PCAPanel extends GPCAPanel
 
     JRadioButtonMenuItem item;
     ButtonGroup buttonGroup = new ButtonGroup();
-    int i, iSize = aps.length;
-    final PCAPanel thisPCAPanel = this;
-    for (i = 0; i < iSize; i++)
+    int iSize = aps.length;
+
+    for (int i = 0; i < iSize; i++)
     {
-      final AlignmentPanel ap = aps[i];
-      item = new JRadioButtonMenuItem(ap.av.viewName, ap.av == rc.av);
+      final AlignmentPanel panel = aps[i];
+      item = new JRadioButtonMenuItem(panel.av.getViewName(),
+              panel.av == getRotatableCanvas().av);
       buttonGroup.add(item);
       item.addActionListener(new ActionListener()
       {
         @Override
         public void actionPerformed(ActionEvent evt)
         {
-          rc.applyToAllViews = false;
-          rc.av = ap.av;
-          rc.ap = ap;
-          PaintRefresher.Register(thisPCAPanel, ap.av.getSequenceSetId());
+          selectAssociatedView(panel);
         }
       });
 
@@ -631,13 +520,13 @@ public class PCAPanel extends GPCAPanel
 
     buttonGroup.add(itemf);
 
-    itemf.setSelected(rc.applyToAllViews);
+    itemf.setSelected(getRotatableCanvas().isApplyToAllViews());
     itemf.addActionListener(new ActionListener()
     {
       @Override
       public void actionPerformed(ActionEvent evt)
       {
-        rc.applyToAllViews = itemf.isSelected();
+        getRotatableCanvas().setApplyToAllViews(itemf.isSelected());
       }
     });
     associateViewsMenu.add(itemf);
@@ -652,12 +541,12 @@ public class PCAPanel extends GPCAPanel
    * )
    */
   @Override
-  protected void outputPoints_actionPerformed(ActionEvent e)
+  protected void outputPoints_actionPerformed()
   {
     CutAndPasteTransfer cap = new CutAndPasteTransfer();
     try
     {
-      cap.setText(pcaModel.getPointsasCsv(false,
+      cap.setText(getPcaModel().getPointsasCsv(false,
               xCombobox.getSelectedIndex(), yCombobox.getSelectedIndex(),
               zCombobox.getSelectedIndex()));
       Desktop.addInternalFrame(cap, MessageManager
@@ -678,12 +567,12 @@ public class PCAPanel extends GPCAPanel
    * .ActionEvent)
    */
   @Override
-  protected void outputProjPoints_actionPerformed(ActionEvent e)
+  protected void outputProjPoints_actionPerformed()
   {
     CutAndPasteTransfer cap = new CutAndPasteTransfer();
     try
     {
-      cap.setText(pcaModel.getPointsasCsv(true,
+      cap.setText(getPcaModel().getPointsasCsv(true,
               xCombobox.getSelectedIndex(), yCombobox.getSelectedIndex(),
               zCombobox.getSelectedIndex()));
       Desktop.addInternalFrame(cap, MessageManager.formatMessage(
@@ -793,13 +682,13 @@ public class PCAPanel extends GPCAPanel
   }
 
   @Override
-  protected void resetButton_actionPerformed(ActionEvent e)
+  protected void resetButton_actionPerformed()
   {
-    int t = top;
-    top = 0; // ugly - prevents dimensionChanged events from being processed
+    int t = getTop();
+    setTop(0); // ugly - prevents dimensionChanged events from being processed
     xCombobox.setSelectedIndex(0);
     yCombobox.setSelectedIndex(1);
-    top = t;
+    setTop(t);
     zCombobox.setSelectedIndex(2);
   }
 
@@ -812,4 +701,94 @@ public class PCAPanel extends GPCAPanel
   {
     return working;
   }
+
+  /**
+   * Answers the selected checkbox item index for PCA dimension for the X, Y or
+   * Z axis of the display
+   * 
+   * @param axis
+   * @return
+   */
+  public int getSelectedDimensionIndex(Axis axis)
+  {
+    switch (axis)
+    {
+    case X:
+      return xCombobox.getSelectedIndex();
+    case Y:
+      return yCombobox.getSelectedIndex();
+    default:
+      return zCombobox.getSelectedIndex();
+    }
+  }
+
+  public void setShowLabels(boolean show)
+  {
+    showLabels.setSelected(show);
+  }
+
+  /**
+   * Sets the input data used to calculate the PCA. This is provided for
+   * 'restore from project', which does not currently support this (AL-2647), so
+   * sets the value to null, and hides the menu option for "Input Data...". J
+   * 
+   * @param data
+   */
+  public void setInputData(AlignmentView data)
+  {
+    getPcaModel().setInputData(data);
+    originalSeqData.setVisible(data != null);
+  }
+
+  public AlignViewportI getAlignViewport()
+  {
+    return av;
+  }
+
+  public PCAModel getPcaModel()
+  {
+    return pcaModel;
+  }
+
+  public void setPcaModel(PCAModel pcaModel)
+  {
+    this.pcaModel = pcaModel;
+  }
+
+  public RotatableCanvas getRotatableCanvas()
+  {
+    return rc;
+  }
+
+  public void setRotatableCanvas(RotatableCanvas rc)
+  {
+    this.rc = rc;
+  }
+
+  public int getTop()
+  {
+    return top;
+  }
+
+  public void setTop(int top)
+  {
+    this.top = top;
+  }
+
+  /**
+   * set the associated view for this PCA.
+   * 
+   * @param panel
+   */
+  public void selectAssociatedView(AlignmentPanel panel)
+  {
+    getRotatableCanvas().setApplyToAllViews(false);
+
+    ap = panel;
+    av = panel.av;
+
+    getRotatableCanvas().av = panel.av;
+    getRotatableCanvas().ap = panel;
+    PaintRefresher.Register(PCAPanel.this, panel.av.getSequenceSetId());
+  }
 }
index 4e02d21..702773b 100644 (file)
@@ -46,6 +46,7 @@ import jalview.schemes.Blosum62ColourScheme;
 import jalview.schemes.ColourSchemeI;
 import jalview.schemes.ColourSchemes;
 import jalview.schemes.PIDColourScheme;
+import jalview.schemes.ResidueColourScheme;
 import jalview.util.GroupUrlLink;
 import jalview.util.GroupUrlLink.UrlStringTooLongException;
 import jalview.util.MessageManager;
@@ -68,11 +69,13 @@ import java.util.SortedMap;
 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.JPopupMenu;
+import javax.swing.JRadioButtonMenuItem;
 
 /**
  * The popup menu that is displayed on right-click on a sequence id, or in the
@@ -90,6 +93,8 @@ public class PopupMenu extends JPopupMenu implements ColourChangeListener
 
   protected JCheckBoxMenuItem conservationMenuItem = new JCheckBoxMenuItem();
 
+  protected JRadioButtonMenuItem annotationColour;
+
   protected JMenuItem modifyConservation = new JMenuItem();
 
   AlignmentPanel ap;
@@ -580,9 +585,20 @@ public class PopupMenu extends JPopupMenu implements ColourChangeListener
         }
       }
     }
-    // for the case when no sequences are even visible
+
+    /*
+     * offer 'Reveal All'
+     * - in the IdPanel (seq not null) if any sequence is hidden
+     * - in the IdPanel or SeqPanel if all sequences are hidden (seq is null)
+     */
     if (alignPanel.av.hasHiddenRows())
     {
+      boolean addOption = seq != null;
+      if (!addOption && alignPanel.av.getAlignment().getHeight() == 0)
+      {
+        addOption = true;
+      }
+      if (addOption)
       {
         menuItem = new JMenuItem(
                 MessageManager.getString("action.reveal_all"));
@@ -598,7 +614,6 @@ public class PopupMenu extends JPopupMenu implements ColourChangeListener
             }
           }
         });
-
         add(menuItem);
       }
     }
@@ -1439,6 +1454,13 @@ public class PopupMenu extends JPopupMenu implements ColourChangeListener
       }
     });
 
+    annotationColour = new JRadioButtonMenuItem(
+            MessageManager.getString("action.by_annotation"));
+    annotationColour.setName(ResidueColourScheme.ANNOTATION_COLOUR);
+    annotationColour.setEnabled(false);
+    annotationColour.setToolTipText(
+            MessageManager.getString("label.by_annotation_tooltip"));
+
     modifyConservation.setText(MessageManager
             .getString("label.modify_conservation_threshold"));
     modifyConservation.addActionListener(new ActionListener()
@@ -1469,7 +1491,10 @@ public class PopupMenu extends JPopupMenu implements ColourChangeListener
     colourMenu.add(textColour);
     colourMenu.addSeparator();
 
-    ColourMenuHelper.addMenuItems(colourMenu, this, sg, false);
+    ButtonGroup bg = ColourMenuHelper.addMenuItems(colourMenu, this, sg,
+            false);
+    bg.add(annotationColour);
+    colourMenu.add(annotationColour);
 
     colourMenu.addSeparator();
     colourMenu.add(conservationMenuItem);
@@ -2148,7 +2173,7 @@ public class PopupMenu extends JPopupMenu implements ColourChangeListener
      * switch to the chosen colour scheme (or null for None)
      */
     ColourSchemeI colourScheme = ColourSchemes.getInstance()
-            .getColourScheme(colourSchemeName, sg,
+            .getColourScheme(colourSchemeName, ap.av, sg,
                     ap.av.getHiddenRepSequences());
     sg.setColourScheme(colourScheme);
     if (colourScheme instanceof Blosum62ColourScheme
index 7d02fac..ab09f74 100755 (executable)
@@ -24,6 +24,7 @@ import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
 import jalview.bin.Cache;
 import jalview.gui.Help.HelpId;
 import jalview.gui.StructureViewer.ViewerType;
+import jalview.io.BackupFiles;
 import jalview.io.FileFormatI;
 import jalview.io.JalviewFileChooser;
 import jalview.io.JalviewFileView;
@@ -325,7 +326,7 @@ public class Preferences extends GPreferences
     gapLabel.setEnabled(!useLegacyGap.isSelected());
     gapColour.setEnabled(!useLegacyGap.isSelected());
     showHiddenAtStart
-            .setSelected(Cache.getDefault(SHOW_OV_HIDDEN_AT_START, true));
+            .setSelected(Cache.getDefault(SHOW_OV_HIDDEN_AT_START, false));
 
     /*
      * Set Structure tab defaults.
@@ -546,6 +547,12 @@ public class Preferences extends GPreferences
 
     annotations_actionPerformed(null); // update the display of the annotation
                                        // settings
+    
+    
+    /*
+     * Set Backups tab defaults
+     */
+    loadLastSavedBackupsOptions();
   }
 
   /**
@@ -794,6 +801,27 @@ public class Preferences extends GPreferences
             Boolean.toString(padGaps.isSelected()));
 
     wsPrefs.updateAndRefreshWsMenuConfig(false);
+
+    /*
+     * Save Backups settings
+     */
+    Cache.applicationProperties.setProperty(BackupFiles.CONFIRM_DELETE_OLD,
+            Boolean.toString(backupfilesConfirmDelete.isSelected()));
+    Cache.applicationProperties.setProperty(BackupFiles.ENABLED,
+            Boolean.toString(enableBackupFiles.isSelected()));
+    Cache.applicationProperties.setProperty(BackupFiles.NO_MAX,
+            Boolean.toString(backupfilesKeepAll.isSelected()));
+    Cache.applicationProperties.setProperty(BackupFiles.REVERSE_ORDER,
+            Boolean.toString(suffixReverse.isSelected()));
+    Cache.applicationProperties.setProperty(BackupFiles.SUFFIX,
+            suffixTemplate.getText());
+    Cache.applicationProperties.setProperty(BackupFiles.ROLL_MAX,
+            Integer.toString(getSpinnerInt(backupfilesRollMaxSpinner, 4)));
+    Cache.applicationProperties.setProperty(BackupFiles.SUFFIX_DIGITS,
+            Integer.toString(getSpinnerInt(suffixDigitsSpinner, 3)));
+    Cache.applicationProperties.setProperty(BackupFiles.NS+"_PRESET",
+            Integer.toString(getComboIntStringKey(backupfilesPresetsCombo)));
+
     Cache.saveProperties();
     Desktop.instance.doConfigureStructurePrefs();
     try
@@ -1116,7 +1144,7 @@ public class Preferences extends GPreferences
   {
     useLegacyGap.setSelected(false);
     useLegacyGaps_actionPerformed(null);
-    showHiddenAtStart.setSelected(true);
+    showHiddenAtStart.setSelected(false);
     hiddenColour.setBackground(
             jalview.renderer.OverviewResColourFinder.OVERVIEW_DEFAULT_HIDDEN);
   }
index 02368df..dc0cdb4 100755 (executable)
 package jalview.gui;
 
 import jalview.api.RotatableCanvasI;
+import jalview.datamodel.Point;
 import jalview.datamodel.SequenceGroup;
 import jalview.datamodel.SequenceI;
 import jalview.datamodel.SequencePoint;
 import jalview.math.RotatableMatrix;
+import jalview.math.RotatableMatrix.Axis;
+import jalview.util.ColorUtils;
 import jalview.util.MessageManager;
 import jalview.viewmodel.AlignmentViewport;
 
@@ -43,328 +46,192 @@ import java.awt.event.MouseListener;
 import java.awt.event.MouseMotionListener;
 import java.awt.event.MouseWheelEvent;
 import java.awt.event.MouseWheelListener;
-import java.util.Vector;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
 
 import javax.swing.JPanel;
 import javax.swing.ToolTipManager;
 
 /**
- * DOCUMENT ME!
- * 
- * @author $author$
- * @version $Revision$
+ * Models a Panel on which a set of points, and optionally x/y/z axes, can be
+ * drawn, and rotated or zoomed with the mouse
  */
 public class RotatableCanvas extends JPanel implements MouseListener,
-        MouseMotionListener, KeyListener, RotatableCanvasI
+        MouseMotionListener, KeyListener, RotatableCanvasI,
+        MouseWheelListener
 {
-  RotatableMatrix idmat = new RotatableMatrix(3, 3);
+  private static final float ZOOM_OUT = 0.9f;
 
-  RotatableMatrix objmat = new RotatableMatrix(3, 3);
+  private static final float ZOOM_IN = 1.1f;
 
-  RotatableMatrix rotmat = new RotatableMatrix(3, 3);
+  /*
+   * pixels distance within which tooltip shows sequence name
+   */
+  private static final int NEARBY = 3;
 
-  // RubberbandRectangle rubberband;
-  boolean drawAxes = true;
+  private static final List<String> AXES = Arrays.asList("x", "y", "z");
 
-  int omx = 0;
+  private static final Color AXIS_COLOUR = Color.yellow;
 
-  int mx = 0;
+  private static final int DIMS = 3;
 
-  int omy = 0;
+  boolean drawAxes = true;
+
+  int mouseX;
 
-  int my = 0;
+  int mouseY;
 
   Image img;
 
   Graphics ig;
 
-  Dimension prefsize;
-
-  float[] centre = new float[3];
+  Dimension prefSize;
 
-  float[] width = new float[3];
-
-  float[] max = new float[3];
-
-  float[] min = new float[3];
+  /*
+   * the min-max [x, y, z] values of sequence points when the points
+   * were set on the object, or when the view is reset; 
+   * x and y ranges are not recomputed as points are rotated, as this
+   * would make scaling (zoom) unstable, but z ranges are (for correct
+   * graduated colour brightness based on z-coordinate)
+   */
+  float[] seqMin;
 
-  float maxwidth;
+  float[] seqMax;
 
-  float scale;
+  /*
+   * a scale factor used in drawing; when equal to 1, the points span
+   * half the available width or height (whichever is less); increase this
+   * factor to zoom in, decrease it to zoom out
+   */
+  private float scaleFactor;
 
   int npoint;
 
-  Vector points;
-
-  float[][] orig;
-
-  float[][] axes;
-
-  int startx;
-
-  int starty;
-
-  int lastx;
-
-  int lasty;
-
-  int rectx1;
-
-  int recty1;
-
-  int rectx2;
+  /*
+   * sequences and their (x, y, z) PCA dimension values
+   */
+  List<SequencePoint> sequencePoints;
 
-  int recty2;
+  /*
+   * x, y, z axis end points (PCA dimension values)
+   */
+  private Point[] axisEndPoints;
 
-  float scalefactor = 1;
+  // fields for 'select rectangle' (JAL-1124)
+  // int rectx1;
+  // int recty1;
+  // int rectx2;
+  // int recty2;
 
   AlignmentViewport av;
 
   AlignmentPanel ap;
 
-  boolean showLabels = false;
+  private boolean showLabels;
 
-  Color bgColour = Color.black;
+  private Color bgColour;
 
-  boolean applyToAllViews = false;
+  private boolean applyToAllViews;
 
-  public RotatableCanvas(AlignmentPanel ap)
+  /**
+   * Constructor
+   * 
+   * @param panel
+   */
+  public RotatableCanvas(AlignmentPanel panel)
   {
-    this.av = ap.av;
-    this.ap = ap;
-
-    addMouseWheelListener(new MouseWheelListener()
-    {
-      @Override
-      public void mouseWheelMoved(MouseWheelEvent e)
-      {
-        double wheelRotation = e.getPreciseWheelRotation();
-        if (wheelRotation > 0)
-        {
-          /*
-           * zoom in
-           */
-          scale = (float) (scale * 1.1);
-          repaint();
-        }
-        else if (wheelRotation < 0)
-        {
-          /*
-           * zoom out
-           */
-          scale = (float) (scale * 0.9);
-          repaint();
-        }
-      }
-    });
-
+    this.av = panel.av;
+    this.ap = panel;
+    setAxisEndPoints(new Point[DIMS]);
+    setShowLabels(false);
+    setApplyToAllViews(false);
+    setBgColour(Color.BLACK);
+    resetAxes();
+
+    ToolTipManager.sharedInstance().registerComponent(this);
+
+    addMouseListener(this);
+    addMouseMotionListener(this);
+    addMouseWheelListener(this);
   }
 
-  public void showLabels(boolean b)
+  /**
+   * Refreshes the display with labels shown (or not)
+   * 
+   * @param show
+   */
+  public void showLabels(boolean show)
   {
-    showLabels = b;
+    setShowLabels(show);
     repaint();
   }
 
-  boolean first = true;
-
   @Override
-  public void setPoints(Vector points, int npoint)
+  public void setPoints(List<SequencePoint> points, int np)
   {
-    this.points = points;
-    this.npoint = npoint;
-    if (first)
-    {
-      ToolTipManager.sharedInstance().registerComponent(this);
-      ToolTipManager.sharedInstance().setInitialDelay(0);
-      ToolTipManager.sharedInstance().setDismissDelay(10000);
-    }
-    prefsize = getPreferredSize();
-    orig = new float[npoint][3];
+    this.sequencePoints = points;
+    this.npoint = np;
+    prefSize = getPreferredSize();
 
-    for (int i = 0; i < npoint; i++)
-    {
-      SequencePoint sp = (SequencePoint) points.elementAt(i);
+    findWidths();
 
-      for (int j = 0; j < 3; j++)
-      {
-        orig[i][j] = sp.coord[j];
-      }
-    }
-
-    // Initialize the matrices to identity
-    for (int i = 0; i < 3; i++)
-    {
-      for (int j = 0; j < 3; j++)
-      {
-        if (i != j)
-        {
-          idmat.addElement(i, j, 0);
-          objmat.addElement(i, j, 0);
-          rotmat.addElement(i, j, 0);
-        }
-        else
-        {
-          idmat.addElement(i, j, 0);
-          objmat.addElement(i, j, 0);
-          rotmat.addElement(i, j, 0);
-        }
-      }
-    }
-
-    axes = new float[3][3];
-    initAxes();
-
-    findCentre();
-    findWidth();
-
-    scale = findScale();
-    if (first)
-    {
-
-      addMouseListener(this);
-
-      addMouseMotionListener(this);
-    }
-    first = false;
-  }
-
-  public void initAxes()
-  {
-    for (int i = 0; i < 3; i++)
-    {
-      for (int j = 0; j < 3; j++)
-      {
-        if (i != j)
-        {
-          axes[i][j] = 0;
-        }
-        else
-        {
-          axes[i][j] = 1;
-        }
-      }
-    }
+    setScaleFactor(1f);
   }
 
   /**
-   * DOCUMENT ME!
+   * Resets axes to the initial state: x-axis to the right, y-axis up, z-axis to
+   * back (so obscured in a 2-D display)
    */
-  public void findWidth()
+  protected void resetAxes()
   {
-    max = new float[3];
-    min = new float[3];
-
-    max[0] = (float) -1e30;
-    max[1] = (float) -1e30;
-    max[2] = (float) -1e30;
-
-    min[0] = (float) 1e30;
-    min[1] = (float) 1e30;
-    min[2] = (float) 1e30;
-
-    for (int i = 0; i < 3; i++)
-    {
-      for (int j = 0; j < npoint; j++)
-      {
-        SequencePoint sp = (SequencePoint) points.elementAt(j);
-
-        if (sp.coord[i] >= max[i])
-        {
-          max[i] = sp.coord[i];
-        }
-
-        if (sp.coord[i] <= min[i])
-        {
-          min[i] = sp.coord[i];
-        }
-      }
-    }
-
-    // System.out.println("xmax " + max[0] + " min " + min[0]);
-    // System.out.println("ymax " + max[1] + " min " + min[1]);
-    // System.out.println("zmax " + max[2] + " min " + min[2]);
-    width[0] = Math.abs(max[0] - min[0]);
-    width[1] = Math.abs(max[1] - min[1]);
-    width[2] = Math.abs(max[2] - min[2]);
-
-    maxwidth = width[0];
-
-    if (width[1] > width[0])
-    {
-      maxwidth = width[1];
-    }
-
-    if (width[2] > width[1])
-    {
-      maxwidth = width[2];
-    }
-
-    // System.out.println("Maxwidth = " + maxwidth);
-  }
-
-  /**
-   * DOCUMENT ME!
-   * 
-   * @return DOCUMENT ME!
-   */
-  public float findScale()
-  {
-    int dim;
-    int width;
-    int height;
-
-    if (getWidth() != 0)
-    {
-      width = getWidth();
-      height = getHeight();
-    }
-    else
-    {
-      width = prefsize.width;
-      height = prefsize.height;
-    }
-
-    if (width < height)
-    {
-      dim = width;
-    }
-    else
-    {
-      dim = height;
-    }
-
-    return (dim * scalefactor) / (2 * maxwidth);
+    getAxisEndPoints()[0] = new Point(1f, 0f, 0f);
+    getAxisEndPoints()[1] = new Point(0f, 1f, 0f);
+    getAxisEndPoints()[2] = new Point(0f, 0f, 1f);
   }
 
   /**
-   * DOCUMENT ME!
+   * Computes and saves the min-max ranges of x/y/z positions of the sequence
+   * points
    */
-  public void findCentre()
+  protected void findWidths()
   {
-    // Find centre coordinate
-    findWidth();
-
-    centre[0] = (max[0] + min[0]) / 2;
-    centre[1] = (max[1] + min[1]) / 2;
-    centre[2] = (max[2] + min[2]) / 2;
-
-    // System.out.println("Centre x " + centre[0]);
-    // System.out.println("Centre y " + centre[1]);
-    // System.out.println("Centre z " + centre[2]);
+    float[] max = new float[DIMS];
+    float[] min = new float[DIMS];
+    
+    max[0] = -Float.MAX_VALUE;
+    max[1] = -Float.MAX_VALUE;
+    max[2] = -Float.MAX_VALUE;
+    
+    min[0] = Float.MAX_VALUE;
+    min[1] = Float.MAX_VALUE;
+    min[2] = Float.MAX_VALUE;
+    
+    for (SequencePoint sp : sequencePoints)
+    {
+      max[0] = Math.max(max[0], sp.coord.x);
+      max[1] = Math.max(max[1], sp.coord.y);
+      max[2] = Math.max(max[2], sp.coord.z);
+      min[0] = Math.min(min[0], sp.coord.x);
+      min[1] = Math.min(min[1], sp.coord.y);
+      min[2] = Math.min(min[2], sp.coord.z);
+    }
+    
+    seqMin = min;
+    seqMax = max;
   }
 
   /**
-   * DOCUMENT ME!
+   * Answers the preferred size if it has been set, else 400 x 400
    * 
-   * @return DOCUMENT ME!
+   * @return
    */
   @Override
   public Dimension getPreferredSize()
   {
-    if (prefsize != null)
+    if (prefSize != null)
     {
-      return prefsize;
+      return prefSize;
     }
     else
     {
@@ -373,9 +240,10 @@ public class RotatableCanvas extends JPanel implements MouseListener,
   }
 
   /**
-   * DOCUMENT ME!
+   * Answers the preferred size
    * 
-   * @return DOCUMENT ME!
+   * @return
+   * @see RotatableCanvas#getPreferredSize()
    */
   @Override
   public Dimension getMinimumSize()
@@ -384,10 +252,9 @@ public class RotatableCanvas extends JPanel implements MouseListener,
   }
 
   /**
-   * DOCUMENT ME!
+   * Repaints the panel
    * 
    * @param g
-   *          DOCUMENT ME!
    */
   @Override
   public void paintComponent(Graphics g1)
@@ -397,7 +264,7 @@ public class RotatableCanvas extends JPanel implements MouseListener,
 
     g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
             RenderingHints.VALUE_ANTIALIAS_ON);
-    if (points == null)
+    if (sequencePoints == null)
     {
       g.setFont(new Font("Verdana", Font.PLAIN, 18));
       g.drawString(
@@ -406,24 +273,24 @@ public class RotatableCanvas extends JPanel implements MouseListener,
     }
     else
     {
-      // Only create the image at the beginning -
-      if ((img == null) || (prefsize.width != getWidth())
-              || (prefsize.height != getHeight()))
+      /*
+       * create the image at the beginning or after a resize
+       */
+      boolean resized = prefSize.width != getWidth()
+              || prefSize.height != getHeight();
+      if (img == null || resized)
       {
-        prefsize.width = getWidth();
-        prefsize.height = getHeight();
+        prefSize.width = getWidth();
+        prefSize.height = getHeight();
 
-        scale = findScale();
-
-        // System.out.println("New scale = " + scale);
         img = createImage(getWidth(), getHeight());
         ig = img.getGraphics();
       }
 
-      drawBackground(ig, bgColour);
+      drawBackground(ig);
       drawScene(ig);
 
-      if (drawAxes == true)
+      if (drawAxes)
       {
         drawAxes(ig);
       }
@@ -433,96 +300,110 @@ public class RotatableCanvas extends JPanel implements MouseListener,
   }
 
   /**
-   * DOCUMENT ME!
+   * Resets the rotation and choice of axes to the initial state (without change
+   * of scale factor)
+   */
+  public void resetView()
+  {
+    img = null;
+    findWidths();
+    resetAxes();
+    repaint();
+  }
+
+  /**
+   * Draws lines for the x, y, z axes
    * 
    * @param g
-   *          DOCUMENT ME!
    */
   public void drawAxes(Graphics g)
   {
+    g.setColor(AXIS_COLOUR);
 
-    g.setColor(Color.yellow);
+    int midX = getWidth() / 2;
+    int midY = getHeight() / 2;
+    float maxWidth = Math.max(Math.abs(seqMax[0] - seqMin[0]),
+            Math.abs(seqMax[1] - seqMin[1]));
+    int pix = Math.min(getWidth(), getHeight());
+    float scaleBy = pix * getScaleFactor() / (2f * maxWidth);
 
-    for (int i = 0; i < 3; i++)
+    for (int i = 0; i < DIMS; i++)
     {
-      g.drawLine(getWidth() / 2, getHeight() / 2,
-              (int) ((axes[i][0] * scale * max[0]) + (getWidth() / 2)),
-              (int) ((axes[i][1] * scale * max[1]) + (getHeight() / 2)));
+      g.drawLine(midX, midY,
+              midX + (int) (getAxisEndPoints()[i].x * scaleBy * seqMax[0]),
+              midY + (int) (getAxisEndPoints()[i].y * scaleBy * seqMax[1]));
     }
   }
 
   /**
-   * DOCUMENT ME!
+   * Fills the background with the currently configured background colour
    * 
    * @param g
-   *          DOCUMENT ME!
-   * @param col
-   *          DOCUMENT ME!
    */
-  public void drawBackground(Graphics g, Color col)
+  public void drawBackground(Graphics g)
   {
-    g.setColor(col);
-    g.fillRect(0, 0, prefsize.width, prefsize.height);
+    g.setColor(getBgColour());
+    g.fillRect(0, 0, prefSize.width, prefSize.height);
   }
 
   /**
-   * DOCUMENT ME!
+   * Draws points (6x6 squares) for the sequences of the PCA, and labels
+   * (sequence names) if configured to do so. The sequence points colours are
+   * taken from the sequence ids in the alignment (converting black to white).
+   * Sequences 'at the back' (z-coordinate is negative) are shaded slightly
+   * darker to help give a 3-D sensation.
    * 
    * @param g
-   *          DOCUMENT ME!
    */
   public void drawScene(Graphics g1)
   {
-
     Graphics2D g = (Graphics2D) g1;
 
     g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
             RenderingHints.VALUE_ANTIALIAS_ON);
+    int pix = Math.min(getWidth(), getHeight());
+    float xWidth = Math.abs(seqMax[0] - seqMin[0]);
+    float yWidth = Math.abs(seqMax[1] - seqMin[1]);
+    float maxWidth = Math.max(xWidth, yWidth);
+    float scaleBy = pix * getScaleFactor() / (2f * maxWidth);
 
-    int halfwidth = getWidth() / 2;
-    int halfheight = getHeight() / 2;
+    float[] centre = getCentre();
 
     for (int i = 0; i < npoint; i++)
     {
-      SequencePoint sp = (SequencePoint) points.elementAt(i);
-      int x = (int) ((sp.coord[0] - centre[0]) * scale) + halfwidth;
-      int y = (int) ((sp.coord[1] - centre[1]) * scale)
-              + halfheight;
-      float z = sp.coord[1] - centre[2];
-
-      if (av.getSequenceColour(sp.sequence) == Color.black)
-      {
-        g.setColor(Color.white);
-      }
-      else
-      {
-        g.setColor(av.getSequenceColour(sp.sequence));
-      }
-
-      if (av.getSelectionGroup() != null)
-      {
-        if (av.getSelectionGroup().getSequences(null)
-                .contains(((SequencePoint) points.elementAt(i)).sequence))
-        {
-          g.setColor(Color.gray);
-        }
-      }
+      /*
+       * sequence point colour as sequence id, but
+       * gray if sequence is currently selected
+       */
+      SequencePoint sp = sequencePoints.get(i);
+      Color sequenceColour = getSequencePointColour(sp);
+      g.setColor(sequenceColour);
+
+      int halfwidth = getWidth() / 2;
+      int halfheight = getHeight() / 2;
+      int x = (int) ((sp.coord.x - centre[0]) * scaleBy) + halfwidth;
+      int y = (int) ((sp.coord.y - centre[1]) * scaleBy) + halfheight;
+      g.fillRect(x - 3, y - 3, 6, 6);
 
-      if (z < 0)
+      if (isShowLabels())
       {
-        g.setColor(g.getColor().darker());
+        g.setColor(Color.red);
+        g.drawString(sp.getSequence().getName(), x - 3, y - 4);
       }
-
-      g.fillRect(x - 3, y - 3, 6, 6);
-      if (showLabels)
+    }
+    if (isShowLabels())
+    {
+      g.setColor(AXIS_COLOUR);
+      int midX = getWidth() / 2;
+      int midY = getHeight() / 2;
+      Iterator<String> axes = AXES.iterator();
+      for (Point p : getAxisEndPoints())
       {
-        g.setColor(Color.red);
-        g.drawString(
-                ((SequencePoint) points.elementAt(i)).sequence.getName(),
-                x - 3, y - 4);
+        int x = midX + (int) (p.x * scaleBy * seqMax[0]);
+        int y = midY + (int) (p.y * scaleBy * seqMax[1]);
+        g.drawString(axes.next(), x - 3, y - 4);
       }
     }
-
     // //Now the rectangle
     // if (rectx2 != -1 && recty2 != -1) {
     // g.setColor(Color.white);
@@ -532,128 +413,147 @@ public class RotatableCanvas extends JPanel implements MouseListener,
   }
 
   /**
-   * DOCUMENT ME!
+   * Determines the colour to use when drawing a sequence point. The colour is
+   * taken from the sequence id, with black converted to white, and then
+   * graduated from darker (at the back) to brighter (at the front) based on the
+   * z-axis coordinate of the point.
    * 
-   * @return DOCUMENT ME!
+   * @param sp
+   * @return
    */
-  public Dimension minimumsize()
+  protected Color getSequencePointColour(SequencePoint sp)
   {
-    return prefsize;
-  }
+    SequenceI sequence = sp.getSequence();
+    Color sequenceColour = av.getSequenceColour(sequence);
+    if (sequenceColour == Color.black)
+    {
+      sequenceColour = Color.white;
+    }
+    if (av.getSelectionGroup() != null)
+    {
+      if (av.getSelectionGroup().getSequences(null).contains(sequence))
+      {
+        sequenceColour = Color.gray;
+      }
+    }
 
-  /**
-   * DOCUMENT ME!
-   * 
-   * @return DOCUMENT ME!
-   */
-  public Dimension preferredsize()
-  {
-    return prefsize;
+    /*
+     * graduate brighter for point in front of centre, darker if behind centre
+     */
+    float zCentre = (seqMin[2] + seqMax[2]) / 2f;
+    if (sp.coord.z > zCentre)
+    {
+      sequenceColour = ColorUtils.getGraduatedColour(sp.coord.z, 0,
+              sequenceColour, seqMax[2], sequenceColour.brighter());
+    }
+    else if (sp.coord.z < zCentre)
+    {
+      sequenceColour = ColorUtils.getGraduatedColour(sp.coord.z, seqMin[2],
+              sequenceColour.darker(), 0, sequenceColour);
+    }
+
+    return sequenceColour;
   }
 
-  /**
-   * DOCUMENT ME!
-   * 
-   * @param evt
-   *          DOCUMENT ME!
-   */
   @Override
   public void keyTyped(KeyEvent evt)
   {
   }
 
-  /**
-   * DOCUMENT ME!
-   * 
-   * @param evt
-   *          DOCUMENT ME!
-   */
   @Override
   public void keyReleased(KeyEvent evt)
   {
   }
 
   /**
-   * DOCUMENT ME!
+   * Responds to up or down arrow key by zooming in or out, respectively
    * 
    * @param evt
-   *          DOCUMENT ME!
    */
   @Override
   public void keyPressed(KeyEvent evt)
   {
-    if (evt.getKeyCode() == KeyEvent.VK_UP)
+    int keyCode = evt.getKeyCode();
+    boolean shiftDown = evt.isShiftDown();
+
+    if (keyCode == KeyEvent.VK_UP)
+    {
+      if (shiftDown)
+      {
+        rotate(0f, -1f);
+      }
+      else
+      {
+        zoom(ZOOM_IN);
+      }
+    }
+    else if (keyCode == KeyEvent.VK_DOWN)
+    {
+      if (shiftDown)
+      {
+        rotate(0f, 1f);
+      }
+      else
+      {
+        zoom(ZOOM_OUT);
+      }
+    }
+    else if (shiftDown && keyCode == KeyEvent.VK_LEFT)
     {
-      scalefactor = (float) (scalefactor * 1.1);
-      scale = findScale();
+      rotate(1f, 0f);
     }
-    else if (evt.getKeyCode() == KeyEvent.VK_DOWN)
+    else if (shiftDown && keyCode == KeyEvent.VK_RIGHT)
     {
-      scalefactor = (float) (scalefactor * 0.9);
-      scale = findScale();
+      rotate(-1f, 0f);
     }
     else if (evt.getKeyChar() == 's')
     {
-      System.err.println("DEBUG: Rectangle selection"); // log.debug
-
-      if ((rectx2 != -1) && (recty2 != -1))
-      {
-        rectSelect(rectx1, recty1, rectx2, recty2);
-      }
+      // Cache.log.warn("DEBUG: Rectangle selection");
+      // todo not yet enabled as rectx2, recty2 are always -1
+      // need to set them in mouseDragged; JAL-1124
+      // if ((rectx2 != -1) && (recty2 != -1))
+      // {
+      // rectSelect(rectx1, recty1, rectx2, recty2);
+      // }
     }
 
     repaint();
   }
 
-  /**
-   * DOCUMENT ME!
-   * 
-   * @param evt
-   *          DOCUMENT ME!
-   */
+  @Override
+  public void zoom(float factor)
+  {
+    if (factor > 0f)
+    {
+      setScaleFactor(getScaleFactor() * factor);
+    }
+  }
+
   @Override
   public void mouseClicked(MouseEvent evt)
   {
   }
 
-  /**
-   * DOCUMENT ME!
-   * 
-   * @param evt
-   *          DOCUMENT ME!
-   */
   @Override
   public void mouseEntered(MouseEvent evt)
   {
   }
 
-  /**
-   * DOCUMENT ME!
-   * 
-   * @param evt
-   *          DOCUMENT ME!
-   */
   @Override
   public void mouseExited(MouseEvent evt)
   {
   }
 
-  /**
-   * DOCUMENT ME!
-   * 
-   * @param evt
-   *          DOCUMENT ME!
-   */
   @Override
   public void mouseReleased(MouseEvent evt)
   {
   }
 
   /**
-   * DOCUMENT ME!
-   * 
-   * @param evt
-   *          DOCUMENT ME!
+   * If the mouse press is at (within 2 pixels of) a sequence point, toggles
+   * (adds or removes) the corresponding sequence as a member of the viewport
+   * selection group. This supports configuring a group in the alignment by
+   * clicking on points in the PCA display.
    */
   @Override
   public void mousePressed(MouseEvent evt)
@@ -661,22 +561,15 @@ public class RotatableCanvas extends JPanel implements MouseListener,
     int x = evt.getX();
     int y = evt.getY();
 
-    mx = x;
-    my = y;
-
-    omx = mx;
-    omy = my;
-
-    startx = x;
-    starty = y;
+    mouseX = x;
+    mouseY = y;
 
-    rectx1 = x;
-    recty1 = y;
+    // rectx1 = x;
+    // recty1 = y;
+    // rectx2 = -1;
+    // recty2 = -1;
 
-    rectx2 = -1;
-    recty2 = -1;
-
-    SequenceI found = findPoint(x, y);
+    SequenceI found = findSequenceAtPoint(x, y);
 
     if (found != null)
     {
@@ -704,36 +597,37 @@ public class RotatableCanvas extends JPanel implements MouseListener,
     repaint();
   }
 
-  // private void fireSequenceSelectionEvent(Selection sel) {
-  // controller.handleSequenceSelectionEvent(new
-  // SequenceSelectionEvent(this,sel));
-  // }
+  /**
+   * Sets the tooltip to the name of the sequence within 2 pixels of the mouse
+   * position, or clears the tooltip if none found
+   */
   @Override
   public void mouseMoved(MouseEvent evt)
   {
-    SequenceI found = findPoint(evt.getX(), evt.getY());
+    SequenceI found = findSequenceAtPoint(evt.getX(), evt.getY());
 
-    if (found != null)
-    {
-      this.setToolTipText(found.getName());
-    }
-    else
-    {
-      this.setToolTipText(null);
-    }
+    this.setToolTipText(found == null ? null : found.getName());
   }
 
   /**
-   * DOCUMENT ME!
+   * Action handler for a mouse drag. Rotates the display around the X axis (for
+   * up/down mouse movement) and/or the Y axis (for left/right mouse movement).
    * 
    * @param evt
-   *          DOCUMENT ME!
    */
   @Override
   public void mouseDragged(MouseEvent evt)
   {
-    mx = evt.getX();
-    my = evt.getY();
+    int xPos = evt.getX();
+    int yPos = evt.getY();
+
+    if (xPos == mouseX && yPos == mouseY)
+    {
+      return;
+    }
+
+    int xDelta = xPos - mouseX;
+    int yDelta = yPos - mouseY;
 
     // Check if this is a rectangle drawing drag
     if ((evt.getModifiers() & InputEvent.BUTTON2_MASK) != 0)
@@ -743,113 +637,178 @@ public class RotatableCanvas extends JPanel implements MouseListener,
     }
     else
     {
-      rotmat.setIdentity();
+      rotate(xDelta, yDelta);
 
-      rotmat.rotate(my - omy, 'x');
-      rotmat.rotate(mx - omx, 'y');
+      mouseX = xPos;
+      mouseY = yPos;
 
-      for (int i = 0; i < npoint; i++)
-      {
-        SequencePoint sp = (SequencePoint) points.elementAt(i);
-        sp.coord[0] -= centre[0];
-        sp.coord[1] -= centre[1];
-        sp.coord[2] -= centre[2];
-
-        // Now apply the rotation matrix
-        sp.coord = rotmat.vectorMultiply(sp.coord);
-
-        // Now translate back again
-        sp.coord[0] += centre[0];
-        sp.coord[1] += centre[1];
-        sp.coord[2] += centre[2];
-      }
+      // findWidths();
 
-      for (int i = 0; i < 3; i++)
-      {
-        axes[i] = rotmat.vectorMultiply(axes[i]);
-      }
+      repaint();
+    }
+  }
+
+  @Override
+  public void rotate(float x, float y)
+  {
+    if (x == 0f && y == 0f)
+    {
+      return;
+    }
+
+    /*
+     * get the identity transformation...
+     */
+    RotatableMatrix rotmat = new RotatableMatrix();
+
+    /*
+     * rotate around the X axis for change in Y
+     * (mouse movement up/down); note we are equating a
+     * number of pixels with degrees of rotation here!
+     */
+    if (y != 0)
+    {
+      rotmat.rotate(y, Axis.X);
+    }
+
+    /*
+     * rotate around the Y axis for change in X
+     * (mouse movement left/right)
+     */
+    if (x != 0)
+    {
+      rotmat.rotate(x, Axis.Y);
+    }
+
+    /*
+     * apply the composite transformation to sequence points;
+     * update z min-max range (affects colour graduation), but not
+     * x or y min-max (as this would affect axis scaling)
+     */
+    float[] centre = getCentre();
+    float zMin = Float.MAX_VALUE;
+    float zMax = -Float.MAX_VALUE;
+
+    for (int i = 0; i < npoint; i++)
+    {
+      SequencePoint sp = sequencePoints.get(i);
+      sp.translate(-centre[0], -centre[1], -centre[2]);
+
+      // Now apply the rotation matrix
+      sp.coord = rotmat.vectorMultiply(sp.coord);
+
+      // Now translate back again
+      sp.translate(centre[0], centre[1], centre[2]);
+      
+      zMin = Math.min(zMin, sp.coord.z);
+      zMax = Math.max(zMax, sp.coord.z);
+    }
 
-      omx = mx;
-      omy = my;
+    seqMin[2] = zMin;
+    seqMax[2] = zMax;
 
-      paint(this.getGraphics());
+    /*
+     * rotate the x/y/z axis positions
+     */
+    for (int i = 0; i < DIMS; i++)
+    {
+      getAxisEndPoints()[i] = rotmat.vectorMultiply(getAxisEndPoints()[i]);
     }
   }
 
   /**
-   * DOCUMENT ME!
+   * Answers the x/y/z coordinates that are midway between the maximum and
+   * minimum sequence point values
+   * 
+   * @return
+   */
+  private float[] getCentre()
+  {
+    float xCentre = (seqMin[0] + seqMax[0]) / 2f;
+    float yCentre = (seqMin[1] + seqMax[1]) / 2f;
+    float zCentre = (seqMin[2] + seqMax[2]) / 2f;
+
+    return new float[] { xCentre, yCentre, zCentre };
+  }
+
+  /**
+   * Adds any sequences whose displayed points are within the given rectangle to
+   * the viewport's current selection. Intended for key 's' after dragging to
+   * select a region of the PCA.
    * 
    * @param x1
-   *          DOCUMENT ME!
    * @param y1
-   *          DOCUMENT ME!
    * @param x2
-   *          DOCUMENT ME!
    * @param y2
-   *          DOCUMENT ME!
    */
-  public void rectSelect(int x1, int y1, int x2, int y2)
+  protected void rectSelect(int x1, int y1, int x2, int y2)
   {
+    float[] centre = getCentre();
+
     for (int i = 0; i < npoint; i++)
     {
-      SequencePoint sp = (SequencePoint) points.elementAt(i);
-      int tmp1 = (int) (((sp.coord[0] - centre[0]) * scale)
+      SequencePoint sp = sequencePoints.get(i);
+      int tmp1 = (int) (((sp.coord.x - centre[0]) * getScaleFactor())
               + (getWidth() / 2.0));
-      int tmp2 = (int) (((sp.coord[1] - centre[1]) * scale)
+      int tmp2 = (int) (((sp.coord.y - centre[1]) * getScaleFactor())
               + (getHeight() / 2.0));
 
       if ((tmp1 > x1) && (tmp1 < x2) && (tmp2 > y1) && (tmp2 < y2))
       {
         if (av != null)
         {
+          SequenceI sequence = sp.getSequence();
           if (!av.getSelectionGroup().getSequences(null)
-                  .contains(sp.sequence))
+                  .contains(sequence))
           {
-            av.getSelectionGroup().addSequence(sp.sequence, true);
+            av.getSelectionGroup().addSequence(sequence, true);
           }
         }
       }
     }
-
-    // if (changedSel) {
-    // fireSequenceSelectionEvent(av.getSelection());
-    // }
   }
 
   /**
-   * DOCUMENT ME!
+   * Answers the first sequence found whose point on the display is within 2
+   * pixels of the given coordinates, or null if none is found
    * 
    * @param x
-   *          DOCUMENT ME!
    * @param y
-   *          DOCUMENT ME!
    * 
-   * @return DOCUMENT ME!
+   * @return
    */
-  public SequenceI findPoint(int x, int y)
+  protected SequenceI findSequenceAtPoint(int x, int y)
   {
     int halfwidth = getWidth() / 2;
     int halfheight = getHeight() / 2;
 
     int found = -1;
+    int pix = Math.min(getWidth(), getHeight());
+    float xWidth = Math.abs(seqMax[0] - seqMin[0]);
+    float yWidth = Math.abs(seqMax[1] - seqMin[1]);
+    float maxWidth = Math.max(xWidth, yWidth);
+    float scaleBy = pix * getScaleFactor() / (2f * maxWidth);
+
+    float[] centre = getCentre();
 
     for (int i = 0; i < npoint; i++)
     {
-      SequencePoint sp = (SequencePoint) points.elementAt(i);
-      int px = (int) ((sp.coord[0] - centre[0]) * scale)
+      SequencePoint sp = sequencePoints.get(i);
+      int px = (int) ((sp.coord.x - centre[0]) * scaleBy)
               + halfwidth;
-      int py = (int) ((sp.coord[1] - centre[1]) * scale)
+      int py = (int) ((sp.coord.y - centre[1]) * scaleBy)
               + halfheight;
 
-      if ((Math.abs(px - x) < 3) && (Math.abs(py - y) < 3))
+      if ((Math.abs(px - x) < NEARBY) && (Math.abs(py - y) < NEARBY))
       {
         found = i;
+        break;
       }
     }
 
     if (found != -1)
     {
-      return ((SequencePoint) points.elementAt(found)).sequence;
+      return sequencePoints.get(found).getSequence();
     }
     else
     {
@@ -857,9 +816,15 @@ public class RotatableCanvas extends JPanel implements MouseListener,
     }
   }
 
+  /**
+   * Answers the panel the PCA is associated with (all panels for this alignment
+   * if 'associate with all panels' is selected).
+   * 
+   * @return
+   */
   AlignmentPanel[] getAssociatedPanels()
   {
-    if (applyToAllViews)
+    if (isApplyToAllViews())
     {
       return PaintRefresher.getAssociatedPanels(av.getSequenceSetId());
     }
@@ -869,19 +834,114 @@ public class RotatableCanvas extends JPanel implements MouseListener,
     }
   }
 
+  public Color getBackgroundColour()
+  {
+    return getBgColour();
+  }
+
+  /**
+   * Zooms in or out in response to mouse wheel movement
+   */
+  @Override
+  public void mouseWheelMoved(MouseWheelEvent e)
+  {
+    double wheelRotation = e.getPreciseWheelRotation();
+    if (wheelRotation > 0)
+    {
+      zoom(ZOOM_IN);
+      repaint();
+    }
+    else if (wheelRotation < 0)
+    {
+      zoom(ZOOM_OUT);
+      repaint();
+    }
+  }
+
+  /**
+   * Answers the sequence point minimum [x, y, z] values. Note these are derived
+   * when sequence points are set, but x and y values are not updated on
+   * rotation (because this would result in changes to scaling).
+   * 
+   * @return
+   */
+  public float[] getSeqMin()
+  {
+    return seqMin;
+  }
+
+  /**
+   * Answers the sequence point maximum [x, y, z] values. Note these are derived
+   * when sequence points are set, but x and y values are not updated on
+   * rotation (because this would result in changes to scaling).
+   * 
+   * @return
+   */
+  public float[] getSeqMax()
+  {
+    return seqMax;
+  }
+
   /**
+   * Sets the minimum and maximum [x, y, z] positions for sequence points. For
+   * use when restoring a saved PCA from state data.
    * 
-   * @return x,y,z positions of point s (index into points) under current
-   *         transform.
+   * @param min
+   * @param max
    */
-  public double[] getPointPosition(int s)
+  public void setSeqMinMax(float[] min, float[] max)
+  {
+    seqMin = min;
+    seqMax = max;
+  }
+
+  public float getScaleFactor()
+  {
+    return scaleFactor;
+  }
+
+  public void setScaleFactor(float scaleFactor)
+  {
+    this.scaleFactor = scaleFactor;
+  }
+
+  public boolean isShowLabels()
   {
-    double pts[] = new double[3];
-    float[] p = ((SequencePoint) points.elementAt(s)).coord;
-    pts[0] = p[0];
-    pts[1] = p[1];
-    pts[2] = p[2];
-    return pts;
+    return showLabels;
   }
 
+  public void setShowLabels(boolean showLabels)
+  {
+    this.showLabels = showLabels;
+  }
+
+  public boolean isApplyToAllViews()
+  {
+    return applyToAllViews;
+  }
+
+  public void setApplyToAllViews(boolean applyToAllViews)
+  {
+    this.applyToAllViews = applyToAllViews;
+  }
+
+  public Point[] getAxisEndPoints()
+  {
+    return axisEndPoints;
+  }
+
+  public void setAxisEndPoints(Point[] axisEndPoints)
+  {
+    this.axisEndPoints = axisEndPoints;
+  }
+
+  public Color getBgColour()
+  {
+    return bgColour;
+  }
+
+  public void setBgColour(Color bgColour)
+  {
+    this.bgColour = bgColour;
+  }
 }
index 6abee08..b392c8f 100755 (executable)
@@ -23,7 +23,6 @@ package jalview.gui;
 import jalview.datamodel.ColumnSelection;
 import jalview.datamodel.HiddenColumns;
 import jalview.datamodel.SequenceGroup;
-import jalview.datamodel.SequenceI;
 import jalview.renderer.ScaleRenderer;
 import jalview.renderer.ScaleRenderer.ScaleMark;
 import jalview.util.MessageManager;
@@ -35,6 +34,7 @@ import java.awt.Color;
 import java.awt.FontMetrics;
 import java.awt.Graphics;
 import java.awt.Graphics2D;
+import java.awt.Point;
 import java.awt.RenderingHints;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
@@ -158,7 +158,12 @@ public class ScalePanel extends JPanel
   protected void rightMouseButtonPressed(MouseEvent evt, final int res)
   {
     JPopupMenu pop = new JPopupMenu();
-    if (reveal != null)
+
+    /*
+     * grab the hidden range in case mouseMoved nulls it
+     */
+    final int[] hiddenRange = reveal;
+    if (hiddenRange != null)
     {
       JMenuItem item = new JMenuItem(
               MessageManager.getString("label.reveal"));
@@ -167,8 +172,9 @@ public class ScalePanel extends JPanel
         @Override
         public void actionPerformed(ActionEvent e)
         {
-          av.showColumn(reveal[0]);
+          av.showColumn(hiddenRange[0]);
           reveal = null;
+          ap.updateLayout();
           ap.paintAlignment(true, true);
           av.sendSelection();
         }
@@ -185,6 +191,7 @@ public class ScalePanel extends JPanel
           {
             av.showAllHiddenColumns();
             reveal = null;
+            ap.updateLayout();
             ap.paintAlignment(true, true);
             av.sendSelection();
           }
@@ -209,6 +216,7 @@ public class ScalePanel extends JPanel
             av.setSelectionGroup(null);
           }
 
+          ap.updateLayout();
           ap.paintAlignment(true, true);
           av.sendSelection();
         }
@@ -237,15 +245,7 @@ public class ScalePanel extends JPanel
     }
 
     av.getColumnSelection().addElement(res);
-    SequenceGroup sg = new SequenceGroup();
-    // try to be as quick as possible
-    SequenceI[] iVec = av.getAlignment().getSequencesArray();
-    for (int i = 0; i < iVec.length; i++)
-    {
-      sg.addSequence(iVec[i], false);
-      iVec[i] = null;
-    }
-    iVec = null;
+    SequenceGroup sg = new SequenceGroup(av.getAlignment().getSequences());
     sg.setStartRes(res);
     sg.setEndRes(res);
 
@@ -266,31 +266,29 @@ public class ScalePanel extends JPanel
   }
 
   /**
-   * DOCUMENT ME!
+   * Action on mouseUp is to set the limit of the current selection group (if
+   * there is one) and broadcast the selection
    * 
    * @param evt
-   *          DOCUMENT ME!
    */
   @Override
   public void mouseReleased(MouseEvent evt)
   {
+    boolean wasDragging = mouseDragging;
     mouseDragging = false;
+    ap.getSeqPanel().stopScrolling();
 
     int xCords = Math.max(0, evt.getX()); // prevent negative X coordinates
-
+    ViewportRanges ranges = av.getRanges();
     int res = (xCords / av.getCharWidth())
-            + av.getRanges().getStartRes();
-
+            + ranges.getStartRes();
+    res = Math.min(res, ranges.getEndRes());
     if (av.hasHiddenColumns())
     {
       res = av.getAlignment().getHiddenColumns()
               .visibleToAbsoluteColumn(res);
     }
-
-    if (res >= av.getAlignment().getWidth())
-    {
-      res = av.getAlignment().getWidth() - 1;
-    }
+    res = Math.max(0, res);
 
     if (!stretchingGroup)
     {
@@ -317,15 +315,26 @@ public class ScalePanel extends JPanel
       {
         sg.setStartRes(res);
       }
+      if (wasDragging)
+      {
+        min = Math.min(res, min);
+        max = Math.max(res, max);
+        av.getColumnSelection().stretchGroup(res, sg, min, max);
+      }
     }
     stretchingGroup = false;
     ap.paintAlignment(false, false);
+    av.isSelectionGroupChanged(true);
+    av.isColSelChanged(true);
     av.sendSelection();
   }
 
   /**
    * Action on dragging the mouse in the scale panel is to expand or shrink the
-   * selection group range (including any hidden columns that it spans)
+   * selection group range (including any hidden columns that it spans). Note
+   * that the selection is only broadcast at the start of the drag (on
+   * mousePressed) and at the end (on mouseReleased), to avoid overload
+   * redrawing of other views.
    * 
    * @param evt
    */
@@ -358,16 +367,22 @@ public class ScalePanel extends JPanel
   {
     if (mouseDragging)
     {
-      ap.getSeqPanel().scrollCanvas(null);
+      ap.getSeqPanel().stopScrolling();
     }
   }
 
+  /**
+   * Action on leaving the panel bounds with mouse drag in progress is to start
+   * scrolling the alignment in the direction of the mouse. To restrict
+   * scrolling to left-right (not up-down), the y-value of the mouse position is
+   * replaced with zero.
+   */
   @Override
   public void mouseExited(MouseEvent evt)
   {
     if (mouseDragging)
     {
-      ap.getSeqPanel().scrollCanvas(evt);
+      ap.getSeqPanel().startScrolling(new Point(evt.getX(), 0));
     }
   }
 
index 5c404f0..b3fcc54 100755 (executable)
@@ -55,6 +55,11 @@ import javax.swing.JComponent;
  */
 public class SeqCanvas extends JComponent implements ViewportListenerI
 {
+  /*
+   * pixels gap between sequences and annotations when in wrapped mode
+   */
+  static final int SEQS_ANNOTATION_GAP = 3;
+
   private static final String ZEROS = "0000000000";
 
   final FeatureRenderer fr;
@@ -82,9 +87,9 @@ public class SeqCanvas extends JComponent implements ViewportListenerI
 
   private int labelWidthWest; // label left width in pixels if shown
 
-  private int wrappedSpaceAboveAlignment; // gap between widths
+  int wrappedSpaceAboveAlignment; // gap between widths
 
-  private int wrappedRepeatHeightPx; // height in pixels of wrapped width
+  int wrappedRepeatHeightPx; // height in pixels of wrapped width
 
   private int wrappedVisibleWidths; // number of wrapped widths displayed
 
@@ -559,7 +564,7 @@ public class SeqCanvas extends JComponent implements ViewportListenerI
     calculateWrappedGeometry(canvasWidth, canvasHeight);
 
     /*
-     * draw one width at a time (excluding any scales or annotation shown),
+     * draw one width at a time (excluding any scales shown),
      * until we have run out of either alignment or vertical space available
      */
     int ypos = wrappedSpaceAboveAlignment;
@@ -606,14 +611,22 @@ public class SeqCanvas extends JComponent implements ViewportListenerI
             * (av.getScaleAboveWrapped() ? 2 : 1);
 
     /*
-     * height in pixels of the wrapped widths
+     * compute height in pixels of the wrapped widths
+     * - start with space above plus sequences
      */
     wrappedRepeatHeightPx = wrappedSpaceAboveAlignment;
-    // add sequences
     wrappedRepeatHeightPx += av.getAlignment().getHeight()
             * charHeight;
-    // add annotations panel height if shown
-    wrappedRepeatHeightPx += getAnnotationHeight();
+
+    /*
+     * add annotations panel height if shown
+     * also gap between sequences and annotations
+     */
+    if (av.isShowAnnotation())
+    {
+      wrappedRepeatHeightPx += getAnnotationHeight();
+      wrappedRepeatHeightPx += SEQS_ANNOTATION_GAP; // 3px
+    }
 
     /*
      * number of visible widths (the last one may be part height),
@@ -657,8 +670,9 @@ public class SeqCanvas extends JComponent implements ViewportListenerI
    * @param endColumn
    * @param canvasHeight
    */
-  protected void drawWrappedWidth(Graphics g, int ypos, int startColumn,
-          int endColumn, int canvasHeight)
+  protected void drawWrappedWidth(Graphics g, final int ypos,
+          final int startColumn, final int endColumn,
+          final int canvasHeight)
   {
     ViewportRanges ranges = av.getRanges();
     int viewportWidth = ranges.getViewportWidth();
@@ -705,7 +719,8 @@ public class SeqCanvas extends JComponent implements ViewportListenerI
 
     if (av.isShowAnnotation())
     {
-      g.translate(0, cHeight + ypos + 3);
+      final int yShift = cHeight + ypos + SEQS_ANNOTATION_GAP;
+      g.translate(0, yShift);
       if (annotations == null)
       {
         annotations = new AnnotationPanel(av);
@@ -713,7 +728,7 @@ public class SeqCanvas extends JComponent implements ViewportListenerI
 
       annotations.renderer.drawComponent(annotations, av, g, -1,
               startColumn, endx + 1);
-      g.translate(0, -cHeight - ypos - 3);
+      g.translate(0, -yShift);
     }
     g.setClip(clip);
     g.translate(-xOffset, 0);
@@ -855,13 +870,7 @@ public class SeqCanvas extends JComponent implements ViewportListenerI
     int startx = startRes;
     int endx;
     int ypos = hgap; // vertical offset
-    int maxwidth = av.getAlignment().getWidth();
-
-    if (av.hasHiddenColumns())
-    {
-      maxwidth = av.getAlignment().getHiddenColumns()
-              .absoluteToVisibleColumn(maxwidth);
-    }
+    int maxwidth = av.getAlignment().getVisibleWidth();
 
     // chop the wrapped alignment extent up into panel-sized blocks and treat
     // each block as if it were a block from an unwrapped alignment
@@ -1646,7 +1655,7 @@ public class SeqCanvas extends JComponent implements ViewportListenerI
       }
       ViewportRanges vpRanges = av.getRanges();
 
-      int range = vpRanges.getEndRes() - vpRanges.getStartRes();
+      int range = vpRanges.getEndRes() - vpRanges.getStartRes() + 1;
       if (scrollX > range)
       {
         scrollX = range;
@@ -1715,10 +1724,10 @@ public class SeqCanvas extends JComponent implements ViewportListenerI
   {
     ViewportRanges ranges = av.getRanges();
 
-    if (Math.abs(scrollX) > ranges.getViewportWidth())
+    if (Math.abs(scrollX) >= ranges.getViewportWidth())
     {
       /*
-       * shift of more than one view width is 
+       * shift of one view width or more is 
        * overcomplicated to handle in this method
        */
       fastPaint = false;
@@ -1909,10 +1918,17 @@ public class SeqCanvas extends JComponent implements ViewportListenerI
 
       while (y >= 0)
       {
+        /*
+         * shift 'widthToCopy' residues by 'positions' places to the right
+         */
         gg.copyArea(copyFromLeftStart, y, widthToCopy, heightToCopy,
                 positions * charWidth, 0);
         if (y > 0)
         {
+          /*
+           * copy 'positions' residue from the row above (right hand end)
+           * to this row's left hand end
+           */
           gg.copyArea(copyFromRightStart, y - wrappedRepeatHeightPx,
                   positions * charWidth, heightToCopy, -widthToCopy,
                   wrappedRepeatHeightPx);
index 8b2e7bc..1176df5 100644 (file)
@@ -25,6 +25,7 @@ import jalview.bin.Cache;
 import jalview.commands.EditCommand;
 import jalview.commands.EditCommand.Action;
 import jalview.commands.EditCommand.Edit;
+import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.ColumnSelection;
 import jalview.datamodel.HiddenColumns;
@@ -48,6 +49,7 @@ import jalview.util.MappingUtils;
 import jalview.util.MessageManager;
 import jalview.util.Platform;
 import jalview.viewmodel.AlignmentViewport;
+import jalview.viewmodel.ViewportRanges;
 
 import java.awt.BorderLayout;
 import java.awt.Color;
@@ -76,6 +78,82 @@ public class SeqPanel extends JPanel
         implements MouseListener, MouseMotionListener, MouseWheelListener,
         SequenceListener, SelectionListener
 {
+  /*
+   * a class that holds computed mouse position
+   * - column of the alignment (0...)
+   * - sequence offset (0...)
+   * - annotation row offset (0...)
+   * where annotation offset is -1 unless the alignment is shown
+   * in wrapped mode, annotations are shown, and the mouse is
+   * over an annnotation row
+   */
+  static class MousePos
+  {
+    /*
+     * alignment column position of cursor (0...)
+     */
+    final int column;
+
+    /*
+     * index in alignment of sequence under cursor,
+     * or nearest above if cursor is not over a sequence
+     */
+    final int seqIndex;
+
+    /*
+     * index in annotations array of annotation under the cursor
+     * (only possible in wrapped mode with annotations shown),
+     * or -1 if cursor is not over an annotation row
+     */
+    final int annotationIndex;
+
+    MousePos(int col, int seq, int ann)
+    {
+      column = col;
+      seqIndex = seq;
+      annotationIndex = ann;
+    }
+
+    boolean isOverAnnotation()
+    {
+      return annotationIndex != -1;
+    }
+
+    @Override
+    public boolean equals(Object obj)
+    {
+      if (obj == null || !(obj instanceof MousePos))
+      {
+        return false;
+      }
+      MousePos o = (MousePos) obj;
+      boolean b = (column == o.column && seqIndex == o.seqIndex
+              && annotationIndex == o.annotationIndex);
+      // System.out.println(obj + (b ? "= " : "!= ") + this);
+      return b;
+    }
+
+    /**
+     * A simple hashCode that ensures that instances that satisfy equals() have
+     * the same hashCode
+     */
+    @Override
+    public int hashCode()
+    {
+      return column + seqIndex + annotationIndex;
+    }
+
+    /**
+     * toString method for debug output purposes only
+     */
+    @Override
+    public String toString()
+    {
+      return String.format("c%d:s%d:a%d", column, seqIndex,
+              annotationIndex);
+    }
+  }
+
   private static final int MAX_TOOLTIP_LENGTH = 300;
 
   public SeqCanvas seqCanvas;
@@ -83,18 +161,13 @@ public class SeqPanel extends JPanel
   public AlignmentPanel ap;
 
   /*
-   * last column position for mouseMoved event
+   * last position for mouseMoved event
    */
-  private int lastMouseColumn;
+  private MousePos lastMousePosition;
 
-  /*
-   * last sequence offset for mouseMoved event
-   */
-  private int lastMouseSeq;
-
-  protected int lastres;
+  protected int editLastRes;
 
-  protected int startseq;
+  protected int editStartSeq;
 
   protected AlignViewport av;
 
@@ -176,9 +249,6 @@ public class SeqPanel extends JPanel
       ssm.addStructureViewerListener(this);
       ssm.addSelectionListener(this);
     }
-
-    lastMouseColumn = -1;
-    lastMouseSeq = -1;
   }
 
   int startWrapBlock = -1;
@@ -186,6 +256,73 @@ public class SeqPanel extends JPanel
   int wrappedBlock = -1;
 
   /**
+   * Computes the column and sequence row (and possibly annotation row when in
+   * wrapped mode) for the given mouse position
+   * 
+   * @param evt
+   * @return
+   */
+  MousePos findMousePosition(MouseEvent evt)
+  {
+    int col = findColumn(evt);
+    int seqIndex = -1;
+    int annIndex = -1;
+    int y = evt.getY();
+
+    int charHeight = av.getCharHeight();
+    int alignmentHeight = av.getAlignment().getHeight();
+    if (av.getWrapAlignment())
+    {
+      seqCanvas.calculateWrappedGeometry(seqCanvas.getWidth(),
+              seqCanvas.getHeight());
+
+      /*
+       * yPos modulo height of repeating width
+       */
+      int yOffsetPx = y % seqCanvas.wrappedRepeatHeightPx;
+
+      /*
+       * height of sequences plus space / scale above,
+       * plus gap between sequences and annotations
+       */
+      int alignmentHeightPixels = seqCanvas.wrappedSpaceAboveAlignment
+              + alignmentHeight * charHeight
+              + SeqCanvas.SEQS_ANNOTATION_GAP;
+      if (yOffsetPx >= alignmentHeightPixels)
+      {
+        /*
+         * mouse is over annotations; find annotation index, also set
+         * last sequence above (for backwards compatible behaviour)
+         */
+        AlignmentAnnotation[] anns = av.getAlignment()
+                .getAlignmentAnnotation();
+        int rowOffsetPx = yOffsetPx - alignmentHeightPixels;
+        annIndex = AnnotationPanel.getRowIndex(rowOffsetPx, anns);
+        seqIndex = alignmentHeight - 1;
+      }
+      else
+      {
+        /*
+         * mouse is over sequence (or the space above sequences)
+         */
+        yOffsetPx -= seqCanvas.wrappedSpaceAboveAlignment;
+        if (yOffsetPx >= 0)
+        {
+          seqIndex = Math.min(yOffsetPx / charHeight, alignmentHeight - 1);
+        }
+      }
+    }
+    else
+    {
+      ViewportRanges ranges = av.getRanges();
+      seqIndex = Math.min((y / charHeight) + ranges.getStartSeq(),
+              alignmentHeight - 1);
+      seqIndex = Math.min(seqIndex, ranges.getEndSeq());
+    }
+
+    return new MousePos(col, seqIndex, annIndex);
+  }
+  /**
    * Returns the aligned sequence position (base 0) at the mouse position, or
    * the closest visible one
    * 
@@ -197,10 +334,11 @@ public class SeqPanel extends JPanel
     int res = 0;
     int x = evt.getX();
 
-    int startRes = av.getRanges().getStartRes();
+    final int startRes = av.getRanges().getStartRes();
+    final int charWidth = av.getCharWidth();
+
     if (av.getWrapAlignment())
     {
-
       int hgap = av.getCharHeight();
       if (av.getScaleAboveWrapped())
       {
@@ -212,35 +350,40 @@ public class SeqPanel extends JPanel
 
       int y = evt.getY();
       y = Math.max(0, y - hgap);
-      x = Math.max(0, x - seqCanvas.getLabelWidthWest());
+      x -= seqCanvas.getLabelWidthWest();
+      if (x < 0)
+      {
+        // mouse is over left scale
+        return -1;
+      }
 
       int cwidth = seqCanvas.getWrappedCanvasWidth(this.getWidth());
       if (cwidth < 1)
       {
         return 0;
       }
+      if (x >= cwidth * charWidth)
+      {
+        // mouse is over right scale
+        return -1;
+      }
 
       wrappedBlock = y / cHeight;
       wrappedBlock += startRes / cwidth;
       // allow for wrapped view scrolled right (possible from Overview)
       int startOffset = startRes % cwidth;
       res = wrappedBlock * cwidth + startOffset
-              + +Math.min(cwidth - 1, x / av.getCharWidth());
+              + Math.min(cwidth - 1, x / charWidth);
     }
     else
     {
-      if (x > seqCanvas.getX() + seqCanvas.getWidth())
-      {
-        // make sure we calculate relative to visible alignment, rather than
-        // right-hand gutter
-        x = seqCanvas.getX() + seqCanvas.getWidth();
-      }
-      res = (x / av.getCharWidth()) + startRes;
-      if (res > av.getRanges().getEndRes())
-      {
-        // moused off right
-        res = av.getRanges().getEndRes();
-      }
+      /*
+       * make sure we calculate relative to visible alignment, 
+       * rather than right-hand gutter
+       */
+      x = Math.min(x, seqCanvas.getX() + seqCanvas.getWidth());
+      res = (x / charWidth) + startRes;
+      res = Math.min(res, av.getRanges().getEndRes());
     }
 
     if (av.hasHiddenColumns())
@@ -250,38 +393,6 @@ public class SeqPanel extends JPanel
     }
 
     return res;
-
-  }
-
-  int findSeq(MouseEvent evt)
-  {
-    int seq = 0;
-    int y = evt.getY();
-
-    if (av.getWrapAlignment())
-    {
-      int hgap = av.getCharHeight();
-      if (av.getScaleAboveWrapped())
-      {
-        hgap += av.getCharHeight();
-      }
-
-      int cHeight = av.getAlignment().getHeight() * av.getCharHeight()
-              + hgap + seqCanvas.getAnnotationHeight();
-
-      y -= hgap;
-
-      seq = Math.min((y % cHeight) / av.getCharHeight(),
-              av.getAlignment().getHeight() - 1);
-    }
-    else
-    {
-      seq = Math.min(
-              (y / av.getCharHeight()) + av.getRanges().getStartSeq(),
-              av.getAlignment().getHeight() - 1);
-    }
-
-    return seq;
   }
 
   /**
@@ -303,8 +414,8 @@ public class SeqPanel extends JPanel
       /*
        * Tidy up come what may...
        */
-      startseq = -1;
-      lastres = -1;
+      editStartSeq = -1;
+      editLastRes = -1;
       editingSeqs = false;
       groupEditing = false;
       keyboardNo1 = null;
@@ -532,8 +643,8 @@ public class SeqPanel extends JPanel
   void insertGapAtCursor(boolean group)
   {
     groupEditing = group;
-    startseq = seqCanvas.cursorY;
-    lastres = seqCanvas.cursorX;
+    editStartSeq = seqCanvas.cursorY;
+    editLastRes = seqCanvas.cursorX;
     editSequence(true, false, seqCanvas.cursorX + getKeyboardNo1());
     endEditing();
   }
@@ -541,8 +652,8 @@ public class SeqPanel extends JPanel
   void deleteGapAtCursor(boolean group)
   {
     groupEditing = group;
-    startseq = seqCanvas.cursorY;
-    lastres = seqCanvas.cursorX + getKeyboardNo1();
+    editStartSeq = seqCanvas.cursorY;
+    editLastRes = seqCanvas.cursorX + getKeyboardNo1();
     editSequence(false, false, seqCanvas.cursorX);
     endEditing();
   }
@@ -551,8 +662,8 @@ public class SeqPanel extends JPanel
   {
     // TODO not called - delete?
     groupEditing = group;
-    startseq = seqCanvas.cursorY;
-    lastres = seqCanvas.cursorX;
+    editStartSeq = seqCanvas.cursorY;
+    editLastRes = seqCanvas.cursorX;
     editSequence(false, true, seqCanvas.cursorX + getKeyboardNo1());
     endEditing();
   }
@@ -617,24 +728,31 @@ public class SeqPanel extends JPanel
   @Override
   public void mouseReleased(MouseEvent evt)
   {
+    MousePos pos = findMousePosition(evt);
+    if (pos.isOverAnnotation() || pos.seqIndex == -1 || pos.column == -1)
+    {
+      return;
+    }
+
     boolean didDrag = mouseDragging; // did we come here after a drag
     mouseDragging = false;
     mouseWheelPressed = false;
 
     if (evt.isPopupTrigger()) // Windows: mouseReleased
     {
-      showPopupMenu(evt);
+      showPopupMenu(evt, pos);
       evt.consume();
       return;
     }
 
-    if (!editingSeqs)
+    if (editingSeqs)
+    {
+      endEditing();
+    }
+    else
     {
       doMouseReleasedDefineMode(evt, didDrag);
-      return;
     }
-
-    endEditing();
   }
 
   /**
@@ -647,6 +765,11 @@ public class SeqPanel extends JPanel
   public void mousePressed(MouseEvent evt)
   {
     lastMousePress = evt.getPoint();
+    MousePos pos = findMousePosition(evt);
+    if (pos.isOverAnnotation() || pos.seqIndex == -1 || pos.column == -1)
+    {
+      return;
+    }
 
     if (SwingUtilities.isMiddleMouseButton(evt))
     {
@@ -665,28 +788,23 @@ public class SeqPanel extends JPanel
     }
     else
     {
-      doMousePressedDefineMode(evt);
+      doMousePressedDefineMode(evt, pos);
       return;
     }
 
-    int seq = findSeq(evt);
-    int res = findColumn(evt);
-
-    if (seq < 0 || res < 0)
-    {
-      return;
-    }
+    int seq = pos.seqIndex;
+    int res = pos.column;
 
     if ((seq < av.getAlignment().getHeight())
             && (res < av.getAlignment().getSequenceAt(seq).getLength()))
     {
-      startseq = seq;
-      lastres = res;
+      editStartSeq = seq;
+      editLastRes = res;
     }
     else
     {
-      startseq = -1;
-      lastres = -1;
+      editStartSeq = -1;
+      editLastRes = -1;
     }
 
     return;
@@ -731,7 +849,7 @@ public class SeqPanel extends JPanel
       // over residue to change abruptly, causing highlighted residue in panel 2
       // to change, causing a scroll in panel 1 etc)
       ap.setToScrollComplementPanel(false);
-      wasScrolled = ap.scrollToPosition(results, false);
+      wasScrolled = ap.scrollToPosition(results);
       if (wasScrolled)
       {
         seqCanvas.revalidate();
@@ -777,23 +895,32 @@ public class SeqPanel extends JPanel
       mouseDragged(evt);
     }
 
-    final int column = findColumn(evt);
-    final int seq = findSeq(evt);
+    final MousePos mousePos = findMousePosition(evt);
+    if (mousePos.equals(lastMousePosition))
+    {
+      /*
+       * just a pixel move without change of 'cell'
+       */
+      return;
+    }
+    lastMousePosition = mousePos;
 
-    if (column < 0 || seq < 0 || seq >= av.getAlignment().getHeight())
+    if (mousePos.isOverAnnotation())
     {
-      lastMouseSeq = -1;
+      mouseMovedOverAnnotation(mousePos);
       return;
     }
-    if (column == lastMouseColumn && seq == lastMouseSeq)
+    final int seq = mousePos.seqIndex;
+
+    final int column = mousePos.column;
+    if (column < 0 || seq < 0 || seq >= av.getAlignment().getHeight())
     {
-      /*
-       * just a pixel move without change of residue
-       */
+      lastMousePosition = null;
+      setToolTipText(null);
+      lastTooltip = null;
+      ap.alignFrame.setStatus("");
       return;
     }
-    lastMouseColumn = column;
-    lastMouseSeq = seq;
 
     SequenceI sequence = av.getAlignment().getSequenceAt(seq);
 
@@ -871,6 +998,35 @@ public class SeqPanel extends JPanel
     }
   }
 
+  /**
+   * When the view is in wrapped mode, and the mouse is over an annotation row,
+   * shows the corresponding tooltip and status message (if any)
+   * 
+   * @param pos
+   * @param column
+   */
+  protected void mouseMovedOverAnnotation(MousePos pos)
+  {
+    final int column = pos.column;
+    final int rowIndex = pos.annotationIndex;
+
+    if (column < 0 || !av.getWrapAlignment() || !av.isShowAnnotation()
+            || rowIndex < 0)
+    {
+      return;
+    }
+    AlignmentAnnotation[] anns = av.getAlignment().getAlignmentAnnotation();
+
+    String tooltip = AnnotationPanel.buildToolTip(anns[rowIndex], column,
+            anns);
+    setToolTipText(tooltip);
+    lastTooltip = tooltip;
+
+    String msg = AnnotationPanel.getStatusMessage(av.getAlignment(), column,
+            anns[rowIndex]);
+    ap.alignFrame.setStatus(msg);
+  }
+
   private Point lastp = null;
 
   /*
@@ -881,20 +1037,26 @@ public class SeqPanel extends JPanel
   @Override
   public Point getToolTipLocation(MouseEvent event)
   {
-    int x = event.getX(), w = getWidth();
-    int wdth = (w - x < 200) ? -(w / 2) : 5; // switch sides when tooltip is too
-    // close to edge
+    if (tooltipText == null || tooltipText.length() <= 6)
+    {
+      lastp = null;
+      return null;
+    }
+
+    int x = event.getX();
+    int w = getWidth();
+    // switch sides when tooltip is too close to edge
+    int wdth = (w - x < 200) ? -(w / 2) : 5;
     Point p = lastp;
     if (!event.isShiftDown() || p == null)
     {
-      p = (tooltipText != null && tooltipText.length() > 6)
-              ? new Point(event.getX() + wdth, event.getY() - 20)
-              : null;
+      p = new Point(event.getX() + wdth, event.getY() - 20);
+      lastp = p;
     }
     /*
-     * TODO: try to modify position region is not obcured by tooltip
+     * TODO: try to set position so region is not obscured by tooltip
      */
-    return lastp = p;
+    return p;
   }
 
   String lastTooltip;
@@ -997,7 +1159,7 @@ public class SeqPanel extends JPanel
 
       text.append(" (").append(Integer.toString(residuePos)).append(")");
     }
-    ap.alignFrame.statusBar.setText(text.toString());
+    ap.alignFrame.setStatus(text.toString());
   }
 
   /**
@@ -1039,6 +1201,12 @@ public class SeqPanel extends JPanel
   @Override
   public void mouseDragged(MouseEvent evt)
   {
+    MousePos pos = findMousePosition(evt);
+    if (pos.isOverAnnotation() || pos.column == -1)
+    {
+      return;
+    }
+
     if (mouseWheelPressed)
     {
       boolean inSplitFrame = ap.av.getCodingComplement() != null;
@@ -1134,23 +1302,23 @@ public class SeqPanel extends JPanel
 
     if (!editingSeqs)
     {
-      doMouseDraggedDefineMode(evt);
+      dragStretchGroup(evt);
       return;
     }
 
-    int res = findColumn(evt);
+    int res = pos.column;
 
     if (res < 0)
     {
       res = 0;
     }
 
-    if ((lastres == -1) || (lastres == res))
+    if ((editLastRes == -1) || (editLastRes == res))
     {
       return;
     }
 
-    if ((res < av.getAlignment().getWidth()) && (res < lastres))
+    if ((res < av.getAlignment().getWidth()) && (res < editLastRes))
     {
       // dragLeft, delete gap
       editSequence(false, false, res);
@@ -1161,22 +1329,46 @@ public class SeqPanel extends JPanel
     }
 
     mouseDragging = true;
-    if ((scrollThread != null) && (scrollThread.isRunning()))
+    if (scrollThread != null)
     {
-      scrollThread.setEvent(evt);
+      scrollThread.setMousePosition(evt.getPoint());
     }
   }
 
-  // TODO: Make it more clever than many booleans
+  /**
+   * Edits the sequence to insert or delete one or more gaps, in response to a
+   * mouse drag or cursor mode command. The number of inserts/deletes may be
+   * specified with the cursor command, or else depends on the mouse event
+   * (normally one column, but potentially more for a fast mouse drag).
+   * <p>
+   * Delete gaps is limited to the number of gaps left of the cursor position
+   * (mouse drag), or at or right of the cursor position (cursor mode).
+   * <p>
+   * In group editing mode (Ctrl or Cmd down), the edit acts on all sequences in
+   * the current selection group.
+   * <p>
+   * In locked editing mode (with a selection group present), inserts/deletions
+   * within the selection group are limited to its boundaries (and edits outside
+   * the group stop at its border).
+   * 
+   * @param insertGap
+   *          true to insert gaps, false to delete gaps
+   * @param editSeq
+   *          (unused parameter)
+   * @param startres
+   *          the column at which to perform the action; the number of columns
+   *          affected depends on <code>this.editLastRes</code> (cursor column
+   *          position)
+   */
   synchronized void editSequence(boolean insertGap, boolean editSeq,
-          int startres)
+          final int startres)
   {
     int fixedLeft = -1;
     int fixedRight = -1;
     boolean fixedColumns = false;
     SequenceGroup sg = av.getSelectionGroup();
 
-    SequenceI seq = av.getAlignment().getSequenceAt(startseq);
+    final SequenceI seq = av.getAlignment().getSequenceAt(editStartSeq);
 
     // No group, but the sequence may represent a group
     if (!groupEditing && av.hasHiddenRows())
@@ -1188,30 +1380,38 @@ public class SeqPanel extends JPanel
       }
     }
 
-    StringBuilder message = new StringBuilder(64);
+    StringBuilder message = new StringBuilder(64); // for status bar
+
+    /*
+     * make a name for the edit action, for
+     * status bar message and Undo/Redo menu
+     */
+    String label = null;
     if (groupEditing)
     {
-      message.append("Edit group:");
-      if (editCommand == null)
-      {
-        editCommand = new EditCommand(
-                MessageManager.getString("action.edit_group"));
-      }
+        message.append("Edit group:");
+      label = MessageManager.getString("action.edit_group");
     }
     else
     {
-      message.append("Edit sequence: " + seq.getName());
-      String label = seq.getName();
+        message.append("Edit sequence: " + seq.getName());
+      label = seq.getName();
       if (label.length() > 10)
       {
         label = label.substring(0, 10);
       }
-      if (editCommand == null)
-      {
-        editCommand = new EditCommand(MessageManager
-                .formatMessage("label.edit_params", new String[]
-                { label }));
-      }
+      label = MessageManager.formatMessage("label.edit_params",
+              new String[]
+              { label });
+    }
+
+    /*
+     * initialise the edit command if there is not
+     * already one being extended
+     */
+    if (editCommand == null)
+    {
+      editCommand = new EditCommand(label);
     }
 
     if (insertGap)
@@ -1223,12 +1423,17 @@ public class SeqPanel extends JPanel
       message.append(" delete ");
     }
 
-    message.append(Math.abs(startres - lastres) + " gaps.");
-    ap.alignFrame.statusBar.setText(message.toString());
+    message.append(Math.abs(startres - editLastRes) + " gaps.");
+    ap.alignFrame.setStatus(message.toString());
 
-    // Are we editing within a selection group?
-    if (groupEditing || (sg != null
-            && sg.getSequences(av.getHiddenRepSequences()).contains(seq)))
+    /*
+     * is there a selection group containing the sequence being edited?
+     * if so the boundary of the group is the limit of the edit
+     * (but the edit may be inside or outside the selection group)
+     */
+    boolean inSelectionGroup = sg != null
+            && sg.getSequences(av.getHiddenRepSequences()).contains(seq);
+    if (groupEditing || inSelectionGroup)
     {
       fixedColumns = true;
 
@@ -1247,10 +1452,10 @@ public class SeqPanel extends JPanel
       fixedLeft = sg.getStartRes();
       fixedRight = sg.getEndRes();
 
-      if ((startres < fixedLeft && lastres >= fixedLeft)
-              || (startres >= fixedLeft && lastres < fixedLeft)
-              || (startres > fixedRight && lastres <= fixedRight)
-              || (startres <= fixedRight && lastres > fixedRight))
+      if ((startres < fixedLeft && editLastRes >= fixedLeft)
+              || (startres >= fixedLeft && editLastRes < fixedLeft)
+              || (startres > fixedRight && editLastRes <= fixedRight)
+              || (startres <= fixedRight && editLastRes > fixedRight))
       {
         endEditing();
         return;
@@ -1276,8 +1481,8 @@ public class SeqPanel extends JPanel
       int y2 = av.getAlignment().getHiddenColumns()
               .getNextHiddenBoundary(false, startres);
 
-      if ((insertGap && startres > y1 && lastres < y1)
-              || (!insertGap && startres < y2 && lastres > y2))
+      if ((insertGap && startres > y1 && editLastRes < y1)
+              || (!insertGap && startres < y2 && editLastRes > y2))
       {
         endEditing();
         return;
@@ -1298,6 +1503,54 @@ public class SeqPanel extends JPanel
       }
     }
 
+    boolean success = doEditSequence(insertGap, editSeq, startres,
+            fixedRight, fixedColumns, sg);
+
+    /*
+     * report what actually happened (might be less than
+     * what was requested), by inspecting the edit commands added
+     */
+    String msg = getEditStatusMessage(editCommand);
+    ap.alignFrame.setStatus(msg == null ? " " : msg);
+    if (!success)
+    {
+      endEditing();
+    }
+
+    editLastRes = startres;
+    seqCanvas.repaint();
+  }
+
+  /**
+   * A helper method that performs the requested editing to insert or delete
+   * gaps (if possible). Answers true if the edit was successful, false if could
+   * only be performed in part or not at all. Failure may occur in 'locked edit'
+   * mode, when an insertion requires a matching gapped position (or column) to
+   * delete, and deletion requires an adjacent gapped position (or column) to
+   * remove.
+   * 
+   * @param insertGap
+   *          true if inserting gap(s), false if deleting
+   * @param editSeq
+   *          (unused parameter, currently always false)
+   * @param startres
+   *          the column at which to perform the edit
+   * @param fixedRight
+   *          fixed right boundary column of a locked edit (within or to the
+   *          left of a selection group)
+   * @param fixedColumns
+   *          true if this is a locked edit
+   * @param sg
+   *          the sequence group (if group edit is being performed)
+   * @return
+   */
+  protected boolean doEditSequence(final boolean insertGap,
+          final boolean editSeq, final int startres, int fixedRight,
+          final boolean fixedColumns, final SequenceGroup sg)
+  {
+    final SequenceI seq = av.getAlignment().getSequenceAt(editStartSeq);
+    SequenceI[] seqs = new SequenceI[] { seq };
+
     if (groupEditing)
     {
       List<SequenceI> vseqs = sg.getSequences(av.getHiddenRepSequences());
@@ -1316,7 +1569,8 @@ public class SeqPanel extends JPanel
         if (sg.getStartRes() == 0 && sg.getEndRes() == fixedRight
                 && sg.getEndRes() == av.getAlignment().getWidth() - 1)
         {
-          sg.setEndRes(av.getAlignment().getWidth() + startres - lastres);
+          sg.setEndRes(
+                  av.getAlignment().getWidth() + startres - editLastRes);
           fixedRight = sg.getEndRes();
         }
 
@@ -1324,15 +1578,16 @@ public class SeqPanel extends JPanel
         // Find the next gap before the end
         // of the visible region boundary
         boolean blank = false;
-        for (; fixedRight > lastres; fixedRight--)
+        for (; fixedRight > editLastRes; fixedRight--)
         {
           blank = true;
 
           for (g = 0; g < groupSize; g++)
           {
-            for (int j = 0; j < startres - lastres; j++)
+            for (int j = 0; j < startres - editLastRes; j++)
             {
-              if (!Comparison.isGap(groupSeqs[g].getCharAt(fixedRight - j)))
+              if (!Comparison
+                      .isGap(groupSeqs[g].getCharAt(fixedRight - j)))
               {
                 blank = false;
                 break;
@@ -1349,12 +1604,11 @@ public class SeqPanel extends JPanel
         {
           if (sg.getSize() == av.getAlignment().getHeight())
           {
-            if ((av.hasHiddenColumns() && startres < av.getAlignment()
-                    .getHiddenColumns()
-                    .getNextHiddenBoundary(false, startres)))
+            if ((av.hasHiddenColumns()
+                    && startres < av.getAlignment().getHiddenColumns()
+                            .getNextHiddenBoundary(false, startres)))
             {
-              endEditing();
-              return;
+              return false;
             }
 
             int alWidth = av.getAlignment().getWidth();
@@ -1369,13 +1623,12 @@ public class SeqPanel extends JPanel
             }
             // We can still insert gaps if the selectionGroup
             // contains all the sequences
-            sg.setEndRes(sg.getEndRes() + startres - lastres);
-            fixedRight = alWidth + startres - lastres;
+            sg.setEndRes(sg.getEndRes() + startres - editLastRes);
+            fixedRight = alWidth + startres - editLastRes;
           }
           else
           {
-            endEditing();
-            return;
+            return false;
           }
         }
       }
@@ -1388,7 +1641,7 @@ public class SeqPanel extends JPanel
 
         for (g = 0; g < groupSize; g++)
         {
-          for (int j = startres; j < lastres; j++)
+          for (int j = startres; j < editLastRes; j++)
           {
             if (groupSeqs[g].getLength() <= j)
             {
@@ -1398,8 +1651,7 @@ public class SeqPanel extends JPanel
             if (!Comparison.isGap(groupSeqs[g].getCharAt(j)))
             {
               // Not a gap, block edit not valid
-              endEditing();
-              return;
+              return false;
             }
           }
         }
@@ -1410,15 +1662,15 @@ public class SeqPanel extends JPanel
         // dragging to the right
         if (fixedColumns && fixedRight != -1)
         {
-          for (int j = lastres; j < startres; j++)
+          for (int j = editLastRes; j < startres; j++)
           {
-            insertChar(j, groupSeqs, fixedRight);
+            insertGap(j, groupSeqs, fixedRight);
           }
         }
         else
         {
           appendEdit(Action.INSERT_GAP, groupSeqs, startres,
-                  startres - lastres);
+                  startres - editLastRes, false);
         }
       }
       else
@@ -1426,7 +1678,7 @@ public class SeqPanel extends JPanel
         // dragging to the left
         if (fixedColumns && fixedRight != -1)
         {
-          for (int j = lastres; j > startres; j--)
+          for (int j = editLastRes; j > startres; j--)
           {
             deleteChar(startres, groupSeqs, fixedRight);
           }
@@ -1434,28 +1686,36 @@ public class SeqPanel extends JPanel
         else
         {
           appendEdit(Action.DELETE_GAP, groupSeqs, startres,
-                  lastres - startres);
+                  editLastRes - startres, false);
         }
-
       }
     }
     else
-    // ///Editing a single sequence///////////
     {
+      /*
+       * editing a single sequence
+       */
       if (insertGap)
       {
         // dragging to the right
         if (fixedColumns && fixedRight != -1)
         {
-          for (int j = lastres; j < startres; j++)
+          for (int j = editLastRes; j < startres; j++)
           {
-            insertChar(j, new SequenceI[] { seq }, fixedRight);
+            if (!insertGap(j, seqs, fixedRight))
+            {
+              /*
+               * e.g. cursor mode command specified 
+               * more inserts than are possible
+               */
+              return false;
+            }
           }
         }
         else
         {
-          appendEdit(Action.INSERT_GAP, new SequenceI[] { seq }, lastres,
-                  startres - lastres);
+          appendEdit(Action.INSERT_GAP, seqs, editLastRes,
+                  startres - editLastRes, false);
         }
       }
       else
@@ -1465,21 +1725,20 @@ public class SeqPanel extends JPanel
           // dragging to the left
           if (fixedColumns && fixedRight != -1)
           {
-            for (int j = lastres; j > startres; j--)
+            for (int j = editLastRes; j > startres; j--)
             {
               if (!Comparison.isGap(seq.getCharAt(startres)))
               {
-                endEditing();
-                break;
+                return false;
               }
-              deleteChar(startres, new SequenceI[] { seq }, fixedRight);
+              deleteChar(startres, seqs, fixedRight);
             }
           }
           else
           {
             // could be a keyboard edit trying to delete none gaps
             int max = 0;
-            for (int m = startres; m < lastres; m++)
+            for (int m = startres; m < editLastRes; m++)
             {
               if (!Comparison.isGap(seq.getCharAt(m)))
               {
@@ -1487,11 +1746,9 @@ public class SeqPanel extends JPanel
               }
               max++;
             }
-
             if (max > 0)
             {
-              appendEdit(Action.DELETE_GAP, new SequenceI[] { seq },
-                      startres, max);
+              appendEdit(Action.DELETE_GAP, seqs, startres, max, false);
             }
           }
         }
@@ -1499,25 +1756,82 @@ public class SeqPanel extends JPanel
         {// insertGap==false AND editSeq==TRUE;
           if (fixedColumns && fixedRight != -1)
           {
-            for (int j = lastres; j < startres; j++)
+            for (int j = editLastRes; j < startres; j++)
             {
-              insertChar(j, new SequenceI[] { seq }, fixedRight);
+              insertGap(j, seqs, fixedRight);
             }
           }
           else
           {
-            appendEdit(Action.INSERT_NUC, new SequenceI[] { seq }, lastres,
-                    startres - lastres);
+            appendEdit(Action.INSERT_NUC, seqs, editLastRes,
+                    startres - editLastRes, false);
           }
         }
       }
     }
 
-    lastres = startres;
-    seqCanvas.repaint();
+    return true;
   }
 
-  void insertChar(int j, SequenceI[] seq, int fixedColumn)
+  /**
+   * Constructs an informative status bar message while dragging to insert or
+   * delete gaps. Answers null if inserts and deletes cancel out.
+   * 
+   * @param editCommand
+   *          a command containing the list of individual edits
+   * @return
+   */
+  protected static String getEditStatusMessage(EditCommand editCommand)
+  {
+    if (editCommand == null)
+    {
+      return null;
+    }
+
+    /*
+     * add any inserts, and subtract any deletes,  
+     * not counting those auto-inserted when doing a 'locked edit'
+     * (so only counting edits 'under the cursor')
+     */
+    int count = 0;
+    for (Edit cmd : editCommand.getEdits())
+    {
+      if (!cmd.isSystemGenerated())
+      {
+        count += cmd.getAction() == Action.INSERT_GAP ? cmd.getNumber()
+                : -cmd.getNumber();
+      }
+    }
+
+    if (count == 0)
+    {
+      /*
+       * inserts and deletes cancel out
+       */
+      return null;
+    }
+
+    String msgKey = count > 1 ? "label.insert_gaps"
+            : (count == 1 ? "label.insert_gap"
+                    : (count == -1 ? "label.delete_gap"
+                            : "label.delete_gaps"));
+    count = Math.abs(count);
+
+    return MessageManager.formatMessage(msgKey, String.valueOf(count));
+  }
+
+  /**
+   * Inserts one gap at column j, deleting the right-most gapped column up to
+   * (and including) fixedColumn. Returns true if the edit is successful, false
+   * if no blank column is available to allow the insertion to be balanced by a
+   * deletion.
+   * 
+   * @param j
+   * @param seq
+   * @param fixedColumn
+   * @return
+   */
+  boolean insertGap(int j, SequenceI[] seq, int fixedColumn)
   {
     int blankColumn = fixedColumn;
     for (int s = 0; s < seq.length; s++)
@@ -1538,47 +1852,60 @@ public class SeqPanel extends JPanel
       {
         blankColumn = fixedColumn;
         endEditing();
-        return;
+        return false;
       }
     }
 
-    appendEdit(Action.DELETE_GAP, seq, blankColumn, 1);
+    appendEdit(Action.DELETE_GAP, seq, blankColumn, 1, true);
 
-    appendEdit(Action.INSERT_GAP, seq, j, 1);
+    appendEdit(Action.INSERT_GAP, seq, j, 1, false);
 
+    return true;
   }
 
   /**
-   * Helper method to add and perform one edit action.
+   * Helper method to add and perform one edit action
    * 
    * @param action
    * @param seq
    * @param pos
    * @param count
+   * @param systemGenerated
+   *          true if the edit is a 'balancing' delete (or insert) to match a
+   *          user's insert (or delete) in a locked editing region
    */
   protected void appendEdit(Action action, SequenceI[] seq, int pos,
-          int count)
+          int count, boolean systemGenerated)
   {
 
     final Edit edit = new EditCommand().new Edit(action, seq, pos, count,
             av.getAlignment().getGapCharacter());
+    edit.setSystemGenerated(systemGenerated);
 
     editCommand.appendEdit(edit, av.getAlignment(), true, null);
   }
 
-  void deleteChar(int j, SequenceI[] seq, int fixedColumn)
+  /**
+   * Deletes the character at column j, and inserts a gap at fixedColumn, in
+   * each of the given sequences. The caller should ensure that all sequences
+   * are gapped in column j.
+   * 
+   * @param j
+   * @param seqs
+   * @param fixedColumn
+   */
+  void deleteChar(int j, SequenceI[] seqs, int fixedColumn)
   {
+    appendEdit(Action.DELETE_GAP, seqs, j, 1, false);
 
-    appendEdit(Action.DELETE_GAP, seq, j, 1);
-
-    appendEdit(Action.INSERT_GAP, seq, fixedColumn, 1);
+    appendEdit(Action.INSERT_GAP, seqs, fixedColumn, 1, true);
   }
 
   /**
-   * DOCUMENT ME!
+   * On reentering the panel, stops any scrolling that was started on dragging
+   * out of the panel
    * 
    * @param e
-   *          DOCUMENT ME!
    */
   @Override
   public void mouseEntered(MouseEvent e)
@@ -1587,23 +1914,20 @@ public class SeqPanel extends JPanel
     {
       oldSeq = 0;
     }
-
-    if ((scrollThread != null) && (scrollThread.isRunning()))
-    {
-      scrollThread.stopScrolling();
-      scrollThread = null;
-    }
+    stopScrolling();
   }
 
   /**
-   * DOCUMENT ME!
+   * On leaving the panel, if the mouse is being dragged, starts a thread to
+   * scroll it until the mouse is released (in unwrapped mode only)
    * 
    * @param e
-   *          DOCUMENT ME!
    */
   @Override
   public void mouseExited(MouseEvent e)
   {
+    lastMousePosition = null;
+    ap.alignFrame.setStatus(" ");
     if (av.getWrapAlignment())
     {
       return;
@@ -1624,7 +1948,12 @@ public class SeqPanel extends JPanel
   public void mouseClicked(MouseEvent evt)
   {
     SequenceGroup sg = null;
-    SequenceI sequence = av.getAlignment().getSequenceAt(findSeq(evt));
+    MousePos pos = findMousePosition(evt);
+    if (pos.isOverAnnotation() || pos.seqIndex == -1 || pos.column == -1)
+    {
+      return;
+    }
+
     if (evt.getClickCount() > 1)
     {
       sg = av.getSelectionGroup();
@@ -1634,12 +1963,13 @@ public class SeqPanel extends JPanel
         av.setSelectionGroup(null);
       }
 
-      int column = findColumn(evt);
+      int column = pos.column;
 
       /*
        * find features at the position (if not gapped), or straddling
        * the position (if at a gap)
        */
+      SequenceI sequence = av.getAlignment().getSequenceAt(pos.seqIndex);
       List<SequenceFeature> features = seqCanvas.getFeatureRenderer()
               .findFeaturesAtColumn(sequence, column + 1);
 
@@ -1706,32 +2036,22 @@ public class SeqPanel extends JPanel
   /**
    * DOCUMENT ME!
    * 
-   * @param evt
+   * @param pos
    *          DOCUMENT ME!
    */
-  public void doMousePressedDefineMode(MouseEvent evt)
+  protected void doMousePressedDefineMode(MouseEvent evt, MousePos pos)
   {
-    final int res = findColumn(evt);
-    final int seq = findSeq(evt);
-    oldSeq = seq;
-    updateOverviewAndStructs = false;
-
-    startWrapBlock = wrappedBlock;
-
-    if (av.getWrapAlignment() && seq > av.getAlignment().getHeight())
+    if (pos.isOverAnnotation() || pos.seqIndex == -1 || pos.column == -1)
     {
-      JvOptionPane.showInternalMessageDialog(Desktop.desktop,
-              MessageManager.getString(
-                      "label.cannot_edit_annotations_in_wrapped_view"),
-              MessageManager.getString("label.wrapped_view_no_edit"),
-              JvOptionPane.WARNING_MESSAGE);
       return;
     }
 
-    if (seq < 0 || res < 0)
-    {
-      return;
-    }
+    final int res = pos.column;
+    final int seq = pos.seqIndex;
+    oldSeq = seq;
+    updateOverviewAndStructs = false;
+
+    startWrapBlock = wrappedBlock;
 
     SequenceI sequence = av.getAlignment().getSequenceAt(seq);
 
@@ -1755,7 +2075,7 @@ public class SeqPanel extends JPanel
 
     if (evt.isPopupTrigger()) // Mac: mousePressed
     {
-      showPopupMenu(evt);
+      showPopupMenu(evt, pos);
       return;
     }
 
@@ -1771,8 +2091,8 @@ public class SeqPanel extends JPanel
 
     if (av.cursorMode)
     {
-      seqCanvas.cursorX = findColumn(evt);
-      seqCanvas.cursorY = findSeq(evt);
+      seqCanvas.cursorX = res;
+      seqCanvas.cursorY = seq;
       seqCanvas.repaint();
       return;
     }
@@ -1830,15 +2150,14 @@ public class SeqPanel extends JPanel
 
   /**
    * Build and show a pop-up menu at the right-click mouse position
-   * 
+   *
    * @param evt
-   * @param res
-   * @param sequences
+   * @param pos
    */
-  void showPopupMenu(MouseEvent evt)
+  void showPopupMenu(MouseEvent evt, MousePos pos)
   {
-    final int column = findColumn(evt);
-    final int seq = findSeq(evt);
+    final int column = pos.column;
+    final int seq = pos.seqIndex;
     SequenceI sequence = av.getAlignment().getSequenceAt(seq);
     List<SequenceFeature> features = ap.getFeatureRenderer()
             .findFeaturesAtColumn(sequence, column + 1);
@@ -1856,7 +2175,8 @@ public class SeqPanel extends JPanel
    *          true if this event is happening after a mouse drag (rather than a
    *          mouse down)
    */
-  public void doMouseReleasedDefineMode(MouseEvent evt, boolean afterDrag)
+  protected void doMouseReleasedDefineMode(MouseEvent evt,
+          boolean afterDrag)
   {
     if (stretchGroup == null)
     {
@@ -1872,8 +2192,11 @@ public class SeqPanel extends JPanel
             && afterDrag;
     if (stretchGroup.cs != null)
     {
-      stretchGroup.cs.alignmentChanged(stretchGroup,
-              av.getHiddenRepSequences());
+      if (afterDrag)
+      {
+        stretchGroup.cs.alignmentChanged(stretchGroup,
+                av.getHiddenRepSequences());
+      }
 
       ResidueShaderI groupColourScheme = stretchGroup
               .getGroupColourScheme();
@@ -1899,31 +2222,34 @@ public class SeqPanel extends JPanel
   }
 
   /**
-   * DOCUMENT ME!
+   * Resizes the borders of a selection group depending on the direction of
+   * mouse drag
    * 
    * @param evt
-   *          DOCUMENT ME!
    */
-  public void doMouseDraggedDefineMode(MouseEvent evt)
+  protected void dragStretchGroup(MouseEvent evt)
   {
-    int res = findColumn(evt);
-    int y = findSeq(evt);
-
-    if (wrappedBlock != startWrapBlock)
+    if (stretchGroup == null)
     {
       return;
     }
 
-    if (stretchGroup == null)
+    MousePos pos = findMousePosition(evt);
+    if (pos.isOverAnnotation() || pos.column == -1 || pos.seqIndex == -1)
     {
       return;
     }
 
-    if (res >= av.getAlignment().getWidth())
+    int res = pos.column;
+    int y = pos.seqIndex;
+
+    if (wrappedBlock != startWrapBlock)
     {
-      res = av.getAlignment().getWidth() - 1;
+      return;
     }
 
+    res = Math.min(res, av.getAlignment().getWidth()-1);
+
     if (stretchGroup.getEndRes() == res)
     {
       // Edit end res position of selected group
@@ -2008,89 +2334,152 @@ public class SeqPanel extends JPanel
 
     mouseDragging = true;
 
-    if ((scrollThread != null) && (scrollThread.isRunning()))
+    if (scrollThread != null)
     {
-      scrollThread.setEvent(evt);
+      scrollThread.setMousePosition(evt.getPoint());
     }
+
+    /*
+     * construct a status message showing the range of the selection
+     */
+    StringBuilder status = new StringBuilder(64);
+    List<SequenceI> seqs = stretchGroup.getSequences();
+    String name = seqs.get(0).getName();
+    if (name.length() > 20)
+    {
+      name = name.substring(0, 20);
+    }
+    status.append(name).append(" - ");
+    name = seqs.get(seqs.size() - 1).getName();
+    if (name.length() > 20)
+    {
+      name = name.substring(0, 20);
+    }
+    status.append(name).append(" ");
+    int startRes = stretchGroup.getStartRes();
+    status.append(" cols ").append(String.valueOf(startRes + 1))
+            .append("-");
+    int endRes = stretchGroup.getEndRes();
+    status.append(String.valueOf(endRes + 1));
+    status.append(" (").append(String.valueOf(seqs.size())).append(" x ")
+            .append(String.valueOf(endRes - startRes + 1)).append(")");
+    ap.alignFrame.setStatus(status.toString());
   }
 
-  void scrollCanvas(MouseEvent evt)
+  /**
+   * Stops the scroll thread if it is running
+   */
+  void stopScrolling()
   {
-    if (evt == null)
+    if (scrollThread != null)
     {
-      if ((scrollThread != null) && (scrollThread.isRunning()))
-      {
-        scrollThread.stopScrolling();
-        scrollThread = null;
-      }
-      mouseDragging = false;
+      scrollThread.stopScrolling();
+      scrollThread = null;
     }
-    else
-    {
-      if (scrollThread == null)
-      {
-        scrollThread = new ScrollThread();
-      }
+    mouseDragging = false;
+  }
 
-      mouseDragging = true;
-      scrollThread.setEvent(evt);
+  /**
+   * Starts a thread to scroll the alignment, towards a given mouse position
+   * outside the panel bounds
+   * 
+   * @param mousePos
+   */
+  void startScrolling(Point mousePos)
+  {
+    if (scrollThread == null)
+    {
+      scrollThread = new ScrollThread();
     }
 
+    mouseDragging = true;
+    scrollThread.setMousePosition(mousePos);
   }
 
-  // this class allows scrolling off the bottom of the visible alignment
+  /**
+   * Performs scrolling of the visible alignment left, right, up or down
+   */
   class ScrollThread extends Thread
   {
-    MouseEvent evt;
+    private Point mousePos;
 
     private volatile boolean threadRunning = true;
 
+    /**
+     * Constructor
+     */
     public ScrollThread()
     {
+      setName("SeqPanel$ScrollThread");
       start();
     }
 
-    public void setEvent(MouseEvent e)
+    /**
+     * Sets the position of the mouse that determines the direction of the
+     * scroll to perform
+     * 
+     * @param p
+     */
+    public void setMousePosition(Point p)
     {
-      evt = e;
+      mousePos = p;
     }
 
+    /**
+     * Sets a flag that will cause the thread to exit
+     */
     public void stopScrolling()
     {
       threadRunning = false;
     }
 
-    public boolean isRunning()
-    {
-      return threadRunning;
-    }
-
+    /**
+     * Scrolls the alignment left or right, and/or up or down, depending on the
+     * last notified mouse position, until the limit of the alignment is
+     * reached, or a flag is set to stop the scroll
+     */
     @Override
     public void run()
     {
-      while (threadRunning)
+      while (threadRunning && mouseDragging)
       {
-        if (evt != null)
+        if (mousePos != null)
         {
-          if (mouseDragging && (evt.getY() < 0)
-                  && (av.getRanges().getStartSeq() > 0))
+          boolean scrolled = false;
+          ViewportRanges ranges = SeqPanel.this.av.getRanges();
+
+          /*
+           * scroll up or down
+           */
+          if (mousePos.y < 0)
           {
-            av.getRanges().scrollUp(true);
+            // mouse is above this panel - try scroll up
+            scrolled = ranges.scrollUp(true);
           }
-
-          if (mouseDragging && (evt.getY() >= getHeight()) && (av
-                  .getAlignment().getHeight() > av.getRanges().getEndSeq()))
+          else if (mousePos.y >= getHeight())
           {
-            av.getRanges().scrollUp(false);
+            // mouse is below this panel - try scroll down
+            scrolled = ranges.scrollUp(false);
           }
 
-          if (mouseDragging && (evt.getX() < 0))
+          /*
+           * scroll left or right
+           */
+          if (mousePos.x < 0)
           {
-            av.getRanges().scrollRight(false);
+            scrolled |= ranges.scrollRight(false);
           }
-          else if (mouseDragging && (evt.getX() >= getWidth()))
+          else if (mousePos.x >= getWidth())
           {
-            av.getRanges().scrollRight(true);
+            scrolled |= ranges.scrollRight(true);
+          }
+          if (!scrolled)
+          {
+            /*
+             * we have reached the limit of the visible alignment - quit
+             */
+            threadRunning = false;
+            SeqPanel.this.ap.repaint();
           }
         }
 
@@ -2280,7 +2669,7 @@ public class SeqPanel extends JPanel
     HiddenColumns hs = new HiddenColumns();
     MappingUtils.mapColumnSelection(colsel, hidden, sourceAv, av, cs, hs);
     av.setColumnSelection(cs);
-    av.getAlignment().setHiddenColumns(hs);
+    boolean hiddenChanged = av.getAlignment().setHiddenColumns(hs);
 
     // lastly, update any dependent dialogs
     if (ap.getCalculationDialog() != null)
@@ -2288,7 +2677,11 @@ public class SeqPanel extends JPanel
       ap.getCalculationDialog().validateCalcTypes();
     }
 
-    PaintRefresher.Refresh(this, av.getSequenceSetId());
+    /*
+     * repaint alignment, and also Overview or Structure
+     * if hidden column selection has changed
+     */
+    ap.paintAlignment(hiddenChanged, hiddenChanged);
 
     return true;
   }
index 8754fbb..1c4e6a6 100755 (executable)
@@ -1038,7 +1038,7 @@ public class SequenceFetcher extends JPanel implements Runnable
         Desktop.addInternalFrame(af, title, AlignFrame.DEFAULT_WIDTH,
                 AlignFrame.DEFAULT_HEIGHT);
 
-        af.statusBar.setText(MessageManager
+        af.setStatus(MessageManager
                 .getString("label.successfully_pasted_alignment_file"));
 
         try
index 93a2457..f98139b 100755 (executable)
@@ -26,6 +26,7 @@ import jalview.jbgui.GSliderPanel;
 import jalview.renderer.ResidueShaderI;
 import jalview.util.MessageManager;
 
+import java.awt.event.ActionEvent;
 import java.awt.event.MouseAdapter;
 import java.awt.event.MouseEvent;
 import java.beans.PropertyVetoException;
@@ -396,7 +397,6 @@ public class SliderPanel extends GSliderPanel
   public void setAllGroupsCheckEnabled(boolean b)
   {
     allGroupsCheck.setEnabled(b);
-    allGroupsCheck.setSelected(ap.av.getColourAppliesToAllGroups());
   }
 
   /**
@@ -497,4 +497,13 @@ public class SliderPanel extends GSliderPanel
     }
     return title;
   }
+
+  @Override
+  protected void allGroupsCheck_actionPerformed(ActionEvent e)
+  {
+    if (allGroupsCheck.isSelected())
+    {
+      valueChanged(slider.getValue());
+    }
+  }
 }
index 5bff407..a0d31cf 100644 (file)
@@ -539,7 +539,7 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI
       topFrame.setDisplayedView(newTopPanel);
     }
 
-    newBottomPanel.av.viewName = newTopPanel.av.viewName;
+    newBottomPanel.av.setViewName(newTopPanel.av.getViewName());
     newTopPanel.av.setCodingComplement(newBottomPanel.av);
 
     /*
index 72b0bcc..35a5475 100644 (file)
@@ -564,7 +564,8 @@ public abstract class StructureViewerBase extends GStructureViewer
   {
     AlignmentI al = getAlignmentPanel().av.getAlignment();
     ColourSchemeI cs = ColourSchemes.getInstance()
-            .getColourScheme(colourSchemeName, al, null);
+            .getColourScheme(colourSchemeName, getAlignmentPanel().av, al,
+                    null);
     getBinding().setJalviewColourScheme(cs);
   }
 
index fa30e13..180467a 100755 (executable)
@@ -28,11 +28,8 @@ import jalview.datamodel.SequenceGroup;
 import jalview.datamodel.SequenceI;
 import jalview.datamodel.SequenceNode;
 import jalview.schemes.ColourSchemeI;
-import jalview.schemes.ColourSchemeProperty;
-import jalview.schemes.UserColourScheme;
 import jalview.structure.SelectionSource;
 import jalview.util.Format;
-import jalview.util.MappingUtils;
 import jalview.util.MessageManager;
 
 import java.awt.Color;
@@ -80,9 +77,9 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
 
   TreePanel tp;
 
-  AlignViewport av;
+  private AlignViewport av;
 
-  AlignmentPanel ap;
+  private AlignmentPanel ap;
 
   Font font;
 
@@ -100,7 +97,7 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
 
   int offy;
 
-  float threshold;
+  private float threshold;
 
   String longestName;
 
@@ -130,7 +127,7 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
   {
     this.tp = tp;
     this.av = ap.av;
-    this.ap = ap;
+    this.setAssociatedPanel(ap);
     font = av.getFont();
     scrollPane = scroller;
     addMouseListener(this);
@@ -512,29 +509,21 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
       return;
     }
 
-    if ((node.left() == null) && (node.right() == null)) // TODO: internal node
+    node.color = c;
+    if (node.element() instanceof SequenceI)
     {
-      node.color = c;
-
-      if (node.element() instanceof SequenceI)
+      final SequenceI seq = (SequenceI) node.element();
+      AlignmentPanel[] aps = getAssociatedPanels();
+      if (aps != null)
       {
-        AlignmentPanel[] aps = getAssociatedPanels();
-        if (aps != null)
+        for (int a = 0; a < aps.length; a++)
         {
-          for (int a = 0; a < aps.length; a++)
-          {
-            final SequenceI seq = (SequenceI) node.element();
-            aps[a].av.setSequenceColour(seq, c);
-          }
+          aps[a].av.setSequenceColour(seq, c);
         }
       }
     }
-    else
-    {
-      node.color = c;
-      setColor((SequenceNode) node.left(), c);
-      setColor((SequenceNode) node.right(), c);
-    }
+    setColor((SequenceNode) node.left(), c);
+    setColor((SequenceNode) node.right(), c);
   }
 
   /**
@@ -847,7 +836,7 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
     if (col != null)
     {
       setColor(highlightNode, col);
-      PaintRefresher.Refresh(tp, ap.av.getSequenceSetId());
+      PaintRefresher.Refresh(tp, getAssociatedPanel().av.getSequenceSetId());
       repaint();
     }
   }
@@ -928,7 +917,7 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
     if (ob instanceof SequenceI)
     {
       treeSelectionChanged((Sequence) ob);
-      PaintRefresher.Refresh(tp, ap.av.getSequenceSetId());
+      PaintRefresher.Refresh(tp, getAssociatedPanel().av.getSequenceSetId());
       repaint();
       av.sendSelection();
       return;
@@ -960,6 +949,7 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
                     .deleteAllGroups();
             aps[a].av.getCodingComplement().clearSequenceColours();
           }
+          aps[a].av.setUpdateStructures(true);
         }
         colourGroups(groups);
 
@@ -973,7 +963,7 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
         }
       }
 
-      PaintRefresher.Refresh(tp, ap.av.getSequenceSetId());
+      PaintRefresher.Refresh(tp, getAssociatedPanel().av.getSequenceSetId());
       repaint();
     }
 
@@ -1003,76 +993,48 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
       }
 
       ColourSchemeI cs = null;
-      SequenceGroup sg = new SequenceGroup(sequences, null, cs, true, true,
+      SequenceGroup _sg = new SequenceGroup(sequences, null, cs, true, true,
               false, 0, av.getAlignment().getWidth() - 1);
 
-      if (av.getGlobalColourScheme() != null)
-      {
-        if (av.getGlobalColourScheme() instanceof UserColourScheme)
-        {
-          cs = new UserColourScheme(
-                  ((UserColourScheme) av.getGlobalColourScheme())
-                          .getColours());
-
-        }
-        else
-        {
-          cs = ColourSchemeProperty.getColourScheme(sg, ColourSchemeProperty
-                  .getColourName(av.getGlobalColourScheme()));
-        }
-        // cs is null if shading is an annotationColourGradient
-        // if (cs != null)
-        // {
-        // cs.setThreshold(av.getViewportColourScheme().getThreshold(),
-        // av.isIgnoreGapsConsensus());
-        // }
-      }
-      sg.setColourScheme(cs);
-      sg.getGroupColourScheme().setThreshold(
-              av.getResidueShading().getThreshold(),
-              av.isIgnoreGapsConsensus());
-      // sg.recalcConservation();
-      sg.setName("JTreeGroup:" + sg.hashCode());
-      sg.setIdColour(col);
+      _sg.setName("JTreeGroup:" + _sg.hashCode());
+      _sg.setIdColour(col);
 
       for (int a = 0; a < aps.length; a++)
       {
-        if (aps[a].av.getGlobalColourScheme() != null
-                && aps[a].av.getResidueShading().conservationApplied())
-        {
-          Conservation c = new Conservation("Group", sg.getSequences(null),
-                  sg.getStartRes(), sg.getEndRes());
-          c.calculate();
-          c.verdict(false, aps[a].av.getConsPercGaps());
-          sg.cs.setConservation(c);
-        }
+        SequenceGroup sg = new SequenceGroup(_sg);
+        AlignViewport viewport = aps[a].av;
 
-        aps[a].av.getAlignment().addGroup(new SequenceGroup(sg));
-        // TODO can we push all of the below into AlignViewportI?
-        final AlignViewportI codingComplement = aps[a].av
-                .getCodingComplement();
-        if (codingComplement != null)
+        // Propagate group colours in each view
+        if (viewport.getGlobalColourScheme() != null)
         {
-          SequenceGroup mappedGroup = MappingUtils.mapSequenceGroup(sg, av,
-                  codingComplement);
-          if (mappedGroup.getSequences().size() > 0)
+          cs = viewport.getGlobalColourScheme().getInstance(viewport, sg);
+          sg.setColourScheme(cs);
+          sg.getGroupColourScheme().setThreshold(
+                  viewport.getResidueShading().getThreshold(),
+                  viewport.isIgnoreGapsConsensus());
+
+          if (viewport.getResidueShading().conservationApplied())
           {
-            codingComplement.getAlignment().addGroup(mappedGroup);
-            for (SequenceI seq : mappedGroup.getSequences())
-            {
-              codingComplement.setSequenceColour(seq, col.brighter());
-            }
+            Conservation c = new Conservation("Group",
+                    sg.getSequences(null), sg.getStartRes(),
+                    sg.getEndRes());
+            c.calculate();
+            c.verdict(false, viewport.getConsPercGaps());
+            sg.cs.setConservation(c);
           }
         }
+        // indicate that associated structure views will need an update
+        viewport.setUpdateStructures(true);
+        // propagate structure view update and sequence group to complement view
+        viewport.addSequenceGroup(sg);
       }
     }
 
-    // notify the panel(s) to redo any group specific stuff.
+    // notify the panel(s) to redo any group specific stuff
+    // also updates structure views if necessary
     for (int a = 0; a < aps.length; a++)
     {
       aps[a].updateAnnotation();
-      // TODO: JAL-868 - need to ensure view colour change message is broadcast
-      // to any Jmols listening in
       final AlignViewportI codingComplement = aps[a].av
               .getCodingComplement();
       if (codingComplement != null)
@@ -1127,7 +1089,47 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
     }
     else
     {
-      return new AlignmentPanel[] { ap };
+      return new AlignmentPanel[] { getAssociatedPanel() };
     }
   }
+
+  public AlignmentPanel getAssociatedPanel()
+  {
+    return ap;
+  }
+
+  public void setAssociatedPanel(AlignmentPanel ap)
+  {
+    this.ap = ap;
+  }
+
+  public AlignViewport getViewport()
+  {
+    return av;
+  }
+
+  public void setViewport(AlignViewport av)
+  {
+    this.av = av;
+  }
+
+  public float getThreshold()
+  {
+    return threshold;
+  }
+
+  public void setThreshold(float threshold)
+  {
+    this.threshold = threshold;
+  }
+
+  public boolean isApplyToAllViews()
+  {
+    return this.applyToAllViews;
+  }
+
+  public void setApplyToAllViews(boolean applyToAllViews)
+  {
+    this.applyToAllViews = applyToAllViews;
+  }
 }
index 2727db1..ca4f84e 100755 (executable)
@@ -85,11 +85,11 @@ public class TreePanel extends GTreePanel
 
   SimilarityParamsI similarityParams;
 
-  TreeCanvas treeCanvas;
+  private TreeCanvas treeCanvas;
 
   TreeModel tree;
 
-  AlignViewport av;
+  private AlignViewport av;
 
   /**
    * Creates a new TreePanel object.
@@ -121,24 +121,24 @@ public class TreePanel extends GTreePanel
 
   public AlignmentI getAlignment()
   {
-    return treeCanvas.av.getAlignment();
+    return getTreeCanvas().getViewport().getAlignment();
   }
 
   public AlignmentViewport getViewPort()
   {
-    return treeCanvas.av;
+    return getTreeCanvas().getViewport();
   }
 
   void initTreePanel(AlignmentPanel ap, String type, String modelName,
           NewickFile newTree, AlignmentView inputData)
   {
 
-    av = ap.av;
+    setViewport(ap.av);
     this.treeType = type;
     this.scoreModelName = modelName;
 
     treeCanvas = new TreeCanvas(this, ap, scrollPane);
-    scrollPane.setViewportView(treeCanvas);
+    scrollPane.setViewportView(getTreeCanvas());
 
     PaintRefresher.Register(this, ap.av.getSequenceSetId());
 
@@ -155,9 +155,9 @@ public class TreePanel extends GTreePanel
       @Override
       public void internalFrameClosed(InternalFrameEvent evt)
       {
-        if (av != null)
+        if (getViewport() != null)
         {
-          av.removePropertyChangeListener(listener);
+          getViewport().removePropertyChangeListener(listener);
         }
       }
     });
@@ -194,13 +194,13 @@ public class TreePanel extends GTreePanel
           }
 
           tree.updatePlaceHolders((List<SequenceI>) evt.getNewValue());
-          treeCanvas.nameHash.clear(); // reset the mapping between canvas
+          getTreeCanvas().nameHash.clear(); // reset the mapping between canvas
           // rectangles and leafnodes
           repaint();
         }
       }
     };
-    av.addPropertyChangeListener(listener);
+    getViewport().addPropertyChangeListener(listener);
     return listener;
   }
 
@@ -213,8 +213,8 @@ public class TreePanel extends GTreePanel
   void buildAssociatedViewMenu()
   {
     AlignmentPanel[] aps = PaintRefresher
-            .getAssociatedPanels(av.getSequenceSetId());
-    if (aps.length == 1 && treeCanvas.ap == aps[0])
+            .getAssociatedPanels(getViewport().getSequenceSetId());
+    if (aps.length == 1 && getTreeCanvas().getAssociatedPanel() == aps[0])
     {
       associateLeavesMenu.setVisible(false);
       return;
@@ -237,16 +237,16 @@ public class TreePanel extends GTreePanel
     for (i = 0; i < iSize; i++)
     {
       final AlignmentPanel ap = aps[i];
-      item = new JRadioButtonMenuItem(ap.av.viewName, ap == treeCanvas.ap);
+      item = new JRadioButtonMenuItem(ap.av.getViewName(), ap == getTreeCanvas().getAssociatedPanel());
       buttonGroup.add(item);
       item.addActionListener(new ActionListener()
       {
         @Override
         public void actionPerformed(ActionEvent evt)
         {
-          treeCanvas.applyToAllViews = false;
-          treeCanvas.ap = ap;
-          treeCanvas.av = ap.av;
+          getTreeCanvas().applyToAllViews = false;
+          getTreeCanvas().setAssociatedPanel(ap);
+          getTreeCanvas().setViewport(ap.av);
           PaintRefresher.Register(thisTreePanel, ap.av.getSequenceSetId());
         }
       });
@@ -257,13 +257,13 @@ public class TreePanel extends GTreePanel
     final JRadioButtonMenuItem itemf = new JRadioButtonMenuItem(
             MessageManager.getString("label.all_views"));
     buttonGroup.add(itemf);
-    itemf.setSelected(treeCanvas.applyToAllViews);
+    itemf.setSelected(getTreeCanvas().applyToAllViews);
     itemf.addActionListener(new ActionListener()
     {
       @Override
       public void actionPerformed(ActionEvent evt)
       {
-        treeCanvas.applyToAllViews = itemf.isSelected();
+        getTreeCanvas().applyToAllViews = itemf.isSelected();
       }
     });
     associateLeavesMenu.add(itemf);
@@ -296,7 +296,7 @@ public class TreePanel extends GTreePanel
 
       if (newtree != null)
       {
-        tree = new TreeModel(av.getAlignment().getSequencesArray(), odata,
+        tree = new TreeModel(getViewport().getAlignment().getSequencesArray(), odata,
                 newtree);
         if (tree.getOriginalData() == null)
         {
@@ -306,20 +306,20 @@ public class TreePanel extends GTreePanel
       else
       {
         ScoreModelI sm = ScoreModels.getInstance()
-                .getScoreModel(scoreModelName, treeCanvas.ap);
+                .getScoreModel(scoreModelName, getTreeCanvas().getAssociatedPanel());
         TreeBuilder njtree = treeType.equals(TreeBuilder.NEIGHBOUR_JOINING)
-                ? new NJTree(av, sm, similarityParams)
-                : new AverageDistanceTree(av, sm, similarityParams);
+                ? new NJTree(getViewport(), sm, similarityParams)
+                : new AverageDistanceTree(getViewport(), sm, similarityParams);
         tree = new TreeModel(njtree);
         showDistances(true);
       }
 
       tree.reCount(tree.getTopNode());
       tree.findHeight(tree.getTopNode());
-      treeCanvas.setTree(tree);
-      treeCanvas.repaint();
-      av.setCurrentTree(tree);
-      if (av.getSortByTree())
+      getTreeCanvas().setTree(tree);
+      getTreeCanvas().repaint();
+      getViewport().setCurrentTree(tree);
+      if (getViewport().getSortByTree())
       {
         sortByTree_actionPerformed();
       }
@@ -328,20 +328,20 @@ public class TreePanel extends GTreePanel
 
   public void showDistances(boolean b)
   {
-    treeCanvas.setShowDistances(b);
+    getTreeCanvas().setShowDistances(b);
     distanceMenu.setSelected(b);
   }
 
   public void showBootstrap(boolean b)
   {
-    treeCanvas.setShowBootstrap(b);
+    getTreeCanvas().setShowBootstrap(b);
     bootstrapMenu.setSelected(b);
   }
 
   public void showPlaceholders(boolean b)
   {
     placeholdersMenu.setState(b);
-    treeCanvas.setMarkPlaceholders(b);
+    getTreeCanvas().setMarkPlaceholders(b);
   }
 
   /**
@@ -432,7 +432,7 @@ public class TreePanel extends GTreePanel
   public void printMenu_actionPerformed(ActionEvent e)
   {
     // Putting in a thread avoids Swing painting problems
-    treeCanvas.startPrinting();
+    getTreeCanvas().startPrinting();
   }
 
   @Override
@@ -456,7 +456,7 @@ public class TreePanel extends GTreePanel
     {
       // we try to get the associated view's gap character
       // but this may fail if the view was closed...
-      gc = av.getGapCharacter();
+      gc = getViewport().getGapCharacter();
 
     } catch (Exception ex)
     {
@@ -469,8 +469,8 @@ public class TreePanel extends GTreePanel
       // AlignmentOrder origorder = new AlignmentOrder(alAndColsel[0]);
 
       AlignmentI al = new Alignment((SequenceI[]) alAndColsel[0]);
-      AlignmentI dataset = (av != null && av.getAlignment() != null)
-              ? av.getAlignment().getDataset()
+      AlignmentI dataset = (getViewport() != null && getViewport().getAlignment() != null)
+              ? getViewport().getAlignment().getDataset()
               : null;
       if (dataset != null)
       {
@@ -507,7 +507,7 @@ public class TreePanel extends GTreePanel
   @Override
   public void fitToWindow_actionPerformed(ActionEvent e)
   {
-    treeCanvas.fitToWindow = fitToWindow.isSelected();
+    getTreeCanvas().fitToWindow = fitToWindow.isSelected();
     repaint();
   }
 
@@ -520,15 +520,15 @@ public class TreePanel extends GTreePanel
   public void sortByTree_actionPerformed()
   {
 
-    if (treeCanvas.applyToAllViews)
+    if (getTreeCanvas().applyToAllViews)
     {
       final ArrayList<CommandI> commands = new ArrayList<>();
       for (AlignmentPanel ap : PaintRefresher
-              .getAssociatedPanels(av.getSequenceSetId()))
+              .getAssociatedPanels(getViewport().getSequenceSetId()))
       {
         commands.add(sortAlignmentIn(ap.av.getAlignPanel()));
       }
-      av.getAlignPanel().alignFrame.addHistoryItem(new CommandI()
+      getViewport().getAlignPanel().alignFrame.addHistoryItem(new CommandI()
       {
 
         @Override
@@ -563,7 +563,7 @@ public class TreePanel extends GTreePanel
         }
       });
       for (AlignmentPanel ap : PaintRefresher
-              .getAssociatedPanels(av.getSequenceSetId()))
+              .getAssociatedPanels(getViewport().getSequenceSetId()))
       {
         // ensure all the alignFrames refresh their GI after adding an undo item
         ap.alignFrame.updateEditMenuBar();
@@ -571,8 +571,8 @@ public class TreePanel extends GTreePanel
     }
     else
     {
-      treeCanvas.ap.alignFrame
-              .addHistoryItem(sortAlignmentIn(treeCanvas.ap));
+      getTreeCanvas().getAssociatedPanel().alignFrame
+              .addHistoryItem(sortAlignmentIn(getTreeCanvas().getAssociatedPanel()));
     }
 
   }
@@ -599,7 +599,7 @@ public class TreePanel extends GTreePanel
   @Override
   public void font_actionPerformed(ActionEvent e)
   {
-    if (treeCanvas == null)
+    if (getTreeCanvas() == null)
     {
       return;
     }
@@ -609,14 +609,14 @@ public class TreePanel extends GTreePanel
 
   public Font getTreeFont()
   {
-    return treeCanvas.font;
+    return getTreeCanvas().font;
   }
 
   public void setTreeFont(Font f)
   {
-    if (treeCanvas != null)
+    if (getTreeCanvas() != null)
     {
-      treeCanvas.setFont(f);
+      getTreeCanvas().setFont(f);
     }
   }
 
@@ -629,7 +629,7 @@ public class TreePanel extends GTreePanel
   @Override
   public void distanceMenu_actionPerformed(ActionEvent e)
   {
-    treeCanvas.setShowDistances(distanceMenu.isSelected());
+    getTreeCanvas().setShowDistances(distanceMenu.isSelected());
   }
 
   /**
@@ -641,7 +641,7 @@ public class TreePanel extends GTreePanel
   @Override
   public void bootstrapMenu_actionPerformed(ActionEvent e)
   {
-    treeCanvas.setShowBootstrap(bootstrapMenu.isSelected());
+    getTreeCanvas().setShowBootstrap(bootstrapMenu.isSelected());
   }
 
   /**
@@ -653,7 +653,7 @@ public class TreePanel extends GTreePanel
   @Override
   public void placeholdersMenu_actionPerformed(ActionEvent e)
   {
-    treeCanvas.setMarkPlaceholders(placeholdersMenu.isSelected());
+    getTreeCanvas().setMarkPlaceholders(placeholdersMenu.isSelected());
   }
 
   /**
@@ -691,8 +691,8 @@ public class TreePanel extends GTreePanel
       accurateText = false;
     }
 
-    int width = treeCanvas.getWidth();
-    int height = treeCanvas.getHeight();
+    int width = getTreeCanvas().getWidth();
+    int height = getTreeCanvas().getHeight();
 
     try
     {
@@ -720,7 +720,7 @@ public class TreePanel extends GTreePanel
 
       pg.setAccurateTextMode(accurateText);
 
-      treeCanvas.draw(pg, width, height);
+      getTreeCanvas().draw(pg, width, height);
 
       pg.flush();
       pg.close();
@@ -739,8 +739,8 @@ public class TreePanel extends GTreePanel
   @Override
   public void pngTree_actionPerformed(ActionEvent e)
   {
-    int width = treeCanvas.getWidth();
-    int height = treeCanvas.getHeight();
+    int width = getTreeCanvas().getWidth();
+    int height = getTreeCanvas().getHeight();
 
     try
     {
@@ -769,7 +769,7 @@ public class TreePanel extends GTreePanel
               BufferedImage.TYPE_INT_RGB);
       Graphics png = bi.getGraphics();
 
-      treeCanvas.draw(png, width, height);
+      getTreeCanvas().draw(png, width, height);
 
       ImageIO.write(bi, "png", out);
       out.close();
@@ -879,8 +879,23 @@ public class TreePanel extends GTreePanel
     /*
      * put them together as <method> Using <model>
      */
-    final String ttl = MessageManager.formatMessage("label.treecalc_title",
+    final String ttl = MessageManager.formatMessage("label.calc_title",
             treecalcnm, smn);
     return ttl;
   }
+
+  public AlignViewport getViewport()
+  {
+    return av;
+  }
+
+  public void setViewport(AlignViewport av)
+  {
+    this.av = av;
+  }
+
+  public TreeCanvas getTreeCanvas()
+  {
+    return treeCanvas;
+  }
 }
index 3290500..b1f6d1b 100755 (executable)
@@ -24,8 +24,6 @@ import jalview.bin.Cache;
 import jalview.io.JalviewFileChooser;
 import jalview.io.JalviewFileView;
 import jalview.jbgui.GUserDefinedColours;
-import jalview.schemabinding.version2.Colour;
-import jalview.schemabinding.version2.JalviewUserColours;
 import jalview.schemes.ColourSchemeI;
 import jalview.schemes.ColourSchemeLoader;
 import jalview.schemes.ColourSchemes;
@@ -34,6 +32,9 @@ import jalview.schemes.UserColourScheme;
 import jalview.util.ColorUtils;
 import jalview.util.Format;
 import jalview.util.MessageManager;
+import jalview.xml.binding.jalview.JalviewUserColours;
+import jalview.xml.binding.jalview.JalviewUserColours.Colour;
+import jalview.xml.binding.jalview.ObjectFactory;
 
 import java.awt.Color;
 import java.awt.Font;
@@ -51,6 +52,8 @@ import javax.swing.JButton;
 import javax.swing.JInternalFrame;
 import javax.swing.event.ChangeEvent;
 import javax.swing.event.ChangeListener;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.Marshaller;
 
 /**
  * This panel allows the user to assign colours to Amino Acid residue codes, and
@@ -858,9 +861,14 @@ public class UserDefinedColours extends GUserDefinedColours
         Colour col = new Colour();
         col.setName(button.getText());
         col.setRGB(Format.getHexString(button.getBackground()));
-        ucs.addColour(col);
+        ucs.getColour().add(col);
       }
-      ucs.marshal(out);
+      JAXBContext jaxbContext = JAXBContext
+              .newInstance(JalviewUserColours.class);
+      Marshaller jaxbMarshaller = jaxbContext.createMarshaller();
+      jaxbMarshaller.marshal(
+              new ObjectFactory().createJalviewUserColours(ucs), out);
+      // ucs.marshal(out);
       out.close();
     } catch (Exception ex)
     {
index 973cfe8..c094b1c 100644 (file)
@@ -484,8 +484,8 @@ public class VamsasApplication implements SelectionSource, VamsasSource
               errorsDuringUpdate = true;
               Cache.log.error("Exception synchronizing " + af.getTitle()
                       + " "
-                      + (af.getViewport().viewName == null ? ""
-                              : " view " + af.getViewport().viewName)
+                      + (af.getViewport().getViewName() == null ? ""
+                              : " view " + af.getViewport().getViewName())
                       + " to document.", e);
               stored = false;
             }
index d91775c..cb98856 100644 (file)
@@ -27,8 +27,11 @@ import jalview.util.MessageManager;
 import jalview.ws.params.ParamDatastoreI;
 import jalview.ws.params.ParamManager;
 import jalview.ws.params.WsParamSetI;
+import jalview.xml.binding.jalview.ObjectFactory;
+import jalview.xml.binding.jalview.WebServiceParameterSet;
 
 import java.io.File;
+import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStreamReader;
@@ -39,6 +42,12 @@ import java.util.Hashtable;
 import java.util.List;
 import java.util.StringTokenizer;
 
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.Marshaller;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamReader;
+
 /**
  * store and retrieve web service parameter sets.
  * 
@@ -47,7 +56,7 @@ import java.util.StringTokenizer;
  */
 public class WsParamSetManager implements ParamManager
 {
-  Hashtable<String, ParamDatastoreI> paramparsers = new Hashtable<String, ParamDatastoreI>();
+  Hashtable<String, ParamDatastoreI> paramparsers = new Hashtable<>();
 
   @Override
   public WsParamSetI[] getParameterSet(String name, String serviceUrl,
@@ -60,7 +69,7 @@ public class WsParamSetManager implements ParamManager
     }
     StringTokenizer st = new StringTokenizer(files, "|");
     String pfile = null;
-    ArrayList<WsParamSetI> params = new ArrayList<WsParamSetI>();
+    List<WsParamSetI> params = new ArrayList<>();
     while (st.hasMoreTokens())
     {
       pfile = st.nextToken();
@@ -107,33 +116,39 @@ public class WsParamSetManager implements ParamManager
 
   private WsParamSetI[] parseParamFile(String filename) throws IOException
   {
-    List<WsParamSetI> psets = new ArrayList<WsParamSetI>();
+    List<WsParamSetI> psets = new ArrayList<>();
     InputStreamReader is = new InputStreamReader(
-            new java.io.FileInputStream(new File(filename)), "UTF-8");
-
-    jalview.schemabinding.version2.WebServiceParameterSet wspset = new jalview.schemabinding.version2.WebServiceParameterSet();
+            new FileInputStream(new File(filename)), "UTF-8");
 
-    org.exolab.castor.xml.Unmarshaller unmar = new org.exolab.castor.xml.Unmarshaller(
-            wspset);
-    unmar.setWhitespacePreserve(true);
+    WebServiceParameterSet wspset = null;
     try
     {
-      wspset = (jalview.schemabinding.version2.WebServiceParameterSet) unmar
-              .unmarshal(is);
+      JAXBContext jc = JAXBContext
+              .newInstance("jalview.xml.binding.jalview");
+      javax.xml.bind.Unmarshaller um = jc.createUnmarshaller();
+      XMLStreamReader streamReader = XMLInputFactory.newInstance()
+              .createXMLStreamReader(is);
+      JAXBElement<WebServiceParameterSet> jbe = um.unmarshal(streamReader,
+              WebServiceParameterSet.class);
+      wspset = jbe.getValue();
     } catch (Exception ex)
     {
       throw new IOException(ex);
     }
+
     if (wspset != null && wspset.getParameters().length() > 0)
     {
-      for (String url : wspset.getServiceURL())
+      List<String> urls = wspset.getServiceURL();
+      final String[] urlArray = urls.toArray(new String[urls.size()]);
+
+      for (String url : urls)
       {
         ParamDatastoreI parser = paramparsers.get(url);
         if (parser != null)
         {
           WsParamSetI pset = parser.parseServiceParameterFile(
                   wspset.getName(), wspset.getDescription(),
-                  wspset.getServiceURL(), wspset.getParameters());
+                  urlArray, wspset.getParameters());
           if (pset != null)
           {
             pset.setSourceFile(filename);
@@ -190,8 +205,7 @@ public class WsParamSetManager implements ParamManager
       if (value == JalviewFileChooser.APPROVE_OPTION)
       {
         outfile = chooser.getSelectedFile();
-        jalview.bin.Cache.setProperty("LAST_DIRECTORY",
-                outfile.getParent());
+        Cache.setProperty("LAST_DIRECTORY", outfile.getParent());
         filename = outfile.getAbsolutePath();
         if (!filename.endsWith(".wsparams"))
         {
@@ -212,13 +226,16 @@ public class WsParamSetManager implements ParamManager
         }
         paramFiles = paramFiles.concat(filename);
       }
-      jalview.bin.Cache.setProperty("WS_PARAM_FILES", paramFiles);
+      Cache.setProperty("WS_PARAM_FILES", paramFiles);
 
-      jalview.schemabinding.version2.WebServiceParameterSet paramxml = new jalview.schemabinding.version2.WebServiceParameterSet();
+      WebServiceParameterSet paramxml = new WebServiceParameterSet();
 
       paramxml.setName(parameterSet.getName());
       paramxml.setDescription(parameterSet.getDescription());
-      paramxml.setServiceURL(parameterSet.getApplicableUrls().clone());
+      for (String url : parameterSet.getApplicableUrls())
+      {
+        paramxml.getServiceURL().add(url);
+      }
       paramxml.setVersion("1.0");
       try
       {
@@ -226,7 +243,12 @@ public class WsParamSetManager implements ParamManager
                 parser.generateServiceParameterFile(parameterSet));
         PrintWriter out = new PrintWriter(new OutputStreamWriter(
                 new FileOutputStream(outfile), "UTF-8"));
-        paramxml.marshal(out);
+        JAXBContext jaxbContext = JAXBContext
+                .newInstance(WebServiceParameterSet.class);
+        Marshaller jaxbMarshaller = jaxbContext.createMarshaller();
+        jaxbMarshaller.marshal(
+                new ObjectFactory().createWebServiceParameterSet(paramxml),
+                out);
         out.close();
         parameterSet.setSourceFile(filename);
       } catch (Exception e)
index e578a45..dd385d2 100755 (executable)
@@ -1617,8 +1617,10 @@ public class AnnotationFile
         }
         else if (key.equalsIgnoreCase("colour"))
         {
+          // TODO need to notify colourscheme of view reference once it is
+          // available
           sg.cs.setColourScheme(
-                  ColourSchemeProperty.getColourScheme(al, value));
+                  ColourSchemeProperty.getColourScheme(null, al, value));
         }
         else if (key.equalsIgnoreCase("pidThreshold"))
         {
diff --git a/src/jalview/io/BackupFilenameFilter.java b/src/jalview/io/BackupFilenameFilter.java
new file mode 100644 (file)
index 0000000..573040f
--- /dev/null
@@ -0,0 +1,46 @@
+package jalview.io;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.io.IOException;
+
+public class BackupFilenameFilter implements FilenameFilter
+{
+
+  public String base;
+
+  public String template;
+
+  public int digits;
+
+  public BackupFilenameFilter(String base, String template, int digits)
+  {
+    this.base = base;
+    this.template = template;
+    this.digits = digits;
+  }
+
+  @Override
+  public boolean accept(File dir, String filename)
+  {
+    try
+    {
+      File file = new File(
+              dir.getCanonicalPath() + File.separatorChar + filename);
+      if (file.isDirectory())
+      {
+        // backup files aren't dirs!
+        return false;
+      }
+    } catch (IOException e)
+    {
+      System.out.println("IOException when checking file '" + filename
+              + "' is a backupfile");
+    }
+
+    BackupFilenameParts bffp = new BackupFilenameParts(filename, base,
+            template, digits);
+    return bffp.isBackupFile();
+  }
+
+}
diff --git a/src/jalview/io/BackupFilenameParts.java b/src/jalview/io/BackupFilenameParts.java
new file mode 100644 (file)
index 0000000..4f93ece
--- /dev/null
@@ -0,0 +1,153 @@
+package jalview.io;
+
+import jalview.bin.Cache;
+
+import java.io.File;
+
+public class BackupFilenameParts
+{
+  private String base;
+
+  private String templateStart;
+
+  private int num;
+
+  private int digits;
+
+  private String templateEnd;
+
+  private boolean isBackupFile;
+
+  private BackupFilenameParts()
+  {
+    this.isBackupFile = false;
+  }
+
+  public BackupFilenameParts(File file, String base, String template,
+          int digits)
+  {
+    this(file.getName(), base, template, digits);
+  }
+
+  public BackupFilenameParts(String filename, String base, String template,
+          int suggesteddigits)
+  {
+    this(filename, base, template, suggesteddigits, false);
+  }
+
+  public BackupFilenameParts(String filename, String base, String template,
+          int suggesteddigits, boolean extensionMatch)
+  {
+    this.isBackupFile = false;
+
+    int numcharstart = template.indexOf(BackupFiles.NUM_PLACEHOLDER);
+    int digits = 0;
+    String templateStart = template;
+    String templateEnd = "";
+    if (numcharstart > -1)
+    {
+      templateStart = template.substring(0, numcharstart);
+      templateEnd = template.substring(
+              numcharstart + BackupFiles.NUM_PLACEHOLDER.length());
+      digits = suggesteddigits;
+    }
+
+    String savedFilename = "";
+    // if extensionOnly is set then reset the filename to the last occurrence of the extension+templateStart and try the match
+    if (extensionMatch)
+    {
+      // only trying to match from extension onwards
+
+      int extensioncharstart = filename
+              .lastIndexOf('.' + base + templateStart);
+      if (extensioncharstart == -1)
+      {
+        return;
+      }
+
+      savedFilename = filename.substring(0, extensioncharstart + 1); // include
+                                                                     // the "."
+      filename = filename.substring(extensioncharstart + 1);
+    }
+
+    // full filename match
+
+    // calculate minimum length of a backup filename
+    int minlength = base.length() + template.length()
+            - BackupFiles.NUM_PLACEHOLDER.length() + digits;
+
+    if (!(filename.startsWith(base + templateStart)
+            && filename.endsWith(templateEnd)
+            && filename.length() >= minlength))
+    {
+      // non-starter
+      return;
+    }
+
+    int startLength = base.length() + templateStart.length();
+    int endLength = templateEnd.length();
+    String numString = numcharstart > -1
+            ? filename.substring(startLength, filename.length() - endLength)
+            : "";
+
+    if (filename.length() >= startLength + digits + endLength
+            && filename.startsWith(base + templateStart)
+            && filename.endsWith(templateEnd)
+            // match exactly digits number of number-characters (numString
+            // should be all digits and at least the right length), or more than
+            // digits long with proviso it's not zero-leading.
+            && (numString.matches("[0-9]{" + digits + "}")
+                    || numString.matches("[1-9][0-9]{" + digits + ",}")))
+    {
+      this.base = extensionMatch ? savedFilename + base : base;
+      this.templateStart = templateStart;
+      this.num = numString.length() > 0 ? Integer.parseInt(numString) : 0;
+      this.digits = digits;
+      this.templateEnd = templateEnd;
+      this.isBackupFile = true;
+    }
+
+  }
+
+  public static BackupFilenameParts currentBackupFilenameParts(
+          String filename, String base, boolean extensionMatch)
+  {
+    BackupFilenameParts bfp = new BackupFilenameParts();
+    String template = Cache.getDefault(BackupFiles.SUFFIX, null);
+    if (template == null)
+    {
+      return bfp;
+    }
+    int digits;
+    try
+    {
+      digits = Integer
+              .parseInt(Cache.getDefault(BackupFiles.SUFFIX_DIGITS, null));
+    } catch (Exception e)
+    {
+      return bfp;
+    }
+    return new BackupFilenameParts(filename, base, template, digits,
+            extensionMatch);
+  }
+
+  public boolean isBackupFile()
+  {
+    return this.isBackupFile;
+  }
+
+  public int indexNum()
+  {
+    return this.num;
+  }
+
+  public static String getBackupFilename(int index, String base,
+          String template, int digits)
+  {
+    String numString = String.format("%0" + digits + "d", index);
+    String backupSuffix = template.replaceFirst(BackupFiles.NUM_PLACEHOLDER,
+            numString);
+    String backupfilename = base + backupSuffix;
+    return backupfilename;
+  }
+}
diff --git a/src/jalview/io/BackupFiles.java b/src/jalview/io/BackupFiles.java
new file mode 100644 (file)
index 0000000..dbda022
--- /dev/null
@@ -0,0 +1,764 @@
+package jalview.io;
+
+import jalview.bin.Cache;
+import jalview.gui.Desktop;
+import jalview.gui.JvOptionPane;
+import jalview.util.MessageManager;
+
+import java.io.File;
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.TreeMap;
+
+/*
+ * BackupFiles used for manipulating (naming rolling/deleting) backup/version files when an alignment or project file is saved.
+ * User configurable options are:
+ * BACKUPFILES_ENABLED - boolean flag as to whether to use this mechanism or act as before, including overwriting files as saved.
+ * BACKUPFILES_SUFFIX - a template to insert after the file extension.  Use '%n' to be replaced by a 0-led SUFFIX_DIGITS long integer.
+ * BACKUPFILES_NO_MAX - flag to turn off setting a maximum number of backup files to keep.
+ * BACKUPFILES_ROLL_MAX - the maximum number of backupfiles to keep for any one alignment or project file.
+ * BACKUPFILES_SUFFIX_DIGITS - the number of digits to insert replace %n with (e.g. BACKUPFILES_SUFFIX_DIGITS = 3 would make "001", "002", etc)
+ * BACKUPFILES_REVERSE_ORDER - if true then "logfile" style numbering and file rolling will occur. If false then ever-increasing version numbering will occur, but old files will still be deleted if there are more than ROLL_MAX backup files. 
+ * BACKUPFILES_CONFIRM_DELETE_OLD - if true then prompt/confirm with the user when deleting older backup/version files.
+ */
+
+public class BackupFiles
+{
+
+  // labels for saved params in Cache and .jalview_properties
+  public static final String NS = "BACKUPFILES";
+
+  public static final String ENABLED = NS + "_ENABLED";
+
+  public static final String SUFFIX = NS + "_SUFFIX";
+
+  public static final String NO_MAX = NS + "_NO_MAX";
+
+  public static final String ROLL_MAX = NS + "_ROLL_MAX";
+
+  public static final String SUFFIX_DIGITS = NS + "_SUFFIX_DIGITS";
+
+  public static final String NUM_PLACEHOLDER = "%n";
+
+  public static final String REVERSE_ORDER = NS + "_REVERSE_ORDER";
+
+  public static final String CONFIRM_DELETE_OLD = NS
+          + "_CONFIRM_DELETE_OLD";
+
+  private static final String DEFAULT_TEMP_FILE = "jalview_temp_file_" + NS;
+
+  private static final String TEMP_FILE_EXT = ".tmp";
+
+  // file - File object to be backed up and then updated (written over)
+  private File file;
+
+  // enabled - default flag as to whether to do the backup file roll (if not
+  // defined in preferences)
+  private static boolean enabled;
+
+  // confirmDelete - default flag as to whether to confirm with the user before
+  // deleting old backup/version files
+  private static boolean confirmDelete;
+
+  // defaultSuffix - default template to use to append to basename of file
+  private String suffix;
+
+  // noMax - flag to turn off a maximum number of files
+  private boolean noMax;
+
+  // defaultMax - default max number of backup files
+  private int max;
+
+  // defaultDigits - number of zero-led digits to use in the filename
+  private int digits;
+
+  // reverseOrder - set to true to make newest (latest) files lowest number
+  // (like rolled log files)
+  private boolean reverseOrder;
+
+  // temp saved file to become new saved file
+  private File tempFile;
+
+  // flag set to see if file save to temp file was successful
+  private boolean tempFileWriteSuccess;
+
+  // array of files to be deleted, with extra information
+  private ArrayList<File> deleteFiles = new ArrayList<>();
+
+  // date formatting for modification times
+  private static final SimpleDateFormat sdf = new SimpleDateFormat(
+          "yyyy-MM-dd HH:mm:ss");
+
+  public BackupFiles(String filename)
+  {
+    this(new File(filename));
+  }
+
+  // first time defaults for SUFFIX, NO_MAX, ROLL_MAX, SUFFIX_DIGITS and
+  // REVERSE_ORDER
+  public BackupFiles(File file)
+  {
+    this(file, ".bak" + NUM_PLACEHOLDER, false, 3, 3, false);
+  }
+
+  public BackupFiles(File file, String defaultSuffix, boolean defaultNoMax,
+          int defaultMax, int defaultDigits, boolean defaultReverseOrder)
+  {
+    classInit();
+    this.file = file;
+    this.suffix = Cache.getDefault(SUFFIX, defaultSuffix);
+    this.noMax = Cache.getDefault(NO_MAX, defaultNoMax);
+    this.max = Cache.getDefault(ROLL_MAX, defaultMax);
+    this.digits = Cache.getDefault(SUFFIX_DIGITS, defaultDigits);
+    this.reverseOrder = Cache.getDefault(REVERSE_ORDER,
+            defaultReverseOrder);
+
+    // create a temp file to save new data in
+    File temp = null;
+    try
+    {
+      if (file != null)
+      {
+        String tempfilename = file.getName();
+        File tempdir = file.getParentFile();
+        temp = File.createTempFile(tempfilename, TEMP_FILE_EXT + "_newfile",
+                tempdir);
+      }
+      else
+      {
+        temp = File.createTempFile(DEFAULT_TEMP_FILE, TEMP_FILE_EXT);
+      }
+    } catch (IOException e)
+    {
+      System.out.println(
+              "Could not create temp file to save into (IOException)");
+    } catch (Exception e)
+    {
+      System.out.println("Exception ctreating temp file for saving");
+    }
+    this.setTempFile(temp);
+  }
+
+  public static void classInit()
+  {
+    setEnabled(Cache.getDefault(ENABLED, true));
+    setConfirmDelete(Cache.getDefault(CONFIRM_DELETE_OLD, true));
+  }
+
+  public static void setEnabled(boolean flag)
+  {
+    enabled = flag;
+  }
+
+  public static boolean getEnabled()
+  {
+    classInit();
+    return enabled;
+  }
+
+  public static void setConfirmDelete(boolean flag)
+  {
+    confirmDelete = flag;
+  }
+
+  public static boolean getConfirmDelete()
+  {
+    classInit();
+    return confirmDelete;
+  }
+
+  // set, get and rename temp file into place
+  public void setTempFile(File temp)
+  {
+    this.tempFile = temp;
+  }
+
+  public File getTempFile()
+  {
+    return tempFile;
+  }
+
+  public String getTempFilePath()
+  {
+    String path = null;
+    try
+    {
+      path = this.getTempFile().getCanonicalPath();
+    } catch (IOException e)
+    {
+      System.out.println(
+              "IOException when getting Canonical Path of temp file '"
+                      + this.getTempFile().getName() + "'");
+    }
+    return path;
+  }
+
+  public boolean setWriteSuccess(boolean flag)
+  {
+    boolean old = this.tempFileWriteSuccess;
+    this.tempFileWriteSuccess = flag;
+    return old;
+  }
+
+  public boolean getWriteSuccess()
+  {
+    return this.tempFileWriteSuccess;
+  }
+
+  public boolean renameTempFile()
+  {
+    return tempFile.renameTo(file);
+  }
+
+  // roll the backupfiles
+  public boolean rollBackupFiles()
+  {
+    return this.rollBackupFiles(true);
+  }
+
+  public boolean rollBackupFiles(boolean tidyUp)
+  {
+    // file doesn't yet exist or backups are not enabled or template is null or
+    // empty
+    if ((!file.exists()) || (!enabled) || max < 0 || suffix == null
+            || suffix.length() == 0)
+    {
+      // nothing to do
+      return true;
+    }
+
+    String dir = "";
+    File dirFile;
+    try
+    {
+      dirFile = file.getParentFile();
+      dir = dirFile.getCanonicalPath();
+    } catch (Exception e)
+    {
+      System.out.println(
+              "Could not get canonical path for file '" + file + "'");
+      return false;
+    }
+    String filename = file.getName();
+    String basename = filename;
+
+    boolean ret = true;
+    // Create/move backups up one
+
+    deleteFiles.clear();
+
+    // find existing backup files
+    BackupFilenameFilter bff = new BackupFilenameFilter(basename, suffix,
+            digits);
+    File[] backupFiles = dirFile.listFiles(bff);
+    int nextIndexNum = 0;
+
+    if (backupFiles.length == 0)
+    {
+      // No other backup files. Just need to move existing file to backupfile_1
+      nextIndexNum = 1;
+    }
+    else
+    {
+      TreeMap<Integer, File> bfTreeMap = sortBackupFilesAsTreeMap(
+              backupFiles, basename);
+      // bfTreeMap now a sorted list of <Integer index>,<File backupfile>
+      // mappings
+
+      if (reverseOrder)
+      {
+        // backup style numbering
+
+
+        int tempMax = noMax ? -1 : max;
+        // noMax == true means no limits
+        // look for first "gap" in backupFiles
+        // if tempMax is -1 at this stage just keep going until there's a gap,
+        // then hopefully tempMax gets set to the right index (a positive
+        // integer so the loop breaks)...
+        // why do I feel a little uneasy about this loop?..
+        for (int i = 1; tempMax < 0 || i <= max; i++)
+        {
+          if (!bfTreeMap.containsKey(i)) // first index without existent
+                                         // backupfile
+          {
+            tempMax = i;
+          }
+        }
+        
+        File previousFile = null;
+        File fileToBeDeleted = null;
+        for (int n = tempMax; n > 0; n--)
+        {
+          String backupfilename = dir + File.separatorChar
+                  + BackupFilenameParts.getBackupFilename(n, basename,
+                          suffix, digits);
+          File backupfile_n = new File(backupfilename);
+
+          if (!backupfile_n.exists())
+          {
+            // no "oldest" file to delete
+            previousFile = backupfile_n;
+            fileToBeDeleted = null;
+            continue;
+          }
+
+          // check the modification time of this (backupfile_n) and the previous
+          // file (fileToBeDeleted) if the previous file is going to be deleted
+          if (fileToBeDeleted != null)
+          {
+            File replacementFile = backupfile_n;
+            long fileToBeDeletedLMT = fileToBeDeleted.lastModified();
+            long replacementFileLMT = replacementFile.lastModified();
+
+            try
+            {
+              File oldestTempFile = nextTempFile(fileToBeDeleted.getName(),
+                      dirFile);
+              
+              if (fileToBeDeletedLMT > replacementFileLMT)
+              {
+                String fileToBeDeletedLMTString = sdf
+                        .format(fileToBeDeletedLMT);
+                String replacementFileLMTString = sdf
+                        .format(replacementFileLMT);
+                System.out.println("WARNING! I am set to delete backupfile "
+                        + fileToBeDeleted.getName()
+                        + " has modification time "
+                        + fileToBeDeletedLMTString
+                        + " which is newer than its replacement "
+                        + replacementFile.getName()
+                        + " with modification time "
+                        + replacementFileLMTString);
+
+                boolean delete = confirmNewerDeleteFile(fileToBeDeleted,
+                        replacementFile, true);
+
+                if (delete)
+                {
+                  // User has confirmed delete -- no need to add it to the list
+                  fileToBeDeleted.delete();
+                }
+                else
+                {
+                  fileToBeDeleted.renameTo(oldestTempFile);
+                }
+              }
+              else
+              {
+                fileToBeDeleted.renameTo(oldestTempFile);
+                addDeleteFile(oldestTempFile);
+              }
+
+            } catch (Exception e)
+            {
+              System.out.println(
+                      "Error occurred, probably making new temp file for '"
+                              + fileToBeDeleted.getName() + "'");
+              e.printStackTrace();
+            }
+
+            // reset
+            fileToBeDeleted = null;
+          }
+
+          if (!noMax && n == tempMax && backupfile_n.exists())
+          {
+            fileToBeDeleted = backupfile_n;
+          }
+          else
+          {
+            if (previousFile != null)
+            {
+              ret = ret && backupfile_n.renameTo(previousFile);
+            }
+          }
+
+          previousFile = backupfile_n;
+        }
+
+        // index to use for the latest backup
+        nextIndexNum = 1;
+      }
+      else
+      {
+        // version style numbering (with earliest file deletion if max files
+        // reached)
+
+        bfTreeMap.values().toArray(backupFiles);
+
+        // noMax == true means keep all backup files
+        if ((!noMax) && bfTreeMap.size() >= max)
+        {
+          // need to delete some files to keep number of backups to designated
+          // max
+          int numToDelete = bfTreeMap.size() - max + 1;
+          // the "replacement" file is the latest backup file being kept (it's
+          // not replacing though)
+          File replacementFile = numToDelete < backupFiles.length
+                  ? backupFiles[numToDelete]
+                  : null;
+          for (int i = 0; i < numToDelete; i++)
+          {
+            // check the deletion files for modification time of the last
+            // backupfile being saved
+            File fileToBeDeleted = backupFiles[i];
+            boolean delete = true;
+
+            boolean newer = false;
+            if (replacementFile != null)
+            {
+              long fileToBeDeletedLMT = fileToBeDeleted.lastModified();
+              long replacementFileLMT = replacementFile != null
+                      ? replacementFile.lastModified()
+                      : Long.MAX_VALUE;
+              if (fileToBeDeletedLMT > replacementFileLMT)
+              {
+                String fileToBeDeletedLMTString = sdf
+                        .format(fileToBeDeletedLMT);
+                String replacementFileLMTString = sdf
+                        .format(replacementFileLMT);
+
+                System.out
+                        .println("WARNING! I am set to delete backupfile '"
+                                + fileToBeDeleted.getName()
+                                + "' has modification time "
+                        + fileToBeDeletedLMTString
+                                + " which is newer than the oldest backupfile being kept '"
+                        + replacementFile.getName()
+                                + "' with modification time "
+                        + replacementFileLMTString);
+
+                delete = confirmNewerDeleteFile(fileToBeDeleted,
+                        replacementFile, false);
+                if (delete)
+                {
+                  // User has confirmed delete -- no need to add it to the list
+                  fileToBeDeleted.delete();
+                  delete = false;
+                }
+                else
+                {
+                  // keeping file, nothing to do!
+                }
+              }
+            }
+            if (delete)
+            {
+              addDeleteFile(fileToBeDeleted);
+            }
+
+          }
+
+        }
+
+        nextIndexNum = bfTreeMap.lastKey() + 1;
+      }
+    }
+
+    // Let's make the new backup file!! yay, got there at last!
+    String latestBackupFilename = dir + File.separatorChar
+            + BackupFilenameParts.getBackupFilename(nextIndexNum, basename,
+                    suffix, digits);
+    ret |= file.renameTo(new File(latestBackupFilename));
+
+    if (tidyUp)
+    {
+      tidyUpFiles();
+    }
+
+    return ret;
+  }
+
+  private static File nextTempFile(String filename, File dirFile)
+          throws IOException
+  {
+    File temp = null;
+    COUNT: for (int i = 1; i < 1000; i++)
+    {
+      File trythis = new File(dirFile,
+              filename + '~' + Integer.toString(i));
+      if (!trythis.exists())
+      {
+        temp = trythis;
+        break COUNT;
+      }
+
+    }
+    if (temp == null)
+    {
+      temp = File.createTempFile(filename, TEMP_FILE_EXT, dirFile);
+    }
+    return temp;
+  }
+
+  private void tidyUpFiles()
+  {
+    deleteOldFiles();
+  }
+
+  private static boolean confirmNewerDeleteFile(File fileToBeDeleted,
+          File replacementFile, boolean replace)
+  {
+    StringBuilder messageSB = new StringBuilder();
+
+    File ftbd = fileToBeDeleted;
+    String ftbdLMT = sdf.format(ftbd.lastModified());
+    String ftbdSize = Long.toString(ftbd.length());
+
+    File rf = replacementFile;
+    String rfLMT = sdf.format(rf.lastModified());
+    String rfSize = Long.toString(rf.length());
+
+    int confirmButton = JvOptionPane.NO_OPTION;
+    if (replace)
+    {
+      File saveFile = null;
+      try
+      {
+        saveFile = nextTempFile(ftbd.getName(), ftbd.getParentFile());
+      } catch (Exception e)
+      {
+        System.out.println(
+                "Error when confirming to keep backup file newer than other backup files.");
+        e.printStackTrace();
+      }
+      messageSB.append(MessageManager.formatMessage(
+              "label.newerdelete_replacement_line", new String[]
+              { ftbd.getName(), rf.getName(), ftbdLMT, rfLMT, ftbdSize,
+                  rfSize }));
+      messageSB.append("\n\n");
+      messageSB.append(MessageManager.formatMessage(
+              "label.confirm_deletion_or_rename", new String[]
+              { ftbd.getName(), saveFile.getName() }));
+      String[] options = new String[] {
+          MessageManager.getString("label.delete"),
+          MessageManager.getString("label.rename") };
+
+      confirmButton = JvOptionPane.showOptionDialog(Desktop.desktop,
+              messageSB.toString(),
+              MessageManager.getString("label.backupfiles_confirm_delete"),
+              JvOptionPane.YES_NO_OPTION, JvOptionPane.WARNING_MESSAGE,
+              null, options, options[0]);
+    }
+    else
+    {
+      messageSB.append(MessageManager
+              .formatMessage("label.newerdelete_line", new String[]
+              { ftbd.getName(), rf.getName(), ftbdLMT, rfLMT, ftbdSize,
+                  rfSize }));
+      messageSB.append("\n\n");
+      messageSB.append(MessageManager
+              .formatMessage("label.confirm_deletion", new String[]
+              { ftbd.getName() }));
+      String[] options = new String[] {
+          MessageManager.getString("label.delete"),
+          MessageManager.getString("label.keep") };
+
+      confirmButton = JvOptionPane.showOptionDialog(Desktop.desktop,
+              messageSB.toString(),
+              MessageManager.getString("label.backupfiles_confirm_delete"),
+              JvOptionPane.YES_NO_OPTION, JvOptionPane.WARNING_MESSAGE,
+              null, options, options[0]);
+    }
+
+
+    // return should be TRUE if file is to be deleted
+    return (confirmButton == JvOptionPane.YES_OPTION);
+  }
+
+  private void deleteOldFiles()
+  {
+    if (deleteFiles != null && !deleteFiles.isEmpty())
+    {
+      boolean doDelete = false;
+      StringBuilder messageSB = null;
+      if (confirmDelete && deleteFiles.size() > 0)
+      {
+        messageSB = new StringBuilder();
+        messageSB.append(MessageManager
+                .getString("label.backupfiles_confirm_delete_old_files"));
+        for (int i = 0; i < deleteFiles.size(); i++)
+        {
+          File df = deleteFiles.get(i);
+          messageSB.append("\n");
+          messageSB.append(df.getName());
+          messageSB.append(" ");
+          messageSB.append(MessageManager.formatMessage("label.file_info",
+                  new String[]
+                  { sdf.format(df.lastModified()),
+                      Long.toString(df.length()) }));
+        }
+
+        int confirmButton = JvOptionPane.showConfirmDialog(Desktop.desktop,
+                messageSB.toString(),
+                MessageManager
+                        .getString("label.backupfiles_confirm_delete"),
+                JvOptionPane.YES_NO_OPTION, JvOptionPane.WARNING_MESSAGE);
+
+        doDelete = (confirmButton == JvOptionPane.YES_OPTION);
+      }
+      else
+      {
+        doDelete = true;
+      }
+
+      if (doDelete)
+      {
+        for (int i = 0; i < deleteFiles.size(); i++)
+        {
+          File fileToDelete = deleteFiles.get(i);
+          fileToDelete.delete();
+          System.out.println("DELETING '" + fileToDelete.getName() + "'");
+        }
+      }
+
+    }
+
+    deleteFiles.clear();
+  }
+
+  private TreeMap<Integer, File> sortBackupFilesAsTreeMap(
+          File[] backupFiles,
+          String basename)
+  {
+    // sort the backup files (based on integer found in the suffix) using a
+    // precomputed Hashmap for speed
+    Map<Integer, File> bfHashMap = new HashMap<>();
+    for (int i = 0; i < backupFiles.length; i++)
+    {
+      File f = backupFiles[i];
+      BackupFilenameParts bfp = new BackupFilenameParts(f, basename, suffix,
+              digits);
+      bfHashMap.put(bfp.indexNum(), f);
+    }
+    TreeMap<Integer, File> bfTreeMap = new TreeMap<>();
+    bfTreeMap.putAll(bfHashMap);
+    return bfTreeMap;
+  }
+
+  public boolean rollBackupsAndRenameTempFile()
+  {
+    boolean write = this.getWriteSuccess();
+
+    boolean roll = false;
+    boolean rename = false;
+    if (write)
+    {
+      roll = this.rollBackupFiles(false);
+      rename = this.renameTempFile();
+    }
+
+    /*
+     * Not sure that this confirmation is desirable.  By this stage the new file is
+     * already written successfully, but something (e.g. disk full) has happened while 
+     * trying to roll the backup files, and most likely the filename needed will already
+     * be vacant so renaming the temp file is nearly always correct!
+     */
+    boolean okay = roll && rename;
+    if (!okay)
+    {
+      StringBuilder messageSB = new StringBuilder();
+      messageSB.append(MessageManager.getString( "label.backupfiles_confirm_save_file_backupfiles_roll_wrong"));
+      if (rename)
+      {
+        if (messageSB.length() > 0)
+        {
+          messageSB.append("\n");
+        }
+        messageSB.append(MessageManager.getString(
+                "label.backupfiles_confirm_save_new_saved_file_ok"));
+      }
+      else
+      {
+        if (messageSB.length() > 0)
+        {
+          messageSB.append("\n");
+        }
+        messageSB.append(MessageManager.getString(
+                "label.backupfiles_confirm_save_new_saved_file_not_ok"));
+      }
+
+      int confirmButton = JvOptionPane.showConfirmDialog(Desktop.desktop,
+              messageSB.toString(),
+              MessageManager
+                      .getString("label.backupfiles_confirm_save_file"),
+              JvOptionPane.OK_OPTION, JvOptionPane.WARNING_MESSAGE);
+      okay = confirmButton == JvOptionPane.OK_OPTION;
+    }
+    if (okay)
+    {
+      tidyUpFiles();
+    }
+
+    return rename;
+  }
+
+  public static TreeMap<Integer, File> getBackupFilesAsTreeMap(
+          String fileName, String suffix, int digits)
+  {
+    File[] backupFiles = null;
+
+    File file = new File(fileName);
+
+    File dirFile;
+    try
+    {
+      dirFile = file.getParentFile();
+    } catch (Exception e)
+    {
+      System.out.println(
+              "Could not get canonical path for file '" + file + "'");
+      return new TreeMap<>();
+    }
+
+    String filename = file.getName();
+    String basename = filename;
+
+    // find existing backup files
+    BackupFilenameFilter bff = new BackupFilenameFilter(basename, suffix,
+            digits);
+    backupFiles = dirFile.listFiles(bff); // is clone needed?
+
+    // sort the backup files (based on integer found in the suffix) using a
+    // precomputed Hashmap for speed
+    Map<Integer, File> bfHashMap = new HashMap<>();
+    for (int i = 0; i < backupFiles.length; i++)
+    {
+      File f = backupFiles[i];
+      BackupFilenameParts bfp = new BackupFilenameParts(f, basename, suffix,
+              digits);
+      bfHashMap.put(bfp.indexNum(), f);
+    }
+    TreeMap<Integer, File> bfTreeMap = new TreeMap<>();
+    bfTreeMap.putAll(bfHashMap);
+
+    return bfTreeMap;
+  }
+
+  /*
+  private boolean addDeleteFile(File fileToBeDeleted, File originalFile,
+          boolean delete, boolean newer)
+  {
+    return addDeleteFile(fileToBeDeleted, originalFile, null, delete, newer);
+  }
+  */
+  private boolean addDeleteFile(File fileToBeDeleted)
+  {
+    boolean ret = false;
+    int pos = deleteFiles.indexOf(fileToBeDeleted);
+    if (pos > -1)
+    {
+      return true;
+    }
+    else
+    {
+      deleteFiles.add(fileToBeDeleted);
+    }
+    return ret;
+  }
+
+}
index 169da5a..12ad0d4 100755 (executable)
@@ -24,6 +24,7 @@ import jalview.analysis.AlignmentUtils;
 import jalview.analysis.SequenceIdMatcher;
 import jalview.api.AlignViewportI;
 import jalview.api.FeatureColourI;
+import jalview.api.FeatureRenderer;
 import jalview.api.FeaturesSourceI;
 import jalview.datamodel.AlignedCodonFrame;
 import jalview.datamodel.Alignment;
@@ -562,28 +563,27 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI
   }
 
   /**
-   * Returns contents of a Jalview format features file, for visible features, as
-   * filtered by type and group. Features with a null group are displayed if their
-   * feature type is visible. Non-positional features may optionally be included
-   * (with no check on type or group).
+   * Returns contents of a Jalview format features file, for visible features,
+   * as filtered by type and group. Features with a null group are displayed if
+   * their feature type is visible. Non-positional features may optionally be
+   * included (with no check on type or group).
    * 
    * @param sequences
-   *          source of features
-   * @param visible
-   *          map of colour for each visible feature type
-   * @param featureFilters
-   * @param visibleFeatureGroups
+   * @param fr
    * @param includeNonPositional
    *          if true, include non-positional features (regardless of group or
    *          type)
    * @return
    */
   public String printJalviewFormat(SequenceI[] sequences,
-          Map<String, FeatureColourI> visible,
-          Map<String, FeatureMatcherSetI> featureFilters,
-          List<String> visibleFeatureGroups, boolean includeNonPositional)
+          FeatureRenderer fr, boolean includeNonPositional)
   {
-    if (!includeNonPositional && (visible == null || visible.isEmpty()))
+    Map<String, FeatureColourI> visibleColours = fr
+            .getDisplayedFeatureCols();
+    Map<String, FeatureMatcherSetI> featureFilters = fr.getFeatureFilters();
+
+    if (!includeNonPositional
+            && (visibleColours == null || visibleColours.isEmpty()))
     {
       // no point continuing.
       return "No Features Visible";
@@ -594,9 +594,10 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI
      */
     // TODO: decide if feature links should also be written here ?
     StringBuilder out = new StringBuilder(256);
-    if (visible != null)
+    if (visibleColours != null)
     {
-      for (Entry<String, FeatureColourI> featureColour : visible.entrySet())
+      for (Entry<String, FeatureColourI> featureColour : visibleColours
+              .entrySet())
       {
         FeatureColourI colour = featureColour.getValue();
         out.append(colour.toJalviewFormat(featureColour.getKey())).append(
@@ -604,50 +605,22 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI
       }
     }
 
-    String[] types = visible == null ? new String[0] : visible.keySet()
-            .toArray(new String[visible.keySet().size()]);
+    String[] types = visibleColours == null ? new String[0]
+            : visibleColours.keySet()
+                    .toArray(new String[visibleColours.keySet().size()]);
 
     /*
      * feature filters if any
      */
-    outputFeatureFilters(out, visible, featureFilters);
-
-    /*
-     * sort groups alphabetically, and ensure that features with a
-     * null or empty group are output after those in named groups
-     */
-    List<String> sortedGroups = new ArrayList<>(visibleFeatureGroups);
-    sortedGroups.remove(null);
-    sortedGroups.remove("");
-    Collections.sort(sortedGroups);
-    sortedGroups.add(null);
-    sortedGroups.add("");
-
-    boolean foundSome = false;
-
-    /*
-     * first output any non-positional features
-     */
-    if (includeNonPositional)
-    {
-      for (int i = 0; i < sequences.length; i++)
-      {
-        String sequenceName = sequences[i].getName();
-        for (SequenceFeature feature : sequences[i].getFeatures()
-                .getNonPositionalFeatures())
-        {
-          foundSome = true;
-          out.append(formatJalviewFeature(sequenceName, feature));
-        }
-      }
-    }
+    outputFeatureFilters(out, visibleColours, featureFilters);
 
     /*
-     * positional features within groups
+     * output features within groups
      */
-    foundSome |= outputFeaturesByGroup(out, sortedGroups, types, sequences);
+    int count = outputFeaturesByGroup(out, fr, types, sequences,
+            includeNonPositional);
 
-    return foundSome ? out.toString() : "No Features Visible";
+    return count > 0 ? out.toString() : "No Features Visible";
   }
 
   /**
@@ -685,65 +658,104 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI
     }
     if (!first)
     {
-      out.append(ENDFILTERS).append(newline).append(newline);
+      out.append(ENDFILTERS).append(newline);
     }
 
   }
 
   /**
-   * Appends output of sequence features within feature groups to the output
-   * buffer. Groups other than the null or empty group are sandwiched by
-   * STARTGROUP and ENDGROUP lines.
+   * Appends output of visible sequence features within feature groups to the
+   * output buffer. Groups other than the null or empty group are sandwiched by
+   * STARTGROUP and ENDGROUP lines. Answers the number of features written.
    * 
    * @param out
-   * @param groups
+   * @param fr
    * @param featureTypes
    * @param sequences
+   * @param includeNonPositional
    * @return
    */
-  private boolean outputFeaturesByGroup(StringBuilder out,
-          List<String> groups, String[] featureTypes, SequenceI[] sequences)
+  private int outputFeaturesByGroup(StringBuilder out,
+          FeatureRenderer fr, String[] featureTypes,
+          SequenceI[] sequences, boolean includeNonPositional)
   {
-    boolean foundSome = false;
-    for (String group : groups)
+    List<String> featureGroups = fr.getFeatureGroups();
+
+    /*
+     * sort groups alphabetically, and ensure that features with a
+     * null or empty group are output after those in named groups
+     */
+    List<String> sortedGroups = new ArrayList<>(featureGroups);
+    sortedGroups.remove(null);
+    sortedGroups.remove("");
+    Collections.sort(sortedGroups);
+    sortedGroups.add(null);
+    sortedGroups.add("");
+
+    int count = 0;
+    List<String> visibleGroups = fr.getDisplayedFeatureGroups();
+
+    /*
+     * loop over all groups (may be visible or not);
+     * non-positional features are output even if group is not visible
+     */
+    for (String group : sortedGroups)
     {
-      boolean isNamedGroup = (group != null && !"".equals(group));
-      if (isNamedGroup)
-      {
-        out.append(newline);
-        out.append(STARTGROUP).append(TAB);
-        out.append(group);
-        out.append(newline);
-      }
+      boolean firstInGroup = true;
+      boolean isNullGroup = group == null || "".equals(group);
 
-      /*
-       * output positional features within groups
-       */
       for (int i = 0; i < sequences.length; i++)
       {
         String sequenceName = sequences[i].getName();
         List<SequenceFeature> features = new ArrayList<>();
-        if (featureTypes.length > 0)
+
+        /*
+         * get any non-positional features in this group, if wanted
+         * (for any feature type, whether visible or not)
+         */
+        if (includeNonPositional)
+        {
+          features.addAll(sequences[i].getFeatures()
+                  .getFeaturesForGroup(false, group));
+        }
+
+        /*
+         * add positional features for visible feature types, but
+         * (for named groups) only if feature group is visible
+         */
+        if (featureTypes.length > 0
+                && (isNullGroup || visibleGroups.contains(group)))
         {
           features.addAll(sequences[i].getFeatures().getFeaturesForGroup(
                   true, group, featureTypes));
         }
 
-        for (SequenceFeature sequenceFeature : features)
+        for (SequenceFeature sf : features)
         {
-          foundSome = true;
-          out.append(formatJalviewFeature(sequenceName, sequenceFeature));
+          if (sf.isNonPositional() || fr.isVisible(sf))
+          {
+            count++;
+            if (firstInGroup)
+            {
+              out.append(newline);
+              if (!isNullGroup)
+              {
+                out.append(STARTGROUP).append(TAB).append(group)
+                        .append(newline);
+              }
+            }
+            firstInGroup = false;
+            out.append(formatJalviewFeature(sequenceName, sf));
+          }
         }
       }
 
-      if (isNamedGroup)
+      if (!isNullGroup && !firstInGroup)
       {
-        out.append(ENDGROUP).append(TAB);
-        out.append(group);
-        out.append(newline);
+        out.append(ENDGROUP).append(TAB).append(group).append(newline);
       }
     }
-    return foundSome;
+    return count;
   }
 
   /**
@@ -872,23 +884,23 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI
    * @return
    */
   public String printGffFormat(SequenceI[] sequences,
-          Map<String, FeatureColourI> visible,
-          List<String> visibleFeatureGroups,
-          boolean includeNonPositionalFeatures)
+          FeatureRenderer fr, boolean includeNonPositionalFeatures)
   {
+    Map<String, FeatureColourI> visibleColours = fr.getDisplayedFeatureCols();
+
     StringBuilder out = new StringBuilder(256);
 
     out.append(String.format("%s %d\n", GFF_VERSION, gffVersion == 0 ? 2 : gffVersion));
 
     if (!includeNonPositionalFeatures
-            && (visible == null || visible.isEmpty()))
+            && (visibleColours == null || visibleColours.isEmpty()))
     {
       return out.toString();
     }
 
-    String[] types = visible == null ? new String[0] : visible.keySet()
-            .toArray(
-            new String[visible.keySet().size()]);
+    String[] types = visibleColours == null ? new String[0]
+            : visibleColours.keySet()
+                    .toArray(new String[visibleColours.keySet().size()]);
 
     for (SequenceI seq : sequences)
     {
@@ -897,21 +909,23 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI
       {
         features.addAll(seq.getFeatures().getNonPositionalFeatures());
       }
-      if (visible != null && !visible.isEmpty())
+      if (visibleColours != null && !visibleColours.isEmpty())
       {
         features.addAll(seq.getFeatures().getPositionalFeatures(types));
       }
 
       for (SequenceFeature sf : features)
       {
-        String source = sf.featureGroup;
-        if (!sf.isNonPositional() && source != null
-                && !visibleFeatureGroups.contains(source))
+        if (!sf.isNonPositional() && !fr.isVisible(sf))
         {
-          // group is not visible
+          /*
+           * feature hidden by group visibility, colour threshold,
+           * or feature filter condition
+           */
           continue;
         }
 
+        String source = sf.featureGroup;
         if (source == null)
         {
           source = sf.getDescription();
index f26d6da..791f881 100755 (executable)
@@ -33,9 +33,9 @@ import jalview.datamodel.SequenceI;
 import jalview.gui.AlignFrame;
 import jalview.gui.AlignViewport;
 import jalview.gui.Desktop;
-import jalview.gui.Jalview2XML;
 import jalview.gui.JvOptionPane;
 import jalview.json.binding.biojson.v1.ColourSchemeMapper;
+import jalview.project.Jalview2XML;
 import jalview.schemes.ColourSchemeI;
 import jalview.structure.StructureSelectionManager;
 import jalview.util.MessageManager;
@@ -440,7 +440,7 @@ public class FileLoader implements Runnable
               alignFrame.getViewport()
                       .applyFeaturesStyle(proxyColourScheme);
             }
-            alignFrame.statusBar.setText(MessageManager.formatMessage(
+            alignFrame.setStatus(MessageManager.formatMessage(
                     "label.successfully_loaded_file", new String[]
                     { title }));
 
index 7a21c16..7fbe801 100755 (executable)
@@ -30,6 +30,8 @@ import java.awt.Component;
 import java.awt.Dimension;
 import java.awt.EventQueue;
 import java.awt.HeadlessException;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
 import java.awt.event.MouseAdapter;
 import java.awt.event.MouseEvent;
 import java.io.File;
@@ -38,12 +40,17 @@ import java.util.List;
 import java.util.StringTokenizer;
 import java.util.Vector;
 
+import javax.swing.BoxLayout;
 import javax.swing.DefaultListCellRenderer;
+import javax.swing.JCheckBox;
 import javax.swing.JFileChooser;
 import javax.swing.JList;
 import javax.swing.JPanel;
 import javax.swing.JScrollPane;
 import javax.swing.SpringLayout;
+import javax.swing.SwingUtilities;
+import javax.swing.border.TitledBorder;
+import javax.swing.filechooser.FileFilter;
 import javax.swing.plaf.basic.BasicFileChooserUI;
 
 /**
@@ -58,6 +65,14 @@ import javax.swing.plaf.basic.BasicFileChooserUI;
 public class JalviewFileChooser extends JFileChooser
 {
   /**
+   * backupfilesCheckBox = "Include backup files" checkbox includeBackupfiles =
+   * flag set by checkbox
+   */
+  private JCheckBox backupfilesCheckBox = null;
+
+  protected boolean includeBackupFiles = false;
+
+  /**
    * Factory method to return a file chooser that offers readable alignment file
    * formats
    * 
@@ -68,6 +83,12 @@ public class JalviewFileChooser extends JFileChooser
   public static JalviewFileChooser forRead(String directory,
           String selected)
   {
+    return JalviewFileChooser.forRead(directory, selected, false);
+  }
+
+  public static JalviewFileChooser forRead(String directory,
+          String selected, boolean allowBackupFiles)
+  {
     List<String> extensions = new ArrayList<>();
     List<String> descs = new ArrayList<>();
     for (FileFormatI format : FileFormats.getInstance().getFormats())
@@ -78,9 +99,11 @@ public class JalviewFileChooser extends JFileChooser
         descs.add(format.getName());
       }
     }
+
     return new JalviewFileChooser(directory,
             extensions.toArray(new String[extensions.size()]),
-            descs.toArray(new String[descs.size()]), selected, true);
+            descs.toArray(new String[descs.size()]), selected, true,
+            allowBackupFiles);
   }
 
   /**
@@ -139,6 +162,12 @@ public class JalviewFileChooser extends JFileChooser
   JalviewFileChooser(String dir, String[] extensions, String[] descs,
           String selected, boolean allFiles)
   {
+    this(dir, extensions, descs, selected, allFiles, false);
+  }
+
+  public JalviewFileChooser(String dir, String[] extensions, String[] descs,
+          String selected, boolean allFiles, boolean allowBackupFiles)
+  {
     super(safePath(dir));
     if (extensions.length == descs.length)
     {
@@ -147,7 +176,7 @@ public class JalviewFileChooser extends JFileChooser
       {
         formats.add(new String[] { extensions[i], descs[i] });
       }
-      init(formats, selected, allFiles);
+      init(formats, selected, allFiles, allowBackupFiles);
     }
     else
     {
@@ -181,6 +210,12 @@ public class JalviewFileChooser extends JFileChooser
    */
   void init(List<String[]> formats, String selected, boolean allFiles)
   {
+    init(formats, selected, allFiles, false);
+  }
+
+  void init(List<String[]> formats, String selected, boolean allFiles,
+          boolean allowBackupFiles)
+  {
 
     JalviewFileFilter chosen = null;
 
@@ -191,6 +226,10 @@ public class JalviewFileChooser extends JFileChooser
     for (String[] format : formats)
     {
       JalviewFileFilter jvf = new JalviewFileFilter(format[0], format[1]);
+      if (allowBackupFiles)
+      {
+        jvf.setParentJFC(this);
+      }
       addChoosableFileFilter(jvf);
       if ((selected != null) && selected.equalsIgnoreCase(format[1]))
       {
@@ -203,7 +242,64 @@ public class JalviewFileChooser extends JFileChooser
       setFileFilter(chosen);
     }
 
-    setAccessory(new RecentlyOpened());
+    if (allowBackupFiles)
+    {
+      JPanel multi = new JPanel();
+      multi.setLayout(new BoxLayout(multi, BoxLayout.PAGE_AXIS));
+      if (backupfilesCheckBox == null)
+      {
+        try {
+          includeBackupFiles = Boolean.parseBoolean(
+                  Cache.getProperty(BackupFiles.NS + "_FC_INCLUDE"));
+        } catch (Exception e)
+        {
+          includeBackupFiles = false;
+        }
+        backupfilesCheckBox = new JCheckBox(
+                MessageManager.getString("label.include_backup_files"),
+                includeBackupFiles);
+        backupfilesCheckBox.setAlignmentX(Component.CENTER_ALIGNMENT);
+        JalviewFileChooser jfc = this;
+        backupfilesCheckBox.addActionListener(new ActionListener()
+        {
+          @Override
+          public void actionPerformed(ActionEvent e)
+          {
+            includeBackupFiles = backupfilesCheckBox.isSelected();
+            Cache.setProperty(BackupFiles.NS + "_FC_INCLUDE",
+                    String.valueOf(includeBackupFiles));
+
+            FileFilter f = jfc.getFileFilter();
+            // deselect the selected file if it's no longer choosable
+            File selectedFile = jfc.getSelectedFile();
+            if (selectedFile != null && !f.accept(selectedFile))
+            {
+              jfc.setSelectedFile(null);
+            }
+            // fake the OK button changing (to force it to upate)
+            String s = jfc.getApproveButtonText();
+            jfc.firePropertyChange(
+                    APPROVE_BUTTON_TEXT_CHANGED_PROPERTY, null, s);
+            // fake the file filter changing (its behaviour actually has)
+            jfc.firePropertyChange(FILE_FILTER_CHANGED_PROPERTY, null, f);
+
+            jfc.rescanCurrentDirectory();
+            jfc.revalidate();
+            jfc.repaint();
+          }
+        });
+      }
+      multi.add(new RecentlyOpened());
+      multi.add(backupfilesCheckBox);
+      setAccessory(multi);
+    }
+    else
+    {
+      // set includeBackupFiles=false to avoid other file choosers from picking
+      // up backup files (Just In Case)
+      includeBackupFiles = false;
+      setAccessory(new RecentlyOpened());
+    }
   }
 
   @Override
@@ -295,14 +391,29 @@ public class JalviewFileChooser extends JFileChooser
   public int showSaveDialog(Component parent) throws HeadlessException
   {
     this.setAccessory(null);
+    this.setSelectedFile(null);
+    return super.showSaveDialog(parent);
+  }
 
-    setDialogType(SAVE_DIALOG);
+  /**
+   * If doing a Save, and an existing file is chosen or entered, prompt for
+   * confirmation of overwrite. Proceed if Yes, else leave the file chooser
+   * open.
+   * 
+   * @see https://stackoverflow.com/questions/8581215/jfilechooser-and-checking-for-overwrite
+   */
+  @Override
+  public void approveSelection()
+  {
+    if (getDialogType() != SAVE_DIALOG)
+    {
+      super.approveSelection();
+      return;
+    }
 
-    this.setSelectedFile(null);
-    int ret = showDialog(parent, MessageManager.getString("action.save"));
     ourselectedFile = getSelectedFile();
 
-    if (getSelectedFile() == null)
+    if (ourselectedFile == null)
     {
       // Workaround for Java 9,10 on OSX - no selected file, but there is a
       // filename typed in
@@ -319,11 +430,15 @@ public class JalviewFileChooser extends JFileChooser
                 "Unexpected exception when trying to get filename.");
         x.printStackTrace();
       }
+      // TODO: ENSURE THAT FILES SAVED WITH A ':' IN THE NAME ARE REFUSED AND
+      // THE
+      // USER PROMPTED FOR A NEW FILENAME
     }
     if (ourselectedFile == null)
     {
-      return JalviewFileChooser.CANCEL_OPTION;
+      return;
     }
+
     if (getFileFilter() instanceof JalviewFileFilter)
     {
       JalviewFileFilter jvf = (JalviewFileFilter) getFileFilter();
@@ -336,23 +451,21 @@ public class JalviewFileChooser extends JFileChooser
         setSelectedFile(ourselectedFile);
       }
     }
-    // TODO: ENSURE THAT FILES SAVED WITH A ':' IN THE NAME ARE REFUSED AND THE
-    // USER PROMPTED FOR A NEW FILENAME
-    if ((ret == JalviewFileChooser.APPROVE_OPTION)
-            && ourselectedFile.exists())
+
+    if (ourselectedFile.exists())
     {
-      int confirm = JvOptionPane.showConfirmDialog(parent,
+      int confirm = JvOptionPane.showConfirmDialog(this,
               MessageManager.getString("label.overwrite_existing_file"),
               MessageManager.getString("label.file_already_exists"),
               JvOptionPane.YES_NO_OPTION);
 
       if (confirm != JvOptionPane.YES_OPTION)
       {
-        ret = JalviewFileChooser.CANCEL_OPTION;
+        return;
       }
     }
 
-    return ret;
+    super.approveSelection();
   }
 
   void recentListSelectionChanged(Object selection)
@@ -375,28 +488,35 @@ public class JalviewFileChooser extends JFileChooser
     }
   }
 
+  /**
+   * A panel to set as the 'accessory' component to the file chooser dialog,
+   * holding a list of recently opened files (if any). These are held as a
+   * tab-separated list of file paths under key <code>RECENT_FILE</code> in
+   * <code>.jalview_properties</code>. A click in the list calls a method in
+   * JalviewFileChooser to set the chosen file as the selection.
+   */
   class RecentlyOpened extends JPanel
   {
-    JList list;
+    private static final long serialVersionUID = 1L;
 
-    public RecentlyOpened()
-    {
+    private JList<String> list;
 
-      String historyItems = jalview.bin.Cache.getProperty("RECENT_FILE");
+    RecentlyOpened()
+    {
+      String historyItems = Cache.getProperty("RECENT_FILE");
       StringTokenizer st;
-      Vector recent = new Vector();
+      Vector<String> recent = new Vector<>();
 
       if (historyItems != null)
       {
         st = new StringTokenizer(historyItems, "\t");
-
         while (st.hasMoreTokens())
         {
-          recent.addElement(st.nextElement());
+          recent.addElement(st.nextToken());
         }
       }
 
-      list = new JList(recent);
+      list = new JList<>(recent);
 
       DefaultListCellRenderer dlcr = new DefaultListCellRenderer();
       dlcr.setHorizontalAlignment(DefaultListCellRenderer.RIGHT);
@@ -411,7 +531,7 @@ public class JalviewFileChooser extends JFileChooser
         }
       });
 
-      this.setBorder(new javax.swing.border.TitledBorder(
+      this.setBorder(new TitledBorder(
               MessageManager.getString("label.recently_opened")));
 
       final JScrollPane scroller = new JScrollPane(list);
@@ -422,7 +542,7 @@ public class JalviewFileChooser extends JFileChooser
       layout.putConstraint(SpringLayout.NORTH, scroller, 5,
               SpringLayout.NORTH, this);
 
-      if (new Platform().isAMac())
+      if (Platform.isAMac())
       {
         scroller.setPreferredSize(new Dimension(500, 100));
       }
@@ -433,7 +553,7 @@ public class JalviewFileChooser extends JFileChooser
 
       this.add(scroller);
 
-      javax.swing.SwingUtilities.invokeLater(new Runnable()
+      SwingUtilities.invokeLater(new Runnable()
       {
         @Override
         public void run()
@@ -442,8 +562,6 @@ public class JalviewFileChooser extends JFileChooser
                   .setValue(scroller.getHorizontalScrollBar().getMaximum());
         }
       });
-
     }
-
   }
 }
index 21f5b0f..bc20342 100755 (executable)
@@ -41,6 +41,8 @@ public class JalviewFileFilter extends FileFilter
 
   private boolean useExtensionsInDescription = true;
 
+  private JalviewFileChooser parentJFC = null;
+
   public JalviewFileFilter(String extension, String description)
   {
     StringTokenizer st = new StringTokenizer(extension, ",");
@@ -81,6 +83,7 @@ public class JalviewFileFilter extends FileFilter
   @Override
   public boolean accept(File f)
   {
+
     if (f != null)
     {
       String extension = getExtension(f);
@@ -94,8 +97,31 @@ public class JalviewFileFilter extends FileFilter
       {
         return true;
       }
+
     }
 
+    if (parentJFC != null && parentJFC.includeBackupFiles)
+    {
+      Iterator<String> it = filters.keySet().iterator();
+      EXTENSION: while (it.hasNext())
+      {
+        String ext = it.next();
+
+        // quick negative test
+        if (!f.getName().contains(ext))
+        {
+          continue EXTENSION;
+        }
+
+        BackupFilenameParts bfp = BackupFilenameParts
+                .currentBackupFilenameParts(f.getName(), ext, true);
+        if (bfp.isBackupFile())
+        {
+          return true;
+        }
+      }
+    }
+    
     return false;
   }
 
@@ -178,4 +204,10 @@ public class JalviewFileFilter extends FileFilter
   {
     return useExtensionsInDescription;
   }
+
+  protected void setParentJFC(JalviewFileChooser p)
+  {
+    this.parentJFC = p;
+  }
+
 }
index 18114f3..52d130c 100755 (executable)
  */
 package jalview.io;
 
+import jalview.util.MessageManager;
+
 import java.io.File;
 import java.net.URL;
 import java.util.HashMap;
+import java.util.Iterator;
 import java.util.Map;
 
 import javax.swing.Icon;
@@ -55,7 +58,9 @@ public class JalviewFileView extends FileView
   public String getTypeDescription(File f)
   {
     String extension = getExtension(f);
+    
     String type = getDescriptionForExtension(extension);
+    
     if (extension != null)
     {
       if (extensions.containsKey(extension))
@@ -84,8 +89,34 @@ public class JalviewFileView extends FileView
   {
     String extension = getExtension(f);
     Icon icon = null;
+    String type = getDescriptionForExtension(extension);
+
+    if (type == null)
+    {
+      Iterator<String> it = extensions.keySet().iterator();
+      EXTENSION: while (it.hasNext())
+      {
+        String ext = it.next();
+
+        // quick negative test
+        if (!f.getName().contains(ext))
+        {
+          continue EXTENSION;
+        }
+
+        BackupFilenameParts bfp = BackupFilenameParts
+                .currentBackupFilenameParts(f.getName(), ext, true);
+        if (bfp.isBackupFile())
+        {
+          extension = ext;
+          type = getDescriptionForExtension(extension)
+                  + MessageManager.getString("label.backup");
+          break;
+        }
+      }
+    }
 
-    if (getDescriptionForExtension(extension) != null)
+    if (type != null)
     {
       icon = getImageIcon("/images/file.png");
     }
index d81a6b0..adf4447 100644 (file)
@@ -33,6 +33,7 @@ import jalview.io.vamsas.Datasetsequence;
 import jalview.io.vamsas.DatastoreItem;
 import jalview.io.vamsas.DatastoreRegistry;
 import jalview.io.vamsas.Rangetype;
+import jalview.project.Jalview2XML;
 import jalview.util.MessageManager;
 import jalview.viewmodel.AlignmentViewport;
 
@@ -1311,7 +1312,8 @@ public class VamsasAppDatastore
           // client data is shared over all app clients
           try
           {
-            jalview.gui.Jalview2XML fromxml = new jalview.gui.Jalview2XML();
+            // jalview.gui.Jalview2XML fromxml = new jalview.gui.Jalview2XML();
+            Jalview2XML fromxml = new Jalview2XML();
             fromxml.attemptversion1parse = false;
             fromxml.setUniqueSetSuffix("");
             fromxml.setObjectMappingTables(vobj2jv, jv2vobj); // mapKeysToString
@@ -1360,7 +1362,7 @@ public class VamsasAppDatastore
         // user data overrides data shared over all app clients ?
         try
         {
-          jalview.gui.Jalview2XML fromxml = new jalview.gui.Jalview2XML();
+          Jalview2XML fromxml = new Jalview2XML();
           fromxml.attemptversion1parse = false;
           fromxml.setUniqueSetSuffix("");
           fromxml.setSkipList(skipList);
@@ -1531,7 +1533,7 @@ public class VamsasAppDatastore
     {
       try
       {
-        jalview.gui.Jalview2XML jxml = new jalview.gui.Jalview2XML();
+        Jalview2XML jxml = new Jalview2XML();
         jxml.setObjectMappingTables(mapKeysToString(vobj2jv),
                 mapValuesToString(jv2vobj));
         jxml.setSkipList(skipList);
index de2f18a..5ba5d93 100644 (file)
@@ -835,33 +835,6 @@ public class VCFLoader
   }
 
   /**
-   * A convenience method to get the AF value for the given alternate allele
-   * index
-   * 
-   * @param variant
-   * @param alleleIndex
-   * @return
-   */
-  protected float getAlleleFrequency(VariantContext variant, int alleleIndex)
-  {
-    float score = 0f;
-    String attributeValue = getAttributeValue(variant,
-            ALLELE_FREQUENCY_KEY, alleleIndex);
-    if (attributeValue != null)
-    {
-      try
-      {
-        score = Float.parseFloat(attributeValue);
-      } catch (NumberFormatException e)
-      {
-        // leave as 0
-      }
-    }
-
-    return score;
-  }
-
-  /**
    * A convenience method to get an attribute value for an alternate allele
    * 
    * @param variant
@@ -981,10 +954,8 @@ public class VCFLoader
       type = getOntologyTerm(consequence);
     }
 
-    float score = getAlleleFrequency(variant, altAlleleIndex);
-
     SequenceFeature sf = new SequenceFeature(type, alleles, featureStart,
-            featureEnd, score, FEATURE_GROUP_VCF);
+            featureEnd, FEATURE_GROUP_VCF);
     sf.setSource(sourceId);
 
     sf.setValue(Gff3Helper.ALLELES, alleles);
index 1cf482d..9f41c92 100755 (executable)
 package jalview.jbgui;
 
 import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
+import jalview.analysis.GeneticCodeI;
+import jalview.analysis.GeneticCodes;
 import jalview.api.SplitContainerI;
 import jalview.bin.Cache;
 import jalview.gui.JvSwingUtils;
 import jalview.gui.Preferences;
 import jalview.io.FileFormats;
+import jalview.schemes.ResidueColourScheme;
 import jalview.util.MessageManager;
 import jalview.util.Platform;
 
@@ -75,7 +78,7 @@ public class GAlignFrame extends JInternalFrame
 
   protected JMenu sortByAnnotScore = new JMenu();
 
-  public JLabel statusBar = new JLabel();
+  protected JLabel statusBar = new JLabel();
 
   protected JMenu outputTextboxMenu = new JMenu();
 
@@ -123,7 +126,7 @@ public class GAlignFrame extends JInternalFrame
 
   protected JMenuItem modifyPID;
 
-  protected JMenuItem annotationColour;
+  protected JRadioButtonMenuItem annotationColour;
 
   protected JMenu sortByTreeMenu = new JMenu();
 
@@ -137,7 +140,7 @@ public class GAlignFrame extends JInternalFrame
 
   protected JCheckBoxMenuItem showDbRefsMenuitem = new JCheckBoxMenuItem();
 
-  protected JMenuItem showTranslation = new JMenuItem();
+  protected JMenu showTranslation = new JMenu();
 
   protected JMenuItem showReverse = new JMenuItem();
 
@@ -201,7 +204,7 @@ public class GAlignFrame extends JInternalFrame
 
   private boolean showAutoCalculatedAbove = false;
 
-  private Map<KeyStroke, JMenuItem> accelerators = new HashMap<KeyStroke, JMenuItem>();
+  private Map<KeyStroke, JMenuItem> accelerators = new HashMap<>();
 
   private SplitContainerI splitFrame;
 
@@ -1221,16 +1224,33 @@ public class GAlignFrame extends JInternalFrame
         vamsasStore_actionPerformed(e);
       }
     });
-    showTranslation
-            .setText(MessageManager.getString("label.translate_cDNA"));
-    showTranslation.addActionListener(new ActionListener()
-    {
-      @Override
-      public void actionPerformed(ActionEvent e)
+
+    /*
+     * Translate as cDNA with sub-menu of translation tables
+     */
+    showTranslation.setText(MessageManager
+            .getString("label.translate_cDNA"));
+    boolean first = true;
+    for (final GeneticCodeI table : GeneticCodes.getInstance()
+            .getCodeTables())
+    {
+      JMenuItem item = new JMenuItem(table.getId() + " " + table.getName());
+      showTranslation.add(item);
+      item.addActionListener(new ActionListener()
+      {
+        @Override
+        public void actionPerformed(ActionEvent e)
+        {
+          showTranslation_actionPerformed(table);
+        }
+      });
+      if (first)
       {
-        showTranslation_actionPerformed(e);
+        showTranslation.addSeparator();
       }
-    });
+      first = false;
+    }
+
     showReverse.setText(MessageManager.getString("label.reverse"));
     showReverse.addActionListener(new ActionListener()
     {
@@ -1943,8 +1963,9 @@ public class GAlignFrame extends JInternalFrame
       }
     });
 
-    annotationColour = new JMenuItem(
+    annotationColour = new JRadioButtonMenuItem(
             MessageManager.getString("action.by_annotation"));
+    annotationColour.setName(ResidueColourScheme.ANNOTATION_COLOUR);
     annotationColour.addActionListener(new ActionListener()
     {
       @Override
@@ -2440,7 +2461,7 @@ public class GAlignFrame extends JInternalFrame
 
   }
 
-  public void showTranslation_actionPerformed(ActionEvent e)
+  public void showTranslation_actionPerformed(GeneticCodeI codeTable)
   {
 
   }
diff --git a/src/jalview/jbgui/GDasSourceBrowser.java b/src/jalview/jbgui/GDasSourceBrowser.java
deleted file mode 100755 (executable)
index a91769a..0000000
+++ /dev/null
@@ -1,256 +0,0 @@
-/*
- * 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.jbgui;
-
-import jalview.util.MessageManager;
-
-import java.awt.BorderLayout;
-import java.awt.Dimension;
-import java.awt.FlowLayout;
-import java.awt.Font;
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.Insets;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-
-import javax.swing.BorderFactory;
-import javax.swing.JButton;
-import javax.swing.JEditorPane;
-import javax.swing.JLabel;
-import javax.swing.JList;
-import javax.swing.JPanel;
-import javax.swing.JProgressBar;
-import javax.swing.JScrollPane;
-import javax.swing.JTable;
-import javax.swing.JTextField;
-import javax.swing.SwingConstants;
-import javax.swing.border.TitledBorder;
-import javax.swing.event.HyperlinkEvent;
-import javax.swing.event.HyperlinkListener;
-
-public class GDasSourceBrowser extends JPanel
-{
-  public GDasSourceBrowser()
-  {
-    try
-    {
-      jbInit();
-    } catch (Exception ex)
-    {
-      ex.printStackTrace();
-    }
-  }
-
-  private void jbInit() throws Exception
-  {
-    this.setLayout(gridBagLayout1);
-    refresh.setText(
-            MessageManager.getString("label.refresh_available_sources"));
-    refresh.addActionListener(new ActionListener()
-    {
-      public void actionPerformed(ActionEvent e)
-      {
-        refresh_actionPerformed(e);
-      }
-    });
-    progressBar.setPreferredSize(new Dimension(450, 20));
-    progressBar.setString("");
-    scrollPane.setBorder(titledBorder1);
-    scrollPane.setBorder(BorderFactory.createEtchedBorder());
-    fullDetailsScrollpane.setBorder(BorderFactory.createEtchedBorder());
-    fullDetails.addHyperlinkListener(new HyperlinkListener()
-    {
-      public void hyperlinkUpdate(HyperlinkEvent e)
-      {
-        fullDetails_hyperlinkUpdate(e);
-      }
-    });
-    fullDetails.setFont(new java.awt.Font("Verdana", Font.PLAIN, 10));
-    fullDetails.setEditable(false);
-    registryLabel.setFont(new java.awt.Font("Verdana", Font.PLAIN, 10));
-    registryLabel.setHorizontalAlignment(SwingConstants.TRAILING);
-    registryLabel.setText(MessageManager.getString("label.use_registry"));
-    addLocal.setText(MessageManager.getString("label.add_local_source"));
-    addLocal.addActionListener(new ActionListener()
-    {
-      public void actionPerformed(ActionEvent e)
-      {
-        amendLocal(true);
-      }
-    });
-    jPanel1.setLayout(flowLayout1);
-    jPanel1.setMinimumSize(new Dimension(596, 30));
-    jPanel1.setPreferredSize(new Dimension(596, 30));
-    jScrollPane2.setBorder(titledBorder3);
-    jScrollPane3.setBorder(titledBorder4);
-    jScrollPane4.setBorder(titledBorder5);
-    titledBorder2
-            .setTitleFont(new java.awt.Font("Verdana", Font.PLAIN, 10));
-    titledBorder3
-            .setTitleFont(new java.awt.Font("Verdana", Font.PLAIN, 10));
-    titledBorder4
-            .setTitleFont(new java.awt.Font("Verdana", Font.PLAIN, 10));
-    filter1.setFont(new java.awt.Font("Verdana", Font.PLAIN, 10));
-    filter2.setFont(new java.awt.Font("Verdana", Font.PLAIN, 10));
-    filter3.setFont(new java.awt.Font("Verdana", Font.PLAIN, 10));
-    table.setFont(new java.awt.Font("Verdana", Font.PLAIN, 10));
-    reset.setFont(new java.awt.Font("Verdana", Font.PLAIN, 10));
-    reset.setMargin(new Insets(2, 2, 2, 2));
-    reset.setText(MessageManager.getString("action.reset"));
-    reset.addActionListener(new ActionListener()
-    {
-      public void actionPerformed(ActionEvent e)
-      {
-        reset_actionPerformed(e);
-      }
-    });
-    jPanel2.setLayout(borderLayout1);
-    borderLayout1.setHgap(5);
-    registryURL.setFont(new java.awt.Font("Verdana", Font.PLAIN, 10));
-    scrollPane.getViewport().add(table);
-    fullDetailsScrollpane.getViewport().add(fullDetails);
-    jScrollPane3.getViewport().add(filter2);
-    jScrollPane4.getViewport().add(filter3);
-    jPanel1.add(refresh, null);
-    jPanel1.add(addLocal, null);
-    jPanel1.add(progressBar, null);
-    jScrollPane2.getViewport().add(filter1);
-    this.add(jPanel1, new GridBagConstraints(0, 3, 3, 1, 1.0, 1.0,
-            GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL,
-            new Insets(0, 0, 0, 0), 0, 0));
-    this.add(fullDetailsScrollpane,
-            new GridBagConstraints(1, 0, 2, 1, 1.0, 1.0,
-                    GridBagConstraints.CENTER, GridBagConstraints.BOTH,
-                    new Insets(3, 0, 0, 3), 240, 130));
-    this.add(scrollPane,
-            new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0,
-                    GridBagConstraints.CENTER, GridBagConstraints.BOTH,
-                    new Insets(3, 2, 0, 0), 150, 130));
-    jPanel2.add(registryLabel, java.awt.BorderLayout.WEST);
-    jPanel2.add(registryURL, java.awt.BorderLayout.CENTER);
-    jPanel2.add(reset, java.awt.BorderLayout.EAST);
-    this.add(jPanel2, new GridBagConstraints(0, 2, 3, 1, 0.0, 0.0,
-            GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL,
-            new Insets(5, 10, 0, 10), 339, 0));
-    this.add(jScrollPane2,
-            new GridBagConstraints(0, 1, 1, 1, 1.0, 1.0,
-                    GridBagConstraints.CENTER, GridBagConstraints.BOTH,
-                    new Insets(0, 0, 0, 60), 80, 60));
-    this.add(jScrollPane4,
-            new GridBagConstraints(2, 1, 1, 1, 1.0, 1.0,
-                    GridBagConstraints.CENTER, GridBagConstraints.BOTH,
-                    new Insets(0, -80, 0, 0), 80, 60));
-    this.add(jScrollPane3,
-            new GridBagConstraints(1, 1, 1, 1, 1.0, 1.0,
-                    GridBagConstraints.CENTER, GridBagConstraints.BOTH,
-                    new Insets(0, -60, 0, 80), 80, 60));
-  }
-
-  protected JTable table = new JTable();
-
-  protected JEditorPane fullDetails = new JEditorPane("text/html", "");
-
-  TitledBorder titledBorder1 = new TitledBorder(
-          MessageManager.getString("label.available_das_sources"));
-
-  protected JButton refresh = new JButton();
-
-  protected JProgressBar progressBar = new JProgressBar();
-
-  protected JScrollPane scrollPane = new JScrollPane();
-
-  TitledBorder titledBorder2 = new TitledBorder(
-          MessageManager.getString("label.full_details"));
-
-  protected JScrollPane fullDetailsScrollpane = new JScrollPane();
-
-  protected JList filter1 = new JList();
-
-  protected JList filter2 = new JList();
-
-  protected JList filter3 = new JList();
-
-  JScrollPane jScrollPane2 = new JScrollPane();
-
-  JScrollPane jScrollPane3 = new JScrollPane();
-
-  JScrollPane jScrollPane4 = new JScrollPane();
-
-  protected JTextField registryURL = new JTextField();
-
-  protected JLabel registryLabel = new JLabel();
-
-  protected JButton addLocal = new JButton();
-
-  JPanel jPanel1 = new JPanel();
-
-  FlowLayout flowLayout1 = new FlowLayout();
-
-  GridBagLayout gridBagLayout1 = new GridBagLayout();
-
-  TitledBorder titledBorder3 = new TitledBorder(
-          MessageManager.getString("label.authority") + ":");
-
-  TitledBorder titledBorder4 = new TitledBorder(
-          MessageManager.getString("label.type") + ":");
-
-  TitledBorder titledBorder5 = new TitledBorder(
-          MessageManager.getString("label.label") + ":");
-
-  JButton reset = new JButton();
-
-  JPanel jPanel2 = new JPanel();
-
-  BorderLayout borderLayout1 = new BorderLayout();
-
-  public void refresh_actionPerformed(ActionEvent e)
-  {
-
-  }
-
-  public void fullDetails_hyperlinkUpdate(HyperlinkEvent e)
-  {
-    try
-    {
-
-      if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED)
-      {
-        jalview.util.BrowserLauncher.openURL(e.getURL().toString());
-      }
-    } catch (Exception ex)
-    {
-      System.out.println(e.getURL());
-      ex.printStackTrace();
-    }
-  }
-
-  public void amendLocal(boolean newSource)
-  {
-
-  }
-
-  public void reset_actionPerformed(ActionEvent e)
-  {
-
-  }
-
-}
index a4afb74..3081e76 100755 (executable)
@@ -76,6 +76,8 @@ public class GDesktop extends JFrame
 
   JMenuItem saveState = new JMenuItem();
 
+  JMenuItem saveAsState = new JMenuItem();
+
   JMenuItem loadState = new JMenuItem();
 
   JMenu inputMenu = new JMenu();
@@ -245,7 +247,16 @@ public class GDesktop extends JFrame
       @Override
       public void actionPerformed(ActionEvent e)
       {
-        saveState_actionPerformed(e);
+        saveState_actionPerformed();
+      }
+    });
+    saveAsState.setText(MessageManager.getString("action.save_project_as"));
+    saveAsState.addActionListener(new ActionListener()
+    {
+      @Override
+      public void actionPerformed(ActionEvent e)
+      {
+        saveAsState_actionPerformed(e);
       }
     });
     loadState.setText(MessageManager.getString("action.load_project"));
@@ -254,7 +265,7 @@ public class GDesktop extends JFrame
       @Override
       public void actionPerformed(ActionEvent e)
       {
-        loadState_actionPerformed(e);
+        loadState_actionPerformed();
       }
     });
     inputMenu.setText(MessageManager.getString("label.input_alignment"));
@@ -424,6 +435,7 @@ public class GDesktop extends JFrame
     FileMenu.add(inputSequence);
     FileMenu.addSeparator();
     FileMenu.add(saveState);
+    FileMenu.add(saveAsState);
     FileMenu.add(loadState);
     FileMenu.addSeparator();
     FileMenu.add(quit);
@@ -566,7 +578,7 @@ public class GDesktop extends JFrame
    * @param e
    *          DOCUMENT ME!
    */
-  public void SaveState_actionPerformed(ActionEvent e)
+  protected void preferences_actionPerformed(ActionEvent e)
   {
   }
 
@@ -576,17 +588,11 @@ public class GDesktop extends JFrame
    * @param e
    *          DOCUMENT ME!
    */
-  protected void preferences_actionPerformed(ActionEvent e)
+  public void saveState_actionPerformed()
   {
   }
 
-  /**
-   * DOCUMENT ME!
-   * 
-   * @param e
-   *          DOCUMENT ME!
-   */
-  public void saveState_actionPerformed(ActionEvent e)
+  public void saveAsState_actionPerformed(ActionEvent e)
   {
   }
 
@@ -596,7 +602,7 @@ public class GDesktop extends JFrame
    * @param e
    *          DOCUMENT ME!
    */
-  public void loadState_actionPerformed(ActionEvent e)
+  public void loadState_actionPerformed()
   {
   }
 
index 1ea4ab5..b433570 100755 (executable)
@@ -47,41 +47,20 @@ import javax.swing.text.JTextComponent;
 
 public class GFinder extends JPanel
 {
-  JLabel jLabelFind = new JLabel();
+  private static final java.awt.Font VERDANA_12 = new java.awt.Font("Verdana", 0,
+          12);
 
-  protected JButton findAll = new JButton();
-
-  protected JButton findNext = new JButton();
-
-  JPanel actionsPanel = new JPanel();
-
-  GridLayout gridLayout1 = new GridLayout();
+  private static final String FINDER_CACHE_KEY = "CACHE.FINDER";
 
   protected JButton createFeatures = new JButton();
 
-  protected JvCacheableInputBox<String> searchBox = new JvCacheableInputBox<String>(
+  protected JvCacheableInputBox<String> searchBox = new JvCacheableInputBox<>(
           getCacheKey());
 
-  BorderLayout mainBorderLayout = new BorderLayout();
-
-  JPanel jPanel2 = new JPanel();
-
-  JPanel jPanel3 = new JPanel();
-
-  JPanel jPanel4 = new JPanel();
-
-  BorderLayout borderLayout2 = new BorderLayout();
-
-  JPanel jPanel6 = new JPanel();
-
   protected JCheckBox caseSensitive = new JCheckBox();
 
   protected JCheckBox searchDescription = new JCheckBox();
 
-  GridLayout optionsGridLayout = new GridLayout();
-
-  private static final String FINDER_CACHE_KEY = "CACHE.FINDER";
-
   public GFinder()
   {
     try
@@ -95,35 +74,47 @@ public class GFinder extends JPanel
 
   private void jbInit() throws Exception
   {
-    jLabelFind.setFont(new java.awt.Font("Verdana", 0, 12));
-    jLabelFind.setText(MessageManager.getString("label.find"));
+    BorderLayout mainBorderLayout = new BorderLayout();
     this.setLayout(mainBorderLayout);
-    findAll.setFont(new java.awt.Font("Verdana", 0, 12));
-    findAll.setText(MessageManager.getString("action.find_all"));
+    mainBorderLayout.setHgap(5);
+    mainBorderLayout.setVgap(5);
+
+    JLabel jLabelFind = new JLabel(MessageManager.getString("label.find"));
+    jLabelFind.setFont(VERDANA_12);
+
+    JButton findAll = new JButton(
+            MessageManager.getString("action.find_all"));
+    findAll.setFont(VERDANA_12);
     findAll.addActionListener(new java.awt.event.ActionListener()
     {
       @Override
       public void actionPerformed(ActionEvent e)
       {
-        findAll_actionPerformed(e);
+        findAll_actionPerformed();
       }
     });
-    findNext.setFont(new java.awt.Font("Verdana", 0, 12));
-    findNext.setText(MessageManager.getString("action.find_next"));
+
+    JButton findNext = new JButton(
+            MessageManager.getString("action.find_next"));
+    findNext.setFont(VERDANA_12);
     findNext.addActionListener(new java.awt.event.ActionListener()
     {
       @Override
       public void actionPerformed(ActionEvent e)
       {
-        findNext_actionPerformed(e);
+        findNext_actionPerformed();
       }
     });
+
+    JPanel actionsPanel = new JPanel();
+    GridLayout gridLayout1 = new GridLayout();
     actionsPanel.setLayout(gridLayout1);
     gridLayout1.setHgap(0);
     gridLayout1.setRows(3);
     gridLayout1.setVgap(2);
+
     createFeatures.setEnabled(false);
-    createFeatures.setFont(new java.awt.Font("Verdana", 0, 12));
+    createFeatures.setFont(VERDANA_12);
     createFeatures.setMargin(new Insets(0, 0, 0, 0));
     createFeatures.setText(MessageManager.getString("label.new_feature"));
     createFeatures.addActionListener(new java.awt.event.ActionListener()
@@ -141,7 +132,7 @@ public class GFinder extends JPanel
               @Override
               public void caretUpdate(CaretEvent e)
               {
-                textfield_caretUpdate(e);
+                textfield_caretUpdate();
               }
             });
     searchBox.getEditor().getEditorComponent()
@@ -153,11 +144,7 @@ public class GFinder extends JPanel
                 textfield_keyPressed(e);
               }
             });
-    mainBorderLayout.setHgap(5);
-    mainBorderLayout.setVgap(5);
-    jPanel4.setLayout(borderLayout2);
-    jPanel2.setPreferredSize(new Dimension(10, 1));
-    jPanel3.setPreferredSize(new Dimension(10, 1));
+
     caseSensitive.setHorizontalAlignment(SwingConstants.LEFT);
     caseSensitive.setText(MessageManager.getString("label.match_case"));
 
@@ -169,6 +156,13 @@ public class GFinder extends JPanel
     actionsPanel.add(createFeatures, null);
     this.add(jLabelFind, java.awt.BorderLayout.WEST);
     this.add(actionsPanel, java.awt.BorderLayout.EAST);
+
+    JPanel jPanel2 = new JPanel();
+    jPanel2.setPreferredSize(new Dimension(10, 1));
+    JPanel jPanel3 = new JPanel();
+    jPanel3.setPreferredSize(new Dimension(10, 1));
+    JPanel jPanel4 = new JPanel();
+    jPanel4.setLayout(new BorderLayout());
     this.add(jPanel2, java.awt.BorderLayout.SOUTH);
     this.add(jPanel3, java.awt.BorderLayout.NORTH);
     this.add(jPanel4, java.awt.BorderLayout.CENTER);
@@ -176,6 +170,7 @@ public class GFinder extends JPanel
 
     JPanel optionsPanel = new JPanel();
 
+    GridLayout optionsGridLayout = new GridLayout();
     optionsGridLayout.setHgap(0);
     optionsGridLayout.setRows(2);
     optionsGridLayout.setVgap(2);
@@ -193,16 +188,16 @@ public class GFinder extends JPanel
       if (!searchBox.isPopupVisible())
       {
         e.consume();
-        findNext_actionPerformed(null);
+        findNext_actionPerformed();
       }
     }
   }
 
-  protected void findNext_actionPerformed(ActionEvent e)
+  protected void findNext_actionPerformed()
   {
   }
 
-  protected void findAll_actionPerformed(ActionEvent e)
+  protected void findAll_actionPerformed()
   {
   }
 
@@ -210,9 +205,10 @@ public class GFinder extends JPanel
   {
   }
 
-  public void textfield_caretUpdate(CaretEvent e)
+  public void textfield_caretUpdate()
   {
-    if (searchBox.getUserInput().indexOf(">") > -1)
+    // disabled as appears to be running a non-functional
+    if (false && searchBox.getUserInput().indexOf(">") > -1)
     {
       SwingUtilities.invokeLater(new Runnable()
       {
@@ -233,7 +229,7 @@ public class GFinder extends JPanel
             str = jalview.analysis.AlignSeq.extractGaps(
                     jalview.util.Comparison.GapChars,
                     al.getSequenceAt(0).getSequenceAsString());
-
+            // todo and what? set str as searchBox text?
           }
         }
       });
index a183794..122ad0f 100755 (executable)
@@ -46,13 +46,11 @@ public class GPCAPanel extends JInternalFrame
 {
   private static final Font VERDANA_12 = new Font("Verdana", 0, 12);
 
-  protected JComboBox<String> xCombobox = new JComboBox<String>();
+  protected JComboBox<String> xCombobox = new JComboBox<>();
 
-  protected JComboBox<String> yCombobox = new JComboBox<String>();
+  protected JComboBox<String> yCombobox = new JComboBox<>();
 
-  protected JComboBox<String> zCombobox = new JComboBox<String>();
-
-  protected JMenu scoreModelMenu = new JMenu();
+  protected JComboBox<String> zCombobox = new JComboBox<>();
 
   protected JMenu viewMenu = new JMenu();
 
@@ -60,16 +58,15 @@ public class GPCAPanel extends JInternalFrame
 
   protected JMenu associateViewsMenu = new JMenu();
 
-  protected JMenu calcSettings = new JMenu();
-
-  protected JCheckBoxMenuItem nuclSetting = new JCheckBoxMenuItem();
-
-  protected JCheckBoxMenuItem protSetting = new JCheckBoxMenuItem();
-
   protected JLabel statusBar = new JLabel();
 
   protected JPanel statusPanel = new JPanel();
 
+  protected JMenuItem originalSeqData;
+
+  /**
+   * Constructor
+   */
   public GPCAPanel()
   {
     try
@@ -110,7 +107,7 @@ public class GPCAPanel extends JInternalFrame
       @Override
       public void actionPerformed(ActionEvent e)
       {
-        zCombobox_actionPerformed(e);
+        doDimensionChange();
       }
     });
     yCombobox.setFont(VERDANA_12);
@@ -119,7 +116,7 @@ public class GPCAPanel extends JInternalFrame
       @Override
       public void actionPerformed(ActionEvent e)
       {
-        yCombobox_actionPerformed(e);
+        doDimensionChange();
       }
     });
     xCombobox.setFont(VERDANA_12);
@@ -128,7 +125,7 @@ public class GPCAPanel extends JInternalFrame
       @Override
       public void actionPerformed(ActionEvent e)
       {
-        xCombobox_actionPerformed(e);
+        doDimensionChange();
       }
     });
     JButton resetButton = new JButton();
@@ -139,7 +136,7 @@ public class GPCAPanel extends JInternalFrame
       @Override
       public void actionPerformed(ActionEvent e)
       {
-        resetButton_actionPerformed(e);
+        resetButton_actionPerformed();
       }
     });
     JMenu fileMenu = new JMenu();
@@ -152,7 +149,7 @@ public class GPCAPanel extends JInternalFrame
       @Override
       public void actionPerformed(ActionEvent e)
       {
-        eps_actionPerformed(e);
+        eps_actionPerformed();
       }
     });
     JMenuItem png = new JMenuItem("PNG");
@@ -161,7 +158,7 @@ public class GPCAPanel extends JInternalFrame
       @Override
       public void actionPerformed(ActionEvent e)
       {
-        png_actionPerformed(e);
+        png_actionPerformed();
       }
     });
     JMenuItem outputValues = new JMenuItem();
@@ -171,7 +168,7 @@ public class GPCAPanel extends JInternalFrame
       @Override
       public void actionPerformed(ActionEvent e)
       {
-        outputValues_actionPerformed(e);
+        outputValues_actionPerformed();
       }
     });
     JMenuItem outputPoints = new JMenuItem();
@@ -181,7 +178,7 @@ public class GPCAPanel extends JInternalFrame
       @Override
       public void actionPerformed(ActionEvent e)
       {
-        outputPoints_actionPerformed(e);
+        outputPoints_actionPerformed();
       }
     });
     JMenuItem outputProjPoints = new JMenuItem();
@@ -192,7 +189,7 @@ public class GPCAPanel extends JInternalFrame
       @Override
       public void actionPerformed(ActionEvent e)
       {
-        outputProjPoints_actionPerformed(e);
+        outputProjPoints_actionPerformed();
       }
     });
     JMenuItem print = new JMenuItem();
@@ -202,7 +199,7 @@ public class GPCAPanel extends JInternalFrame
       @Override
       public void actionPerformed(ActionEvent e)
       {
-        print_actionPerformed(e);
+        print_actionPerformed();
       }
     });
     viewMenu.setText(MessageManager.getString("action.view"));
@@ -224,33 +221,13 @@ public class GPCAPanel extends JInternalFrame
       {
       }
     });
-    scoreModelMenu
-            .setText(MessageManager.getString("label.select_score_model"));
-    scoreModelMenu.addMenuListener(new MenuListener()
-    {
-      @Override
-      public void menuSelected(MenuEvent e)
-      {
-        scoreModel_menuSelected();
-      }
-
-      @Override
-      public void menuDeselected(MenuEvent e)
-      {
-      }
-
-      @Override
-      public void menuCanceled(MenuEvent e)
-      {
-      }
-    });
     showLabels.setText(MessageManager.getString("label.show_labels"));
     showLabels.addActionListener(new ActionListener()
     {
       @Override
       public void actionPerformed(ActionEvent e)
       {
-        showLabels_actionPerformed(e);
+        showLabels_actionPerformed();
       }
     });
     JMenuItem bgcolour = new JMenuItem();
@@ -260,47 +237,22 @@ public class GPCAPanel extends JInternalFrame
       @Override
       public void actionPerformed(ActionEvent e)
       {
-        bgcolour_actionPerformed(e);
+        bgcolour_actionPerformed();
       }
     });
-    JMenuItem originalSeqData = new JMenuItem();
+    originalSeqData = new JMenuItem();
     originalSeqData.setText(MessageManager.getString("label.input_data"));
     originalSeqData.addActionListener(new ActionListener()
     {
       @Override
       public void actionPerformed(ActionEvent e)
       {
-        originalSeqData_actionPerformed(e);
+        originalSeqData_actionPerformed();
       }
     });
     associateViewsMenu.setText(
             MessageManager.getString("label.associate_nodes_with"));
-    calcSettings.setText(MessageManager.getString("action.change_params"));
-    nuclSetting
-            .setText(MessageManager.getString("label.nucleotide_matrix"));
-    protSetting.setText(MessageManager.getString("label.protein_matrix"));
-    nuclSetting.addActionListener(new ActionListener()
-    {
-
-      @Override
-      public void actionPerformed(ActionEvent arg0)
-      {
-        nuclSetting_actionPerfomed(arg0);
-      }
-    });
-    protSetting.addActionListener(new ActionListener()
-    {
-
-      @Override
-      public void actionPerformed(ActionEvent arg0)
-      {
-        protSetting_actionPerfomed(arg0);
-      }
-    });
 
-    calcSettings.add(nuclSetting);
-    calcSettings.add(protSetting);
-    calcSettings.add(scoreModelMenu);
     statusPanel.setLayout(new GridLayout());
     statusBar.setFont(VERDANA_12);
     // statusPanel.setBackground(Color.lightGray);
@@ -321,7 +273,6 @@ public class GPCAPanel extends JInternalFrame
     JMenuBar jMenuBar1 = new JMenuBar();
     jMenuBar1.add(fileMenu);
     jMenuBar1.add(viewMenu);
-    jMenuBar1.add(calcSettings);
     setJMenuBar(jMenuBar1);
     fileMenu.add(saveMenu);
     fileMenu.add(outputValues);
@@ -336,91 +287,51 @@ public class GPCAPanel extends JInternalFrame
     viewMenu.add(associateViewsMenu);
   }
 
-  protected void scoreModel_menuSelected()
-  {
-    // TODO Auto-generated method stub
-
-  }
-
-  protected void resetButton_actionPerformed(ActionEvent e)
+  protected void resetButton_actionPerformed()
   {
-    // TODO Auto-generated method stub
-
   }
 
-  protected void protSetting_actionPerfomed(ActionEvent arg0)
+  protected void outputPoints_actionPerformed()
   {
-    // TODO Auto-generated method stub
-
   }
 
-  protected void nuclSetting_actionPerfomed(ActionEvent arg0)
+  protected void outputProjPoints_actionPerformed()
   {
-    // TODO Auto-generated method stub
-
   }
 
-  protected void outputPoints_actionPerformed(ActionEvent e)
+  protected void eps_actionPerformed()
   {
-    // TODO Auto-generated method stub
-
   }
 
-  protected void outputProjPoints_actionPerformed(ActionEvent e)
+  protected void png_actionPerformed()
   {
-    // TODO Auto-generated method stub
-
   }
 
-  protected void xCombobox_actionPerformed(ActionEvent e)
+  protected void outputValues_actionPerformed()
   {
   }
 
-  protected void yCombobox_actionPerformed(ActionEvent e)
+  protected void print_actionPerformed()
   {
   }
 
-  protected void zCombobox_actionPerformed(ActionEvent e)
+  protected void showLabels_actionPerformed()
   {
   }
 
-  public void eps_actionPerformed(ActionEvent e)
+  protected void bgcolour_actionPerformed()
   {
-
   }
 
-  public void png_actionPerformed(ActionEvent e)
+  protected void originalSeqData_actionPerformed()
   {
-
   }
 
-  public void outputValues_actionPerformed(ActionEvent e)
+  protected void viewMenu_menuSelected()
   {
-
   }
 
-  public void print_actionPerformed(ActionEvent e)
+  protected void doDimensionChange()
   {
-
-  }
-
-  public void showLabels_actionPerformed(ActionEvent e)
-  {
-
-  }
-
-  public void bgcolour_actionPerformed(ActionEvent e)
-  {
-
-  }
-
-  public void originalSeqData_actionPerformed(ActionEvent e)
-  {
-
-  }
-
-  public void viewMenu_menuSelected()
-  {
-
   }
 }
index 6807382..87cc87b 100755 (executable)
  */
 package jalview.jbgui;
 
+import jalview.bin.Cache;
 import jalview.fts.core.FTSDataColumnPreferences;
 import jalview.fts.core.FTSDataColumnPreferences.PreferenceSource;
 import jalview.fts.service.pdb.PDBFTSRestClient;
+import jalview.gui.Desktop;
+import jalview.gui.JalviewBooleanRadioButtons;
+import jalview.gui.JvOptionPane;
 import jalview.gui.JvSwingUtils;
 import jalview.gui.StructureViewer.ViewerType;
+import jalview.io.BackupFilenameParts;
+import jalview.io.BackupFiles;
 import jalview.util.MessageManager;
 
 import java.awt.BorderLayout;
@@ -42,8 +48,11 @@ import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.awt.event.FocusEvent;
 import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
 import java.awt.event.MouseAdapter;
 import java.awt.event.MouseEvent;
+import java.util.HashMap;
+import java.util.Map;
 
 import javax.swing.AbstractCellEditor;
 import javax.swing.BorderFactory;
@@ -54,13 +63,18 @@ import javax.swing.JCheckBox;
 import javax.swing.JComboBox;
 import javax.swing.JFileChooser;
 import javax.swing.JLabel;
+import javax.swing.JList;
 import javax.swing.JPanel;
 import javax.swing.JRadioButton;
 import javax.swing.JScrollPane;
+import javax.swing.JSpinner;
 import javax.swing.JTabbedPane;
 import javax.swing.JTable;
+import javax.swing.JTextArea;
 import javax.swing.JTextField;
 import javax.swing.ListSelectionModel;
+import javax.swing.SpinnerModel;
+import javax.swing.SpinnerNumberModel;
 import javax.swing.SwingConstants;
 import javax.swing.border.Border;
 import javax.swing.border.EmptyBorder;
@@ -84,6 +98,9 @@ public class GPreferences extends JPanel
   private static final Font LABEL_FONT_ITALIC = JvSwingUtils
           .getLabelFont(false, true);
 
+  private static final Font LABEL_FONT_BOLD = JvSwingUtils
+          .getLabelFont(true, false);
+
   /*
    * Visual tab components
    */
@@ -264,12 +281,51 @@ public class GPreferences extends JPanel
 
   protected JCheckBox sortByTree = new JCheckBox();
 
-
   /*
    * Web Services tab
    */
   protected JPanel wsTab = new JPanel();
 
+  /*
+   * Backups tab components
+   * a lot of these are member variables instead of local variables only so that they
+   * can be enabled/disabled easily in one go
+   */
+
+  protected JCheckBox enableBackupFiles = new JCheckBox();
+
+  protected JPanel presetsPanel = new JPanel();
+
+  protected JButton revertButton = new JButton();
+
+  protected JComboBox<IntKeyStringValueEntry> backupfilesPresetsCombo = new JComboBox<>();
+
+  protected JPanel suffixPanel = new JPanel();
+
+  protected JPanel keepfilesPanel = new JPanel();
+
+  protected JPanel exampleFilesPanel = new JPanel();
+
+  protected JTextField suffixTemplate = new JTextField(null, 8);
+
+  protected JLabel suffixTemplateLabel = new JLabel();
+
+  protected JLabel suffixDigitsLabel = new JLabel();
+
+  protected JSpinner suffixDigitsSpinner = new JSpinner();
+
+  protected JalviewBooleanRadioButtons suffixReverse = new JalviewBooleanRadioButtons();
+
+  protected JalviewBooleanRadioButtons backupfilesKeepAll = new JalviewBooleanRadioButtons();
+
+  public JSpinner backupfilesRollMaxSpinner = new JSpinner();
+
+  protected JLabel oldBackupFilesLabel = new JLabel();
+
+  protected JalviewBooleanRadioButtons backupfilesConfirmDelete = new JalviewBooleanRadioButtons();
+
+  protected JTextArea backupfilesExampleLabel = new JTextArea();
+
   /**
    * Creates a new GPreferences object.
    */
@@ -312,6 +368,9 @@ public class GPreferences extends JPanel
     tabbedPane.add(initConnectionsTab(),
             MessageManager.getString("label.connections"));
 
+    tabbedPane.add(initBackupsTab(),
+            MessageManager.getString("label.backups"));
+
     tabbedPane.add(initLinksTab(),
             MessageManager.getString("label.urllinks"));
 
@@ -584,6 +643,7 @@ public class GPreferences extends JPanel
     linkTab.setLayout(new GridBagLayout());
 
     // Set up table for Url links
+    linkUrlTable.getTableHeader().setReorderingAllowed(false);
     linkUrlTable.setFillsViewportHeight(true);
     linkUrlTable.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
     linkUrlTable.setAutoCreateRowSorter(true);
@@ -1008,14 +1068,13 @@ public class GPreferences extends JPanel
         hiddenColour_actionPerformed(hiddenColour);
       }
     });
-    
+
     useLegacyGap = new JCheckBox(
             MessageManager.getString("label.ov_legacy_gap"));
     useLegacyGap.setFont(LABEL_FONT);
     useLegacyGap.setHorizontalAlignment(SwingConstants.LEFT);
     useLegacyGap.setVerticalTextPosition(SwingConstants.TOP);
-    gapLabel = new JLabel(
-            MessageManager.getString("label.gap_colour"));
+    gapLabel = new JLabel(MessageManager.getString("label.gap_colour"));
     gapLabel.setFont(LABEL_FONT);
     gapLabel.setHorizontalAlignment(SwingConstants.LEFT);
     gapLabel.setVerticalTextPosition(SwingConstants.TOP);
@@ -1630,6 +1689,846 @@ public class GPreferences extends JPanel
     return visualTab;
   }
 
+  /**
+   * Load the saved Backups options EXCEPT "Enabled" and "Scheme"
+   */
+
+  protected void loadLastSavedBackupsOptions()
+  {
+    enableBackupFiles
+            .setSelected(Cache.getDefault(BackupFiles.ENABLED, true));
+    setComboIntStringKey(backupfilesPresetsCombo,
+            Cache.getDefault(BackupFiles.NS + "_PRESET", 1));
+    suffixTemplate.setText(Cache.getDefault(BackupFiles.SUFFIX,
+            ".bak" + BackupFiles.NUM_PLACEHOLDER));
+    suffixDigitsSpinner
+            .setValue(Cache.getDefault(BackupFiles.SUFFIX_DIGITS, 3));
+    suffixReverse.setSelected(
+            Cache.getDefault(BackupFiles.REVERSE_ORDER, false));
+    backupfilesKeepAll
+            .setSelected(Cache.getDefault(BackupFiles.NO_MAX, false));
+    backupfilesRollMaxSpinner
+            .setValue(Cache.getDefault(BackupFiles.ROLL_MAX, 3));
+    backupfilesConfirmDelete.setSelected(
+            Cache.getDefault(BackupFiles.CONFIRM_DELETE_OLD, true));
+
+    backupsOptionsSetEnabled();
+    updateBackupFilesExampleLabel();
+  }
+
+  private boolean warnAboutSuffixReverseChange()
+  {
+    boolean savedSuffixReverse = Cache.getDefault(BackupFiles.REVERSE_ORDER,
+            false);
+    int savedSuffixDigits = Cache.getDefault(BackupFiles.SUFFIX_DIGITS, 3);
+    String savedSuffixTemplate = Cache.getDefault(BackupFiles.SUFFIX,
+            ".bak" + BackupFiles.NUM_PLACEHOLDER);
+
+    boolean nowSuffixReverse = suffixReverse.isSelected();
+    int nowSuffixDigits = getSpinnerInt(suffixDigitsSpinner, 3);
+    String nowSuffixTemplate = suffixTemplate.getText();
+    return nowSuffixReverse != savedSuffixReverse
+            && nowSuffixDigits == savedSuffixDigits
+            && nowSuffixTemplate != null
+            && nowSuffixTemplate.equals(savedSuffixTemplate);
+  }
+
+  /**
+   * Initialises the Backups tabbed panel.
+   * 
+   * @return
+   */
+  private JPanel initBackupsTab()
+  {
+    JPanel backupsTab = new JPanel();
+    backupsTab.setBorder(new TitledBorder(
+            MessageManager.getString("label.backup_files")));
+    backupsTab.setLayout(new GridBagLayout());
+
+    GridBagConstraints gbc = new GridBagConstraints();
+    gbc.weightx = 0.0;
+    gbc.weighty = 0.0;
+    gbc.anchor = GridBagConstraints.FIRST_LINE_START;
+    gbc.fill = GridBagConstraints.NONE;
+
+    initBackupsTabPresetsPanel();
+    initBackupsTabSuffixPanel();
+    initBackupsTabKeepFilesPanel();
+    initBackupsTabFilenameExamplesPanel();
+
+    enableBackupFiles.setFont(LABEL_FONT_BOLD);
+    enableBackupFiles
+            .setText(MessageManager.getString("label.enable_backupfiles"));
+    enableBackupFiles.addActionListener(new ActionListener()
+    {
+      @Override
+      public void actionPerformed(ActionEvent e)
+      {
+        // enable other options only when the first is checked
+        backupsOptionsSetEnabled();
+      }
+    });
+
+
+    // enable checkbox 1 col
+    gbc.gridwidth = 1;
+    gbc.gridheight = 1;
+    gbc.gridx = 0;
+    gbc.gridy = 0; // row 0
+    backupsTab.add(enableBackupFiles, gbc);
+
+    // summary of scheme box (over two rows)
+    gbc.gridx = 1;
+    gbc.weightx = 0.0;
+    gbc.gridheight = 2;
+    gbc.anchor = GridBagConstraints.FIRST_LINE_END;
+    gbc.fill = GridBagConstraints.BOTH;
+    backupsTab.add(exampleFilesPanel, gbc);
+    gbc.gridheight = 1;
+    gbc.anchor = GridBagConstraints.FIRST_LINE_START;
+    gbc.fill = GridBagConstraints.NONE;
+
+    // fill empty space on right
+    gbc.gridx++;
+    gbc.weightx = 1.0;
+    backupsTab.add(new JPanel(), gbc);
+
+    // schemes box
+    gbc.weightx = 0.0;
+    gbc.gridx = 0;
+    gbc.gridy++; // row 1
+    backupsTab.add(presetsPanel, gbc);
+
+    // gbc.anchor = GridBagConstraints.NORTHWEST;
+    // now using whole row
+    gbc.gridwidth = 2;
+    gbc.gridheight = 1;
+    // keep files box
+    gbc.gridx = 0;
+    gbc.gridy++; // row 2
+    backupsTab.add(keepfilesPanel, gbc);
+
+    // filename strategy box
+    gbc.gridy++; // row 3
+    backupsTab.add(suffixPanel, gbc);
+
+    // fill empty space
+    gbc.gridy++; // row 4
+    gbc.weighty = 1.0;
+    backupsTab.add(new JPanel(), gbc);
+
+    backupsOptionsSetEnabled();
+    return backupsTab;
+  }
+
+  protected static final int BACKUPFILESSCHEMECUSTOMISE = 0;
+
+  private static final IntKeyStringValueEntry[] backupfilesPresetEntries = {
+      new IntKeyStringValueEntry(1,
+              MessageManager.getString("label.default")),
+      new IntKeyStringValueEntry(2,
+              MessageManager.getString("label.single_file")),
+      new IntKeyStringValueEntry(3,
+              MessageManager.getString("label.keep_all_versions")),
+      new IntKeyStringValueEntry(4,
+              MessageManager.getString("label.rolled_backups")),
+      // ...
+      // IMPORTANT, keep "Custom" entry with key 0 (even though it appears last)
+      new IntKeyStringValueEntry(BACKUPFILESSCHEMECUSTOMISE,
+              MessageManager.getString("label.customise")) };
+
+  private static final Map<Integer, BackupFilesPresetEntry> backupfilesPresetEntriesValues = new HashMap<Integer, BackupFilesPresetEntry>()
+  {
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 125L;
+
+    {
+      put(1, new BackupFilesPresetEntry(
+              ".bak" + BackupFiles.NUM_PLACEHOLDER, 3, false, false, 3,
+              false));
+      put(2, new BackupFilesPresetEntry("~", 1, false, false, 1, false));
+      put(3, new BackupFilesPresetEntry(".v" + BackupFiles.NUM_PLACEHOLDER,
+              3, false, true, 10, true));
+      put(4, new BackupFilesPresetEntry(
+              "_bak." + BackupFiles.NUM_PLACEHOLDER, 1, true, false, 9,
+              false));
+    }
+  };
+
+  private JPanel initBackupsTabPresetsPanel()
+  {
+
+    String title = MessageManager.getString("label.schemes");
+    // TitledBorder tb = new TitledBorder(new EmptyBorder(0, 0, 0, 0), title);
+    // TitledBorder tb = new TitledBorder(title);
+    // tb.setTitleFont(LABEL_FONT);
+    // presetsPanel.setBorder(tb);
+
+    presetsPanel.setLayout(new GridBagLayout());
+
+    GridBagConstraints gbc = new GridBagConstraints();
+    gbc.weightx = 0.0;
+    gbc.weighty = 0.0;
+    gbc.anchor = GridBagConstraints.BASELINE_LEADING;
+    gbc.fill = GridBagConstraints.NONE;
+    gbc.gridwidth = 1;
+    gbc.gridheight = 1;
+
+    // "Scheme: "
+    gbc.gridx = 0;
+    gbc.gridy = 0;
+    presetsPanel.add(new JLabel(title + ":"), gbc);
+
+    for (int i = 0; i < backupfilesPresetEntries.length; i++)
+    {
+      backupfilesPresetsCombo.addItem(backupfilesPresetEntries[i]);
+    }
+
+    // put "Previously saved scheme" item in italics (it's not really
+    // selectable, as such -- it deselects itself when selected) and
+    // "Customise" in bold
+    backupfilesPresetsCombo
+            .setRenderer(new BackupFilesPresetsComboBoxRenderer());
+    backupfilesPresetsCombo.addActionListener(new ActionListener()
+    {
+      @Override
+      public void actionPerformed(ActionEvent e)
+      {
+        backupsTabUpdatePresets();
+      }
+    });
+
+    // dropdown list of preset schemes
+    gbc.gridx = 1;
+    presetsPanel.add(backupfilesPresetsCombo, gbc);
+
+    revertButton.setText(MessageManager.getString("label.cancel_changes"));
+    revertButton.addActionListener(new ActionListener()
+    {
+      @Override
+      public void actionPerformed(ActionEvent e)
+      {
+        loadLastSavedBackupsOptions();
+      }
+
+    });
+    revertButton.setFont(LABEL_FONT);
+
+    // "Cancel changes" button (aligned with combo box above)
+    gbc.gridx = 1;
+    gbc.gridy++;
+    presetsPanel.add(revertButton, gbc);
+
+    return presetsPanel;
+  }
+
+  private JPanel initBackupsTabFilenameExamplesPanel()
+  {
+    String title = MessageManager
+            .getString("label.summary_of_backups_scheme");
+    TitledBorder tb = new TitledBorder(title);
+    exampleFilesPanel.setBorder(tb);
+    exampleFilesPanel.setLayout(new GridBagLayout());
+
+
+    backupfilesExampleLabel.setEditable(false);
+    backupfilesExampleLabel
+            .setBackground(exampleFilesPanel.getBackground());
+
+    updateBackupFilesExampleLabel();
+
+    GridBagConstraints gbc = new GridBagConstraints();
+    gbc.weightx = 1.0;
+    gbc.weighty = 1.0;
+    gbc.fill = GridBagConstraints.NONE;
+    gbc.anchor = GridBagConstraints.FIRST_LINE_START;
+
+    exampleFilesPanel.add(backupfilesExampleLabel, gbc);
+    return exampleFilesPanel;
+  }
+
+  private void backupsTabUpdatePresets()
+  {
+    IntKeyStringValueEntry entry = (IntKeyStringValueEntry) backupfilesPresetsCombo
+            .getSelectedItem();
+    int key = entry.getKey();
+    String value = entry.getValue();
+
+    // BACKUPFILESSCHEMECUSTOMISE (==0) reserved for "Custom"
+    if (key != BACKUPFILESSCHEMECUSTOMISE)
+    {
+      if (backupfilesPresetEntriesValues.containsKey(key))
+      {
+        backupsSetOptions(backupfilesPresetEntriesValues.get(key));
+      }
+      else
+      {
+        System.out.println("Preset '" + value + "' not implemented");
+      }
+    }
+
+    backupfilesCustomOptionsSetEnabled();
+    updateBackupFilesExampleLabel();
+  }
+
+  protected int getComboIntStringKey(JComboBox<IntKeyStringValueEntry> c)
+  {
+    IntKeyStringValueEntry e = (IntKeyStringValueEntry) c.getSelectedItem();
+    return e != null ? e.getKey() : 0;
+  }
+
+  protected void setComboIntStringKey(JComboBox<IntKeyStringValueEntry> c,
+          int key)
+  {
+    for (int i = 0; i < c.getItemCount(); i++)
+    {
+      IntKeyStringValueEntry e = c.getItemAt(i);
+      if (e.getKey() == key)
+      {
+        c.setSelectedIndex(i);
+        break;
+      }
+    }
+    backupsTabUpdatePresets();
+  }
+
+  private JPanel initBackupsTabSuffixPanel()
+  {
+    suffixPanel.setBorder(new TitledBorder(
+            MessageManager.getString("label.backup_filename_strategy")));
+    suffixPanel.setLayout(new GridBagLayout());
+
+    suffixTemplateLabel
+            .setText(MessageManager.getString("label.append_to_filename"));
+    suffixTemplateLabel.setHorizontalAlignment(SwingConstants.LEFT);
+    suffixTemplateLabel.setFont(LABEL_FONT);
+
+    final String tooltip = JvSwingUtils.wrapTooltip(true,
+            MessageManager.getString("label.append_to_filename_tooltip"));
+    suffixTemplate.setToolTipText(tooltip);
+    suffixTemplate.addActionListener(new ActionListener()
+    {
+      @Override
+      public void actionPerformed(ActionEvent e)
+      {
+        updateBackupFilesExampleLabel();
+        backupfilesCustomOptionsSetEnabled();
+      }
+
+    });
+    KeyListener kl = new KeyListener()
+    {
+      @Override
+      public void keyReleased(KeyEvent e)
+      {
+        updateBackupFilesExampleLabel();
+        backupfilesCustomOptionsSetEnabled();
+      }
+
+      @Override
+      public void keyPressed(KeyEvent e)
+      {
+      }
+
+      // disable use of ':' or '/' or '\'
+      @Override
+      public void keyTyped(KeyEvent e)
+      {
+        char c = e.getKeyChar();
+        if (c == ':' || c == '/' || c == '\\')
+        {
+          // don't process ':' or '/' or '\'
+          e.consume();
+        }
+      }
+
+    };
+    suffixTemplate.addKeyListener(kl);
+
+    // digits spinner
+    suffixDigitsLabel
+            .setText(MessageManager.getString("label.index_digits"));
+    suffixDigitsLabel.setHorizontalAlignment(SwingConstants.LEFT);
+    suffixDigitsLabel.setFont(LABEL_FONT);
+    int defaultmin = 1;
+    int defaultmax = 6;
+    ChangeListener c = new ChangeListener()
+    {
+      @Override
+      public void stateChanged(ChangeEvent e)
+      {
+        updateBackupFilesExampleLabel();
+      }
+
+    };
+    setIntegerSpinner(suffixDigitsSpinner, defaultmin, defaultmax, 3, c);
+
+    suffixReverse.setLabels(MessageManager.getString("label.reverse_roll"),
+            MessageManager.getString("label.increment_index"));
+    suffixReverse.addActionListener(new ActionListener()
+    {
+      @Override
+      public void actionPerformed(ActionEvent e)
+      {
+        boolean okay = true;
+        if (warnAboutSuffixReverseChange())
+        {
+          // Warning popup
+          okay = confirmSuffixReverseChange();
+        }
+        if (okay)
+        {
+          updateBackupFilesExampleLabel();
+        }
+        else
+        {
+          boolean savedSuffixReverse = Cache
+                  .getDefault(BackupFiles.REVERSE_ORDER, false);
+          suffixReverse.setSelected(savedSuffixReverse);
+        }
+      }
+    });
+
+    GridBagConstraints sgbc = new GridBagConstraints();
+
+    // first row (template text box)
+    sgbc.anchor = GridBagConstraints.WEST;
+    sgbc.gridx = 0;
+    sgbc.gridy = 0;
+    sgbc.gridwidth = 1;
+    sgbc.gridheight = 1;
+    sgbc.weightx = 1.0;
+    sgbc.weighty = 0.0;
+    sgbc.fill = GridBagConstraints.NONE;
+    suffixPanel.add(suffixTemplateLabel, sgbc);
+
+    sgbc.gridx = 1;
+    sgbc.fill = GridBagConstraints.HORIZONTAL;
+    suffixPanel.add(suffixTemplate, sgbc);
+
+    // second row (number of digits spinner)
+    sgbc.gridy = 1;
+
+    sgbc.gridx = 0;
+    sgbc.fill = GridBagConstraints.NONE;
+    suffixPanel.add(suffixDigitsLabel, sgbc);
+
+    sgbc.gridx = 1;
+    sgbc.fill = GridBagConstraints.HORIZONTAL;
+    suffixPanel.add(suffixDigitsSpinner, sgbc);
+
+    // third row (forward order radio selection)
+    sgbc.gridx = 0;
+    sgbc.gridy = 2;
+    sgbc.gridwidth = GridBagConstraints.REMAINDER;
+    sgbc.fill = GridBagConstraints.HORIZONTAL;
+    suffixPanel.add(suffixReverse.getFalseButton(), sgbc);
+
+    // fourth row (reverse order radio selection)
+    sgbc.gridy = 3;
+    suffixPanel.add(suffixReverse.getTrueButton(), sgbc);
+    return suffixPanel;
+  }
+
+  private boolean confirmSuffixReverseChange()
+  {
+    boolean ret = false;
+    String warningMessage = MessageManager
+            .getString("label.warning_confirm_change_reverse");
+    int confirm = JvOptionPane.showConfirmDialog(Desktop.desktop,
+            warningMessage,
+            MessageManager.getString("label.change_increment_decrement"),
+            JvOptionPane.YES_NO_OPTION, JvOptionPane.WARNING_MESSAGE);
+
+    ret = (confirm == JvOptionPane.YES_OPTION);
+    return ret;
+  }
+
+  private JPanel initBackupsTabKeepFilesPanel()
+  {
+    keepfilesPanel.setBorder(
+            new TitledBorder(MessageManager.getString("label.keep_files")));
+    keepfilesPanel.setLayout(new GridBagLayout());
+
+    backupfilesKeepAll.setLabels(
+            MessageManager.getString("label.keep_all_backup_files"),
+            MessageManager.getString(
+                    "label.keep_only_this_number_of_backup_files"));
+    backupfilesKeepAll.addTrueActionListener(new ActionListener()
+    {
+      @Override
+      public void actionPerformed(ActionEvent e)
+      {
+        updateBackupFilesExampleLabel();
+      }
+    });
+    backupfilesKeepAll.addActionListener(new ActionListener()
+    {
+      @Override
+      public void actionPerformed(ActionEvent e)
+      {
+        keepRollMaxOptionsEnabled();
+        updateBackupFilesExampleLabel();
+      }
+    });
+
+    ChangeListener c = new ChangeListener()
+    {
+      @Override
+      public void stateChanged(ChangeEvent e)
+      {
+        updateBackupFilesExampleLabel();
+      }
+
+    };
+    setIntegerSpinner(backupfilesRollMaxSpinner, 1, 999, 4, true, c);
+
+    backupfilesConfirmDelete.setLabels(
+            MessageManager.getString("label.always_ask"),
+            MessageManager.getString("label.auto_delete"));
+    // update the enabled section
+    keepRollMaxOptionsEnabled();
+
+    GridBagConstraints kgbc = new GridBagConstraints();
+
+    // first row (template text box)
+    kgbc.anchor = GridBagConstraints.WEST;
+    kgbc.gridx = 0;
+    kgbc.gridy = 0;
+    kgbc.gridwidth = GridBagConstraints.REMAINDER;
+    kgbc.gridheight = 1;
+    kgbc.weightx = 1.0;
+    kgbc.weighty = 0.0;
+    kgbc.fill = GridBagConstraints.HORIZONTAL;
+    keepfilesPanel.add(backupfilesKeepAll.getTrueButton(), kgbc);
+
+    // second row
+    kgbc.gridy = 1;
+
+    kgbc.gridx = 0;
+    kgbc.gridwidth = GridBagConstraints.RELATIVE;
+    keepfilesPanel.add(backupfilesKeepAll.getFalseButton(), kgbc);
+
+    kgbc.gridx = 1;
+    kgbc.gridwidth = GridBagConstraints.REMAINDER;
+    keepfilesPanel.add(backupfilesRollMaxSpinner, kgbc);
+
+    // third row (indented)
+    kgbc.gridy = 2;
+    kgbc.insets = new Insets(0, 20, 0, 0);
+
+    kgbc.gridx = 0;
+    kgbc.gridwidth = GridBagConstraints.REMAINDER;
+    kgbc.fill = GridBagConstraints.HORIZONTAL;
+    kgbc.weightx = 1.0;
+    /*
+    keepfilesPanel.add(backupfilesConfirmDelete.getTrueButton(), kgbc);
+    
+    // fourth row (indented)
+    kgbc.gridy = 3;
+    keepfilesPanel.add(backupfilesConfirmDelete.getFalseButton(), kgbc);
+    */
+
+    JPanel jp = new JPanel();
+    jp.setLayout(new FlowLayout());
+    oldBackupFilesLabel
+            .setText(MessageManager
+                    .getString("label.autodelete_old_backup_files"));
+    oldBackupFilesLabel.setFont(LABEL_FONT);
+    oldBackupFilesLabel.setHorizontalAlignment(SwingConstants.LEFT);
+    jp.add(oldBackupFilesLabel);
+    jp.add(backupfilesConfirmDelete.getTrueButton());
+    jp.add(backupfilesConfirmDelete.getFalseButton());
+    keepfilesPanel.add(jp, kgbc);
+
+    return keepfilesPanel;
+  }
+
+  protected void updateBackupFilesExampleLabel()
+  {
+    int exampleindex = 12;
+    String base = MessageManager.getString("label.filename") + ".fa";
+    if (base == null || base.length() == 0)
+    {
+      base = "file_name.fa";
+    }
+
+    boolean reverse = suffixReverse.isSelected();
+    boolean keepAll = backupfilesKeepAll.isSelected();
+    int rollMax = 4;
+    String suffix = suffixTemplate.getText();
+    int digits = 3;
+
+    backupfilesExampleLabel.setFont(LABEL_FONT_ITALIC);
+    if (suffix == null || suffix.length() == 0)
+    {
+      backupfilesExampleLabel
+              .setText(MessageManager.getString("label.no_backup_files"));
+      backupfilesExampleLabel.setFont(LABEL_FONT_BOLD);
+      return;
+    }
+
+    rollMax = getSpinnerInt(backupfilesRollMaxSpinner, 4);
+    rollMax = rollMax < 1 ? 1 : rollMax;
+
+    if (suffix.indexOf(BackupFiles.NUM_PLACEHOLDER) == -1)
+    {
+      rollMax = 1;
+    }
+
+    digits = getSpinnerInt(suffixDigitsSpinner, 3);
+    digits = digits < 1 ? 1 : digits;
+
+    int lowersurround = 2;
+    int uppersurround = 0;
+    StringBuilder exampleSB = new StringBuilder();
+    boolean firstLine = true;
+    if (reverse)
+    {
+
+      int min = 1;
+      int max = keepAll ? exampleindex : rollMax;
+      for (int index = min; index <= max; index++)
+      {
+        if (index == min + lowersurround && index < max - uppersurround - 1)
+        {
+          exampleSB.append("\n...");
+        }
+        else if (index > min + lowersurround && index < max - uppersurround)
+        {
+          // nothing
+        }
+        else
+        {
+          if (firstLine)
+          {
+            firstLine = false;
+          }
+          else
+          {
+            exampleSB.append("\n");
+          }
+          exampleSB.append(BackupFilenameParts.getBackupFilename(index,
+                  base, suffix, digits));
+          if (min == max)
+          {
+            // no extra text needed
+          }
+          else if (index == min)
+          {
+            String newest = MessageManager.getString("label.braced_newest");
+            if (newest != null && newest.length() > 0)
+            {
+              exampleSB.append(" " + newest);
+            }
+          }
+          else if (index == max)
+          {
+            String oldest = MessageManager.getString("label.braced_oldest");
+            if (oldest != null && oldest.length() > 0)
+            {
+              exampleSB.append(" " + oldest);
+            }
+          }
+        }
+      }
+    }
+    else
+    {
+
+      int min = (keepAll || exampleindex - rollMax < 0) ? 1
+              : exampleindex - rollMax + 1;
+      int max = exampleindex;
+
+      for (int index = min; index <= max; index++)
+      {
+
+        if (index == min + lowersurround && index < max - uppersurround - 1)
+        {
+          exampleSB.append("\n...");
+        }
+        else if (index > min + lowersurround && index < max - uppersurround)
+        {
+          // nothing
+        }
+        else
+        {
+          if (firstLine)
+          {
+            firstLine = false;
+          }
+          else
+          {
+            exampleSB.append("\n");
+          }
+          exampleSB.append(BackupFilenameParts.getBackupFilename(index,
+                  base, suffix, digits));
+          if (min == max)
+          {
+            // no extra text needed
+          }
+          else if (index == min)
+          {
+            String oldest = MessageManager.getString("label.braced_oldest");
+            if (oldest != null && oldest.length() > 0)
+            {
+              exampleSB.append(" " + oldest);
+            }
+          }
+          else if (index == max)
+          {
+            String newest = MessageManager.getString("label.braced_newest");
+            if (newest != null && newest.length() > 0)
+            {
+              exampleSB.append(" " + newest);
+            }
+          }
+        }
+      }
+
+    }
+
+    backupfilesExampleLabel.setText(exampleSB.toString());
+  }
+
+  protected void setIntegerSpinner(JSpinner s, int min, int max, int def,
+          boolean useExistingVal, ChangeListener c)
+  {
+    int i = def;
+    if (useExistingVal)
+    {
+      try
+      {
+        i = Integer.parseInt((String) s.getValue());
+      } catch (Exception e)
+      {
+        System.out.println(
+                "Exception casting the initial value of s.getValue()");
+      }
+    }
+
+    setIntegerSpinner(s, min, max, i, c);
+  }
+
+  protected void setIntegerSpinner(JSpinner s, int min, int max, int def,
+          ChangeListener c)
+  {
+    // integer spinner for number of digits
+    if (def > max)
+    {
+      max = def;
+    }
+    SpinnerModel sModel = new SpinnerNumberModel(def, min, max, 1);
+    s.setModel(sModel);
+
+    s.addChangeListener(c);
+
+  }
+
+  protected static int getSpinnerInt(JSpinner s, int def)
+  {
+    int i = def;
+    try
+    {
+      s.commitEdit();
+      i = (Integer) s.getValue();
+    } catch (Exception e)
+    {
+      System.out.println("Failed casting (Integer) JSpinner s.getValue()");
+    }
+    return i;
+  }
+
+  private void keepRollMaxOptionsEnabled()
+  {
+    boolean enabled = backupfilesKeepAll.isEnabled()
+            && !backupfilesKeepAll.isSelected();
+    oldBackupFilesLabel.setEnabled(enabled);
+    backupfilesRollMaxSpinner.setEnabled(enabled);
+    backupfilesConfirmDelete.setEnabled(enabled);
+  }
+
+  private void backupfilesKeepAllSetEnabled(boolean tryEnabled)
+  {
+    boolean enabled = tryEnabled && enableBackupFiles.isSelected()
+            && getComboIntStringKey(backupfilesPresetsCombo) == 0
+            && suffixTemplate.getText()
+                    .indexOf(BackupFiles.NUM_PLACEHOLDER) > -1;
+    keepfilesPanel.setEnabled(enabled);
+    backupfilesKeepAll.setEnabled(enabled);
+    oldBackupFilesLabel.setEnabled(enabled);
+    keepRollMaxOptionsEnabled();
+  }
+
+  private void backupfilesSuffixTemplateDigitsSetEnabled()
+  {
+    boolean enabled = suffixTemplate.isEnabled() && suffixTemplate.getText()
+            .indexOf(BackupFiles.NUM_PLACEHOLDER) > -1;
+    suffixDigitsLabel.setEnabled(enabled);
+    suffixDigitsSpinner.setEnabled(enabled);
+    suffixReverse.setEnabled(enabled);
+  }
+
+  private void backupfilesSuffixTemplateSetEnabled(boolean tryEnabled)
+  {
+    boolean enabled = tryEnabled && enableBackupFiles.isSelected()
+            && getComboIntStringKey(backupfilesPresetsCombo) == 0;
+    suffixPanel.setEnabled(enabled);
+    suffixTemplateLabel.setEnabled(enabled);
+    suffixTemplate.setEnabled(enabled);
+    backupfilesSuffixTemplateDigitsSetEnabled();
+  }
+
+  protected void backupfilesCustomOptionsSetEnabled()
+  {
+    int scheme = getComboIntStringKey(backupfilesPresetsCombo);
+    boolean enabled = scheme == 0 && enableBackupFiles.isSelected();
+
+    backupfilesSuffixTemplateSetEnabled(enabled);
+    backupfilesKeepAllSetEnabled(enabled);
+  }
+
+  private void backupfilesSummarySetEnabled()
+  {
+    boolean enabled = enableBackupFiles.isSelected();
+    backupfilesExampleLabel.setEnabled(enabled);
+    exampleFilesPanel.setEnabled(enabled);
+  }
+
+  private void backupfilesPresetsSetEnabled()
+  {
+    boolean enabled = enableBackupFiles.isSelected();
+    presetsPanel.setEnabled(enabled);
+    backupfilesPresetsCombo.setEnabled(enabled);
+  }
+
+  protected void backupsOptionsSetEnabled()
+  {
+    backupfilesPresetsSetEnabled();
+    backupfilesSummarySetEnabled();
+    backupfilesCustomOptionsSetEnabled();
+  }
+
+  protected void backupsSetOptions(String suffix, int digits,
+          boolean reverse, boolean keepAll, int rollMax,
+          boolean confirmDelete)
+  {
+    suffixTemplate.setText(suffix);
+    suffixDigitsSpinner.setValue(digits);
+    suffixReverse.setSelected(reverse);
+    backupfilesKeepAll.setSelected(keepAll);
+    backupfilesRollMaxSpinner.setValue(rollMax);
+    backupfilesConfirmDelete.setSelected(confirmDelete);
+  }
+
+  protected void backupsSetOptions(BackupFilesPresetEntry p)
+  {
+    backupsSetOptions(p.suffix, p.digits, p.reverse, p.keepAll, p.rollMax,
+            p.confirmDelete);
+  }
+
   protected void autoIdWidth_actionPerformed()
   {
     // TODO Auto-generated method stub
@@ -1815,3 +2714,86 @@ public class GPreferences extends JPanel
 
   }
 }
+
+class IntKeyStringValueEntry
+{
+  int k;
+
+  String v;
+
+  public IntKeyStringValueEntry(int k, String v)
+  {
+    this.k = k;
+    this.v = v;
+  }
+
+  @Override
+  public String toString()
+  {
+    return this.getValue();
+  }
+
+  public int getKey()
+  {
+    return k;
+  }
+
+  public String getValue()
+  {
+    return v;
+  }
+}
+
+class BackupFilesPresetEntry
+{
+  String suffix;
+
+  int digits;
+
+  boolean reverse;
+
+  boolean keepAll;
+
+  int rollMax;
+
+  boolean confirmDelete;
+
+  public BackupFilesPresetEntry(String suffix, int digits, boolean reverse,
+          boolean keepAll, int rollMax, boolean confirmDelete)
+  {
+    this.suffix = suffix;
+    this.digits = digits;
+    this.reverse = reverse;
+    this.keepAll = keepAll;
+    this.rollMax = rollMax;
+    this.confirmDelete = confirmDelete;
+  }
+}
+
+class BackupFilesPresetsComboBoxRenderer extends DefaultListCellRenderer
+{
+  /**
+   * 
+   */
+  private static final long serialVersionUID = 88L;
+
+  @Override
+  public Component getListCellRendererComponent(JList list, Object value,
+          int index, boolean isSelected, boolean cellHasFocus)
+  {
+    super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
+    
+    try {
+      IntKeyStringValueEntry e = (IntKeyStringValueEntry) value;
+      if (e.getKey() == GPreferences.BACKUPFILESSCHEMECUSTOMISE)
+      {
+        // "Customise" item
+        this.setFont(this.getFont().deriveFont(Font.BOLD));
+      }
+    } catch (Exception e) {
+      return this;
+    }
+
+    return this;
+  }
+}
index c3fd4fa..84de493 100644 (file)
@@ -146,6 +146,7 @@ public class GWsPreferences extends JPanel
     refreshWs.setText(MessageManager.getString("action.refresh_services"));
     refreshWs.addActionListener(new ActionListener()
     {
+      @Override
       public void actionPerformed(ActionEvent e)
       {
         refreshWs_actionPerformed(e);
@@ -156,6 +157,7 @@ public class GWsPreferences extends JPanel
 
     resetWs.addActionListener(new ActionListener()
     {
+      @Override
       public void actionPerformed(ActionEvent e)
       {
         resetWs_actionPerformed(e);
@@ -167,6 +169,7 @@ public class GWsPreferences extends JPanel
             .getString("label.index_web_services_menu_by_host_site"));
     indexByHost.addActionListener(new ActionListener()
     {
+      @Override
       public void actionPerformed(ActionEvent e)
       {
         indexByHost_actionPerformed(e);
@@ -176,6 +179,7 @@ public class GWsPreferences extends JPanel
     indexByType.setText(MessageManager.getString("label.index_by_type"));
     indexByType.addActionListener(new ActionListener()
     {
+      @Override
       public void actionPerformed(ActionEvent e)
       {
         indexByType_actionPerformed(e);
@@ -187,6 +191,7 @@ public class GWsPreferences extends JPanel
             MessageManager.getString("label.enable_jabaws_services"));
     enableJws2Services.addActionListener(new ActionListener()
     {
+      @Override
       public void actionPerformed(ActionEvent e)
       {
         enableJws2Services_actionPerformed(e);
@@ -199,6 +204,7 @@ public class GWsPreferences extends JPanel
             "label.option_want_informed_web_service_URL_cannot_be_accessed_jalview_when_starts_up"));
     displayWsWarning.addActionListener(new ActionListener()
     {
+      @Override
       public void actionPerformed(ActionEvent e)
       {
         displayWsWarning_actionPerformed(e);
@@ -208,6 +214,7 @@ public class GWsPreferences extends JPanel
     newWsUrl.setText(MessageManager.getString("label.new_service_url"));
     newWsUrl.addActionListener(new ActionListener()
     {
+      @Override
       public void actionPerformed(ActionEvent e)
       {
         newWsUrl_actionPerformed(e);
@@ -217,6 +224,7 @@ public class GWsPreferences extends JPanel
     editWsUrl.setText(MessageManager.getString("label.edit_service_url"));
     editWsUrl.addActionListener(new ActionListener()
     {
+      @Override
       public void actionPerformed(ActionEvent e)
       {
         editWsUrl_actionPerformed(e);
@@ -228,6 +236,7 @@ public class GWsPreferences extends JPanel
             .setText(MessageManager.getString("label.delete_service_url"));
     deleteWsUrl.addActionListener(new ActionListener()
     {
+      @Override
       public void actionPerformed(ActionEvent e)
       {
         deleteWsUrl_actionPerformed(e);
@@ -239,6 +248,7 @@ public class GWsPreferences extends JPanel
             .setToolTipText(MessageManager.getString("label.move_url_up"));
     moveWsUrlUp.addActionListener(new ActionListener()
     {
+      @Override
       public void actionPerformed(ActionEvent e)
       {
         moveWsUrlUp_actionPerformed(e);
@@ -250,6 +260,7 @@ public class GWsPreferences extends JPanel
             MessageManager.getString("label.move_url_down"));
     moveWsUrlDown.addActionListener(new ActionListener()
     {
+      @Override
       public void actionPerformed(ActionEvent e)
       {
         moveWsUrlDown_actionPerformed(e);
@@ -260,6 +271,7 @@ public class GWsPreferences extends JPanel
             .setText(MessageManager.getString("label.add_sbrs_definition"));
     newSbrsUrl.addActionListener(new ActionListener()
     {
+      @Override
       public void actionPerformed(ActionEvent e)
       {
         newSbrsUrl_actionPerformed(e);
@@ -270,6 +282,7 @@ public class GWsPreferences extends JPanel
             MessageManager.getString("label.edit_sbrs_definition"));
     editSbrsUrl.addActionListener(new ActionListener()
     {
+      @Override
       public void actionPerformed(ActionEvent e)
       {
         editSbrsUrl_actionPerformed(e);
@@ -281,6 +294,7 @@ public class GWsPreferences extends JPanel
             MessageManager.getString("label.delete_sbrs_definition"));
     deleteSbrsUrl.addActionListener(new ActionListener()
     {
+      @Override
       public void actionPerformed(ActionEvent e)
       {
         deleteSbrsUrl_actionPerformed(e);
@@ -294,14 +308,16 @@ public class GWsPreferences extends JPanel
     wsListUrlPanel.setBorder(BorderFactory.createEtchedBorder());
     wsListUrlPanel.setLayout(new BorderLayout());
     wsListPane.setBorder(BorderFactory.createEtchedBorder());
-    wsListPane.getViewport().add(wsList);
     wsList.setPreferredSize(new Dimension(482, 202));
+    wsList.getTableHeader().setReorderingAllowed(false);
+    wsListPane.getViewport().add(wsList);
     wsListPane.setPreferredSize(new Dimension(380, 80));
     wsList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
     wsList.setColumnSelectionAllowed(false);
     wsList.addMouseListener(new MouseListener()
     {
 
+      @Override
       public void mouseClicked(MouseEvent e)
       {
         if (e.getClickCount() > 1)
@@ -311,20 +327,24 @@ public class GWsPreferences extends JPanel
 
       }
 
+      @Override
       public void mouseEntered(MouseEvent e)
       {
 
       }
 
+      @Override
       public void mouseExited(MouseEvent e)
       {
       }
 
+      @Override
       public void mousePressed(MouseEvent e)
       {
 
       }
 
+      @Override
       public void mouseReleased(MouseEvent e)
       {
 
@@ -356,6 +376,7 @@ public class GWsPreferences extends JPanel
     sbrsList.addMouseListener(new MouseListener()
     {
 
+      @Override
       public void mouseClicked(MouseEvent e)
       {
         if (e.getClickCount() > 1)
@@ -365,20 +386,24 @@ public class GWsPreferences extends JPanel
 
       }
 
+      @Override
       public void mouseEntered(MouseEvent e)
       {
 
       }
 
+      @Override
       public void mouseExited(MouseEvent e)
       {
       }
 
+      @Override
       public void mousePressed(MouseEvent e)
       {
 
       }
 
+      @Override
       public void mouseReleased(MouseEvent e)
       {
 
index 8910c67..b22bf4e 100755 (executable)
@@ -24,6 +24,7 @@ import jalview.util.Format;
 import jalview.util.MessageManager;
 
 import java.io.PrintStream;
+import java.util.Arrays;
 
 /**
  * A class to model rectangular matrices of double values and operations on them
@@ -31,37 +32,40 @@ import java.io.PrintStream;
 public class Matrix implements MatrixI
 {
   /*
-   * the cell values in row-major order
+   * maximum number of iterations for tqli
    */
-  private double[][] value;
+  private static final int MAX_ITER = 45;
+  // fudge - add 15 iterations, just in case
 
   /*
    * the number of rows
    */
-  protected int rows;
+  final protected int rows;
 
   /*
    * the number of columns
    */
-  protected int cols;
+  final protected int cols;
+
+  /*
+   * the cell values in row-major order
+   */
+  private double[][] value;
 
   protected double[] d; // Diagonal
 
   protected double[] e; // off diagonal
 
   /**
-   * maximum number of iterations for tqli
+   * Constructor given number of rows and columns
    * 
+   * @param colCount
+   * @param rowCount
    */
-  private static final int maxIter = 45; // fudge - add 15 iterations, just in
-                                         // case
-
-  /**
-   * Default constructor
-   */
-  public Matrix()
+  protected Matrix(int rowCount, int colCount)
   {
-
+    rows = rowCount;
+    cols = colCount;
   }
 
   /**
@@ -103,11 +107,6 @@ public class Matrix implements MatrixI
     }
   }
 
-  /**
-   * Returns a new matrix which is the transpose of this one
-   * 
-   * @return
-   */
   @Override
   public MatrixI transpose()
   {
@@ -145,18 +144,6 @@ public class Matrix implements MatrixI
     }
   }
 
-  /**
-   * Returns a new matrix which is the result of premultiplying this matrix by
-   * the supplied argument. If this of size AxB (A rows and B columns), and the
-   * argument is CxA (C rows and A columns), the result is of size CxB.
-   * 
-   * @param in
-   * 
-   * @return
-   * @throws IllegalArgumentException
-   *           if the number of columns in the pre-multiplier is not equal to
-   *           the number of rows in the multiplicand (this)
-   */
   @Override
   public MatrixI preMultiply(MatrixI in)
   {
@@ -208,21 +195,6 @@ public class Matrix implements MatrixI
     return out;
   }
 
-  /**
-   * Returns a new matrix which is the result of postmultiplying this matrix by
-   * the supplied argument. If this of size AxB (A rows and B columns), and the
-   * argument is BxC (B rows and C columns), the result is of size AxC.
-   * <p>
-   * This method simply returns the result of in.preMultiply(this)
-   * 
-   * @param in
-   * 
-   * @return
-   * @throws IllegalArgumentException
-   *           if the number of rows in the post-multiplier is not equal to the
-   *           number of columns in the multiplicand (this)
-   * @see #preMultiply(Matrix)
-   */
   @Override
   public MatrixI postMultiply(MatrixI in)
   {
@@ -234,11 +206,6 @@ public class Matrix implements MatrixI
     return in.preMultiply(this);
   }
 
-  /**
-   * Answers a new matrix with a copy of the values in this one
-   * 
-   * @return
-   */
   @Override
   public MatrixI copy()
   {
@@ -249,7 +216,17 @@ public class Matrix implements MatrixI
       System.arraycopy(value[i], 0, newmat[i], 0, value[i].length);
     }
 
-    return new Matrix(newmat);
+    Matrix m = new Matrix(newmat);
+    if (this.d != null)
+    {
+      m.d = Arrays.copyOf(this.d, this.d.length);
+    }
+    if (this.e != null)
+    {
+      m.e = Arrays.copyOf(this.e, this.e.length);
+    }
+
+    return m;
   }
 
   /**
@@ -479,11 +456,11 @@ public class Matrix implements MatrixI
         {
           iter++;
 
-          if (iter == maxIter)
+          if (iter == MAX_ITER)
           {
             throw new Exception(MessageManager.formatMessage(
                     "exception.matrix_too_many_iteration", new String[]
-                    { "tqli", Integer.valueOf(maxIter).toString() }));
+                    { "tqli", Integer.valueOf(MAX_ITER).toString() }));
           }
           else
           {
@@ -743,11 +720,11 @@ public class Matrix implements MatrixI
         {
           iter++;
 
-          if (iter == maxIter)
+          if (iter == MAX_ITER)
           {
             throw new Exception(MessageManager.formatMessage(
                     "exception.matrix_too_many_iteration", new String[]
-                    { "tqli2", Integer.valueOf(maxIter).toString() }));
+                    { "tqli2", Integer.valueOf(MAX_ITER).toString() }));
           }
           else
           {
@@ -995,4 +972,54 @@ public class Matrix implements MatrixI
       }
     }
   }
+
+  @Override
+  public void setD(double[] v)
+  {
+    d = v;
+  }
+
+  @Override
+  public void setE(double[] v)
+  {
+    e = v;
+  }
+
+  public double getTotal()
+  {
+    double d = 0d;
+    for (int i = 0; i < this.height(); i++)
+    {
+      for (int j = 0; j < this.width(); j++)
+      {
+        d += value[i][j];
+      }
+    }
+    return d;
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public boolean equals(MatrixI m2, double delta)
+  {
+    if (m2 == null || this.height() != m2.height()
+            || this.width() != m2.width())
+    {
+      return false;
+    }
+    for (int i = 0; i < this.height(); i++)
+    {
+      for (int j = 0; j < this.width(); j++)
+      {
+        double diff = this.getValue(i, j) - m2.getValue(i, j);
+        if (Math.abs(diff) > delta)
+        {
+          return false;
+        }
+      }
+    }
+    return true;
+  }
 }
index 5b93c76..2c78653 100644 (file)
@@ -22,6 +22,10 @@ package jalview.math;
 
 import java.io.PrintStream;
 
+/**
+ * An interface that describes a rectangular matrix of double values and
+ * operations on it
+ */
 public interface MatrixI
 {
   /**
@@ -63,18 +67,59 @@ public interface MatrixI
    */
   double[] getRow(int i);
 
+  /**
+   * Answers a new matrix with a copy of the values in this one
+   * 
+   * @return
+   */
   MatrixI copy();
 
+  /**
+   * Returns a new matrix which is the transpose of this one
+   * 
+   * @return
+   */
   MatrixI transpose();
 
+  /**
+   * Returns a new matrix which is the result of premultiplying this matrix by
+   * the supplied argument. If this of size AxB (A rows and B columns), and the
+   * argument is CxA (C rows and A columns), the result is of size CxB.
+   * 
+   * @param in
+   * 
+   * @return
+   * @throws IllegalArgumentException
+   *           if the number of columns in the pre-multiplier is not equal to
+   *           the number of rows in the multiplicand (this)
+   */
   MatrixI preMultiply(MatrixI m);
 
+  /**
+   * Returns a new matrix which is the result of postmultiplying this matrix by
+   * the supplied argument. If this of size AxB (A rows and B columns), and the
+   * argument is BxC (B rows and C columns), the result is of size AxC.
+   * <p>
+   * This method simply returns the result of in.preMultiply(this)
+   * 
+   * @param in
+   * 
+   * @return
+   * @throws IllegalArgumentException
+   *           if the number of rows in the post-multiplier is not equal to the
+   *           number of columns in the multiplicand (this)
+   * @see #preMultiply(Matrix)
+   */
   MatrixI postMultiply(MatrixI m);
 
   double[] getD();
 
   double[] getE();
 
+  void setD(double[] v);
+
+  void setE(double[] v);
+
   void print(PrintStream ps, String format);
 
   void printD(PrintStream ps, String format);
@@ -114,4 +159,14 @@ public interface MatrixI
    * @param d
    */
   void multiply(double d);
+
+  /**
+   * Answers true if the two matrices have the same dimensions, and corresponding values all differ by no
+   * more than delta (which should be a positive value), else false
+   * 
+   * @param m2
+   * @param delta
+   * @return
+   */
+  boolean equals(MatrixI m2, double delta);
 }
index 5971227..602c5e4 100755 (executable)
  */
 package jalview.math;
 
+import jalview.datamodel.Point;
+
+import java.util.HashMap;
+import java.util.Map;
+
 /**
- * DOCUMENT ME!
- * 
- * @author $author$
- * @version $Revision$
+ * Model for a 3x3 matrix which provides methods for rotation in 3-D space
  */
 public class RotatableMatrix
 {
-  float[][] matrix;
+  private static final int DIMS = 3;
 
-  float[] temp;
+  /*
+   * cache the most used rotations: +/- 1, 2, 3, 4 degrees around x or y axis
+   */
+  private static Map<Axis, Map<Float, float[][]>> cachedRotations;
 
-  float[][] rot;
+  static
+  {
+    cachedRotations = new HashMap<>();
+    for (Axis axis : Axis.values())
+    {
+      HashMap<Float, float[][]> map = new HashMap<>();
+      cachedRotations.put(axis, map);
+      for (int deg = 1; deg < 5; deg++)
+      {
+        float[][] rotation = getRotation(deg, axis);
+        map.put(Float.valueOf(deg), rotation);
+        rotation = getRotation(-deg, axis);
+        map.put(Float.valueOf(-deg), rotation);
+      }
+    }
+  }
 
-  /**
-   * Creates a new RotatableMatrix object.
-   * 
-   * @param rows
-   *          DOCUMENT ME!
-   * @param cols
-   *          DOCUMENT ME!
-   */
-  public RotatableMatrix(int rows, int cols)
+  public enum Axis
   {
-    matrix = new float[rows][cols];
+    X, Y, Z
+  };
 
-    temp = new float[3];
+  float[][] matrix;
 
-    rot = new float[3][3];
+  /**
+   * Constructor creates a new identity matrix (all values zero except for 1 on
+   * the diagonal)
+   */
+  public RotatableMatrix()
+  {
+    matrix = new float[DIMS][DIMS];
+    for (int j = 0; j < DIMS; j++)
+    {
+      matrix[j][j] = 1f;
+    }
   }
 
   /**
-   * DOCUMENT ME!
+   * Sets the value at position (i, j) of the matrix
    * 
    * @param i
-   *          DOCUMENT ME!
    * @param j
-   *          DOCUMENT ME!
    * @param value
-   *          DOCUMENT ME!
    */
-  public void addElement(int i, int j, float value)
+  public void setValue(int i, int j, float value)
   {
     matrix[i][j] = value;
   }
 
   /**
-   * DOCUMENT ME!
+   * Answers the value at position (i, j) of the matrix
+   * 
+   * @param i
+   * @param j
+   * @return
+   */
+  public float getValue(int i, int j)
+  {
+    return matrix[i][j];
+  }
+
+  /**
+   * Prints the matrix in rows of space-delimited values
    */
   public void print()
   {
@@ -82,174 +114,137 @@ public class RotatableMatrix
   }
 
   /**
-   * DOCUMENT ME!
+   * Rotates the matrix through the specified number of degrees around the
+   * specified axis
    * 
    * @param degrees
-   *          DOCUMENT ME!
    * @param axis
-   *          DOCUMENT ME!
    */
-  public void rotate(float degrees, char axis)
+  public void rotate(float degrees, Axis axis)
   {
-    float costheta = (float) Math.cos((degrees * Math.PI) / (float) 180.0);
+    float[][] rot = getRotation(degrees, axis);
 
-    float sintheta = (float) Math.sin((degrees * Math.PI) / (float) 180.0);
+    preMultiply(rot);
+  }
 
-    if (axis == 'z')
+  /**
+   * Answers a matrix which, when it pre-multiplies another matrix, applies a
+   * rotation of the specified number of degrees around the specified axis
+   * 
+   * @param degrees
+   * @param axis
+   * @return
+   * @see https://en.wikipedia.org/wiki/Rotation_matrix#Basic_rotations
+   */
+  protected static float[][] getRotation(float degrees, Axis axis)
+  {
+    Float floatValue = Float.valueOf(degrees);
+    if (cachedRotations.get(axis).containsKey(floatValue))
     {
-      rot[0][0] = (float) costheta;
-
-      rot[0][1] = (float) -sintheta;
-
-      rot[0][2] = (float) 0.0;
-
-      rot[1][0] = (float) sintheta;
-
-      rot[1][1] = (float) costheta;
-
-      rot[1][2] = (float) 0.0;
-
-      rot[2][0] = (float) 0.0;
-
-      rot[2][1] = (float) 0.0;
-
-      rot[2][2] = (float) 1.0;
-
-      preMultiply(rot);
+      // System.out.println("getRotation from cache: " + (int) degrees);
+      return cachedRotations.get(axis).get(floatValue);
     }
 
-    if (axis == 'x')
-    {
-      rot[0][0] = (float) 1.0;
-
-      rot[0][1] = (float) 0.0;
-
-      rot[0][2] = (float) 0.0;
-
-      rot[1][0] = (float) 0.0;
+    float costheta = (float) Math.cos(degrees * Math.PI / 180f);
 
-      rot[1][1] = (float) costheta;
+    float sintheta = (float) Math.sin(degrees * Math.PI / 180f);
 
-      rot[1][2] = (float) sintheta;
+    float[][] rot = new float[DIMS][DIMS];
 
-      rot[2][0] = (float) 0.0;
-
-      rot[2][1] = (float) -sintheta;
-
-      rot[2][2] = (float) costheta;
-
-      preMultiply(rot);
-    }
-
-    if (axis == 'y')
+    switch (axis)
     {
-      rot[0][0] = (float) costheta;
-
-      rot[0][1] = (float) 0.0;
-
-      rot[0][2] = (float) -sintheta;
-
-      rot[1][0] = (float) 0.0;
-
-      rot[1][1] = (float) 1.0;
-
-      rot[1][2] = (float) 0.0;
-
-      rot[2][0] = (float) sintheta;
-
-      rot[2][1] = (float) 0.0;
-
-      rot[2][2] = (float) costheta;
-
-      preMultiply(rot);
+    case X:
+      rot[0][0] = 1f;
+      rot[1][1] = costheta;
+      rot[1][2] = sintheta;
+      rot[2][1] = -sintheta;
+      rot[2][2] = costheta;
+      break;
+    case Y:
+      rot[0][0] = costheta;
+      rot[0][2] = -sintheta;
+      rot[1][1] = 1f;
+      rot[2][0] = sintheta;
+      rot[2][2] = costheta;
+      break;
+    case Z:
+      rot[0][0] = costheta;
+      rot[0][1] = -sintheta;
+      rot[1][0] = sintheta;
+      rot[1][1] = costheta;
+      rot[2][2] = 1f;
+      break;
     }
+    return rot;
   }
 
   /**
-   * DOCUMENT ME!
+   * Answers a new array of float values which is the result of pre-multiplying
+   * this matrix by the given vector. Each value of the result is the dot
+   * product of the vector with one column of this matrix. The matrix and input
+   * vector are not modified.
    * 
    * @param vect
-   *          DOCUMENT ME!
    * 
-   * @return DOCUMENT ME!
+   * @return
    */
   public float[] vectorMultiply(float[] vect)
   {
-    temp[0] = vect[0];
-
-    temp[1] = vect[1];
-
-    temp[2] = vect[2];
+    float[] result = new float[DIMS];
 
-    for (int i = 0; i < 3; i++)
+    for (int i = 0; i < DIMS; i++)
     {
-      temp[i] = (matrix[i][0] * vect[0]) + (matrix[i][1] * vect[1])
+      result[i] = (matrix[i][0] * vect[0]) + (matrix[i][1] * vect[1])
               + (matrix[i][2] * vect[2]);
     }
 
-    vect[0] = temp[0];
-
-    vect[1] = temp[1];
-
-    vect[2] = temp[2];
-
-    return vect;
+    return result;
   }
 
   /**
-   * DOCUMENT ME!
+   * Performs pre-multiplication of this matrix by the given one. Value (i, j)
+   * of the result is the dot product of the i'th row of <code>mat</code> with
+   * the j'th column of this matrix.
    * 
    * @param mat
-   *          DOCUMENT ME!
    */
   public void preMultiply(float[][] mat)
   {
-    float[][] tmp = new float[3][3];
+    float[][] tmp = new float[DIMS][DIMS];
 
-    for (int i = 0; i < 3; i++)
+    for (int i = 0; i < DIMS; i++)
     {
-      for (int j = 0; j < 3; j++)
+      for (int j = 0; j < DIMS; j++)
       {
         tmp[i][j] = (mat[i][0] * matrix[0][j]) + (mat[i][1] * matrix[1][j])
                 + (mat[i][2] * matrix[2][j]);
       }
     }
 
-    for (int i = 0; i < 3; i++)
-    {
-      for (int j = 0; j < 3; j++)
-      {
-        matrix[i][j] = tmp[i][j];
-      }
-    }
+    matrix = tmp;
   }
 
   /**
-   * DOCUMENT ME!
+   * Performs post-multiplication of this matrix by the given one. Value (i, j)
+   * of the result is the dot product of the i'th row of this matrix with the
+   * j'th column of <code>mat</code>.
    * 
    * @param mat
-   *          DOCUMENT ME!
    */
   public void postMultiply(float[][] mat)
   {
-    float[][] tmp = new float[3][3];
+    float[][] tmp = new float[DIMS][DIMS];
 
-    for (int i = 0; i < 3; i++)
+    for (int i = 0; i < DIMS; i++)
     {
-      for (int j = 0; j < 3; j++)
+      for (int j = 0; j < DIMS; j++)
       {
         tmp[i][j] = (matrix[i][0] * mat[0][j]) + (matrix[i][1] * mat[1][j])
                 + (matrix[i][2] * mat[2][j]);
       }
     }
 
-    for (int i = 0; i < 3; i++)
-    {
-      for (int j = 0; j < 3; j++)
-      {
-        matrix[i][j] = tmp[i][j];
-      }
-    }
+    matrix = tmp;
   }
 
   /**
@@ -260,47 +255,47 @@ public class RotatableMatrix
    */
   public static void main(String[] args)
   {
-    RotatableMatrix m = new RotatableMatrix(3, 3);
+    RotatableMatrix m = new RotatableMatrix();
 
-    m.addElement(0, 0, 1);
+    m.setValue(0, 0, 1);
 
-    m.addElement(0, 1, 0);
+    m.setValue(0, 1, 0);
 
-    m.addElement(0, 2, 0);
+    m.setValue(0, 2, 0);
 
-    m.addElement(1, 0, 0);
+    m.setValue(1, 0, 0);
 
-    m.addElement(1, 1, 2);
+    m.setValue(1, 1, 2);
 
-    m.addElement(1, 2, 0);
+    m.setValue(1, 2, 0);
 
-    m.addElement(2, 0, 0);
+    m.setValue(2, 0, 0);
 
-    m.addElement(2, 1, 0);
+    m.setValue(2, 1, 0);
 
-    m.addElement(2, 2, 1);
+    m.setValue(2, 2, 1);
 
     m.print();
 
-    RotatableMatrix n = new RotatableMatrix(3, 3);
+    RotatableMatrix n = new RotatableMatrix();
 
-    n.addElement(0, 0, 2);
+    n.setValue(0, 0, 2);
 
-    n.addElement(0, 1, 1);
+    n.setValue(0, 1, 1);
 
-    n.addElement(0, 2, 1);
+    n.setValue(0, 2, 1);
 
-    n.addElement(1, 0, 2);
+    n.setValue(1, 0, 2);
 
-    n.addElement(1, 1, 1);
+    n.setValue(1, 1, 1);
 
-    n.addElement(1, 2, 1);
+    n.setValue(1, 2, 1);
 
-    n.addElement(2, 0, 2);
+    n.setValue(2, 0, 2);
 
-    n.addElement(2, 1, 1);
+    n.setValue(2, 1, 1);
 
-    n.addElement(2, 2, 1);
+    n.setValue(2, 2, 1);
 
     n.print();
 
@@ -321,26 +316,15 @@ public class RotatableMatrix
   }
 
   /**
-   * DOCUMENT ME!
+   * Performs a vector multiplication whose result is the Point representing the
+   * input point's value vector post-multiplied by this matrix.
+   * 
+   * @param coord
+   * @return
    */
-  public void setIdentity()
+  public Point vectorMultiply(Point coord)
   {
-    matrix[0][0] = (float) 1.0;
-
-    matrix[1][1] = (float) 1.0;
-
-    matrix[2][2] = (float) 1.0;
-
-    matrix[0][1] = (float) 0.0;
-
-    matrix[0][2] = (float) 0.0;
-
-    matrix[1][0] = (float) 0.0;
-
-    matrix[1][2] = (float) 0.0;
-
-    matrix[2][0] = (float) 0.0;
-
-    matrix[2][1] = (float) 0.0;
+    float[] v = vectorMultiply(new float[] { coord.x, coord.y, coord.z });
+    return new Point(v[0], v[1], v[2]);
   }
 }
index 86592a0..e24cda5 100644 (file)
@@ -45,11 +45,8 @@ public class SparseMatrix extends Matrix
    */
   public SparseMatrix(double[][] v)
   {
-    rows = v.length;
-    if (rows > 0)
-    {
-      cols = v[0].length;
-    }
+    super(v.length, v.length > 0 ? v[0].length : 0);
+
     sparseColumns = new SparseDoubleArray[cols];
 
     /*
similarity index 73%
rename from src/jalview/gui/Jalview2XML.java
rename to src/jalview/project/Jalview2XML.java
index 9285754..02b405e 100644 (file)
  * along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
  */
-package jalview.gui;
+package jalview.project;
+
+import static jalview.math.RotatableMatrix.Axis.X;
+import static jalview.math.RotatableMatrix.Axis.Y;
+import static jalview.math.RotatableMatrix.Axis.Z;
 
 import jalview.analysis.Conservation;
+import jalview.analysis.PCA;
+import jalview.analysis.scoremodels.ScoreModels;
+import jalview.analysis.scoremodels.SimilarityParams;
 import jalview.api.FeatureColourI;
 import jalview.api.ViewStyleI;
+import jalview.api.analysis.ScoreModelI;
+import jalview.api.analysis.SimilarityParamsI;
 import jalview.api.structures.JalviewStructureDisplayI;
 import jalview.bin.Cache;
 import jalview.datamodel.AlignedCodonFrame;
@@ -31,6 +40,7 @@ import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.GraphLine;
 import jalview.datamodel.PDBEntry;
+import jalview.datamodel.Point;
 import jalview.datamodel.RnaViewerModel;
 import jalview.datamodel.SequenceFeature;
 import jalview.datamodel.SequenceGroup;
@@ -42,50 +52,29 @@ import jalview.datamodel.features.FeatureMatcherI;
 import jalview.datamodel.features.FeatureMatcherSet;
 import jalview.datamodel.features.FeatureMatcherSetI;
 import jalview.ext.varna.RnaModel;
+import jalview.gui.AlignFrame;
+import jalview.gui.AlignViewport;
+import jalview.gui.AlignmentPanel;
+import jalview.gui.AppVarna;
+import jalview.gui.ChimeraViewFrame;
+import jalview.gui.Desktop;
+import jalview.gui.FeatureRenderer;
+import jalview.gui.JvOptionPane;
+import jalview.gui.OOMWarning;
+import jalview.gui.PCAPanel;
+import jalview.gui.PaintRefresher;
+import jalview.gui.SplitFrame;
+import jalview.gui.StructureViewer;
 import jalview.gui.StructureViewer.ViewerType;
+import jalview.gui.StructureViewerBase;
+import jalview.gui.TreePanel;
+import jalview.io.BackupFiles;
 import jalview.io.DataSourceType;
 import jalview.io.FileFormat;
+import jalview.io.NewickFile;
+import jalview.math.Matrix;
+import jalview.math.MatrixI;
 import jalview.renderer.ResidueShaderI;
-import jalview.schemabinding.version2.AlcodMap;
-import jalview.schemabinding.version2.AlcodonFrame;
-import jalview.schemabinding.version2.Annotation;
-import jalview.schemabinding.version2.AnnotationColours;
-import jalview.schemabinding.version2.AnnotationElement;
-import jalview.schemabinding.version2.CalcIdParam;
-import jalview.schemabinding.version2.Colour;
-import jalview.schemabinding.version2.CompoundMatcher;
-import jalview.schemabinding.version2.DBRef;
-import jalview.schemabinding.version2.Features;
-import jalview.schemabinding.version2.Group;
-import jalview.schemabinding.version2.HiddenColumns;
-import jalview.schemabinding.version2.JGroup;
-import jalview.schemabinding.version2.JSeq;
-import jalview.schemabinding.version2.JalviewModel;
-import jalview.schemabinding.version2.JalviewModelSequence;
-import jalview.schemabinding.version2.MapListFrom;
-import jalview.schemabinding.version2.MapListTo;
-import jalview.schemabinding.version2.Mapping;
-import jalview.schemabinding.version2.MappingChoice;
-import jalview.schemabinding.version2.MatchCondition;
-import jalview.schemabinding.version2.MatcherSet;
-import jalview.schemabinding.version2.OtherData;
-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;
-import jalview.schemabinding.version2.Setting;
-import jalview.schemabinding.version2.StructureState;
-import jalview.schemabinding.version2.ThresholdLine;
-import jalview.schemabinding.version2.Tree;
-import jalview.schemabinding.version2.UserColours;
-import jalview.schemabinding.version2.Viewport;
-import jalview.schemabinding.version2.types.ColourThreshTypeType;
-import jalview.schemabinding.version2.types.FeatureMatcherByType;
-import jalview.schemabinding.version2.types.NoValueColour;
 import jalview.schemes.AnnotationColourGradient;
 import jalview.schemes.ColourSchemeI;
 import jalview.schemes.ColourSchemeProperty;
@@ -101,6 +90,7 @@ import jalview.util.StringUtils;
 import jalview.util.jarInputStreamProvider;
 import jalview.util.matcher.Condition;
 import jalview.viewmodel.AlignmentViewport;
+import jalview.viewmodel.PCAModel;
 import jalview.viewmodel.ViewportRanges;
 import jalview.viewmodel.seqfeatures.FeatureRendererSettings;
 import jalview.viewmodel.seqfeatures.FeaturesDisplayed;
@@ -110,8 +100,56 @@ import jalview.ws.jws2.jabaws2.Jws2Instance;
 import jalview.ws.params.ArgumentI;
 import jalview.ws.params.AutoCalcSetting;
 import jalview.ws.params.WsParamSetI;
+import jalview.xml.binding.jalview.AlcodonFrame;
+import jalview.xml.binding.jalview.AlcodonFrame.AlcodMap;
+import jalview.xml.binding.jalview.Annotation;
+import jalview.xml.binding.jalview.Annotation.ThresholdLine;
+import jalview.xml.binding.jalview.AnnotationColourScheme;
+import jalview.xml.binding.jalview.AnnotationElement;
+import jalview.xml.binding.jalview.DoubleMatrix;
+import jalview.xml.binding.jalview.DoubleVector;
+import jalview.xml.binding.jalview.Feature;
+import jalview.xml.binding.jalview.Feature.OtherData;
+import jalview.xml.binding.jalview.FeatureMatcherSet.CompoundMatcher;
+import jalview.xml.binding.jalview.FilterBy;
+import jalview.xml.binding.jalview.JalviewModel;
+import jalview.xml.binding.jalview.JalviewModel.FeatureSettings;
+import jalview.xml.binding.jalview.JalviewModel.FeatureSettings.Group;
+import jalview.xml.binding.jalview.JalviewModel.FeatureSettings.Setting;
+import jalview.xml.binding.jalview.JalviewModel.JGroup;
+import jalview.xml.binding.jalview.JalviewModel.JSeq;
+import jalview.xml.binding.jalview.JalviewModel.JSeq.Pdbids;
+import jalview.xml.binding.jalview.JalviewModel.JSeq.Pdbids.StructureState;
+import jalview.xml.binding.jalview.JalviewModel.JSeq.RnaViewer;
+import jalview.xml.binding.jalview.JalviewModel.JSeq.RnaViewer.SecondaryStructure;
+import jalview.xml.binding.jalview.JalviewModel.PcaViewer;
+import jalview.xml.binding.jalview.JalviewModel.PcaViewer.Axis;
+import jalview.xml.binding.jalview.JalviewModel.PcaViewer.SeqPointMax;
+import jalview.xml.binding.jalview.JalviewModel.PcaViewer.SeqPointMin;
+import jalview.xml.binding.jalview.JalviewModel.PcaViewer.SequencePoint;
+import jalview.xml.binding.jalview.JalviewModel.Tree;
+import jalview.xml.binding.jalview.JalviewModel.UserColours;
+import jalview.xml.binding.jalview.JalviewModel.Viewport;
+import jalview.xml.binding.jalview.JalviewModel.Viewport.CalcIdParam;
+import jalview.xml.binding.jalview.JalviewModel.Viewport.HiddenColumns;
+import jalview.xml.binding.jalview.JalviewUserColours;
+import jalview.xml.binding.jalview.JalviewUserColours.Colour;
+import jalview.xml.binding.jalview.MapListType.MapListFrom;
+import jalview.xml.binding.jalview.MapListType.MapListTo;
+import jalview.xml.binding.jalview.Mapping;
+import jalview.xml.binding.jalview.NoValueColour;
+import jalview.xml.binding.jalview.ObjectFactory;
+import jalview.xml.binding.jalview.PcaDataType;
+import jalview.xml.binding.jalview.Pdbentry.Property;
+import jalview.xml.binding.jalview.Sequence;
+import jalview.xml.binding.jalview.Sequence.DBRef;
+import jalview.xml.binding.jalview.SequenceSet;
+import jalview.xml.binding.jalview.SequenceSet.SequenceSetProperties;
+import jalview.xml.binding.jalview.ThresholdType;
+import jalview.xml.binding.jalview.VAMSAS;
 
 import java.awt.Color;
+import java.awt.Font;
 import java.awt.Rectangle;
 import java.io.BufferedReader;
 import java.io.DataInputStream;
@@ -124,12 +162,14 @@ import java.io.InputStreamReader;
 import java.io.OutputStreamWriter;
 import java.io.PrintWriter;
 import java.lang.reflect.InvocationTargetException;
+import java.math.BigInteger;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.Enumeration;
+import java.util.GregorianCalendar;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Hashtable;
@@ -147,9 +187,14 @@ import java.util.jar.JarOutputStream;
 
 import javax.swing.JInternalFrame;
 import javax.swing.SwingUtilities;
-
-import org.exolab.castor.xml.Marshaller;
-import org.exolab.castor.xml.Unmarshaller;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.Marshaller;
+import javax.xml.datatype.DatatypeConfigurationException;
+import javax.xml.datatype.DatatypeFactory;
+import javax.xml.datatype.XMLGregorianCalendar;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamReader;
 
 /**
  * Write out the current jalview desktop state as a Jalview XML stream.
@@ -169,6 +214,12 @@ public class Jalview2XML
 
   private static final String UTF_8 = "UTF-8";
 
+  /**
+   * prefix for recovering datasets for alignments with multiple views where
+   * non-existent dataset IDs were written for some views
+   */
+  private static final String UNIQSEQSETID = "uniqueSeqSetId.";
+
   // use this with nextCounter() to make unique names for entities
   private int counter = 0;
 
@@ -204,6 +255,45 @@ public class Jalview2XML
   private Map<RnaModel, String> rnaSessions = new HashMap<>();
 
   /**
+   * A helper method for safely using the value of an optional attribute that
+   * may be null if not present in the XML. Answers the boolean value, or false
+   * if null.
+   * 
+   * @param b
+   * @return
+   */
+  public static boolean safeBoolean(Boolean b)
+  {
+    return b == null ? false : b.booleanValue();
+  }
+
+  /**
+   * A helper method for safely using the value of an optional attribute that
+   * may be null if not present in the XML. Answers the integer value, or zero
+   * if null.
+   * 
+   * @param i
+   * @return
+   */
+  public static int safeInt(Integer i)
+  {
+    return i == null ? 0 : i.intValue();
+  }
+
+  /**
+   * A helper method for safely using the value of an optional attribute that
+   * may be null if not present in the XML. Answers the float value, or zero if
+   * null.
+   * 
+   * @param f
+   * @return
+   */
+  public static float safeFloat(Float f)
+  {
+    return f == null ? 0f : f.floatValue();
+  }
+
+  /**
    * create/return unique hash string for sq
    * 
    * @param sq
@@ -461,24 +551,30 @@ public class Jalview2XML
   public void saveState(File statefile)
   {
     FileOutputStream fos = null;
+
     try
     {
+
       fos = new FileOutputStream(statefile);
+
       JarOutputStream jout = new JarOutputStream(fos);
       saveState(jout);
+      fos.close();
 
     } catch (Exception e)
     {
+      Cache.log.error("Couln't write Jalview state to " + statefile, e);
       // TODO: inform user of the problem - they need to know if their data was
       // not saved !
       if (errorMessage == null)
       {
-        errorMessage = "Couldn't write Jalview Archive to output file '"
+        errorMessage = "Did't write Jalview Archive to output file '"
                 + statefile + "' - See console error log for details";
       }
       else
       {
-        errorMessage += "(output file was '" + statefile + "')";
+        errorMessage += "(Didn't write Jalview Archive to output file '"
+                + statefile + ")";
       }
       e.printStackTrace();
     } finally
@@ -555,11 +651,12 @@ public class Jalview2XML
 
         String shortName = makeFilename(af, shortNames);
 
-        int ap, apSize = af.alignPanels.size();
+        int apSize = af.getAlignPanels().size();
 
-        for (ap = 0; ap < apSize; ap++)
+        for (int ap = 0; ap < apSize; ap++)
         {
-          AlignmentPanel apanel = af.alignPanels.get(ap);
+          AlignmentPanel apanel = (AlignmentPanel) af.getAlignPanels()
+                  .get(ap);
           String fileName = apSize == 1 ? shortName : ap + shortName;
           if (!fileName.endsWith(".xml"))
           {
@@ -647,7 +744,11 @@ public class Jalview2XML
   {
     try
     {
-      FileOutputStream fos = new FileOutputStream(jarFile);
+      // create backupfiles object and get new temp filename destination
+      BackupFiles backupfiles = new BackupFiles(jarFile);
+      FileOutputStream fos = new FileOutputStream(
+              backupfiles.getTempFilePath());
+
       JarOutputStream jout = new JarOutputStream(fos);
       List<AlignFrame> frames = new ArrayList<>();
 
@@ -669,7 +770,12 @@ public class Jalview2XML
       }
       ;
       jout.close();
-      return true;
+      boolean success = true;
+
+      backupfiles.setWriteSuccess(success);
+      success = backupfiles.rollBackupsAndRenameTempFile();
+
+      return success;
     } catch (Exception ex)
     {
       errorMessage = "Couldn't Write alignment view to Jalview Archive - see error output for details";
@@ -745,10 +851,21 @@ public class Jalview2XML
     AlignViewport av = ap.av;
     ViewportRanges vpRanges = av.getRanges();
 
-    JalviewModel object = new JalviewModel();
-    object.setVamsasModel(new jalview.schemabinding.version2.VamsasModel());
+    final ObjectFactory objectFactory = new ObjectFactory();
+    JalviewModel object = objectFactory.createJalviewModel();
+    object.setVamsasModel(new VAMSAS());
 
-    object.setCreationDate(new java.util.Date(System.currentTimeMillis()));
+    // object.setCreationDate(new java.util.Date(System.currentTimeMillis()));
+    try
+    {
+      GregorianCalendar c = new GregorianCalendar();
+      DatatypeFactory datatypeFactory = DatatypeFactory.newInstance();
+      XMLGregorianCalendar now = datatypeFactory.newXMLGregorianCalendar(c);// gregorianCalendar);
+      object.setCreationDate(now);
+    } catch (DatatypeConfigurationException e)
+    {
+      System.err.println("error writing date: " + e.toString());
+    }
     object.setVersion(
             jalview.bin.Cache.getDefault("VERSION", "Development Build"));
 
@@ -765,7 +882,7 @@ public class Jalview2XML
 
     SequenceSet vamsasSet = new SequenceSet();
     Sequence vamsasSeq;
-    JalviewModelSequence jms = new JalviewModelSequence();
+    // JalviewModelSequence jms = new JalviewModelSequence();
 
     vamsasSet.setGapChar(jal.getGapCharacter() + "");
 
@@ -789,7 +906,8 @@ public class Jalview2XML
         SequenceSetProperties ssp = new SequenceSetProperties();
         ssp.setKey(key);
         ssp.setValue(jal.getProperties().get(key).toString());
-        vamsasSet.addSequenceSetProperties(ssp);
+        // vamsasSet.addSequenceSetProperties(ssp);
+        vamsasSet.getSequenceSetProperties().add(ssp);
       }
     }
 
@@ -826,7 +944,8 @@ public class Jalview2XML
         else
         {
           vamsasSeq = createVamsasSequence(id, jds);
-          vamsasSet.addSequence(vamsasSeq);
+//          vamsasSet.addSequence(vamsasSeq);
+          vamsasSet.getSequence().add(vamsasSeq);
           vamsasSetIds.put(id, vamsasSeq);
           seqRefIds.put(id, jds);
         }
@@ -855,7 +974,8 @@ public class Jalview2XML
             {
               if (reps[h] != jds)
               {
-                jseq.addHiddenSequences(rjal.findIndex(reps[h]));
+                // jseq.addHiddenSequences(rjal.findIndex(reps[h]));
+                jseq.getHiddenSequences().add(rjal.findIndex(reps[h]));
               }
             }
           }
@@ -869,11 +989,11 @@ public class Jalview2XML
 
       // TODO: omit sequence features from each alignment view's XML dump if we
       // are storing dataset
-      List<jalview.datamodel.SequenceFeature> sfs = jds
-              .getSequenceFeatures();
+      List<SequenceFeature> sfs = jds.getSequenceFeatures();
       for (SequenceFeature sf : sfs)
       {
-        Features features = new Features();
+        // Features features = new Features();
+        Feature features = new Feature();
 
         features.setBegin(sf.getBegin());
         features.setEnd(sf.getEnd());
@@ -888,7 +1008,8 @@ public class Jalview2XML
             OtherData keyValue = new OtherData();
             keyValue.setKey("LINK_" + l);
             keyValue.setValue(sf.links.elementAt(l).toString());
-            features.addOtherData(keyValue);
+            // features.addOtherData(keyValue);
+            features.getOtherData().add(keyValue);
           }
         }
         if (sf.otherDetails != null)
@@ -910,7 +1031,8 @@ public class Jalview2XML
                 otherData.setKey(key);
                 otherData.setKey2(subAttribute.getKey());
                 otherData.setValue(subAttribute.getValue().toString());
-                features.addOtherData(otherData);
+                // features.addOtherData(otherData);
+                features.getOtherData().add(otherData);
               }
             }
             else
@@ -918,22 +1040,23 @@ public class Jalview2XML
               OtherData otherData = new OtherData();
               otherData.setKey(key);
               otherData.setValue(value.toString());
-              features.addOtherData(otherData);
+              // features.addOtherData(otherData);
+              features.getOtherData().add(otherData);
             }
           }
         }
 
-        jseq.addFeatures(features);
+        // jseq.addFeatures(features);
+        jseq.getFeatures().add(features);
       }
 
       if (jdatasq.getAllPDBEntries() != null)
       {
-        Enumeration en = jdatasq.getAllPDBEntries().elements();
+        Enumeration<PDBEntry> en = jdatasq.getAllPDBEntries().elements();
         while (en.hasMoreElements())
         {
           Pdbids pdb = new Pdbids();
-          jalview.datamodel.PDBEntry entry = (jalview.datamodel.PDBEntry) en
-                  .nextElement();
+          jalview.datamodel.PDBEntry entry = en.nextElement();
 
           String pdbId = entry.getId();
           pdb.setId(pdbId);
@@ -999,25 +1122,28 @@ public class Jalview2XML
           Enumeration<String> props = entry.getProperties();
           if (props.hasMoreElements())
           {
-            PdbentryItem item = new PdbentryItem();
+            // PdbentryItem item = new PdbentryItem();
             while (props.hasMoreElements())
             {
               Property prop = new Property();
               String key = props.nextElement();
               prop.setName(key);
               prop.setValue(entry.getProperty(key).toString());
-              item.addProperty(prop);
+              // item.addProperty(prop);
+              pdb.getProperty().add(prop);
             }
-            pdb.addPdbentryItem(item);
+            // pdb.addPdbentryItem(item);
           }
 
-          jseq.addPdbids(pdb);
+          // jseq.addPdbids(pdb);
+          jseq.getPdbids().add(pdb);
         }
       }
 
       saveRnaViewers(jout, jseq, jds, viewIds, ap, storeDS);
 
-      jms.addJSeq(jseq);
+      // jms.addJSeq(jseq);
+      object.getJSeq().add(jseq);
     }
 
     if (!storeDS && av.hasHiddenRows())
@@ -1044,12 +1170,14 @@ public class Jalview2XML
             alcmap.setDnasq(seqHash(dnas[m]));
             alcmap.setMapping(
                     createVamsasMapping(pmaps[m], dnas[m], null, false));
-            alc.addAlcodMap(alcmap);
+            // alc.addAlcodMap(alcmap);
+            alc.getAlcodMap().add(alcmap);
             hasMap = true;
           }
           if (hasMap)
           {
-            vamsasSet.addAlcodonFrame(alc);
+            // vamsasSet.addAlcodonFrame(alc);
+            vamsasSet.getAlcodonFrame().add(alc);
           }
         }
         // TODO: delete this ? dead code from 2.8.3->2.9 ?
@@ -1102,13 +1230,13 @@ public class Jalview2XML
           {
             TreePanel tp = (TreePanel) frames[t];
 
-            if (tp.treeCanvas.av.getAlignment() == jal)
+            if (tp.getTreeCanvas().getViewport().getAlignment() == jal)
             {
-              Tree tree = new Tree();
+              JalviewModel.Tree tree = new JalviewModel.Tree();
               tree.setTitle(tp.getTitle());
               tree.setCurrentTree((av.getCurrentTree() == tp.getTree()));
               tree.setNewick(tp.getTree().print());
-              tree.setThreshold(tp.treeCanvas.threshold);
+              tree.setThreshold(tp.getTreeCanvas().getThreshold());
 
               tree.setFitToWindow(tp.fitToWindow.getState());
               tree.setFontName(tp.getTreeFont().getName());
@@ -1124,13 +1252,35 @@ public class Jalview2XML
               tree.setXpos(tp.getX());
               tree.setYpos(tp.getY());
               tree.setId(makeHashCode(tp, null));
-              jms.addTree(tree);
+              tree.setLinkToAllViews(
+                      tp.getTreeCanvas().isApplyToAllViews());
+
+              // jms.addTree(tree);
+              object.getTree().add(tree);
             }
           }
         }
       }
     }
 
+    /*
+     * save PCA viewers
+     */
+    if (!storeDS && Desktop.desktop != null)
+    {
+      for (JInternalFrame frame : Desktop.desktop.getAllFrames())
+      {
+        if (frame instanceof PCAPanel)
+        {
+          PCAPanel panel = (PCAPanel) frame;
+          if (panel.getAlignViewport().getAlignment() == jal)
+          {
+            savePCA(panel, object);
+          }
+        }
+      }
+    }
+
     // SAVE ANNOTATIONS
     /**
      * store forward refs from an annotationRow to any groups
@@ -1188,7 +1338,8 @@ public class Jalview2XML
             if (colourScheme instanceof jalview.schemes.UserColourScheme)
             {
               jGroup.setColour(
-                      setUserColourScheme(colourScheme, userColours, jms));
+                      setUserColourScheme(colourScheme, userColours,
+                              object));
             }
             else
             {
@@ -1200,12 +1351,12 @@ public class Jalview2XML
             jGroup.setColour("AnnotationColourGradient");
             jGroup.setAnnotationColours(constructAnnotationColours(
                     (jalview.schemes.AnnotationColourGradient) colourScheme,
-                    userColours, jms));
+                    userColours, object));
           }
           else if (colourScheme instanceof jalview.schemes.UserColourScheme)
           {
             jGroup.setColour(
-                    setUserColourScheme(colourScheme, userColours, jms));
+                    setUserColourScheme(colourScheme, userColours, object));
           }
           else
           {
@@ -1229,11 +1380,17 @@ public class Jalview2XML
         jGroup.setNormaliseSequenceLogo(sg.isNormaliseSequenceLogo());
         for (SequenceI seq : sg.getSequences())
         {
-          jGroup.addSeq(seqHash(seq));
+          // jGroup.addSeq(seqHash(seq));
+          jGroup.getSeq().add(seqHash(seq));
         }
       }
 
-      jms.setJGroup(groups);
+      //jms.setJGroup(groups);
+      Object group;
+      for (JGroup grp : groups)
+      {
+        object.getJGroup().add(grp);
+      }
     }
     if (!storeDS)
     {
@@ -1247,7 +1404,7 @@ public class Jalview2XML
       {
         view.setComplementId(av.getCodingComplement().getViewId());
       }
-      view.setViewName(av.viewName);
+      view.setViewName(av.getViewName());
       view.setGatheredViews(av.isGatherViewsHere());
 
       Rectangle size = ap.av.getExplodedGeometry();
@@ -1277,15 +1434,15 @@ public class Jalview2XML
       if (av.getGlobalColourScheme() instanceof jalview.schemes.UserColourScheme)
       {
         view.setBgColour(setUserColourScheme(av.getGlobalColourScheme(),
-                userColours, jms));
+                userColours, object));
       }
       else if (av
               .getGlobalColourScheme() instanceof jalview.schemes.AnnotationColourGradient)
       {
-        AnnotationColours ac = constructAnnotationColours(
+        AnnotationColourScheme ac = constructAnnotationColours(
                 (jalview.schemes.AnnotationColourGradient) av
                         .getGlobalColourScheme(),
-                userColours, jms);
+                userColours, object);
 
         view.setAnnotationColours(ac);
         view.setBgColour("AnnotationColourGradient");
@@ -1306,7 +1463,7 @@ public class Jalview2XML
           view.setConsThreshold(vcs.getConservationInc());
           if (cs instanceof jalview.schemes.UserColourScheme)
           {
-            view.setBgColour(setUserColourScheme(cs, userColours, jms));
+            view.setBgColour(setUserColourScheme(cs, userColours, object));
           }
         }
         view.setPidThreshold(vcs.getThreshold());
@@ -1314,9 +1471,10 @@ public class Jalview2XML
 
       view.setConservationSelected(av.getConservationSelected());
       view.setPidSelected(av.getAbovePIDThreshold());
-      view.setFontName(av.font.getName());
-      view.setFontSize(av.font.getSize());
-      view.setFontStyle(av.font.getStyle());
+      final Font font = av.getFont();
+      view.setFontName(font.getName());
+      view.setFontSize(font.getSize());
+      view.setFontStyle(font.getStyle());
       view.setScaleProteinAsCdna(av.getViewStyle().isScaleProteinAsCdna());
       view.setRenderGaps(av.isRenderGaps());
       view.setShowAnnotation(av.isShowAnnotation());
@@ -1343,7 +1501,7 @@ public class Jalview2XML
       view.setIgnoreGapsinConsensus(av.isIgnoreGapsConsensus());
       if (av.getFeaturesDisplayed() != null)
       {
-        jalview.schemabinding.version2.FeatureSettings fs = new jalview.schemabinding.version2.FeatureSettings();
+        FeatureSettings fs = new FeatureSettings();
 
         FeatureRenderer fr = ap.getSeqPanel().seqCanvas
                 .getFeatureRenderer();
@@ -1354,7 +1512,7 @@ public class Jalview2XML
         {
           for (String featureType : renderOrder)
           {
-            Setting setting = new Setting();
+            FeatureSettings.Setting setting = new FeatureSettings.Setting();
             setting.setType(featureType);
 
             /*
@@ -1381,7 +1539,12 @@ public class Jalview2XML
               setting.setColourByLabel(fcol.isColourByLabel());
               if (fcol.isColourByAttribute())
               {
-                setting.setAttributeName(fcol.getAttributeName());
+                String[] attName = fcol.getAttributeName();
+                setting.getAttributeName().add(attName[0]);
+                if (attName.length > 1)
+                {
+                  setting.getAttributeName().add(attName[1]);
+                }
               }
               setting.setAutoScale(fcol.isAutoScaled());
               setting.setThreshold(fcol.getThreshold());
@@ -1415,7 +1578,8 @@ public class Jalview2XML
             {
               setting.setOrder(rorder);
             }
-            fs.addSetting(setting);
+            /// fs.addSetting(setting);
+            fs.getSetting().add(setting);
             settingsAdded.addElement(featureType);
           }
         }
@@ -1434,10 +1598,12 @@ public class Jalview2XML
           g.setName(grp);
           g.setDisplay(((Boolean) fr.checkGroupVisibility(grp, false))
                           .booleanValue());
-          fs.addGroup(g);
+          // fs.addGroup(g);
+          fs.getGroup().add(g);
           groupsAdded.addElement(grp);
         }
-        jms.setFeatureSettings(fs);
+        // jms.setFeatureSettings(fs);
+        object.setFeatureSettings(fs);
       }
 
       if (av.hasHiddenColumns())
@@ -1457,7 +1623,8 @@ public class Jalview2XML
             HiddenColumns hc = new HiddenColumns();
             hc.setStart(region[0]);
             hc.setEnd(region[1]);
-            view.addHiddenColumns(hc);
+            // view.addHiddenColumns(hc);
+            view.getHiddenColumns().add(hc);
           }
         }
       }
@@ -1471,16 +1638,19 @@ public class Jalview2XML
             // Some calcIds have no parameters.
             if (cidp != null)
             {
-              view.addCalcIdParam(cidp);
+              // view.addCalcIdParam(cidp);
+              view.getCalcIdParam().add(cidp);
             }
           }
         }
       }
 
-      jms.addViewport(view);
+      // jms.addViewport(view);
+      object.getViewport().add(view);
     }
-    object.setJalviewModelSequence(jms);
-    object.getVamsasModel().addSequenceSet(vamsasSet);
+    // object.setJalviewModelSequence(jms);
+    // object.getVamsasModel().addSequenceSet(vamsasSet);
+    object.getVamsasModel().getSequenceSet().add(vamsasSet);
 
     if (jout != null && fileName != null)
     {
@@ -1494,13 +1664,23 @@ public class Jalview2XML
         jout.putNextEntry(entry);
         PrintWriter pout = new PrintWriter(
                 new OutputStreamWriter(jout, UTF_8));
-        Marshaller marshaller = new Marshaller(pout);
-        marshaller.marshal(object);
+        JAXBContext jaxbContext = JAXBContext
+                .newInstance(JalviewModel.class);
+        Marshaller jaxbMarshaller = jaxbContext.createMarshaller();
+
+        // output pretty printed
+        // jaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
+        jaxbMarshaller.marshal(
+                new ObjectFactory().createJalviewModel(object), pout);
+
+        // jaxbMarshaller.marshal(object, pout);
+        // marshaller.marshal(object);
         pout.flush();
         jout.closeEntry();
       } catch (Exception ex)
       {
         // TODO: raise error in GUI if marshalling failed.
+        System.err.println("Error writing Jalview project");
         ex.printStackTrace();
       }
     }
@@ -1508,6 +1688,196 @@ public class Jalview2XML
   }
 
   /**
+   * Writes PCA viewer attributes and computed values to an XML model object and
+   * adds it to the JalviewModel. Any exceptions are reported by logging.
+   */
+  protected void savePCA(PCAPanel panel, JalviewModel object)
+  {
+    try
+    {
+      PcaViewer viewer = new PcaViewer();
+      viewer.setHeight(panel.getHeight());
+      viewer.setWidth(panel.getWidth());
+      viewer.setXpos(panel.getX());
+      viewer.setYpos(panel.getY());
+      viewer.setTitle(panel.getTitle());
+      PCAModel pcaModel = panel.getPcaModel();
+      viewer.setScoreModelName(pcaModel.getScoreModelName());
+      viewer.setXDim(panel.getSelectedDimensionIndex(X));
+      viewer.setYDim(panel.getSelectedDimensionIndex(Y));
+      viewer.setZDim(panel.getSelectedDimensionIndex(Z));
+      viewer.setBgColour(
+              panel.getRotatableCanvas().getBackgroundColour().getRGB());
+      viewer.setScaleFactor(panel.getRotatableCanvas().getScaleFactor());
+      float[] spMin = panel.getRotatableCanvas().getSeqMin();
+      SeqPointMin spmin = new SeqPointMin();
+      spmin.setXPos(spMin[0]);
+      spmin.setYPos(spMin[1]);
+      spmin.setZPos(spMin[2]);
+      viewer.setSeqPointMin(spmin);
+      float[] spMax = panel.getRotatableCanvas().getSeqMax();
+      SeqPointMax spmax = new SeqPointMax();
+      spmax.setXPos(spMax[0]);
+      spmax.setYPos(spMax[1]);
+      spmax.setZPos(spMax[2]);
+      viewer.setSeqPointMax(spmax);
+      viewer.setShowLabels(panel.getRotatableCanvas().isShowLabels());
+      viewer.setLinkToAllViews(
+              panel.getRotatableCanvas().isApplyToAllViews());
+      SimilarityParamsI sp = pcaModel.getSimilarityParameters();
+      viewer.setIncludeGaps(sp.includeGaps());
+      viewer.setMatchGaps(sp.matchGaps());
+      viewer.setIncludeGappedColumns(sp.includeGappedColumns());
+      viewer.setDenominateByShortestLength(sp.denominateByShortestLength());
+
+      /*
+       * sequence points on display
+       */
+      for (jalview.datamodel.SequencePoint spt : pcaModel
+              .getSequencePoints())
+      {
+        SequencePoint point = new SequencePoint();
+        point.setSequenceRef(seqHash(spt.getSequence()));
+        point.setXPos(spt.coord.x);
+        point.setYPos(spt.coord.y);
+        point.setZPos(spt.coord.z);
+        viewer.getSequencePoint().add(point);
+      }
+
+      /*
+       * (end points of) axes on display
+       */
+      for (Point p : panel.getRotatableCanvas().getAxisEndPoints())
+      {
+
+        Axis axis = new Axis();
+        axis.setXPos(p.x);
+        axis.setYPos(p.y);
+        axis.setZPos(p.z);
+        viewer.getAxis().add(axis);
+      }
+
+      /*
+       * raw PCA data (note we are not restoring PCA inputs here -
+       * alignment view, score model, similarity parameters)
+       */
+      PcaDataType data = new PcaDataType();
+      viewer.setPcaData(data);
+      PCA pca = pcaModel.getPcaData();
+
+      DoubleMatrix pm = new DoubleMatrix();
+      saveDoubleMatrix(pca.getPairwiseScores(), pm);
+      data.setPairwiseMatrix(pm);
+
+      DoubleMatrix tm = new DoubleMatrix();
+      saveDoubleMatrix(pca.getTridiagonal(), tm);
+      data.setTridiagonalMatrix(tm);
+
+      DoubleMatrix eigenMatrix = new DoubleMatrix();
+      data.setEigenMatrix(eigenMatrix);
+      saveDoubleMatrix(pca.getEigenmatrix(), eigenMatrix);
+
+      object.getPcaViewer().add(viewer);
+    } catch (Throwable t)
+    {
+      Cache.log.error("Error saving PCA: " + t.getMessage());
+    }
+  }
+
+  /**
+   * Stores values from a matrix into an XML element, including (if present) the
+   * D or E vectors
+   * 
+   * @param m
+   * @param xmlMatrix
+   * @see #loadDoubleMatrix(DoubleMatrix)
+   */
+  protected void saveDoubleMatrix(MatrixI m, DoubleMatrix xmlMatrix)
+  {
+    xmlMatrix.setRows(m.height());
+    xmlMatrix.setColumns(m.width());
+    for (int i = 0; i < m.height(); i++)
+    {
+      DoubleVector row = new DoubleVector();
+      for (int j = 0; j < m.width(); j++)
+      {
+        row.getV().add(m.getValue(i, j));
+      }
+      xmlMatrix.getRow().add(row);
+    }
+    if (m.getD() != null)
+    {
+      DoubleVector dVector = new DoubleVector();
+      for (double d : m.getD())
+      {
+        dVector.getV().add(d);
+      }
+      xmlMatrix.setD(dVector);
+    }
+    if (m.getE() != null)
+    {
+      DoubleVector eVector = new DoubleVector();
+      for (double e : m.getE())
+      {
+        eVector.getV().add(e);
+      }
+      xmlMatrix.setE(eVector);
+    }
+  }
+
+  /**
+   * Loads XML matrix data into a new Matrix object, including the D and/or E
+   * vectors (if present)
+   * 
+   * @param mData
+   * @return
+   * @see Jalview2XML#saveDoubleMatrix(MatrixI, DoubleMatrix)
+   */
+  protected MatrixI loadDoubleMatrix(DoubleMatrix mData)
+  {
+    int rows = mData.getRows();
+    double[][] vals = new double[rows][];
+
+    for (int i = 0; i < rows; i++)
+    {
+      List<Double> dVector = mData.getRow().get(i).getV();
+      vals[i] = new double[dVector.size()];
+      int dvi = 0;
+      for (Double d : dVector)
+      {
+        vals[i][dvi++] = d;
+      }
+    }
+
+    MatrixI m = new Matrix(vals);
+
+    if (mData.getD() != null)
+    {
+      List<Double> dVector = mData.getD().getV();
+      double[] vec = new double[dVector.size()];
+      int dvi = 0;
+      for (Double d : dVector)
+      {
+        vec[dvi++] = d;
+      }
+      m.setD(vec);
+    }
+    if (mData.getE() != null)
+    {
+      List<Double> dVector = mData.getE().getV();
+      double[] vec = new double[dVector.size()];
+      int dvi = 0;
+      for (Double d : dVector)
+      {
+        vec[dvi++] = d;
+      }
+      m.setE(vec);
+    }
+
+    return m;
+  }
+
+  /**
    * Save any Varna viewers linked to this sequence. Writes an rnaViewer element
    * for each viewer, with
    * <ul>
@@ -1561,7 +1931,8 @@ public class Jalview2XML
           rna.setHeight(varna.getHeight());
           rna.setDividerLocation(varna.getDividerLocation());
           rna.setSelectedRna(varna.getSelectedIndex());
-          jseq.addRnaViewer(rna);
+          // jseq.addRnaViewer(rna);
+          jseq.getRnaViewer().add(rna);
 
           /*
            * Store each Varna panel's state once in the project per sequence.
@@ -1597,7 +1968,8 @@ public class Jalview2XML
               ss.setViewerState(jarEntryName);
               ss.setGapped(model.gapped);
               ss.setTitle(model.title);
-              rna.addSecondaryStructure(ss);
+              // rna.addSecondaryStructure(ss);
+              rna.getSecondaryStructure().add(ss);
             }
           }
         }
@@ -1736,7 +2108,8 @@ public class Jalview2XML
           state.setColourwithAlignPanel(viewFrame.isUsedforcolourby(ap));
           state.setColourByJmol(viewFrame.isColouredByViewer());
           state.setType(viewFrame.getViewerType().toString());
-          pdb.addStructureState(state);
+          // pdb.addStructureState(state);
+          pdb.getStructureState().add(state);
         }
       }
     }
@@ -1744,19 +2117,19 @@ public class Jalview2XML
   }
 
   /**
-   * Populates the AnnotationColours xml for save. This captures the settings of
-   * the options in the 'Colour by Annotation' dialog.
+   * Populates the AnnotationColourScheme xml for save. This captures the
+   * settings of the options in the 'Colour by Annotation' dialog.
    * 
    * @param acg
    * @param userColours
-   * @param jms
+   * @param jm
    * @return
    */
-  private AnnotationColours constructAnnotationColours(
+  private AnnotationColourScheme constructAnnotationColours(
           AnnotationColourGradient acg, List<UserColourScheme> userColours,
-          JalviewModelSequence jms)
+          JalviewModel jm)
   {
-    AnnotationColours ac = new AnnotationColours();
+    AnnotationColourScheme ac = new AnnotationColourScheme();
     ac.setAboveThreshold(acg.getAboveThreshold());
     ac.setThreshold(acg.getAnnotationThreshold());
     // 2.10.2 save annotationId (unique) not annotation label
@@ -1764,7 +2137,7 @@ public class Jalview2XML
     if (acg.getBaseColour() instanceof UserColourScheme)
     {
       ac.setColourScheme(
-              setUserColourScheme(acg.getBaseColour(), userColours, jms));
+              setUserColourScheme(acg.getBaseColour(), userColours, jm));
     }
     else
     {
@@ -1870,10 +2243,11 @@ public class Jalview2XML
       {
         for (String pr : annotation.getProperties())
         {
-          Property prop = new Property();
+          jalview.xml.binding.jalview.Annotation.Property prop = new jalview.xml.binding.jalview.Annotation.Property();
           prop.setName(pr);
           prop.setValue(annotation.getProperty(pr));
-          an.addProperty(prop);
+          // an.addProperty(prop);
+          an.getProperty().add(prop);
         }
       }
 
@@ -1917,7 +2291,8 @@ public class Jalview2XML
             ae.setColour(annotation.annotations[a].colour.getRGB());
           }
 
-          an.addAnnotationElement(ae);
+          // an.addAnnotationElement(ae);
+          an.getAnnotationElement().add(ae);
           if (annotation.autoCalculated)
           {
             // only write one non-null entry into the annotation row -
@@ -1935,7 +2310,8 @@ public class Jalview2XML
       {
         // skip autocalculated annotation - these are only provided for
         // alignments
-        vamsasSet.addAnnotation(an);
+        // vamsasSet.addAnnotation(an);
+        vamsasSet.getAnnotation().add(an);
       }
     }
 
@@ -1948,12 +2324,14 @@ public class Jalview2XML
     {
       CalcIdParam vCalcIdParam = new CalcIdParam();
       vCalcIdParam.setCalcId(calcId);
-      vCalcIdParam.addServiceURL(settings.getServiceURI());
+      // vCalcIdParam.addServiceURL(settings.getServiceURI());
+      vCalcIdParam.getServiceURL().add(settings.getServiceURI());
       // generic URI allowing a third party to resolve another instance of the
       // service used for this calculation
-      for (String urls : settings.getServiceURLs())
+      for (String url : settings.getServiceURLs())
       {
-        vCalcIdParam.addServiceURL(urls);
+        // vCalcIdParam.addServiceURL(urls);
+        vCalcIdParam.getServiceURL().add(url);
       }
       vCalcIdParam.setVersion("1.0");
       if (settings.getPreset() != null)
@@ -1985,8 +2363,9 @@ public class Jalview2XML
   {
     if (calcIdParam.getVersion().equals("1.0"))
     {
+      final String[] calcIds = calcIdParam.getServiceURL().toArray(new String[0]);
       Jws2Instance service = Jws2Discoverer.getDiscoverer()
-              .getPreferredServiceFor(calcIdParam.getServiceURL());
+              .getPreferredServiceFor(calcIds);
       if (service != null)
       {
         WsParamSetI parmSet = null;
@@ -1994,7 +2373,7 @@ public class Jalview2XML
         {
           parmSet = service.getParamStore().parseServiceParameterFile(
                   calcIdParam.getName(), calcIdParam.getDescription(),
-                  calcIdParam.getServiceURL(),
+                  calcIds,
                   calcIdParam.getParameters().replace("|\\n|", "\n"));
         } catch (IOException x)
         {
@@ -2140,7 +2519,8 @@ public class Jalview2XML
                   jds, recurse);
           dbref.setMapping(mp);
         }
-        vamsasSeq.addDBRef(dbref);
+        // vamsasSeq.addDBRef(dbref);
+        vamsasSeq.getDBRef().add(dbref);
       }
     }
     return vamsasSeq;
@@ -2161,7 +2541,8 @@ public class Jalview2XML
         MapListFrom mfrom = new MapListFrom();
         mfrom.setStart(range[0]);
         mfrom.setEnd(range[1]);
-        mp.addMapListFrom(mfrom);
+        // mp.addMapListFrom(mfrom);
+        mp.getMapListFrom().add(mfrom);
       }
       r = mlst.getToRanges();
       for (int[] range : r)
@@ -2169,13 +2550,14 @@ public class Jalview2XML
         MapListTo mto = new MapListTo();
         mto.setStart(range[0]);
         mto.setEnd(range[1]);
-        mp.addMapListTo(mto);
+        // mp.addMapListTo(mto);
+        mp.getMapListTo().add(mto);
       }
-      mp.setMapFromUnit(mlst.getFromRatio());
-      mp.setMapToUnit(mlst.getToRatio());
+      mp.setMapFromUnit(BigInteger.valueOf(mlst.getFromRatio()));
+      mp.setMapToUnit(BigInteger.valueOf(mlst.getToRatio()));
       if (jmp.getTo() != null)
       {
-        MappingChoice mpc = new MappingChoice();
+        // MappingChoice mpc = new MappingChoice();
 
         // check/create ID for the sequence referenced by getTo()
 
@@ -2191,25 +2573,26 @@ public class Jalview2XML
         {
           jmpid = seqHash(ps = parentseq);
         }
-        mpc.setDseqFor(jmpid);
-        if (!seqRefIds.containsKey(mpc.getDseqFor()))
+        // mpc.setDseqFor(jmpid);
+        mp.setDseqFor(jmpid);
+        if (!seqRefIds.containsKey(jmpid))
         {
           jalview.bin.Cache.log.debug("creatign new DseqFor ID");
-          seqRefIds.put(mpc.getDseqFor(), ps);
+          seqRefIds.put(jmpid, ps);
         }
         else
         {
           jalview.bin.Cache.log.debug("reusing DseqFor ID");
         }
 
-        mp.setMappingChoice(mpc);
+        // mp.setMappingChoice(mpc);
       }
     }
     return mp;
   }
 
   String setUserColourScheme(jalview.schemes.ColourSchemeI cs,
-          List<UserColourScheme> userColours, JalviewModelSequence jms)
+          List<UserColourScheme> userColours, JalviewModel jm)
   {
     String id = null;
     jalview.schemes.UserColourScheme ucs = (jalview.schemes.UserColourScheme) cs;
@@ -2224,48 +2607,60 @@ public class Jalview2XML
     {
       // actually create the scheme's entry in the XML model
       java.awt.Color[] colours = ucs.getColours();
-      jalview.schemabinding.version2.UserColours uc = new jalview.schemabinding.version2.UserColours();
-      jalview.schemabinding.version2.UserColourScheme jbucs = new jalview.schemabinding.version2.UserColourScheme();
+      UserColours uc = new UserColours();
+      // UserColourScheme jbucs = new UserColourScheme();
+      JalviewUserColours jbucs = new JalviewUserColours();
 
       for (int i = 0; i < colours.length; i++)
       {
-        jalview.schemabinding.version2.Colour col = new jalview.schemabinding.version2.Colour();
+        Colour col = new Colour();
         col.setName(ResidueProperties.aa[i]);
         col.setRGB(jalview.util.Format.getHexString(colours[i]));
-        jbucs.addColour(col);
+        // jbucs.addColour(col);
+        jbucs.getColour().add(col);
       }
       if (ucs.getLowerCaseColours() != null)
       {
         colours = ucs.getLowerCaseColours();
         for (int i = 0; i < colours.length; i++)
         {
-          jalview.schemabinding.version2.Colour col = new jalview.schemabinding.version2.Colour();
+          Colour col = new Colour();
           col.setName(ResidueProperties.aa[i].toLowerCase());
           col.setRGB(jalview.util.Format.getHexString(colours[i]));
-          jbucs.addColour(col);
+          // jbucs.addColour(col);
+          jbucs.getColour().add(col);
         }
       }
 
       uc.setId(id);
       uc.setUserColourScheme(jbucs);
-      jms.addUserColours(uc);
+      // jm.addUserColours(uc);
+      jm.getUserColours().add(uc);
     }
 
     return id;
   }
 
   jalview.schemes.UserColourScheme getUserColourScheme(
-          JalviewModelSequence jms, String id)
+          JalviewModel jm, String id)
   {
-    UserColours[] uc = jms.getUserColours();
+    List<UserColours> uc = jm.getUserColours();
     UserColours colours = null;
-
+/*
     for (int i = 0; i < uc.length; i++)
     {
       if (uc[i].getId().equals(id))
       {
         colours = uc[i];
-
+        break;
+      }
+    }
+*/
+    for (UserColours c : uc)
+    {
+      if (c.getId().equals(id))
+      {
+        colours = c;
         break;
       }
     }
@@ -2275,19 +2670,22 @@ public class Jalview2XML
     for (int i = 0; i < 24; i++)
     {
       newColours[i] = new java.awt.Color(Integer.parseInt(
-              colours.getUserColourScheme().getColour(i).getRGB(), 16));
+              // colours.getUserColourScheme().getColour(i).getRGB(), 16));
+              colours.getUserColourScheme().getColour().get(i).getRGB(),
+              16));
     }
 
     jalview.schemes.UserColourScheme ucs = new jalview.schemes.UserColourScheme(
             newColours);
 
-    if (colours.getUserColourScheme().getColourCount() > 24)
+    if (colours.getUserColourScheme().getColour().size()/*Count()*/ > 24)
     {
       newColours = new java.awt.Color[23];
       for (int i = 0; i < 23; i++)
       {
         newColours[i] = new java.awt.Color(Integer.parseInt(
-                colours.getUserColourScheme().getColour(i + 24).getRGB(),
+                colours.getUserColourScheme().getColour().get(i + 24)
+                        .getRGB(),
                 16));
       }
       ucs.setLowerCaseColours(newColours);
@@ -2305,7 +2703,7 @@ public class Jalview2XML
    * flag to control whether the Jalview2XML_V1 parser should be deferred to if
    * exceptions are raised during project XML parsing
    */
-  public boolean attemptversion1parse = true;
+  public boolean attemptversion1parse = false;
 
   /**
    * Load a jalview project archive from a jar file
@@ -2329,8 +2727,10 @@ public class Jalview2XML
 
       jarInputStreamProvider jprovider = createjarInputStreamProvider(file);
       af = loadJalviewAlign(jprovider);
-      af.setMenusForViewport();
-
+      if (af != null)
+      {
+        af.setMenusForViewport();
+      }
     } catch (MalformedURLException e)
     {
       errorMessage = "Invalid URL format for '" + file + "'";
@@ -2435,32 +2835,45 @@ public class Jalview2XML
         if (jarentry != null && jarentry.getName().endsWith(".xml"))
         {
           InputStreamReader in = new InputStreamReader(jin, UTF_8);
-          JalviewModel object = new JalviewModel();
+          // JalviewModel object = new JalviewModel();
 
+          JAXBContext jc = JAXBContext
+                  .newInstance("jalview.xml.binding.jalview");
+          XMLStreamReader streamReader = XMLInputFactory.newInstance()
+                  .createXMLStreamReader(jin);
+          javax.xml.bind.Unmarshaller um = jc.createUnmarshaller();
+          JAXBElement<JalviewModel> jbe = um
+                  .unmarshal(streamReader, JalviewModel.class);
+          JalviewModel object = jbe.getValue();
+
+          /*
           Unmarshaller unmar = new Unmarshaller(object);
           unmar.setValidation(false);
           object = (JalviewModel) unmar.unmarshal(in);
+          */
           if (true) // !skipViewport(object))
           {
             _af = loadFromObject(object, file, true, jprovider);
-            if (_af != null && object.getJalviewModelSequence()
-                    .getViewportCount() > 0)
+            if (_af != null && object.getViewport().size() > 0)
+            // getJalviewModelSequence().getViewportCount() > 0)
             {
               if (af == null)
               {
                 // store a reference to the first view
                 af = _af;
               }
-              if (_af.viewport.isGatherViewsHere())
+              if (_af.getViewport().isGatherViewsHere())
               {
                 // if this is a gathered view, keep its reference since
                 // after gathering views, only this frame will remain
                 af = _af;
-                gatherToThisFrame.put(_af.viewport.getSequenceSetId(), _af);
+                gatherToThisFrame.put(_af.getViewport().getSequenceSetId(),
+                        _af);
               }
               // Save dataset to register mappings once all resolved
-              importedDatasets.put(af.viewport.getAlignment().getDataset(),
-                      af.viewport.getAlignment().getDataset());
+              importedDatasets.put(
+                      af.getViewport().getAlignment().getDataset(),
+                      af.getViewport().getAlignment().getDataset());
             }
           }
           entryCount++;
@@ -2484,16 +2897,7 @@ public class Jalview2XML
       ex.printStackTrace(System.err);
       if (attemptversion1parse)
       {
-        // Is Version 1 Jar file?
-        try
-        {
-          af = new Jalview2XML_V1(raiseGUI).LoadJalviewAlign(jprovider);
-        } catch (Exception ex2)
-        {
-          System.err.println("Exception whilst loading as jalviewXMLV1:");
-          ex2.printStackTrace();
-          af = null;
-        }
+        // used to attempt to parse as V1 castor-generated xml
       }
       if (Desktop.instance != null)
       {
@@ -2594,7 +2998,7 @@ public class Jalview2XML
           addedToSplitFrames.add(af);
           dnaFrame.setMenusForViewport();
           af.setMenusForViewport();
-          if (af.viewport.isGatherViewsHere())
+          if (af.getViewport().isGatherViewsHere())
           {
             gatherTo.add(sf);
           }
@@ -2613,8 +3017,8 @@ public class Jalview2XML
       if (!addedToSplitFrames.contains(af))
       {
         Viewport view = candidate.getKey();
-        Desktop.addInternalFrame(af, view.getTitle(), view.getWidth(),
-                view.getHeight());
+        Desktop.addInternalFrame(af, view.getTitle(),
+                safeInt(view.getWidth()), safeInt(view.getHeight()));
         af.setMenusForViewport();
         System.err.println("Failed to restore view " + view.getTitle()
                 + " to split frame");
@@ -2658,7 +3062,7 @@ public class Jalview2XML
      * And compute cDNA consensus (couldn't do earlier with consensus as
      * mappings were not yet present)
      */
-    proteinFrame.viewport.alignmentChanged(proteinFrame.alignPanel);
+    proteinFrame.getViewport().alignmentChanged(proteinFrame.alignPanel);
 
     return splitFrame;
   }
@@ -2846,7 +3250,7 @@ public class Jalview2XML
   /**
    * Load alignment frame from jalview XML DOM object
    * 
-   * @param object
+   * @param jalviewModel
    *          DOM
    * @param file
    *          filename source string
@@ -2856,18 +3260,43 @@ public class Jalview2XML
    *          data source provider
    * @return alignment frame created from view stored in DOM
    */
-  AlignFrame loadFromObject(JalviewModel object, String file,
+  AlignFrame loadFromObject(JalviewModel jalviewModel, String file,
           boolean loadTreesAndStructures, jarInputStreamProvider jprovider)
   {
-    SequenceSet vamsasSet = object.getVamsasModel().getSequenceSet(0);
-    Sequence[] vamsasSeq = vamsasSet.getSequence();
+    SequenceSet vamsasSet = jalviewModel.getVamsasModel().getSequenceSet().get(0);
+    List<Sequence> vamsasSeqs = vamsasSet.getSequence();
 
-    JalviewModelSequence jms = object.getJalviewModelSequence();
+    // JalviewModelSequence jms = object.getJalviewModelSequence();
 
-    Viewport view = (jms.getViewportCount() > 0) ? jms.getViewport(0)
+    // Viewport view = (jms.getViewportCount() > 0) ? jms.getViewport(0)
+    // : null;
+    Viewport view = (jalviewModel.getViewport().size() > 0)
+            ? jalviewModel.getViewport().get(0)
             : null;
 
     // ////////////////////////////////
+    // INITIALISE ALIGNMENT SEQUENCESETID AND VIEWID
+    //
+    //
+    // If we just load in the same jar file again, the sequenceSetId
+    // will be the same, and we end up with multiple references
+    // to the same sequenceSet. We must modify this id on load
+    // so that each load of the file gives a unique id
+
+    /**
+     * used to resolve correct alignment dataset for alignments with multiple
+     * views
+     */
+    String uniqueSeqSetId = null;
+    String viewId = null;
+    if (view != null)
+    {
+      uniqueSeqSetId = view.getSequenceSetId() + uniqueSetSuffix;
+      viewId = (view.getId() == null ? null
+              : view.getId() + uniqueSetSuffix);
+    }
+
+    // ////////////////////////////////
     // LOAD SEQUENCES
 
     List<SequenceI> hiddenSeqs = null;
@@ -2876,11 +3305,13 @@ public class Jalview2XML
 
     boolean multipleView = false;
     SequenceI referenceseqForView = null;
-    JSeq[] jseqs = object.getJalviewModelSequence().getJSeq();
+    // JSeq[] jseqs = object.getJalviewModelSequence().getJSeq();
+    List<JSeq> jseqs = jalviewModel.getJSeq();
     int vi = 0; // counter in vamsasSeq array
-    for (int i = 0; i < jseqs.length; i++)
+    for (int i = 0; i < jseqs.size(); i++)
     {
-      String seqId = jseqs[i].getId();
+      JSeq jseq = jseqs.get(i);
+      String seqId = jseq.getId();
 
       SequenceI tmpSeq = seqRefIds.get(seqId);
       if (tmpSeq != null)
@@ -2888,25 +3319,26 @@ public class Jalview2XML
         if (!incompleteSeqs.containsKey(seqId))
         {
           // may not need this check, but keep it for at least 2.9,1 release
-          if (tmpSeq.getStart() != jseqs[i].getStart()
-                  || tmpSeq.getEnd() != jseqs[i].getEnd())
+          if (tmpSeq.getStart() != jseq.getStart()
+                  || tmpSeq.getEnd() != jseq.getEnd())
           {
             System.err.println(
                     "Warning JAL-2154 regression: updating start/end for sequence "
-                            + tmpSeq.toString() + " to " + jseqs[i]);
+                            + tmpSeq.toString() + " to " + jseq);
           }
         }
         else
         {
           incompleteSeqs.remove(seqId);
         }
-        if (vamsasSeq.length > vi && vamsasSeq[vi].getId().equals(seqId))
+        if (vamsasSeqs.size() > vi
+                && vamsasSeqs.get(vi).getId().equals(seqId))
         {
           // most likely we are reading a dataset XML document so
           // update from vamsasSeq section of XML for this sequence
-          tmpSeq.setName(vamsasSeq[vi].getName());
-          tmpSeq.setDescription(vamsasSeq[vi].getDescription());
-          tmpSeq.setSequence(vamsasSeq[vi].getSequence());
+          tmpSeq.setName(vamsasSeqs.get(vi).getName());
+          tmpSeq.setDescription(vamsasSeqs.get(vi).getDescription());
+          tmpSeq.setSequence(vamsasSeqs.get(vi).getSequence());
           vi++;
         }
         else
@@ -2914,29 +3346,30 @@ public class Jalview2XML
           // reading multiple views, so vamsasSeq set is a subset of JSeq
           multipleView = true;
         }
-        tmpSeq.setStart(jseqs[i].getStart());
-        tmpSeq.setEnd(jseqs[i].getEnd());
+        tmpSeq.setStart(jseq.getStart());
+        tmpSeq.setEnd(jseq.getEnd());
         tmpseqs.add(tmpSeq);
       }
       else
       {
-        tmpSeq = new jalview.datamodel.Sequence(vamsasSeq[vi].getName(),
-                vamsasSeq[vi].getSequence());
-        tmpSeq.setDescription(vamsasSeq[vi].getDescription());
-        tmpSeq.setStart(jseqs[i].getStart());
-        tmpSeq.setEnd(jseqs[i].getEnd());
+        Sequence vamsasSeq = vamsasSeqs.get(vi);
+        tmpSeq = new jalview.datamodel.Sequence(vamsasSeq.getName(),
+                vamsasSeq.getSequence());
+        tmpSeq.setDescription(vamsasSeq.getDescription());
+        tmpSeq.setStart(jseq.getStart());
+        tmpSeq.setEnd(jseq.getEnd());
         tmpSeq.setVamsasId(uniqueSetSuffix + seqId);
-        seqRefIds.put(vamsasSeq[vi].getId(), tmpSeq);
+        seqRefIds.put(vamsasSeq.getId(), tmpSeq);
         tmpseqs.add(tmpSeq);
         vi++;
       }
 
-      if (jseqs[i].hasViewreference() && jseqs[i].getViewreference())
+      if (safeBoolean(jseq.isViewreference()))
       {
         referenceseqForView = tmpseqs.get(tmpseqs.size() - 1);
       }
 
-      if (jseqs[i].getHidden())
+      if (jseq.isHidden() != null && jseq.isHidden().booleanValue())
       {
         if (hiddenSeqs == null)
         {
@@ -2965,8 +3398,7 @@ public class Jalview2XML
     }
     else
     {
-      boolean isdsal = object.getJalviewModelSequence()
-              .getViewportCount() == 0;
+      boolean isdsal = jalviewModel.getViewport().isEmpty();
       if (isdsal)
       {
         // we are importing a dataset record, so
@@ -2985,7 +3417,7 @@ public class Jalview2XML
 
       // finally, verify all data in vamsasSet is actually present in al
       // passing on flag indicating if it is actually a stored dataset
-      recoverDatasetFor(vamsasSet, al, isdsal);
+      recoverDatasetFor(vamsasSet, al, isdsal, uniqueSeqSetId);
     }
 
     if (referenceseqForView != null)
@@ -2993,9 +3425,10 @@ public class Jalview2XML
       al.setSeqrep(referenceseqForView);
     }
     // / Add the alignment properties
-    for (int i = 0; i < vamsasSet.getSequenceSetPropertiesCount(); i++)
+    for (int i = 0; i < vamsasSet.getSequenceSetProperties().size(); i++)
     {
-      SequenceSetProperties ssp = vamsasSet.getSequenceSetProperties(i);
+      SequenceSetProperties ssp = vamsasSet.getSequenceSetProperties()
+              .get(i);
       al.setProperty(ssp.getKey(), ssp.getValue());
     }
 
@@ -3012,26 +3445,27 @@ public class Jalview2XML
       // now, for 2.10 projects, this is also done if the xml doc includes
       // dataset sequences not actually present in any particular view.
       //
-      for (int i = 0; i < vamsasSeq.length; i++)
+      for (int i = 0; i < vamsasSeqs.size(); i++)
       {
-        if (jseqs[i].getFeaturesCount() > 0)
+        JSeq jseq = jseqs.get(i);
+        if (jseq.getFeatures().size() > 0)
         {
-          Features[] features = jseqs[i].getFeatures();
-          for (int f = 0; f < features.length; f++)
+          List<Feature> features = jseq.getFeatures();
+          for (int f = 0; f < features.size(); f++)
           {
-            SequenceFeature sf = new SequenceFeature(features[f].getType(),
-                    features[f].getDescription(), features[f].getBegin(),
-                    features[f].getEnd(), features[f].getScore(),
-                    features[f].getFeatureGroup());
-            sf.setStatus(features[f].getStatus());
+            Feature feat = features.get(f);
+            SequenceFeature sf = new SequenceFeature(feat.getType(),
+                    feat.getDescription(), feat.getBegin(), feat.getEnd(),
+                    safeFloat(feat.getScore()), feat.getFeatureGroup());
+            sf.setStatus(feat.getStatus());
 
             /*
              * load any feature attributes - include map-valued attributes
              */
             Map<String, Map<String, String>> mapAttributes = new HashMap<>();
-            for (int od = 0; od < features[f].getOtherDataCount(); od++)
+            for (int od = 0; od < feat.getOtherData().size(); od++)
             {
-              OtherData keyValue = features[f].getOtherData(od);
+              OtherData keyValue = feat.getOtherData().get(od);
               String attributeName = keyValue.getKey();
               String attributeValue = keyValue.getValue();
               if (attributeName.startsWith("LINK"))
@@ -3068,27 +3502,28 @@ public class Jalview2XML
             al.getSequenceAt(i).addSequenceFeature(sf);
           }
         }
-        if (vamsasSeq[i].getDBRefCount() > 0)
+        if (vamsasSeqs.get(i).getDBRef().size() > 0)
         {
           // adds dbrefs to datasequence's set (since Jalview 2.10)
           addDBRefs(
                   al.getSequenceAt(i).getDatasetSequence() == null
                           ? al.getSequenceAt(i)
                           : al.getSequenceAt(i).getDatasetSequence(),
-                  vamsasSeq[i]);
+                  vamsasSeqs.get(i));
         }
-        if (jseqs[i].getPdbidsCount() > 0)
+        if (jseq.getPdbids().size() > 0)
         {
-          Pdbids[] ids = jseqs[i].getPdbids();
-          for (int p = 0; p < ids.length; p++)
+          List<Pdbids> ids = jseq.getPdbids();
+          for (int p = 0; p < ids.size(); p++)
           {
+            Pdbids pdbid = ids.get(p);
             jalview.datamodel.PDBEntry entry = new jalview.datamodel.PDBEntry();
-            entry.setId(ids[p].getId());
-            if (ids[p].getType() != null)
+            entry.setId(pdbid.getId());
+            if (pdbid.getType() != null)
             {
-              if (PDBEntry.Type.getType(ids[p].getType()) != null)
+              if (PDBEntry.Type.getType(pdbid.getType()) != null)
               {
-                entry.setType(PDBEntry.Type.getType(ids[p].getType()));
+                entry.setType(PDBEntry.Type.getType(pdbid.getType()));
               }
               else
               {
@@ -3096,21 +3531,22 @@ public class Jalview2XML
               }
             }
             // jprovider is null when executing 'New View'
-            if (ids[p].getFile() != null && jprovider != null)
+            if (pdbid.getFile() != null && jprovider != null)
             {
-              if (!pdbloaded.containsKey(ids[p].getFile()))
+              if (!pdbloaded.containsKey(pdbid.getFile()))
               {
-                entry.setFile(loadPDBFile(jprovider, ids[p].getId(),
-                        ids[p].getFile()));
+                entry.setFile(loadPDBFile(jprovider, pdbid.getId(),
+                        pdbid.getFile()));
               }
               else
               {
-                entry.setFile(pdbloaded.get(ids[p].getId()).toString());
+                entry.setFile(pdbloaded.get(pdbid.getId()).toString());
               }
             }
-            if (ids[p].getPdbentryItem() != null)
+            /*
+            if (pdbid.getPdbentryItem() != null)
             {
-              for (PdbentryItem item : ids[p].getPdbentryItem())
+              for (PdbentryItem item : pdbid.getPdbentryItem())
               {
                 for (Property pr : item.getProperty())
                 {
@@ -3118,6 +3554,11 @@ public class Jalview2XML
                 }
               }
             }
+            */
+            for (Property prop : pdbid.getProperty())
+            {
+              entry.setProperty(prop.getName(), prop.getValue());
+            }
             StructureSelectionManager
                     .getStructureSelectionManager(Desktop.instance)
                     .registerPDBEntry(entry);
@@ -3138,26 +3579,27 @@ public class Jalview2XML
     // ///////////////////////////////
     // LOAD SEQUENCE MAPPINGS
 
-    if (vamsasSet.getAlcodonFrameCount() > 0)
+    if (vamsasSet.getAlcodonFrame().size() > 0)
     {
       // TODO Potentially this should only be done once for all views of an
       // alignment
-      AlcodonFrame[] alc = vamsasSet.getAlcodonFrame();
-      for (int i = 0; i < alc.length; i++)
+      List<AlcodonFrame> alc = vamsasSet.getAlcodonFrame();
+      for (int i = 0; i < alc.size(); i++)
       {
         AlignedCodonFrame cf = new AlignedCodonFrame();
-        if (alc[i].getAlcodMapCount() > 0)
+        if (alc.get(i).getAlcodMap().size() > 0)
         {
-          AlcodMap[] maps = alc[i].getAlcodMap();
-          for (int m = 0; m < maps.length; m++)
+          List<AlcodMap> maps = alc.get(i).getAlcodMap();
+          for (int m = 0; m < maps.size(); m++)
           {
-            SequenceI dnaseq = seqRefIds.get(maps[m].getDnasq());
+            AlcodMap map = maps.get(m);
+            SequenceI dnaseq = seqRefIds.get(map.getDnasq());
             // Load Mapping
             jalview.datamodel.Mapping mapping = null;
             // attach to dna sequence reference.
-            if (maps[m].getMapping() != null)
+            if (map.getMapping() != null)
             {
-              mapping = addMapping(maps[m].getMapping());
+              mapping = addMapping(map.getMapping());
               if (dnaseq != null && mapping.getTo() != null)
               {
                 cf.addMap(dnaseq, mapping.getTo(), mapping.getMap());
@@ -3166,7 +3608,7 @@ public class Jalview2XML
               {
                 // defer to later
                 frefedSequence.add(
-                        newAlcodMapRef(maps[m].getDnasq(), cf, mapping));
+                        newAlcodMapRef(map.getDnasq(), cf, mapping));
               }
             }
           }
@@ -3184,13 +3626,13 @@ public class Jalview2XML
      */
     Map<String, List<AlignmentAnnotation>> groupAnnotRefs = new Hashtable<>();
 
-    if (vamsasSet.getAnnotationCount() > 0)
+    if (vamsasSet.getAnnotation().size()/*Count()*/ > 0)
     {
-      Annotation[] an = vamsasSet.getAnnotation();
+      List<Annotation> an = vamsasSet.getAnnotation();
 
-      for (int i = 0; i < an.length; i++)
+      for (int i = 0; i < an.size(); i++)
       {
-        Annotation annotation = an[i];
+        Annotation annotation = an.get(i);
 
         /**
          * test if annotation is automatically calculated for this view only
@@ -3202,29 +3644,29 @@ public class Jalview2XML
         {
           // Kludge for pre 2.5 projects which lacked the autocalculated flag
           autoForView = true;
-          if (!annotation.hasAutoCalculated())
-          {
-            annotation.setAutoCalculated(true);
-          }
+          // JAXB has no has() test; schema defaults value to false
+          // if (!annotation.hasAutoCalculated())
+          // {
+          // annotation.setAutoCalculated(true);
+          // }
         }
-        if (autoForView || (annotation.hasAutoCalculated()
-                && annotation.isAutoCalculated()))
+        if (autoForView || annotation.isAutoCalculated())
         {
           // remove ID - we don't recover annotation from other views for
           // view-specific annotation
           annotation.setId(null);
         }
 
-        // set visiblity for other annotation in this view
+        // set visibility for other annotation in this view
         String annotationId = annotation.getId();
         if (annotationId != null && annotationIds.containsKey(annotationId))
         {
           AlignmentAnnotation jda = annotationIds.get(annotationId);
           // in principle Visible should always be true for annotation displayed
           // in multiple views
-          if (annotation.hasVisible())
+          if (annotation.isVisible() != null)
           {
-            jda.visible = annotation.getVisible();
+            jda.visible = annotation.isVisible();
           }
 
           al.addAnnotation(jda);
@@ -3232,41 +3674,36 @@ public class Jalview2XML
           continue;
         }
         // Construct new annotation from model.
-        AnnotationElement[] ae = annotation.getAnnotationElement();
+        List<AnnotationElement> ae = annotation.getAnnotationElement();
         jalview.datamodel.Annotation[] anot = null;
         java.awt.Color firstColour = null;
         int anpos;
-        if (!annotation.getScoreOnly())
+        if (!annotation.isScoreOnly())
         {
           anot = new jalview.datamodel.Annotation[al.getWidth()];
-          for (int aa = 0; aa < ae.length && aa < anot.length; aa++)
+          for (int aa = 0; aa < ae.size() && aa < anot.length; aa++)
           {
-            anpos = ae[aa].getPosition();
+            AnnotationElement annElement = ae.get(aa);
+            anpos = annElement.getPosition();
 
             if (anpos >= anot.length)
             {
               continue;
             }
 
+            float value = safeFloat(annElement.getValue());
             anot[anpos] = new jalview.datamodel.Annotation(
-
-                    ae[aa].getDisplayCharacter(), ae[aa].getDescription(),
-                    (ae[aa].getSecondaryStructure() == null
-                            || ae[aa].getSecondaryStructure().length() == 0)
-                                    ? ' '
-                                    : ae[aa].getSecondaryStructure()
-                                            .charAt(0),
-                    ae[aa].getValue()
-
-            );
-            // JBPNote: Consider verifying dataflow for IO of secondary
-            // structure annotation read from Stockholm files
-            // this was added to try to ensure that
-            // if (anot[ae[aa].getPosition()].secondaryStructure>' ')
-            // {
-            // anot[ae[aa].getPosition()].displayCharacter = "";
-            // }
-            anot[anpos].colour = new java.awt.Color(ae[aa].getColour());
+                    annElement.getDisplayCharacter(),
+                    annElement.getDescription(),
+                    (annElement.getSecondaryStructure() == null
+                            || annElement.getSecondaryStructure()
+                                    .length() == 0)
+                                            ? ' '
+                                            : annElement
+                                                    .getSecondaryStructure()
+                                                    .charAt(0),
+                    value);
+            anot[anpos].colour = new Color(safeInt(annElement.getColour()));
             if (firstColour == null)
             {
               firstColour = anot[anpos].colour;
@@ -3275,7 +3712,7 @@ public class Jalview2XML
         }
         jalview.datamodel.AlignmentAnnotation jaa = null;
 
-        if (annotation.getGraph())
+        if (annotation.isGraph())
         {
           float llim = 0, hlim = 0;
           // if (autoForView || an[i].isAutoCalculated()) {
@@ -3283,18 +3720,17 @@ public class Jalview2XML
           // }
           jaa = new jalview.datamodel.AlignmentAnnotation(
                   annotation.getLabel(), annotation.getDescription(), anot,
-                  llim, hlim, annotation.getGraphType());
+                  llim, hlim, safeInt(annotation.getGraphType()));
 
-          jaa.graphGroup = annotation.getGraphGroup();
+          jaa.graphGroup = safeInt(annotation.getGraphGroup());
           jaa._linecolour = firstColour;
           if (annotation.getThresholdLine() != null)
           {
             jaa.setThreshold(new jalview.datamodel.GraphLine(
-                    annotation.getThresholdLine().getValue(),
+                    safeFloat(annotation.getThresholdLine().getValue()),
                     annotation.getThresholdLine().getLabel(),
-                    new java.awt.Color(
-                            annotation.getThresholdLine().getColour())));
-
+                    new java.awt.Color(safeInt(
+                            annotation.getThresholdLine().getColour()))));
           }
           if (autoForView || annotation.isAutoCalculated())
           {
@@ -3305,18 +3741,18 @@ public class Jalview2XML
         }
         else
         {
-          jaa = new jalview.datamodel.AlignmentAnnotation(an[i].getLabel(),
-                  an[i].getDescription(), anot);
+          jaa = new jalview.datamodel.AlignmentAnnotation(
+                  annotation.getLabel(), annotation.getDescription(), anot);
           jaa._linecolour = firstColour;
         }
         // register new annotation
-        if (an[i].getId() != null)
+        if (annotation.getId() != null)
         {
-          annotationIds.put(an[i].getId(), jaa);
-          jaa.annotationId = an[i].getId();
+          annotationIds.put(annotation.getId(), jaa);
+          jaa.annotationId = annotation.getId();
         }
         // recover sequence association
-        String sequenceRef = an[i].getSequenceRef();
+        String sequenceRef = annotation.getSequenceRef();
         if (sequenceRef != null)
         {
           // from 2.9 sequenceRef is to sequence id (JAL-1781)
@@ -3333,55 +3769,54 @@ public class Jalview2XML
           }
         }
         // and make a note of any group association
-        if (an[i].getGroupRef() != null && an[i].getGroupRef().length() > 0)
+        if (annotation.getGroupRef() != null
+                && annotation.getGroupRef().length() > 0)
         {
           List<jalview.datamodel.AlignmentAnnotation> aal = groupAnnotRefs
-                  .get(an[i].getGroupRef());
+                  .get(annotation.getGroupRef());
           if (aal == null)
           {
             aal = new ArrayList<>();
-            groupAnnotRefs.put(an[i].getGroupRef(), aal);
+            groupAnnotRefs.put(annotation.getGroupRef(), aal);
           }
           aal.add(jaa);
         }
 
-        if (an[i].hasScore())
+        if (annotation.getScore() != null)
         {
-          jaa.setScore(an[i].getScore());
+          jaa.setScore(annotation.getScore().doubleValue());
         }
-        if (an[i].hasVisible())
+        if (annotation.isVisible() != null)
         {
-          jaa.visible = an[i].getVisible();
+          jaa.visible = annotation.isVisible().booleanValue();
         }
 
-        if (an[i].hasCentreColLabels())
+        if (annotation.isCentreColLabels() != null)
         {
-          jaa.centreColLabels = an[i].getCentreColLabels();
+          jaa.centreColLabels = annotation.isCentreColLabels()
+                  .booleanValue();
         }
 
-        if (an[i].hasScaleColLabels())
+        if (annotation.isScaleColLabels() != null)
         {
-          jaa.scaleColLabel = an[i].getScaleColLabels();
+          jaa.scaleColLabel = annotation.isScaleColLabels().booleanValue();
         }
-        if (an[i].hasAutoCalculated() && an[i].isAutoCalculated())
+        if (annotation.isAutoCalculated())
         {
           // newer files have an 'autoCalculated' flag and store calculation
           // state in viewport properties
           jaa.autoCalculated = true; // means annotation will be marked for
           // update at end of load.
         }
-        if (an[i].hasGraphHeight())
+        if (annotation.getGraphHeight() != null)
         {
-          jaa.graphHeight = an[i].getGraphHeight();
+          jaa.graphHeight = annotation.getGraphHeight().intValue();
         }
-        if (an[i].hasBelowAlignment())
+        jaa.belowAlignment = annotation.isBelowAlignment();
+        jaa.setCalcId(annotation.getCalcId());
+        if (annotation.getProperty().size() > 0)
         {
-          jaa.belowAlignment = an[i].isBelowAlignment();
-        }
-        jaa.setCalcId(an[i].getCalcId());
-        if (an[i].getPropertyCount() > 0)
-        {
-          for (jalview.schemabinding.version2.Property prop : an[i]
+          for (Annotation.Property prop : annotation
                   .getProperty())
           {
             jaa.setProperty(prop.getName(), prop.getValue());
@@ -3403,19 +3838,19 @@ public class Jalview2XML
     // ///////////////////////
     // LOAD GROUPS
     // Create alignment markup and styles for this view
-    if (jms.getJGroupCount() > 0)
+    if (jalviewModel.getJGroup().size() > 0)
     {
-      JGroup[] groups = jms.getJGroup();
+      List<JGroup> groups = jalviewModel.getJGroup();
       boolean addAnnotSchemeGroup = false;
-      for (int i = 0; i < groups.length; i++)
+      for (int i = 0; i < groups.size(); i++)
       {
-        JGroup jGroup = groups[i];
+        JGroup jGroup = groups.get(i);
         ColourSchemeI cs = null;
         if (jGroup.getColour() != null)
         {
           if (jGroup.getColour().startsWith("ucs"))
           {
-            cs = getUserColourScheme(jms, jGroup.getColour());
+            cs = getUserColourScheme(jalviewModel, jGroup.getColour());
           }
           else if (jGroup.getColour().equals("AnnotationColourGradient")
                   && jGroup.getAnnotationColours() != null)
@@ -3424,17 +3859,17 @@ public class Jalview2XML
           }
           else
           {
-            cs = ColourSchemeProperty.getColourScheme(al,
+            cs = ColourSchemeProperty.getColourScheme(null, al,
                     jGroup.getColour());
           }
         }
-        int pidThreshold = jGroup.getPidThreshold();
+        int pidThreshold = safeInt(jGroup.getPidThreshold());
 
         Vector<SequenceI> seqs = new Vector<>();
 
-        for (int s = 0; s < jGroup.getSeqCount(); s++)
+        for (int s = 0; s < jGroup.getSeq().size(); s++)
         {
-          String seqId = jGroup.getSeq(s) + "";
+          String seqId = jGroup.getSeq().get(s);
           SequenceI ts = seqRefIds.get(seqId);
 
           if (ts != null)
@@ -3449,37 +3884,26 @@ public class Jalview2XML
         }
 
         SequenceGroup sg = new SequenceGroup(seqs, jGroup.getName(), cs,
-                jGroup.getDisplayBoxes(), jGroup.getDisplayText(),
-                jGroup.getColourText(), jGroup.getStart(), jGroup.getEnd());
+                safeBoolean(jGroup.isDisplayBoxes()),
+                safeBoolean(jGroup.isDisplayText()),
+                safeBoolean(jGroup.isColourText()),
+                safeInt(jGroup.getStart()), safeInt(jGroup.getEnd()));
         sg.getGroupColourScheme().setThreshold(pidThreshold, true);
         sg.getGroupColourScheme()
-                .setConservationInc(jGroup.getConsThreshold());
-        sg.setOutlineColour(new java.awt.Color(jGroup.getOutlineColour()));
-
-        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 = jGroup.getTextColThreshold();
-        if (jGroup.hasShowConsensusHistogram())
-        {
+                .setConservationInc(safeInt(jGroup.getConsThreshold()));
+        sg.setOutlineColour(new Color(safeInt(jGroup.getOutlineColour())));
+
+        sg.textColour = new Color(safeInt(jGroup.getTextCol1()));
+        sg.textColour2 = new Color(safeInt(jGroup.getTextCol2()));
+        sg.setShowNonconserved(safeBoolean(jGroup.isShowUnconserved()));
+        sg.thresholdTextColour = safeInt(jGroup.getTextColThreshold());
+        // attributes with a default in the schema are never null
           sg.setShowConsensusHistogram(jGroup.isShowConsensusHistogram());
-        }
-        ;
-        if (jGroup.hasShowSequenceLogo())
-        {
           sg.setshowSequenceLogo(jGroup.isShowSequenceLogo());
-        }
-        if (jGroup.hasNormaliseSequenceLogo())
-        {
           sg.setNormaliseSequenceLogo(jGroup.isNormaliseSequenceLogo());
-        }
-        if (jGroup.hasIgnoreGapsinConsensus())
-        {
-          sg.setIgnoreGapsConsensus(jGroup.getIgnoreGapsinConsensus());
-        }
-        if (jGroup.getConsThreshold() != 0)
+        sg.setIgnoreGapsConsensus(jGroup.isIgnoreGapsinConsensus());
+        if (jGroup.getConsThreshold() != null
+                && jGroup.getConsThreshold().intValue() != 0)
         {
           Conservation c = new Conservation("All", sg.getSequences(null), 0,
                   sg.getWidth() - 1);
@@ -3521,7 +3945,7 @@ public class Jalview2XML
         {
           // reconstruct the annotation colourscheme
           sg.setColourScheme(constructAnnotationColour(
-                  jGroup.getAnnotationColours(), null, al, jms, false));
+                  jGroup.getAnnotationColours(), null, al, jalviewModel, false));
         }
       }
     }
@@ -3533,13 +3957,6 @@ public class Jalview2XML
     // ///////////////////////////////
     // LOAD VIEWPORT
 
-    // If we just load in the same jar file again, the sequenceSetId
-    // will be the same, and we end up with multiple references
-    // to the same sequenceSet. We must modify this id on load
-    // so that each load of the file gives a unique id
-    String uniqueSeqSetId = view.getSequenceSetId() + uniqueSetSuffix;
-    String viewId = (view.getId() == null ? null
-            : view.getId() + uniqueSetSuffix);
     AlignFrame af = null;
     AlignViewport av = null;
     // now check to see if we really need to create a new viewport.
@@ -3578,7 +3995,7 @@ public class Jalview2XML
      * Jalview 2.8.1 behaviour)
      */
     boolean doGroupAnnColour = Jalview2XML.isVersionStringLaterThan("2.8.1",
-            object.getVersion());
+            jalviewModel.getVersion());
 
     AlignmentPanel ap = null;
     boolean isnewview = true;
@@ -3607,9 +4024,9 @@ public class Jalview2XML
 
     if (isnewview)
     {
-      af = loadViewport(file, jseqs, hiddenSeqs, al, jms, view,
+      af = loadViewport(file, jseqs, hiddenSeqs, al, jalviewModel, view,
               uniqueSeqSetId, viewId, autoAlan);
-      av = af.viewport;
+      av = af.getViewport();
       ap = af.alignPanel;
     }
 
@@ -3620,7 +4037,8 @@ public class Jalview2XML
      */
     if (loadTreesAndStructures)
     {
-      loadTrees(jms, view, af, av, ap);
+      loadTrees(jalviewModel, view, af, av, ap);
+      loadPCAViewers(jalviewModel, ap);
       loadPDBStructures(jprovider, jseqs, af, ap);
       loadRnaViewers(jprovider, jseqs, ap);
     }
@@ -3642,7 +4060,7 @@ public class Jalview2XML
    * @param ap
    */
   private void loadRnaViewers(jarInputStreamProvider jprovider,
-          JSeq[] jseqs, AlignmentPanel ap)
+          List<JSeq> jseqs, AlignmentPanel ap)
   {
     /*
      * scan the sequences for references to viewers; create each one the first
@@ -3650,15 +4068,15 @@ public class Jalview2XML
      */
     for (JSeq jseq : jseqs)
     {
-      for (int i = 0; i < jseq.getRnaViewerCount(); i++)
+      for (int i = 0; i < jseq.getRnaViewer().size(); i++)
       {
-        RnaViewer viewer = jseq.getRnaViewer(i);
+        RnaViewer viewer = jseq.getRnaViewer().get(i);
         AppVarna appVarna = findOrCreateVarnaViewer(viewer, uniqueSetSuffix,
                 ap);
 
-        for (int j = 0; j < viewer.getSecondaryStructureCount(); j++)
+        for (int j = 0; j < viewer.getSecondaryStructure().size(); j++)
         {
-          SecondaryStructure ss = viewer.getSecondaryStructure(j);
+          SecondaryStructure ss = viewer.getSecondaryStructure().get(j);
           SequenceI seq = seqRefIds.get(jseq.getId());
           AlignmentAnnotation ann = this.annotationIds
                   .get(ss.getAnnotationId());
@@ -3667,7 +4085,7 @@ public class Jalview2XML
            * add the structure to the Varna display (with session state copied
            * from the jar to a temporary file)
            */
-          boolean gapped = ss.isGapped();
+          boolean gapped = safeBoolean(ss.isGapped());
           String rnaTitle = ss.getTitle();
           String sessionState = ss.getViewerState();
           String tempStateFile = copyJarEntry(jprovider, sessionState,
@@ -3675,7 +4093,7 @@ public class Jalview2XML
           RnaModel rna = new RnaModel(rnaTitle, ann, seq, null, gapped);
           appVarna.addModelSession(rna, rnaTitle, tempStateFile);
         }
-        appVarna.setInitialSelection(viewer.getSelectedRna());
+        appVarna.setInitialSelection(safeInt(viewer.getSelectedRna()));
       }
     }
   }
@@ -3716,8 +4134,9 @@ public class Jalview2XML
      * viewer not found - make it
      */
     RnaViewerModel model = new RnaViewerModel(postLoadId, viewer.getTitle(),
-            viewer.getXpos(), viewer.getYpos(), viewer.getWidth(),
-            viewer.getHeight(), viewer.getDividerLocation());
+            safeInt(viewer.getXpos()), safeInt(viewer.getYpos()),
+            safeInt(viewer.getWidth()), safeInt(viewer.getHeight()),
+            safeInt(viewer.getDividerLocation()));
     AppVarna varna = new AppVarna(model, ap);
 
     return varna;
@@ -3726,30 +4145,30 @@ public class Jalview2XML
   /**
    * Load any saved trees
    * 
-   * @param jms
+   * @param jm
    * @param view
    * @param af
    * @param av
    * @param ap
    */
-  protected void loadTrees(JalviewModelSequence jms, Viewport view,
+  protected void loadTrees(JalviewModel jm, 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++)
+      for (int t = 0; t < jm.getTree().size(); t++)
       {
 
-        Tree tree = jms.getTree(t);
+        Tree tree = jm.getTree().get(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());
+          tp = af.showNewickTree(new NewickFile(tree.getNewick()),
+                  tree.getTitle(), safeInt(tree.getWidth()),
+                  safeInt(tree.getHeight()), safeInt(tree.getXpos()),
+                  safeInt(tree.getYpos()));
           if (tree.getId() != null)
           {
             // perhaps bind the tree id to something ?
@@ -3761,15 +4180,15 @@ public class Jalview2XML
           // 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.setBounds(new Rectangle(safeInt(tree.getXpos()),
+                  safeInt(tree.getYpos()), safeInt(tree.getWidth()),
+                  safeInt(tree.getHeight())));
+          tp.setViewport(av); // af.viewport;
+          // TODO: verify 'associate with all views' works still
+          tp.getTreeCanvas().setViewport(av); // af.viewport;
+          tp.getTreeCanvas().setAssociatedPanel(ap); // af.alignPanel;
+        }
+        tp.getTreeCanvas().setApplyToAllViews(tree.isLinkToAllViews());
         if (tp == null)
         {
           warn("There was a problem recovering stored Newick tree: \n"
@@ -3777,29 +4196,31 @@ public class Jalview2XML
           continue;
         }
 
-        tp.fitToWindow.setState(tree.getFitToWindow());
+        tp.fitToWindow.setState(safeBoolean(tree.isFitToWindow()));
         tp.fitToWindow_actionPerformed(null);
 
         if (tree.getFontName() != null)
         {
-          tp.setTreeFont(new java.awt.Font(tree.getFontName(),
-                  tree.getFontStyle(), tree.getFontSize()));
+          tp.setTreeFont(
+                  new Font(tree.getFontName(), safeInt(tree.getFontStyle()),
+                          safeInt(tree.getFontSize())));
         }
         else
         {
-          tp.setTreeFont(new java.awt.Font(view.getFontName(),
-                  view.getFontStyle(), tree.getFontSize()));
+          tp.setTreeFont(
+                  new Font(view.getFontName(), safeInt(view.getFontStyle()),
+                          safeInt(view.getFontSize())));
         }
 
-        tp.showPlaceholders(tree.getMarkUnlinked());
-        tp.showBootstrap(tree.getShowBootstrap());
-        tp.showDistances(tree.getShowDistances());
+        tp.showPlaceholders(safeBoolean(tree.isMarkUnlinked()));
+        tp.showBootstrap(safeBoolean(tree.isShowBootstrap()));
+        tp.showDistances(safeBoolean(tree.isShowDistances()));
 
-        tp.treeCanvas.threshold = tree.getThreshold();
+        tp.getTreeCanvas().setThreshold(safeFloat(tree.getThreshold()));
 
-        if (tree.getCurrentTree())
+        if (safeBoolean(tree.isCurrentTree()))
         {
-          af.viewport.setCurrentTree(tp.getTree());
+          af.getViewport().setCurrentTree(tp.getTree());
         }
       }
 
@@ -3818,7 +4239,7 @@ public class Jalview2XML
    * @param ap
    */
   protected void loadPDBStructures(jarInputStreamProvider jprovider,
-          JSeq[] jseqs, AlignFrame af, AlignmentPanel ap)
+          List<JSeq> jseqs, AlignFrame af, AlignmentPanel ap)
   {
     /*
      * Run through all PDB ids on the alignment, and collect mappings between
@@ -3826,41 +4247,43 @@ public class Jalview2XML
      */
     Map<String, StructureViewerModel> structureViewers = new LinkedHashMap<>();
 
-    for (int i = 0; i < jseqs.length; i++)
+    for (int i = 0; i < jseqs.size(); i++)
     {
-      if (jseqs[i].getPdbidsCount() > 0)
+      JSeq jseq = jseqs.get(i);
+      if (jseq.getPdbids().size() > 0)
       {
-        Pdbids[] ids = jseqs[i].getPdbids();
-        for (int p = 0; p < ids.length; p++)
+        List<Pdbids> ids = jseq.getPdbids();
+        for (int p = 0; p < ids.size(); p++)
         {
-          final int structureStateCount = ids[p].getStructureStateCount();
+          Pdbids pdbid = ids.get(p);
+          final int structureStateCount = pdbid.getStructureState().size();
           for (int s = 0; s < structureStateCount; s++)
           {
             // check to see if we haven't already created this structure view
-            final StructureState structureState = ids[p]
-                    .getStructureState(s);
+            final StructureState structureState = pdbid
+                    .getStructureState().get(s);
             String sviewid = (structureState.getViewId() == null) ? null
                     : structureState.getViewId() + uniqueSetSuffix;
             jalview.datamodel.PDBEntry jpdb = new jalview.datamodel.PDBEntry();
-            // Originally : ids[p].getFile()
+            // Originally : pdbid.getFile()
             // : TODO: verify external PDB file recovery still works in normal
             // jalview project load
-            jpdb.setFile(loadPDBFile(jprovider, ids[p].getId(),
-                    ids[p].getFile()));
-            jpdb.setId(ids[p].getId());
+            jpdb.setFile(
+                    loadPDBFile(jprovider, pdbid.getId(), pdbid.getFile()));
+            jpdb.setId(pdbid.getId());
 
-            int x = structureState.getXpos();
-            int y = structureState.getYpos();
-            int width = structureState.getWidth();
-            int height = structureState.getHeight();
+            int x = safeInt(structureState.getXpos());
+            int y = safeInt(structureState.getYpos());
+            int width = safeInt(structureState.getWidth());
+            int height = safeInt(structureState.getHeight());
 
             // Probably don't need to do this anymore...
             // Desktop.desktop.getComponentAt(x, y);
             // TODO: NOW: check that this recovers the PDB file correctly.
-            String pdbFile = loadPDBFile(jprovider, ids[p].getId(),
-                    ids[p].getFile());
+            String pdbFile = loadPDBFile(jprovider, pdbid.getId(),
+                    pdbid.getFile());
             jalview.datamodel.SequenceI seq = seqRefIds
-                    .get(jseqs[i].getId() + "");
+                    .get(jseq.getId() + "");
             if (sviewid == null)
             {
               sviewid = "_jalview_pre2_4_" + x + "," + y + "," + width + ","
@@ -3883,19 +4306,14 @@ public class Jalview2XML
             // linkAlignPanel,superposeWithAlignpanel}} from hash
             StructureViewerModel jmoldat = structureViewers.get(sviewid);
             jmoldat.setAlignWithPanel(jmoldat.isAlignWithPanel()
-                    | (structureState.hasAlignwithAlignPanel()
-                            ? structureState.getAlignwithAlignPanel()
-                            : false));
+                    || structureState.isAlignwithAlignPanel());
 
             /*
              * Default colour by linked panel to false if not specified (e.g.
              * for pre-2.7 projects)
              */
             boolean colourWithAlignPanel = jmoldat.isColourWithAlignPanel();
-            colourWithAlignPanel |= (structureState
-                    .hasColourwithAlignPanel()
-                            ? structureState.getColourwithAlignPanel()
-                            : false);
+            colourWithAlignPanel |= structureState.isColourwithAlignPanel();
             jmoldat.setColourWithAlignPanel(colourWithAlignPanel);
 
             /*
@@ -3903,27 +4321,23 @@ public class Jalview2XML
              * pre-2.7 projects)
              */
             boolean colourByViewer = jmoldat.isColourByViewer();
-            colourByViewer &= structureState.hasColourByJmol()
-                    ? structureState.getColourByJmol()
-                    : true;
+            colourByViewer &= structureState.isColourByJmol();
             jmoldat.setColourByViewer(colourByViewer);
 
             if (jmoldat.getStateData().length() < structureState
-                    .getContent().length())
+                    .getValue()/*Content()*/.length())
             {
-              {
-                jmoldat.setStateData(structureState.getContent());
-              }
+              jmoldat.setStateData(structureState.getValue());// Content());
             }
-            if (ids[p].getFile() != null)
+            if (pdbid.getFile() != null)
             {
-              File mapkey = new File(ids[p].getFile());
+              File mapkey = new File(pdbid.getFile());
               StructureData seqstrmaps = jmoldat.getFileData().get(mapkey);
               if (seqstrmaps == null)
               {
                 jmoldat.getFileData().put(mapkey,
                         seqstrmaps = jmoldat.new StructureData(pdbFile,
-                                ids[p].getId()));
+                                pdbid.getId()));
               }
               if (!seqstrmaps.getSeqList().contains(seq))
               {
@@ -4418,46 +4832,47 @@ public class Jalview2XML
     }
   }
 
-  AlignFrame loadViewport(String file, JSeq[] JSEQ,
+  AlignFrame loadViewport(String file, List<JSeq> JSEQ,
           List<SequenceI> hiddenSeqs, AlignmentI al,
-          JalviewModelSequence jms, Viewport view, String uniqueSeqSetId,
+          JalviewModel jm, Viewport view, String uniqueSeqSetId,
           String viewId, List<JvAnnotRow> autoAlan)
   {
     AlignFrame af = null;
-    af = new AlignFrame(al, view.getWidth(), view.getHeight(),
-            uniqueSeqSetId, viewId);
+    af = new AlignFrame(al, safeInt(view.getWidth()),
+            safeInt(view.getHeight()), uniqueSeqSetId, viewId);
 
     af.setFileName(file, FileFormat.Jalview);
 
-    for (int i = 0; i < JSEQ.length; i++)
+    final AlignViewport viewport = af.getViewport();
+    for (int i = 0; i < JSEQ.size(); i++)
     {
-      af.viewport.setSequenceColour(
-              af.viewport.getAlignment().getSequenceAt(i),
-              new java.awt.Color(JSEQ[i].getColour()));
+      int colour = safeInt(JSEQ.get(i).getColour());
+      viewport.setSequenceColour(viewport.getAlignment().getSequenceAt(i),
+              new Color(colour));
     }
 
     if (al.hasSeqrep())
     {
-      af.getViewport().setColourByReferenceSeq(true);
-      af.getViewport().setDisplayReferenceSeq(true);
+      viewport.setColourByReferenceSeq(true);
+      viewport.setDisplayReferenceSeq(true);
     }
 
-    af.viewport.setGatherViewsHere(view.getGatheredViews());
+    viewport.setGatherViewsHere(safeBoolean(view.isGatheredViews()));
 
     if (view.getSequenceSetId() != null)
     {
       AlignmentViewport av = viewportsAdded.get(uniqueSeqSetId);
 
-      af.viewport.setSequenceSetId(uniqueSeqSetId);
+      viewport.setSequenceSetId(uniqueSeqSetId);
       if (av != null)
       {
         // propagate shared settings to this new view
-        af.viewport.setHistoryList(av.getHistoryList());
-        af.viewport.setRedoList(av.getRedoList());
+        viewport.setHistoryList(av.getHistoryList());
+        viewport.setRedoList(av.getRedoList());
       }
       else
       {
-        viewportsAdded.put(uniqueSeqSetId, af.viewport);
+        viewportsAdded.put(uniqueSeqSetId, viewport);
       }
       // TODO: check if this method can be called repeatedly without
       // side-effects if alignpanel already registered.
@@ -4466,15 +4881,15 @@ public class Jalview2XML
     // apply Hidden regions to view.
     if (hiddenSeqs != null)
     {
-      for (int s = 0; s < JSEQ.length; s++)
+      for (int s = 0; s < JSEQ.size(); s++)
       {
         SequenceGroup hidden = new SequenceGroup();
         boolean isRepresentative = false;
-        for (int r = 0; r < JSEQ[s].getHiddenSequencesCount(); r++)
+        for (int r = 0; r < JSEQ.get(s).getHiddenSequences().size(); r++)
         {
           isRepresentative = true;
           SequenceI sequenceToHide = al
-                  .getSequenceAt(JSEQ[s].getHiddenSequences(r));
+                  .getSequenceAt(JSEQ.get(s).getHiddenSequences().get(r));
           hidden.addSequence(sequenceToHide, false);
           // remove from hiddenSeqs list so we don't try to hide it twice
           hiddenSeqs.remove(sequenceToHide);
@@ -4483,56 +4898,59 @@ public class Jalview2XML
         {
           SequenceI representativeSequence = al.getSequenceAt(s);
           hidden.addSequence(representativeSequence, false);
-          af.viewport.hideRepSequences(representativeSequence, hidden);
+          viewport.hideRepSequences(representativeSequence, hidden);
         }
       }
 
       SequenceI[] hseqs = hiddenSeqs
               .toArray(new SequenceI[hiddenSeqs.size()]);
-      af.viewport.hideSequence(hseqs);
+      viewport.hideSequence(hseqs);
 
     }
     // recover view properties and display parameters
 
-    af.viewport.setShowAnnotation(view.getShowAnnotation());
-    af.viewport.setAbovePIDThreshold(view.getPidSelected());
-    af.viewport.setThreshold(view.getPidThreshold());
-
-    af.viewport.setColourText(view.getShowColourText());
-
-    af.viewport.setConservationSelected(view.getConservationSelected());
-    af.viewport.setIncrement(view.getConsThreshold());
-    af.viewport.setShowJVSuffix(view.getShowFullId());
-    af.viewport.setRightAlignIds(view.getRightAlignIds());
-    af.viewport.setFont(new java.awt.Font(view.getFontName(),
-            view.getFontStyle(), view.getFontSize()), true);
-    ViewStyleI vs = af.viewport.getViewStyle();
+    viewport.setShowAnnotation(safeBoolean(view.isShowAnnotation()));
+    viewport.setAbovePIDThreshold(safeBoolean(view.isPidSelected()));
+    final int pidThreshold = safeInt(view.getPidThreshold());
+    viewport.setThreshold(pidThreshold);
+
+    viewport.setColourText(safeBoolean(view.isShowColourText()));
+
+    viewport
+            .setConservationSelected(
+                    safeBoolean(view.isConservationSelected()));
+    viewport.setIncrement(safeInt(view.getConsThreshold()));
+    viewport.setShowJVSuffix(safeBoolean(view.isShowFullId()));
+    viewport.setRightAlignIds(safeBoolean(view.isRightAlignIds()));
+    viewport.setFont(new Font(view.getFontName(),
+            safeInt(view.getFontStyle()), safeInt(view.getFontSize())),
+            true);
+    ViewStyleI vs = viewport.getViewStyle();
     vs.setScaleProteinAsCdna(view.isScaleProteinAsCdna());
-    af.viewport.setViewStyle(vs);
+    viewport.setViewStyle(vs);
     // TODO: allow custom charWidth/Heights to be restored by updating them
     // after setting font - which means set above to false
-    af.viewport.setRenderGaps(view.getRenderGaps());
-    af.viewport.setWrapAlignment(view.getWrapAlignment());
-    af.viewport.setShowAnnotation(view.getShowAnnotation());
+    viewport.setRenderGaps(safeBoolean(view.isRenderGaps()));
+    viewport.setWrapAlignment(safeBoolean(view.isWrapAlignment()));
+    viewport.setShowAnnotation(safeBoolean(view.isShowAnnotation()));
 
-    af.viewport.setShowBoxes(view.getShowBoxes());
+    viewport.setShowBoxes(safeBoolean(view.isShowBoxes()));
 
-    af.viewport.setShowText(view.getShowText());
+    viewport.setShowText(safeBoolean(view.isShowText()));
 
-    af.viewport.setTextColour(new java.awt.Color(view.getTextCol1()));
-    af.viewport.setTextColour2(new java.awt.Color(view.getTextCol2()));
-    af.viewport.setThresholdTextColour(view.getTextColThreshold());
-    af.viewport.setShowUnconserved(
-            view.hasShowUnconserved() ? view.isShowUnconserved() : false);
-    af.viewport.getRanges().setStartRes(view.getStartRes());
+    viewport.setTextColour(new Color(safeInt(view.getTextCol1())));
+    viewport.setTextColour2(new Color(safeInt(view.getTextCol2())));
+    viewport.setThresholdTextColour(safeInt(view.getTextColThreshold()));
+    viewport.setShowUnconserved(view.isShowUnconserved());
+    viewport.getRanges().setStartRes(safeInt(view.getStartRes()));
 
     if (view.getViewName() != null)
     {
-      af.viewport.viewName = view.getViewName();
+      viewport.setViewName(view.getViewName());
       af.setInitialTabVisible();
     }
-    af.setBounds(view.getXpos(), view.getYpos(), view.getWidth(),
-            view.getHeight());
+    af.setBounds(safeInt(view.getXpos()), safeInt(view.getYpos()),
+            safeInt(view.getWidth()), safeInt(view.getHeight()));
     // startSeq set in af.alignPanel.updateLayout below
     af.alignPanel.updateLayout();
     ColourSchemeI cs = null;
@@ -4541,130 +4959,84 @@ public class Jalview2XML
     {
       if (view.getBgColour().startsWith("ucs"))
       {
-        cs = getUserColourScheme(jms, view.getBgColour());
+        cs = getUserColourScheme(jm, view.getBgColour());
       }
       else if (view.getBgColour().startsWith("Annotation"))
       {
-        AnnotationColours viewAnnColour = view.getAnnotationColours();
-        cs = constructAnnotationColour(viewAnnColour, af, al, jms, true);
+        AnnotationColourScheme viewAnnColour = view.getAnnotationColours();
+        cs = constructAnnotationColour(viewAnnColour, af, al, jm, true);
 
         // annpos
 
       }
       else
       {
-        cs = ColourSchemeProperty.getColourScheme(al, view.getBgColour());
+        cs = ColourSchemeProperty.getColourScheme(af.getViewport(), al,
+                view.getBgColour());
       }
     }
 
-    af.viewport.setGlobalColourScheme(cs);
-    af.viewport.getResidueShading().setThreshold(view.getPidThreshold(),
-            view.getIgnoreGapsinConsensus());
-    af.viewport.getResidueShading()
-            .setConsensus(af.viewport.getSequenceConsensusHash());
-    af.viewport.setColourAppliesToAllGroups(false);
-
-    if (view.getConservationSelected() && cs != null)
+    /*
+     * turn off 'alignment colour applies to all groups'
+     * while restoring global colour scheme
+     */
+    viewport.setColourAppliesToAllGroups(false);
+    viewport.setGlobalColourScheme(cs);
+    viewport.getResidueShading().setThreshold(pidThreshold,
+            view.isIgnoreGapsinConsensus());
+    viewport.getResidueShading()
+            .setConsensus(viewport.getSequenceConsensusHash());
+    if (safeBoolean(view.isConservationSelected()) && cs != null)
     {
-      af.viewport.getResidueShading()
-              .setConservationInc(view.getConsThreshold());
+      viewport.getResidueShading()
+              .setConservationInc(safeInt(view.getConsThreshold()));
     }
-
     af.changeColour(cs);
-
-    af.viewport.setColourAppliesToAllGroups(true);
-
-    af.viewport.setShowSequenceFeatures(view.getShowSequenceFeatures());
-
-    if (view.hasCentreColumnLabels())
-    {
-      af.viewport.setCentreColumnLabels(view.getCentreColumnLabels());
-    }
-    if (view.hasIgnoreGapsinConsensus())
-    {
-      af.viewport.setIgnoreGapsConsensus(view.getIgnoreGapsinConsensus(),
-              null);
-    }
-    if (view.hasFollowHighlight())
-    {
-      af.viewport.setFollowHighlight(view.getFollowHighlight());
-    }
-    if (view.hasFollowSelection())
-    {
-      af.viewport.followSelection = view.getFollowSelection();
-    }
-    if (view.hasShowConsensusHistogram())
-    {
-      af.viewport
-              .setShowConsensusHistogram(view.getShowConsensusHistogram());
-    }
-    else
-    {
-      af.viewport.setShowConsensusHistogram(true);
-    }
-    if (view.hasShowSequenceLogo())
-    {
-      af.viewport.setShowSequenceLogo(view.getShowSequenceLogo());
-    }
-    else
-    {
-      af.viewport.setShowSequenceLogo(false);
-    }
-    if (view.hasNormaliseSequenceLogo())
-    {
-      af.viewport.setNormaliseSequenceLogo(view.getNormaliseSequenceLogo());
-    }
-    if (view.hasShowDbRefTooltip())
-    {
-      af.viewport.setShowDBRefs(view.getShowDbRefTooltip());
-    }
-    if (view.hasShowNPfeatureTooltip())
-    {
-      af.viewport.setShowNPFeats(view.hasShowNPfeatureTooltip());
-    }
-    if (view.hasShowGroupConsensus())
-    {
-      af.viewport.setShowGroupConsensus(view.getShowGroupConsensus());
-    }
-    else
-    {
-      af.viewport.setShowGroupConsensus(false);
-    }
-    if (view.hasShowGroupConservation())
-    {
-      af.viewport.setShowGroupConservation(view.getShowGroupConservation());
-    }
-    else
-    {
-      af.viewport.setShowGroupConservation(false);
-    }
+    viewport.setColourAppliesToAllGroups(true);
+
+    viewport
+            .setShowSequenceFeatures(
+                    safeBoolean(view.isShowSequenceFeatures()));
+
+    viewport.setCentreColumnLabels(view.isCentreColumnLabels());
+    viewport.setIgnoreGapsConsensus(view.isIgnoreGapsinConsensus(), null);
+    viewport.setFollowHighlight(view.isFollowHighlight());
+    viewport.followSelection = view.isFollowSelection();
+    viewport.setShowConsensusHistogram(view.isShowConsensusHistogram());
+    viewport.setShowSequenceLogo(view.isShowSequenceLogo());
+    viewport.setNormaliseSequenceLogo(view.isNormaliseSequenceLogo());
+    viewport.setShowDBRefs(safeBoolean(view.isShowDbRefTooltip()));
+    viewport.setShowNPFeats(safeBoolean(view.isShowNPfeatureTooltip()));
+    viewport.setShowGroupConsensus(view.isShowGroupConsensus());
+    viewport.setShowGroupConservation(view.isShowGroupConservation());
 
     // recover feature settings
-    if (jms.getFeatureSettings() != null)
+    if (jm.getFeatureSettings() != null)
     {
       FeatureRenderer fr = af.alignPanel.getSeqPanel().seqCanvas
               .getFeatureRenderer();
       FeaturesDisplayed fdi;
-      af.viewport.setFeaturesDisplayed(fdi = new FeaturesDisplayed());
-      String[] renderOrder = new String[jms.getFeatureSettings()
-              .getSettingCount()];
+      viewport.setFeaturesDisplayed(fdi = new FeaturesDisplayed());
+      String[] renderOrder = new String[jm.getFeatureSettings()
+              .getSetting().size()];
       Map<String, FeatureColourI> featureColours = new Hashtable<>();
       Map<String, Float> featureOrder = new Hashtable<>();
 
-      for (int fs = 0; fs < jms.getFeatureSettings()
-              .getSettingCount(); fs++)
+      for (int fs = 0; fs < jm.getFeatureSettings()
+              .getSetting().size(); fs++)
       {
-        Setting setting = jms.getFeatureSettings().getSetting(fs);
+        Setting setting = jm.getFeatureSettings().getSetting().get(fs);
         String featureType = setting.getType();
 
         /*
          * restore feature filters (if any)
          */
-        MatcherSet filters = setting.getMatcherSet();
+        jalview.xml.binding.jalview.FeatureMatcherSet filters = setting
+                .getMatcherSet();
         if (filters != null)
         {
           FeatureMatcherSetI filter = Jalview2XML
-                  .unmarshalFilter(featureType, filters);
+                  .parseFilter(featureType, filters);
           if (!filter.isEmpty())
           {
             fr.setFeatureFilter(featureType, filter);
@@ -4675,13 +5047,13 @@ public class Jalview2XML
          * restore feature colour scheme
          */
         Color maxColour = new Color(setting.getColour());
-        if (setting.hasMincolour())
+        if (setting.getMincolour() != null)
         {
           /*
            * minColour is always set unless a simple colour
            * (including for colour by label though it doesn't use it)
            */
-          Color minColour = new Color(setting.getMincolour());
+          Color minColour = new Color(setting.getMincolour().intValue());
           Color noValueColour = minColour;
           NoValueColour noColour = setting.getNoValueColour();
           if (noColour == NoValueColour.NONE)
@@ -4692,18 +5064,21 @@ public class Jalview2XML
           {
             noValueColour = maxColour;
           }
-          float min = setting.hasMin() ? setting.getMin() : 0f;
-          float max = setting.hasMin() ? setting.getMax() : 1f;
-          FeatureColourI gc = new FeatureColour(minColour, maxColour,
+          float min = safeFloat(safeFloat(setting.getMin()));
+          float max = setting.getMax() == null ? 1f
+                  : setting.getMax().floatValue();
+          FeatureColourI gc = new FeatureColour(maxColour, minColour,
+                  maxColour,
                   noValueColour, min, max);
-          if (setting.getAttributeNameCount() > 0)
+          if (setting.getAttributeName().size() > 0)
           {
-            gc.setAttributeName(setting.getAttributeName());
+            gc.setAttributeName(setting.getAttributeName().toArray(
+                    new String[setting.getAttributeName().size()]));
           }
-          if (setting.hasThreshold())
+          if (setting.getThreshold() != null)
           {
-            gc.setThreshold(setting.getThreshold());
-            int threshstate = setting.getThreshstate();
+            gc.setThreshold(setting.getThreshold().floatValue());
+            int threshstate = safeInt(setting.getThreshstate());
             // -1 = None, 0 = Below, 1 = Above threshold
             if (threshstate == 0)
             {
@@ -4715,13 +5090,13 @@ public class Jalview2XML
             }
           }
           gc.setAutoScaled(true); // default
-          if (setting.hasAutoScale())
+          if (setting.isAutoScale() != null)
           {
-            gc.setAutoScaled(setting.getAutoScale());
+            gc.setAutoScaled(setting.isAutoScale());
           }
-          if (setting.hasColourByLabel())
+          if (setting.isColourByLabel() != null)
           {
-            gc.setColourByLabel(setting.getColourByLabel());
+            gc.setColourByLabel(setting.isColourByLabel());
           }
           // and put in the feature colour table.
           featureColours.put(featureType, gc);
@@ -4732,25 +5107,25 @@ public class Jalview2XML
                   new FeatureColour(maxColour));
         }
         renderOrder[fs] = featureType;
-        if (setting.hasOrder())
+        if (setting.getOrder() != null)
         {
-          featureOrder.put(featureType, setting.getOrder());
+          featureOrder.put(featureType, setting.getOrder().floatValue());
         }
         else
         {
           featureOrder.put(featureType, new Float(
-                  fs / jms.getFeatureSettings().getSettingCount()));
+                  fs / jm.getFeatureSettings().getSetting().size()));
         }
-        if (setting.getDisplay())
+        if (safeBoolean(setting.isDisplay()))
         {
           fdi.setVisible(featureType);
         }
       }
       Map<String, Boolean> fgtable = new Hashtable<>();
-      for (int gs = 0; gs < jms.getFeatureSettings().getGroupCount(); gs++)
+      for (int gs = 0; gs < jm.getFeatureSettings().getGroup().size(); gs++)
       {
-        Group grp = jms.getFeatureSettings().getGroup(gs);
-        fgtable.put(grp.getName(), new Boolean(grp.getDisplay()));
+        Group grp = jm.getFeatureSettings().getGroup().get(gs);
+        fgtable.put(grp.getName(), new Boolean(grp.isDisplay()));
       }
       // FeatureRendererSettings frs = new FeatureRendererSettings(renderOrder,
       // fgtable, featureColours, jms.getFeatureSettings().hasTransparency() ?
@@ -4760,13 +5135,13 @@ public class Jalview2XML
       fr.transferSettings(frs);
     }
 
-    if (view.getHiddenColumnsCount() > 0)
+    if (view.getHiddenColumns().size() > 0)
     {
-      for (int c = 0; c < view.getHiddenColumnsCount(); c++)
+      for (int c = 0; c < view.getHiddenColumns().size(); c++)
       {
-        af.viewport.hideColumns(view.getHiddenColumns(c).getStart(),
-                view.getHiddenColumns(c).getEnd() // +1
-        );
+        final HiddenColumns hc = view.getHiddenColumns().get(c);
+        viewport.hideColumns(safeInt(hc.getStart()),
+                safeInt(hc.getEnd()) /* +1 */);
       }
     }
     if (view.getCalcIdParam() != null)
@@ -4775,7 +5150,7 @@ public class Jalview2XML
       {
         if (calcIdParam != null)
         {
-          if (recoverCalcIdParam(calcIdParam, af.viewport))
+          if (recoverCalcIdParam(calcIdParam, viewport))
           {
           }
           else
@@ -4786,7 +5161,7 @@ public class Jalview2XML
         }
       }
     }
-    af.setMenusFromViewport(af.viewport);
+    af.setMenusFromViewport(viewport);
     af.setTitle(view.getTitle());
     // TODO: we don't need to do this if the viewport is aready visible.
     /*
@@ -4797,8 +5172,8 @@ public class Jalview2XML
     String complementaryViewId = view.getComplementId();
     if (complementaryViewId == null)
     {
-      Desktop.addInternalFrame(af, view.getTitle(), view.getWidth(),
-              view.getHeight());
+      Desktop.addInternalFrame(af, view.getTitle(),
+              safeInt(view.getWidth()), safeInt(view.getHeight()));
       // recompute any autoannotation
       af.alignPanel.updateAnnotation(false, true);
       reorderAutoannotation(af, al, autoAlan);
@@ -4817,16 +5192,17 @@ public class Jalview2XML
    * @param viewAnnColour
    * @param af
    * @param al
-   * @param jms
+   * @param model
    * @param checkGroupAnnColour
    * @return
    */
   private ColourSchemeI constructAnnotationColour(
-          AnnotationColours viewAnnColour, AlignFrame af, AlignmentI al,
-          JalviewModelSequence jms, boolean checkGroupAnnColour)
+          AnnotationColourScheme viewAnnColour, AlignFrame af,
+          AlignmentI al, JalviewModel model, boolean checkGroupAnnColour)
   {
     boolean propagateAnnColour = false;
-    AlignmentI annAlignment = af != null ? af.viewport.getAlignment() : al;
+    AlignmentI annAlignment = af != null ? af.getViewport().getAlignment()
+            : al;
     if (checkGroupAnnColour && al.getGroups() != null
             && al.getGroups().size() > 0)
     {
@@ -4872,34 +5248,36 @@ public class Jalview2XML
     }
     if (matchedAnnotation.getThreshold() == null)
     {
-      matchedAnnotation.setThreshold(new GraphLine(
-              viewAnnColour.getThreshold(), "Threshold", Color.black));
+      matchedAnnotation.setThreshold(
+              new GraphLine(safeFloat(viewAnnColour.getThreshold()),
+                      "Threshold", Color.black));
     }
 
     AnnotationColourGradient cs = null;
     if (viewAnnColour.getColourScheme().equals("None"))
     {
       cs = new AnnotationColourGradient(matchedAnnotation,
-              new Color(viewAnnColour.getMinColour()),
-              new Color(viewAnnColour.getMaxColour()),
-              viewAnnColour.getAboveThreshold());
+              new Color(safeInt(viewAnnColour.getMinColour())),
+              new Color(safeInt(viewAnnColour.getMaxColour())),
+              safeInt(viewAnnColour.getAboveThreshold()));
     }
     else if (viewAnnColour.getColourScheme().startsWith("ucs"))
     {
       cs = new AnnotationColourGradient(matchedAnnotation,
-              getUserColourScheme(jms, viewAnnColour.getColourScheme()),
-              viewAnnColour.getAboveThreshold());
+              getUserColourScheme(model, viewAnnColour.getColourScheme()),
+              safeInt(viewAnnColour.getAboveThreshold()));
     }
     else
     {
       cs = new AnnotationColourGradient(matchedAnnotation,
-              ColourSchemeProperty.getColourScheme(al,
+              ColourSchemeProperty.getColourScheme(af.getViewport(), al,
                       viewAnnColour.getColourScheme()),
-              viewAnnColour.getAboveThreshold());
+              safeInt(viewAnnColour.getAboveThreshold()));
     }
 
-    boolean perSequenceOnly = viewAnnColour.isPerSequence();
-    boolean useOriginalColours = viewAnnColour.isPredefinedColours();
+    boolean perSequenceOnly = safeBoolean(viewAnnColour.isPerSequence());
+    boolean useOriginalColours = safeBoolean(
+            viewAnnColour.isPredefinedColours());
     cs.setSeqAssociated(perSequenceOnly);
     cs.setPredefinedColours(useOriginalColours);
 
@@ -4916,7 +5294,7 @@ public class Jalview2XML
 
         AnnotationColourGradient groupScheme = new AnnotationColourGradient(
                 matchedAnnotation, sg.getColourScheme(),
-                viewAnnColour.getAboveThreshold());
+                safeInt(viewAnnColour.getAboveThreshold()));
         sg.setColourScheme(groupScheme);
         groupScheme.setSeqAssociated(perSequenceOnly);
         groupScheme.setPredefinedColours(useOriginalColours);
@@ -5050,10 +5428,8 @@ public class Jalview2XML
     {
       return false;
     }
-    String id;
-    if (skipList.containsKey(
-            id = object.getJalviewModelSequence().getViewport()[0]
-                    .getSequenceSetId()))
+    String id = object.getViewport().get(0).getSequenceSetId();
+    if (skipList.containsKey(id))
     {
       if (Cache.log != null && Cache.log.isDebugEnabled())
       {
@@ -5083,19 +5459,57 @@ public class Jalview2XML
   }
 
   private void recoverDatasetFor(SequenceSet vamsasSet, AlignmentI al,
-          boolean ignoreUnrefed)
+          boolean ignoreUnrefed, String uniqueSeqSetId)
   {
     jalview.datamodel.AlignmentI ds = getDatasetFor(
             vamsasSet.getDatasetId());
+    AlignmentI xtant_ds = ds;
+    if (xtant_ds == null)
+    {
+      // good chance we are about to create a new dataset, but check if we've
+      // seen some of the dataset sequence IDs before.
+      // TODO: skip this check if we are working with project generated by
+      // version 2.11 or later
+      xtant_ds = checkIfHasDataset(vamsasSet.getSequence());
+      if (xtant_ds != null)
+      {
+        ds = xtant_ds;
+        addDatasetRef(vamsasSet.getDatasetId(), ds);
+      }
+    }
     Vector dseqs = null;
+    if (!ignoreUnrefed)
+    {
+      // recovering an alignment View
+      AlignmentI seqSetDS = getDatasetFor(UNIQSEQSETID + uniqueSeqSetId);
+      if (seqSetDS != null)
+      {
+        if (ds != null && ds != seqSetDS)
+        {
+          warn("JAL-3171 regression: Overwriting a dataset reference for an alignment"
+                  + " - CDS/Protein crossreference data may be lost");
+          if (xtant_ds != null)
+          {
+            // This can only happen if the unique sequence set ID was bound to a
+            // dataset that did not contain any of the sequences in the view
+            // currently being restored.
+            warn("JAL-3171 SERIOUS!  TOTAL CONFUSION - please consider contacting the Jalview Development team so they can investigate why your project caused this message to be displayed.");
+          }
+        }
+        ds = seqSetDS;
+        addDatasetRef(vamsasSet.getDatasetId(), ds);
+      }
+    }
     if (ds == null)
     {
+      // try even harder to restore dataset
+      AlignmentI xtantDS = checkIfHasDataset(vamsasSet.getSequence());
       // create a list of new dataset sequences
       dseqs = new Vector();
     }
-    for (int i = 0, iSize = vamsasSet.getSequenceCount(); i < iSize; i++)
+    for (int i = 0, iSize = vamsasSet.getSequence().size(); i < iSize; i++)
     {
-      Sequence vamsasSeq = vamsasSet.getSequence(i);
+      Sequence vamsasSeq = vamsasSet.getSequence().get(i);
       ensureJalviewDatasetSequence(vamsasSeq, ds, dseqs, ignoreUnrefed, i);
     }
     // create a new dataset
@@ -5112,10 +5526,58 @@ public class Jalview2XML
     if (al.getDataset() == null && !ignoreUnrefed)
     {
       al.setDataset(ds);
+      // register dataset for the alignment's uniqueSeqSetId for legacy projects
+      addDatasetRef(UNIQSEQSETID + uniqueSeqSetId, ds);
     }
+    updateSeqDatasetBinding(vamsasSet.getSequence(), ds);
   }
 
   /**
+   * XML dataset sequence ID to materialised dataset reference
+   */
+  HashMap<String, AlignmentI> seqToDataset = new HashMap<>();
+
+  /**
+   * @return the first materialised dataset reference containing a dataset
+   *         sequence referenced in the given view
+   * @param list
+   *          - sequences from the view
+   */
+  AlignmentI checkIfHasDataset(List<Sequence> list)
+  {
+    for (Sequence restoredSeq : list)
+    {
+      AlignmentI datasetFor = seqToDataset.get(restoredSeq.getDsseqid());
+      if (datasetFor != null)
+      {
+        return datasetFor;
+      }
+    }
+    return null;
+  }
+
+  /**
+   * Register ds as the containing dataset for the dataset sequences referenced
+   * by sequences in list
+   * 
+   * @param list
+   *          - sequences in a view
+   * @param ds
+   */
+  void updateSeqDatasetBinding(List<Sequence> list, AlignmentI ds)
+  {
+    for (Sequence restoredSeq : list)
+    {
+      AlignmentI prevDS = seqToDataset.put(restoredSeq.getDsseqid(), ds);
+      if (prevDS != null && prevDS != ds)
+      {
+        warn("Dataset sequence appears in many datasets: "
+                + restoredSeq.getDsseqid());
+        // TODO: try to merge!
+      }
+    }
+  }
+  /**
    * 
    * @param vamsasSeq
    *          sequence definition to create/merge dataset sequence for
@@ -5338,13 +5800,11 @@ public class Jalview2XML
 
   private void addDBRefs(SequenceI datasetSequence, Sequence sequence)
   {
-    for (int d = 0; d < sequence.getDBRefCount(); d++)
+    for (int d = 0; d < sequence.getDBRef().size(); d++)
     {
-      DBRef dr = sequence.getDBRef(d);
+      DBRef dr = sequence.getDBRef().get(d);
       jalview.datamodel.DBRefEntry entry = new jalview.datamodel.DBRefEntry(
-              sequence.getDBRef(d).getSource(),
-              sequence.getDBRef(d).getVersion(),
-              sequence.getDBRef(d).getAccessionId());
+              dr.getSource(), dr.getVersion(), dr.getAccessionId());
       if (dr.getMapping() != null)
       {
         entry.setMap(addMapping(dr.getMapping()));
@@ -5357,88 +5817,89 @@ public class Jalview2XML
   {
     SequenceI dsto = null;
     // Mapping m = dr.getMapping();
-    int fr[] = new int[m.getMapListFromCount() * 2];
-    Enumeration f = m.enumerateMapListFrom();
-    for (int _i = 0; f.hasMoreElements(); _i += 2)
+    int fr[] = new int[m.getMapListFrom().size() * 2];
+    Iterator<MapListFrom> from = m.getMapListFrom().iterator();// enumerateMapListFrom();
+    for (int _i = 0; from.hasNext(); _i += 2)
     {
-      MapListFrom mf = (MapListFrom) f.nextElement();
+      MapListFrom mf = from.next();
       fr[_i] = mf.getStart();
       fr[_i + 1] = mf.getEnd();
     }
-    int fto[] = new int[m.getMapListToCount() * 2];
-    f = m.enumerateMapListTo();
-    for (int _i = 0; f.hasMoreElements(); _i += 2)
+    int fto[] = new int[m.getMapListTo().size() * 2];
+    Iterator<MapListTo> to = m.getMapListTo().iterator();// enumerateMapListTo();
+    for (int _i = 0; to.hasNext(); _i += 2)
     {
-      MapListTo mf = (MapListTo) f.nextElement();
+      MapListTo mf = to.next();
       fto[_i] = mf.getStart();
       fto[_i + 1] = mf.getEnd();
     }
     jalview.datamodel.Mapping jmap = new jalview.datamodel.Mapping(dsto, fr,
-            fto, (int) m.getMapFromUnit(), (int) m.getMapToUnit());
-    if (m.getMappingChoice() != null)
+            fto, m.getMapFromUnit().intValue(),
+            m.getMapToUnit().intValue());
+
+    /*
+     * (optional) choice of dseqFor or Sequence
+     */
+    if (m.getDseqFor() != null)
     {
-      MappingChoice mc = m.getMappingChoice();
-      if (mc.getDseqFor() != null)
+      String dsfor = m.getDseqFor();
+      if (seqRefIds.containsKey(dsfor))
       {
-        String dsfor = "" + mc.getDseqFor();
-        if (seqRefIds.containsKey(dsfor))
-        {
-          /**
-           * recover from hash
-           */
-          jmap.setTo(seqRefIds.get(dsfor));
-        }
-        else
-        {
-          frefedSequence.add(newMappingRef(dsfor, jmap));
-        }
+        /*
+         * recover from hash
+         */
+        jmap.setTo(seqRefIds.get(dsfor));
       }
       else
       {
-        /**
-         * local sequence definition
+        frefedSequence.add(newMappingRef(dsfor, jmap));
+      }
+    }
+    else if (m.getSequence() != null)
+    {
+      /*
+       * local sequence definition
+       */
+      Sequence ms = m.getSequence();
+      SequenceI djs = null;
+      String sqid = ms.getDsseqid();
+      if (sqid != null && sqid.length() > 0)
+      {
+        /*
+         * recover dataset sequence
          */
-        Sequence ms = mc.getSequence();
-        SequenceI djs = null;
-        String sqid = ms.getDsseqid();
-        if (sqid != null && sqid.length() > 0)
-        {
-          /*
-           * recover dataset sequence
-           */
-          djs = seqRefIds.get(sqid);
-        }
-        else
-        {
-          System.err.println(
-                  "Warning - making up dataset sequence id for DbRef sequence map reference");
-          sqid = ((Object) ms).toString(); // make up a new hascode for
-          // undefined dataset sequence hash
-          // (unlikely to happen)
-        }
-
-        if (djs == null)
-        {
-          /**
-           * make a new dataset sequence and add it to refIds hash
-           */
-          djs = new jalview.datamodel.Sequence(ms.getName(),
-                  ms.getSequence());
-          djs.setStart(jmap.getMap().getToLowest());
-          djs.setEnd(jmap.getMap().getToHighest());
-          djs.setVamsasId(uniqueSetSuffix + sqid);
-          jmap.setTo(djs);
-          incompleteSeqs.put(sqid, djs);
-          seqRefIds.put(sqid, djs);
+        djs = seqRefIds.get(sqid);
+      }
+      else
+      {
+        System.err.println(
+                "Warning - making up dataset sequence id for DbRef sequence map reference");
+        sqid = ((Object) ms).toString(); // make up a new hascode for
+        // undefined dataset sequence hash
+        // (unlikely to happen)
+      }
 
-        }
-        jalview.bin.Cache.log.debug("about to recurse on addDBRefs.");
-        addDBRefs(djs, ms);
+      if (djs == null)
+      {
+        /**
+         * make a new dataset sequence and add it to refIds hash
+         */
+        djs = new jalview.datamodel.Sequence(ms.getName(),
+                ms.getSequence());
+        djs.setStart(jmap.getMap().getToLowest());
+        djs.setEnd(jmap.getMap().getToHighest());
+        djs.setVamsasId(uniqueSetSuffix + sqid);
+        jmap.setTo(djs);
+        incompleteSeqs.put(sqid, djs);
+        seqRefIds.put(sqid, djs);
 
       }
+      jalview.bin.Cache.log.debug("about to recurse on addDBRefs.");
+      addDBRefs(djs, ms);
+
     }
-    return (jmap);
 
+    return jmap;
   }
 
   /**
@@ -5453,8 +5914,13 @@ public class Jalview2XML
     initSeqRefs();
     JalviewModel jm = saveState(ap, null, null, null);
 
+    addDatasetRef(
+            jm.getVamsasModel().getSequenceSet().get(0).getDatasetId(),
+            ap.getAlignment().getDataset());
+
     uniqueSetSuffix = "";
-    jm.getJalviewModelSequence().getViewport(0).setId(null);
+    // jm.getJalviewModelSequence().getViewport(0).setId(null);
+    jm.getViewport().get(0).setId(null);
     // we don't overwrite the view we just copied
 
     if (this.frefedSequence == null)
@@ -5465,7 +5931,7 @@ public class Jalview2XML
     viewportsAdded.clear();
 
     AlignFrame af = loadFromObject(jm, null, false, null);
-    af.alignPanels.clear();
+    af.getAlignPanels().clear();
     af.closeMenuItem_actionPerformed(true);
 
     /*
@@ -5713,16 +6179,138 @@ public class Jalview2XML
   }
 
   /**
+   * Loads any saved PCA viewers
+   * 
+   * @param jms
+   * @param ap
+   */
+  protected void loadPCAViewers(JalviewModel model, AlignmentPanel ap)
+  {
+    try
+    {
+      List<PcaViewer> pcaviewers = model.getPcaViewer();
+      for (PcaViewer viewer : pcaviewers)
+      {
+        String modelName = viewer.getScoreModelName();
+        SimilarityParamsI params = new SimilarityParams(
+                viewer.isIncludeGappedColumns(), viewer.isMatchGaps(),
+                viewer.isIncludeGaps(),
+                viewer.isDenominateByShortestLength());
+
+        /*
+         * create the panel (without computing the PCA)
+         */
+        PCAPanel panel = new PCAPanel(ap, modelName, params);
+
+        panel.setTitle(viewer.getTitle());
+        panel.setBounds(new Rectangle(viewer.getXpos(), viewer.getYpos(),
+                viewer.getWidth(), viewer.getHeight()));
+
+        boolean showLabels = viewer.isShowLabels();
+        panel.setShowLabels(showLabels);
+        panel.getRotatableCanvas().setShowLabels(showLabels);
+        panel.getRotatableCanvas()
+                .setBgColour(new Color(viewer.getBgColour()));
+        panel.getRotatableCanvas()
+                .setApplyToAllViews(viewer.isLinkToAllViews());
+
+        /*
+         * load PCA output data
+         */
+        ScoreModelI scoreModel = ScoreModels.getInstance()
+                .getScoreModel(modelName, ap);
+        PCA pca = new PCA(null, scoreModel, params);
+        PcaDataType pcaData = viewer.getPcaData();
+
+        MatrixI pairwise = loadDoubleMatrix(pcaData.getPairwiseMatrix());
+        pca.setPairwiseScores(pairwise);
+
+        MatrixI triDiag = loadDoubleMatrix(pcaData.getTridiagonalMatrix());
+        pca.setTridiagonal(triDiag);
+
+        MatrixI result = loadDoubleMatrix(pcaData.getEigenMatrix());
+        pca.setEigenmatrix(result);
+
+        panel.getPcaModel().setPCA(pca);
+
+        /*
+         * we haven't saved the input data! (JAL-2647 to do)
+         */
+        panel.setInputData(null);
+
+        /*
+         * add the sequence points for the PCA display
+         */
+        List<jalview.datamodel.SequencePoint> seqPoints = new ArrayList<>();
+        for (SequencePoint sp : viewer.getSequencePoint())
+        {
+          String seqId = sp.getSequenceRef();
+          SequenceI seq = seqRefIds.get(seqId);
+          if (seq == null)
+          {
+            throw new IllegalStateException(
+                    "Unmatched seqref for PCA: " + seqId);
+          }
+          Point pt = new Point(sp.getXPos(), sp.getYPos(), sp.getZPos());
+          jalview.datamodel.SequencePoint seqPoint = new jalview.datamodel.SequencePoint(
+                  seq, pt);
+          seqPoints.add(seqPoint);
+        }
+        panel.getRotatableCanvas().setPoints(seqPoints, seqPoints.size());
+
+        /*
+         * set min-max ranges and scale after setPoints (which recomputes them)
+         */
+        panel.getRotatableCanvas().setScaleFactor(viewer.getScaleFactor());
+        SeqPointMin spMin = viewer.getSeqPointMin();
+        float[] min = new float[] { spMin.getXPos(), spMin.getYPos(),
+            spMin.getZPos() };
+        SeqPointMax spMax = viewer.getSeqPointMax();
+        float[] max = new float[] { spMax.getXPos(), spMax.getYPos(),
+            spMax.getZPos() };
+        panel.getRotatableCanvas().setSeqMinMax(min, max);
+
+        // todo: hold points list in PCAModel only
+        panel.getPcaModel().setSequencePoints(seqPoints);
+
+        panel.setSelectedDimensionIndex(viewer.getXDim(), X);
+        panel.setSelectedDimensionIndex(viewer.getYDim(), Y);
+        panel.setSelectedDimensionIndex(viewer.getZDim(), Z);
+
+        // is this duplication needed?
+        panel.setTop(seqPoints.size() - 1);
+        panel.getPcaModel().setTop(seqPoints.size() - 1);
+
+        /*
+         * add the axes' end points for the display
+         */
+        for (int i = 0; i < 3; i++)
+        {
+          Axis axis = viewer.getAxis().get(i);
+          panel.getRotatableCanvas().getAxisEndPoints()[i] = new Point(
+                  axis.getXPos(), axis.getYPos(), axis.getZPos());
+        }
+
+        Desktop.addInternalFrame(panel, MessageManager.formatMessage(
+                "label.calc_title", "PCA", modelName), 475, 450);
+      }
+    } catch (Exception ex)
+    {
+      Cache.log.error("Error loading PCA: " + ex.toString());
+    }
+  }
+
+  /**
    * Populates an XML model of the feature colour scheme for one feature type
    * 
    * @param featureType
    * @param fcol
    * @return
    */
-  protected static jalview.schemabinding.version2.Colour marshalColour(
+  public static Colour marshalColour(
           String featureType, FeatureColourI fcol)
   {
-    jalview.schemabinding.version2.Colour col = new jalview.schemabinding.version2.Colour();
+    Colour col = new Colour();
     if (fcol.isSimpleColour())
     {
       col.setRGB(Format.getHexString(fcol.getColour()));
@@ -5736,12 +6324,17 @@ public class Jalview2XML
       col.setAutoScale(fcol.isAutoScaled());
       col.setThreshold(fcol.getThreshold());
       col.setColourByLabel(fcol.isColourByLabel());
-      col.setThreshType(fcol.isAboveThreshold() ? ColourThreshTypeType.ABOVE
-              : (fcol.isBelowThreshold() ? ColourThreshTypeType.BELOW
-                      : ColourThreshTypeType.NONE));
+      col.setThreshType(fcol.isAboveThreshold() ? ThresholdType.ABOVE
+              : (fcol.isBelowThreshold() ? ThresholdType.BELOW
+                      : ThresholdType.NONE));
       if (fcol.isColourByAttribute())
       {
-        col.setAttributeName(fcol.getAttributeName());
+        final String[] attName = fcol.getAttributeName();
+        col.getAttributeName().add(attName[0]);
+        if (attName.length > 1)
+        {
+          col.getAttributeName().add(attName[1]);
+        }
       }
       Color noColour = fcol.getNoColour();
       if (noColour == null)
@@ -5771,10 +6364,11 @@ public class Jalview2XML
    * @param and
    *          if true, conditions are and-ed, else or-ed
    */
-  protected static MatcherSet marshalFilter(FeatureMatcherI firstMatcher,
-          Iterator<FeatureMatcherI> filters, boolean and)
+  public static jalview.xml.binding.jalview.FeatureMatcherSet marshalFilter(
+          FeatureMatcherI firstMatcher, Iterator<FeatureMatcherI> filters,
+          boolean and)
   {
-    MatcherSet result = new MatcherSet();
+    jalview.xml.binding.jalview.FeatureMatcherSet result = new jalview.xml.binding.jalview.FeatureMatcherSet();
   
     if (filters.hasNext())
     {
@@ -5783,12 +6377,15 @@ public class Jalview2XML
        */
       CompoundMatcher compound = new CompoundMatcher();
       compound.setAnd(and);
-      MatcherSet matcher1 = marshalFilter(firstMatcher,
-              Collections.emptyIterator(), and);
-      compound.addMatcherSet(matcher1);
+      jalview.xml.binding.jalview.FeatureMatcherSet matcher1 = marshalFilter(
+              firstMatcher, Collections.emptyIterator(), and);
+      // compound.addMatcherSet(matcher1);
+      compound.getMatcherSet().add(matcher1);
       FeatureMatcherI nextMatcher = filters.next();
-      MatcherSet matcher2 = marshalFilter(nextMatcher, filters, and);
-      compound.addMatcherSet(matcher2);
+      jalview.xml.binding.jalview.FeatureMatcherSet matcher2 = marshalFilter(
+              nextMatcher, filters, and);
+      // compound.addMatcherSet(matcher2);
+      compound.getMatcherSet().add(matcher2);
       result.setCompoundMatcher(compound);
     }
     else
@@ -5796,22 +6393,29 @@ public class Jalview2XML
       /*
        * single condition matcher
        */
-      MatchCondition matcherModel = new MatchCondition();
+      // MatchCondition matcherModel = new MatchCondition();
+      jalview.xml.binding.jalview.FeatureMatcher matcherModel = new jalview.xml.binding.jalview.FeatureMatcher();
       matcherModel.setCondition(
               firstMatcher.getMatcher().getCondition().getStableName());
       matcherModel.setValue(firstMatcher.getMatcher().getPattern());
       if (firstMatcher.isByAttribute())
       {
-        matcherModel.setBy(FeatureMatcherByType.BYATTRIBUTE);
-        matcherModel.setAttributeName(firstMatcher.getAttribute());
+        matcherModel.setBy(FilterBy.BY_ATTRIBUTE);
+        // matcherModel.setAttributeName(firstMatcher.getAttribute());
+        String[] attName = firstMatcher.getAttribute();
+        matcherModel.getAttributeName().add(attName[0]); // attribute
+        if (attName.length > 1)
+        {
+          matcherModel.getAttributeName().add(attName[1]); // sub-attribute
+        }
       }
       else if (firstMatcher.isByLabel())
       {
-        matcherModel.setBy(FeatureMatcherByType.BYLABEL);
+        matcherModel.setBy(FilterBy.BY_LABEL);
       }
       else if (firstMatcher.isByScore())
       {
-        matcherModel.setBy(FeatureMatcherByType.BYSCORE);
+        matcherModel.setBy(FilterBy.BY_SCORE);
       }
       result.setMatchCondition(matcherModel);
     }
@@ -5826,13 +6430,14 @@ public class Jalview2XML
    * @param matcherSetModel
    * @return
    */
-  protected static FeatureMatcherSetI unmarshalFilter(
-          String featureType, MatcherSet matcherSetModel)
+  public static FeatureMatcherSetI parseFilter(
+          String featureType,
+          jalview.xml.binding.jalview.FeatureMatcherSet matcherSetModel)
   {
     FeatureMatcherSetI result = new FeatureMatcherSet();
     try
     {
-      unmarshalFilterConditions(result, matcherSetModel, true);
+      parseFilterConditions(result, matcherSetModel, true);
     } catch (IllegalStateException e)
     {
       // mixing AND and OR conditions perhaps
@@ -5856,32 +6461,36 @@ public class Jalview2XML
    * @throws IllegalStateException
    *           if AND and OR conditions are mixed
    */
-  protected static void unmarshalFilterConditions(
-          FeatureMatcherSetI matcherSet, MatcherSet matcherSetModel,
+  protected static void parseFilterConditions(
+          FeatureMatcherSetI matcherSet,
+          jalview.xml.binding.jalview.FeatureMatcherSet matcherSetModel,
           boolean and)
   {
-    MatchCondition mc = matcherSetModel.getMatchCondition();
+    jalview.xml.binding.jalview.FeatureMatcher mc = matcherSetModel
+            .getMatchCondition();
     if (mc != null)
     {
       /*
        * single condition
        */
-      FeatureMatcherByType filterBy = mc.getBy();
+      FilterBy filterBy = mc.getBy();
       Condition cond = Condition.fromString(mc.getCondition());
       String pattern = mc.getValue();
       FeatureMatcherI matchCondition = null;
-      if (filterBy == FeatureMatcherByType.BYLABEL)
+      if (filterBy == FilterBy.BY_LABEL)
       {
         matchCondition = FeatureMatcher.byLabel(cond, pattern);
       }
-      else if (filterBy == FeatureMatcherByType.BYSCORE)
+      else if (filterBy == FilterBy.BY_SCORE)
       {
         matchCondition = FeatureMatcher.byScore(cond, pattern);
   
       }
-      else if (filterBy == FeatureMatcherByType.BYATTRIBUTE)
+      else if (filterBy == FilterBy.BY_ATTRIBUTE)
       {
-        String[] attNames = mc.getAttributeName();
+        final List<String> attributeName = mc.getAttributeName();
+        String[] attNames = attributeName
+                .toArray(new String[attributeName.size()]);
         matchCondition = FeatureMatcher.byAttribute(cond, pattern,
                 attNames);
       }
@@ -5904,13 +6513,13 @@ public class Jalview2XML
       /*
        * compound condition
        */
-      MatcherSet[] matchers = matcherSetModel.getCompoundMatcher()
-              .getMatcherSet();
-      boolean anded = matcherSetModel.getCompoundMatcher().getAnd();
-      if (matchers.length == 2)
+      List<jalview.xml.binding.jalview.FeatureMatcherSet> matchers = matcherSetModel
+              .getCompoundMatcher().getMatcherSet();
+      boolean anded = matcherSetModel.getCompoundMatcher().isAnd();
+      if (matchers.size() == 2)
       {
-        unmarshalFilterConditions(matcherSet, matchers[0], anded);
-        unmarshalFilterConditions(matcherSet, matchers[1], anded);
+        parseFilterConditions(matcherSet, matchers.get(0), anded);
+        parseFilterConditions(matcherSet, matchers.get(1), anded);
       }
       else
       {
@@ -5925,12 +6534,11 @@ public class Jalview2XML
    * @param colourModel
    * @return
    */
-  protected static FeatureColourI unmarshalColour(
-          jalview.schemabinding.version2.Colour colourModel)
+  public static FeatureColourI parseColour(Colour colourModel)
   {
     FeatureColourI colour = null;
   
-    if (colourModel.hasMax())
+    if (colourModel.getMax() != null)
     {
       Color mincol = null;
       Color maxcol = null;
@@ -5955,37 +6563,37 @@ public class Jalview2XML
         noValueColour = maxcol;
       }
   
-      colour = new FeatureColour(mincol, maxcol, noValueColour,
-              colourModel.getMin(),
-              colourModel.getMax());
-      String[] attributes = colourModel.getAttributeName();
+      colour = new FeatureColour(maxcol, mincol, maxcol, noValueColour,
+              safeFloat(colourModel.getMin()),
+              safeFloat(colourModel.getMax()));
+      final List<String> attributeName = colourModel.getAttributeName();
+      String[] attributes = attributeName
+              .toArray(new String[attributeName.size()]);
       if (attributes != null && attributes.length > 0)
       {
         colour.setAttributeName(attributes);
       }
-      if (colourModel.hasAutoScale())
+      if (colourModel.isAutoScale() != null)
       {
-        colour.setAutoScaled(colourModel.getAutoScale());
+        colour.setAutoScaled(colourModel.isAutoScale().booleanValue());
       }
-      if (colourModel.hasColourByLabel())
+      if (colourModel.isColourByLabel() != null)
       {
-        colour.setColourByLabel(colourModel.getColourByLabel());
+        colour.setColourByLabel(
+                colourModel.isColourByLabel().booleanValue());
       }
-      if (colourModel.hasThreshold())
+      if (colourModel.getThreshold() != null)
       {
-        colour.setThreshold(colourModel.getThreshold());
+        colour.setThreshold(colourModel.getThreshold().floatValue());
       }
-      ColourThreshTypeType ttyp = colourModel.getThreshType();
-      if (ttyp != null)
+      ThresholdType ttyp = colourModel.getThreshType();
+      if (ttyp == ThresholdType.ABOVE)
       {
-        if (ttyp == ColourThreshTypeType.ABOVE)
-        {
-          colour.setAboveThreshold(true);
-        }
-        else if (ttyp == ColourThreshTypeType.BELOW)
-        {
-          colour.setBelowThreshold(true);
-        }
+        colour.setAboveThreshold(true);
+      }
+      else if (ttyp == ThresholdType.BELOW)
+      {
+        colour.setBelowThreshold(true);
       }
     }
     else
index 795cd36..13885b4 100644 (file)
@@ -22,7 +22,7 @@ package jalview.renderer.seqfeatures;
 
 import jalview.api.AlignViewportI;
 import jalview.api.FeatureColourI;
-import jalview.datamodel.Range;
+import jalview.datamodel.ContiguousI;
 import jalview.datamodel.SequenceFeature;
 import jalview.datamodel.SequenceI;
 import jalview.util.Comparison;
@@ -272,7 +272,7 @@ public class FeatureRenderer extends FeatureRendererModel
     /*
      * if columns are all gapped, or sequence has no features, nothing to do
      */
-    Range visiblePositions = seq.findPositions(start+1, end+1);
+    ContiguousI visiblePositions = seq.findPositions(start + 1, end + 1);
     if (visiblePositions == null || !seq.getFeatures().hasFeatures())
     {
       return null;
diff --git a/src/jalview/schemabinding/version2/.castor.cdr b/src/jalview/schemabinding/version2/.castor.cdr
deleted file mode 100644 (file)
index e1100a8..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-#Thu Dec 14 09:10:14 GMT 2017
-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.CalcIdParam=jalview.schemabinding.version2.descriptors.CalcIdParamDescriptor
-jalview.schemabinding.version2.Tree=jalview.schemabinding.version2.descriptors.TreeDescriptor
-jalview.schemabinding.version2.JalviewModel=jalview.schemabinding.version2.descriptors.JalviewModelDescriptor
-jalview.schemabinding.version2.SequenceType=jalview.schemabinding.version2.descriptors.SequenceTypeDescriptor
-jalview.schemabinding.version2.OtherData=jalview.schemabinding.version2.descriptors.OtherDataDescriptor
-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.FeatureMatcherSet=jalview.schemabinding.version2.descriptors.FeatureMatcherSetDescriptor
-jalview.schemabinding.version2.SecondaryStructure=jalview.schemabinding.version2.descriptors.SecondaryStructureDescriptor
-jalview.schemabinding.version2.MatchCondition=jalview.schemabinding.version2.descriptors.MatchConditionDescriptor
-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
-jalview.schemabinding.version2.DBRef=jalview.schemabinding.version2.descriptors.DBRefDescriptor
-jalview.schemabinding.version2.AlcodMap=jalview.schemabinding.version2.descriptors.AlcodMapDescriptor
-jalview.schemabinding.version2.Annotation=jalview.schemabinding.version2.descriptors.AnnotationDescriptor
-jalview.schemabinding.version2.JSeq=jalview.schemabinding.version2.descriptors.JSeqDescriptor
-jalview.schemabinding.version2.MatcherSet=jalview.schemabinding.version2.descriptors.MatcherSetDescriptor
-jalview.schemabinding.version2.Sequence=jalview.schemabinding.version2.descriptors.SequenceDescriptor
-jalview.schemabinding.version2.WebServiceParameterSet=jalview.schemabinding.version2.descriptors.WebServiceParameterSetDescriptor
-jalview.schemabinding.version2.Alcodon=jalview.schemabinding.version2.descriptors.AlcodonDescriptor
-jalview.schemabinding.version2.Filter=jalview.schemabinding.version2.descriptors.FilterDescriptor
-jalview.schemabinding.version2.AnnotationColours=jalview.schemabinding.version2.descriptors.AnnotationColoursDescriptor
-jalview.schemabinding.version2.Pdbids=jalview.schemabinding.version2.descriptors.PdbidsDescriptor
-jalview.schemabinding.version2.AnnotationColourScheme=jalview.schemabinding.version2.descriptors.AnnotationColourSchemeDescriptor
-jalview.schemabinding.version2.Mapping=jalview.schemabinding.version2.descriptors.MappingDescriptor
-jalview.schemabinding.version2.CompoundMatcher=jalview.schemabinding.version2.descriptors.CompoundMatcherDescriptor
-jalview.schemabinding.version2.JalviewModelSequence=jalview.schemabinding.version2.descriptors.JalviewModelSequenceDescriptor
-jalview.schemabinding.version2.Group=jalview.schemabinding.version2.descriptors.GroupDescriptor
-jalview.schemabinding.version2.MappingChoice=jalview.schemabinding.version2.descriptors.MappingChoiceDescriptor
-jalview.schemabinding.version2.Feature=jalview.schemabinding.version2.descriptors.FeatureDescriptor
-jalview.schemabinding.version2.UserColours=jalview.schemabinding.version2.descriptors.UserColoursDescriptor
-jalview.schemabinding.version2.Colour=jalview.schemabinding.version2.descriptors.ColourDescriptor
-jalview.schemabinding.version2.PdbentryItem=jalview.schemabinding.version2.descriptors.PdbentryItemDescriptor
-jalview.schemabinding.version2.MapListFrom=jalview.schemabinding.version2.descriptors.MapListFromDescriptor
-jalview.schemabinding.version2.FeatureSettings=jalview.schemabinding.version2.descriptors.FeatureSettingsDescriptor
-jalview.schemabinding.version2.JGroup=jalview.schemabinding.version2.descriptors.JGroupDescriptor
-jalview.schemabinding.version2.MapListTo=jalview.schemabinding.version2.descriptors.MapListToDescriptor
-jalview.schemabinding.version2.JalviewUserColours=jalview.schemabinding.version2.descriptors.JalviewUserColoursDescriptor
-jalview.schemabinding.version2.VamsasModel=jalview.schemabinding.version2.descriptors.VamsasModelDescriptor
-jalview.schemabinding.version2.Pdbentry=jalview.schemabinding.version2.descriptors.PdbentryDescriptor
-jalview.schemabinding.version2.HiddenColumns=jalview.schemabinding.version2.descriptors.HiddenColumnsDescriptor
-jalview.schemabinding.version2.Features=jalview.schemabinding.version2.descriptors.FeaturesDescriptor
-jalview.schemabinding.version2.VAMSAS=jalview.schemabinding.version2.descriptors.VAMSASDescriptor
-jalview.schemabinding.version2.FeatureMatcher=jalview.schemabinding.version2.descriptors.FeatureMatcherDescriptor
diff --git a/src/jalview/schemabinding/version2/AlcodMap.java b/src/jalview/schemabinding/version2/AlcodMap.java
deleted file mode 100644 (file)
index e2522a1..0000000
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * 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 AlcodMap.
- * 
- * @version $Revision$ $Date$
- */
-public class AlcodMap implements java.io.Serializable
-{
-
-  // --------------------------/
-  // - Class/Member Variables -/
-  // --------------------------/
-
-  /**
-   * internal jalview id for the dnasq for this mapping.
-   * 
-   */
-  private java.lang.String _dnasq;
-
-  /**
-   * a Mapping entry and an associated protein sequence
-   * 
-   */
-  private jalview.schemabinding.version2.Mapping _mapping;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public AlcodMap()
-  {
-    super();
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-   * Returns the value of field 'dnasq'. The field 'dnasq' has the following
-   * description: internal jalview id for the dnasq for this mapping.
-   * 
-   * 
-   * @return the value of field 'Dnasq'.
-   */
-  public java.lang.String getDnasq()
-  {
-    return this._dnasq;
-  }
-
-  /**
-   * Returns the value of field 'mapping'. The field 'mapping' has the following
-   * description: a Mapping entry and an associated protein sequence
-   * 
-   * 
-   * @return the value of field 'Mapping'.
-   */
-  public jalview.schemabinding.version2.Mapping getMapping()
-  {
-    return this._mapping;
-  }
-
-  /**
-   * 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 'dnasq'. The field 'dnasq' has the following
-   * description: internal jalview id for the dnasq for this mapping.
-   * 
-   * 
-   * @param dnasq
-   *          the value of field 'dnasq'.
-   */
-  public void setDnasq(final java.lang.String dnasq)
-  {
-    this._dnasq = dnasq;
-  }
-
-  /**
-   * Sets the value of field 'mapping'. The field 'mapping' has the following
-   * description: a Mapping entry and an associated protein sequence
-   * 
-   * 
-   * @param mapping
-   *          the value of field 'mapping'.
-   */
-  public void setMapping(
-          final jalview.schemabinding.version2.Mapping mapping)
-  {
-    this._mapping = mapping;
-  }
-
-  /**
-   * 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.AlcodMap
-   */
-  public static jalview.schemabinding.version2.AlcodMap unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.AlcodMap) Unmarshaller
-            .unmarshal(jalview.schemabinding.version2.AlcodMap.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/Alcodon.java b/src/jalview/schemabinding/version2/Alcodon.java
deleted file mode 100644 (file)
index 3bd1cbb..0000000
+++ /dev/null
@@ -1,275 +0,0 @@
-/*
- * 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 Alcodon.
- * 
- * @version $Revision$ $Date$
- */
-public class Alcodon implements java.io.Serializable
-{
-
-  // --------------------------/
-  // - Class/Member Variables -/
-  // --------------------------/
-
-  /**
-   * Field _pos1.
-   */
-  private long _pos1;
-
-  /**
-   * keeps track of state for field: _pos1
-   */
-  private boolean _has_pos1;
-
-  /**
-   * Field _pos2.
-   */
-  private long _pos2;
-
-  /**
-   * keeps track of state for field: _pos2
-   */
-  private boolean _has_pos2;
-
-  /**
-   * Field _pos3.
-   */
-  private long _pos3;
-
-  /**
-   * keeps track of state for field: _pos3
-   */
-  private boolean _has_pos3;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public Alcodon()
-  {
-    super();
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-     */
-  public void deletePos1()
-  {
-    this._has_pos1 = false;
-  }
-
-  /**
-     */
-  public void deletePos2()
-  {
-    this._has_pos2 = false;
-  }
-
-  /**
-     */
-  public void deletePos3()
-  {
-    this._has_pos3 = false;
-  }
-
-  /**
-   * Returns the value of field 'pos1'.
-   * 
-   * @return the value of field 'Pos1'.
-   */
-  public long getPos1()
-  {
-    return this._pos1;
-  }
-
-  /**
-   * Returns the value of field 'pos2'.
-   * 
-   * @return the value of field 'Pos2'.
-   */
-  public long getPos2()
-  {
-    return this._pos2;
-  }
-
-  /**
-   * Returns the value of field 'pos3'.
-   * 
-   * @return the value of field 'Pos3'.
-   */
-  public long getPos3()
-  {
-    return this._pos3;
-  }
-
-  /**
-   * Method hasPos1.
-   * 
-   * @return true if at least one Pos1 has been added
-   */
-  public boolean hasPos1()
-  {
-    return this._has_pos1;
-  }
-
-  /**
-   * Method hasPos2.
-   * 
-   * @return true if at least one Pos2 has been added
-   */
-  public boolean hasPos2()
-  {
-    return this._has_pos2;
-  }
-
-  /**
-   * Method hasPos3.
-   * 
-   * @return true if at least one Pos3 has been added
-   */
-  public boolean hasPos3()
-  {
-    return this._has_pos3;
-  }
-
-  /**
-   * 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 'pos1'.
-   * 
-   * @param pos1
-   *          the value of field 'pos1'.
-   */
-  public void setPos1(final long pos1)
-  {
-    this._pos1 = pos1;
-    this._has_pos1 = true;
-  }
-
-  /**
-   * Sets the value of field 'pos2'.
-   * 
-   * @param pos2
-   *          the value of field 'pos2'.
-   */
-  public void setPos2(final long pos2)
-  {
-    this._pos2 = pos2;
-    this._has_pos2 = true;
-  }
-
-  /**
-   * Sets the value of field 'pos3'.
-   * 
-   * @param pos3
-   *          the value of field 'pos3'.
-   */
-  public void setPos3(final long pos3)
-  {
-    this._pos3 = pos3;
-    this._has_pos3 = 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.Alcodo
-   */
-  public static jalview.schemabinding.version2.Alcodon unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.Alcodon) Unmarshaller.unmarshal(
-            jalview.schemabinding.version2.Alcodon.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/AlcodonFrame.java b/src/jalview/schemabinding/version2/AlcodonFrame.java
deleted file mode 100644 (file)
index 218e07e..0000000
+++ /dev/null
@@ -1,466 +0,0 @@
-/*
- * 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 AlcodonFrame.
- * 
- * @version $Revision$ $Date$
- */
-public class AlcodonFrame implements java.io.Serializable
-{
-
-  // --------------------------/
-  // - Class/Member Variables -/
-  // --------------------------/
-
-  /**
-   * Field _alcodonList.
-   */
-  private java.util.Vector _alcodonList;
-
-  /**
-   * Field _alcodMapList.
-   */
-  private java.util.Vector _alcodMapList;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public AlcodonFrame()
-  {
-    super();
-    this._alcodonList = new java.util.Vector();
-    this._alcodMapList = new java.util.Vector();
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-   * 
-   * 
-   * @param vAlcodMap
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addAlcodMap(
-          final jalview.schemabinding.version2.AlcodMap vAlcodMap)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._alcodMapList.addElement(vAlcodMap);
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vAlcodMap
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addAlcodMap(final int index,
-          final jalview.schemabinding.version2.AlcodMap vAlcodMap)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._alcodMapList.add(index, vAlcodMap);
-  }
-
-  /**
-   * 
-   * 
-   * @param vAlcodon
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addAlcodon(
-          final jalview.schemabinding.version2.Alcodon vAlcodon)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._alcodonList.addElement(vAlcodon);
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vAlcodon
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addAlcodon(final int index,
-          final jalview.schemabinding.version2.Alcodon vAlcodon)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._alcodonList.add(index, vAlcodon);
-  }
-
-  /**
-   * Method enumerateAlcodMap.
-   * 
-   * @return an Enumeration over all jalview.schemabinding.version2.AlcodMap
-   *         elements
-   */
-  public java.util.Enumeration enumerateAlcodMap()
-  {
-    return this._alcodMapList.elements();
-  }
-
-  /**
-   * Method enumerateAlcodon.
-   * 
-   * @return an Enumeration over all jalview.schemabinding.version2.Alcodon
-   *         elements
-   */
-  public java.util.Enumeration enumerateAlcodon()
-  {
-    return this._alcodonList.elements();
-  }
-
-  /**
-   * Method getAlcodMap.
-   * 
-   * @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.AlcodMap at the
-   *         given index
-   */
-  public jalview.schemabinding.version2.AlcodMap getAlcodMap(final int index)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._alcodMapList.size())
-    {
-      throw new IndexOutOfBoundsException("getAlcodMap: Index value '"
-              + index + "' not in range [0.."
-              + (this._alcodMapList.size() - 1) + "]");
-    }
-
-    return (jalview.schemabinding.version2.AlcodMap) _alcodMapList
-            .get(index);
-  }
-
-  /**
-   * Method getAlcodMap.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.AlcodMap[] getAlcodMap()
-  {
-    jalview.schemabinding.version2.AlcodMap[] array = new jalview.schemabinding.version2.AlcodMap[0];
-    return (jalview.schemabinding.version2.AlcodMap[]) this._alcodMapList
-            .toArray(array);
-  }
-
-  /**
-   * Method getAlcodMapCount.
-   * 
-   * @return the size of this collection
-   */
-  public int getAlcodMapCount()
-  {
-    return this._alcodMapList.size();
-  }
-
-  /**
-   * Method getAlcodon.
-   * 
-   * @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.Alcodon at the
-   *         given index
-   */
-  public jalview.schemabinding.version2.Alcodon getAlcodon(final int index)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._alcodonList.size())
-    {
-      throw new IndexOutOfBoundsException("getAlcodon: Index value '"
-              + index + "' not in range [0.."
-              + (this._alcodonList.size() - 1) + "]");
-    }
-
-    return (jalview.schemabinding.version2.Alcodon) _alcodonList.get(index);
-  }
-
-  /**
-   * Method getAlcodon.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.Alcodon[] getAlcodon()
-  {
-    jalview.schemabinding.version2.Alcodon[] array = new jalview.schemabinding.version2.Alcodon[0];
-    return (jalview.schemabinding.version2.Alcodon[]) this._alcodonList
-            .toArray(array);
-  }
-
-  /**
-   * Method getAlcodonCount.
-   * 
-   * @return the size of this collection
-   */
-  public int getAlcodonCount()
-  {
-    return this._alcodonList.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 removeAlcodMap.
-   * 
-   * @param vAlcodMap
-   * @return true if the object was removed from the collection.
-   */
-  public boolean removeAlcodMap(
-          final jalview.schemabinding.version2.AlcodMap vAlcodMap)
-  {
-    boolean removed = _alcodMapList.remove(vAlcodMap);
-    return removed;
-  }
-
-  /**
-   * Method removeAlcodMapAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public jalview.schemabinding.version2.AlcodMap removeAlcodMapAt(
-          final int index)
-  {
-    java.lang.Object obj = this._alcodMapList.remove(index);
-    return (jalview.schemabinding.version2.AlcodMap) obj;
-  }
-
-  /**
-   * Method removeAlcodon.
-   * 
-   * @param vAlcodon
-   * @return true if the object was removed from the collection.
-   */
-  public boolean removeAlcodon(
-          final jalview.schemabinding.version2.Alcodon vAlcodon)
-  {
-    boolean removed = _alcodonList.remove(vAlcodon);
-    return removed;
-  }
-
-  /**
-   * Method removeAlcodonAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public jalview.schemabinding.version2.Alcodon removeAlcodonAt(
-          final int index)
-  {
-    java.lang.Object obj = this._alcodonList.remove(index);
-    return (jalview.schemabinding.version2.Alcodon) obj;
-  }
-
-  /**
-     */
-  public void removeAllAlcodMap()
-  {
-    this._alcodMapList.clear();
-  }
-
-  /**
-     */
-  public void removeAllAlcodon()
-  {
-    this._alcodonList.clear();
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vAlcodMap
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void setAlcodMap(final int index,
-          final jalview.schemabinding.version2.AlcodMap vAlcodMap)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._alcodMapList.size())
-    {
-      throw new IndexOutOfBoundsException("setAlcodMap: Index value '"
-              + index + "' not in range [0.."
-              + (this._alcodMapList.size() - 1) + "]");
-    }
-
-    this._alcodMapList.set(index, vAlcodMap);
-  }
-
-  /**
-   * 
-   * 
-   * @param vAlcodMapArray
-   */
-  public void setAlcodMap(
-          final jalview.schemabinding.version2.AlcodMap[] vAlcodMapArray)
-  {
-    // -- copy array
-    _alcodMapList.clear();
-
-    for (int i = 0; i < vAlcodMapArray.length; i++)
-    {
-      this._alcodMapList.add(vAlcodMapArray[i]);
-    }
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vAlcodon
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void setAlcodon(final int index,
-          final jalview.schemabinding.version2.Alcodon vAlcodon)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._alcodonList.size())
-    {
-      throw new IndexOutOfBoundsException("setAlcodon: Index value '"
-              + index + "' not in range [0.."
-              + (this._alcodonList.size() - 1) + "]");
-    }
-
-    this._alcodonList.set(index, vAlcodon);
-  }
-
-  /**
-   * 
-   * 
-   * @param vAlcodonArray
-   */
-  public void setAlcodon(
-          final jalview.schemabinding.version2.Alcodon[] vAlcodonArray)
-  {
-    // -- copy array
-    _alcodonList.clear();
-
-    for (int i = 0; i < vAlcodonArray.length; i++)
-    {
-      this._alcodonList.add(vAlcodonArray[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.schemabinding.version2.AlcodonFrame
-   */
-  public static jalview.schemabinding.version2.AlcodonFrame unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.AlcodonFrame) Unmarshaller
-            .unmarshal(jalview.schemabinding.version2.AlcodonFrame.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/Annotation.java b/src/jalview/schemabinding/version2/Annotation.java
deleted file mode 100644 (file)
index 2fead37..0000000
+++ /dev/null
@@ -1,1396 +0,0 @@
-/*
- * 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 Annotation.
- * 
- * @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 _sequenceRef.
-   */
-  private java.lang.String _sequenceRef;
-
-  /**
-   * Field _groupRef.
-   */
-  private java.lang.String _groupRef;
-
-  /**
-   * Field _graphColour.
-   */
-  private int _graphColour;
-
-  /**
-   * keeps track of state for field: _graphColour
-   */
-  private boolean _has_graphColour;
-
-  /**
-   * Field _graphGroup.
-   */
-  private int _graphGroup;
-
-  /**
-   * keeps track of state for field: _graphGroup
-   */
-  private boolean _has_graphGroup;
-
-  /**
-   * height in pixels for the graph if this is a graph-type annotation.
-   */
-  private int _graphHeight;
-
-  /**
-   * keeps track of state for field: _graphHeight
-   */
-  private boolean _has_graphHeight;
-
-  /**
-   * Field _id.
-   */
-  private java.lang.String _id;
-
-  /**
-   * Field _scoreOnly.
-   */
-  private boolean _scoreOnly = false;
-
-  /**
-   * keeps track of state for field: _scoreOnly
-   */
-  private boolean _has_scoreOnly;
-
-  /**
-   * Field _score.
-   */
-  private double _score;
-
-  /**
-   * keeps track of state for field: _score
-   */
-  private boolean _has_score;
-
-  /**
-   * Field _visible.
-   */
-  private boolean _visible;
-
-  /**
-   * keeps track of state for field: _visible
-   */
-  private boolean _has_visible;
-
-  /**
-   * Field _centreColLabels.
-   */
-  private boolean _centreColLabels;
-
-  /**
-   * keeps track of state for field: _centreColLabels
-   */
-  private boolean _has_centreColLabels;
-
-  /**
-   * Field _scaleColLabels.
-   */
-  private boolean _scaleColLabels;
-
-  /**
-   * keeps track of state for field: _scaleColLabels
-   */
-  private boolean _has_scaleColLabels;
-
-  /**
-   * Field _showAllColLabels.
-   */
-  private boolean _showAllColLabels;
-
-  /**
-   * keeps track of state for field: _showAllColLabels
-   */
-  private boolean _has_showAllColLabels;
-
-  /**
-   * is an autocalculated annotation row
-   */
-  private boolean _autoCalculated = false;
-
-  /**
-   * keeps track of state for field: _autoCalculated
-   */
-  private boolean _has_autoCalculated;
-
-  /**
-   * is to be shown below the alignment - introduced in Jalview 2.8 for
-   * visualizing T-COFFEE alignment scores
-   */
-  private boolean _belowAlignment = true;
-
-  /**
-   * keeps track of state for field: _belowAlignment
-   */
-  private boolean _has_belowAlignment;
-
-  /**
-   * Optional string identifier used to group sets of annotation produced by a
-   * particular calculation. Values are opaque strings but have semantic meaning
-   * to Jalview's renderer, data importer and calculation system.
-   */
-  private java.lang.String _calcId;
-
-  /**
-   * Field _annotationElementList.
-   */
-  private java.util.Vector _annotationElementList;
-
-  /**
-   * Field _label.
-   */
-  private java.lang.String _label;
-
-  /**
-   * Field _description.
-   */
-  private java.lang.String _description;
-
-  /**
-   * Field _thresholdLine.
-   */
-  private jalview.schemabinding.version2.ThresholdLine _thresholdLine;
-
-  /**
-   * Field _propertyList.
-   */
-  private java.util.Vector _propertyList;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public Annotation()
-  {
-    super();
-    this._annotationElementList = new java.util.Vector();
-    this._propertyList = 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.schemabinding.version2.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.schemabinding.version2.AnnotationElement vAnnotationElement)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._annotationElementList.add(index, vAnnotationElement);
-  }
-
-  /**
-   * 
-   * 
-   * @param vProperty
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addProperty(
-          final jalview.schemabinding.version2.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.schemabinding.version2.Property vProperty)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._propertyList.add(index, vProperty);
-  }
-
-  /**
-     */
-  public void deleteAutoCalculated()
-  {
-    this._has_autoCalculated = false;
-  }
-
-  /**
-     */
-  public void deleteBelowAlignment()
-  {
-    this._has_belowAlignment = false;
-  }
-
-  /**
-     */
-  public void deleteCentreColLabels()
-  {
-    this._has_centreColLabels = false;
-  }
-
-  /**
-     */
-  public void deleteGraph()
-  {
-    this._has_graph = false;
-  }
-
-  /**
-     */
-  public void deleteGraphColour()
-  {
-    this._has_graphColour = false;
-  }
-
-  /**
-     */
-  public void deleteGraphGroup()
-  {
-    this._has_graphGroup = false;
-  }
-
-  /**
-     */
-  public void deleteGraphHeight()
-  {
-    this._has_graphHeight = false;
-  }
-
-  /**
-     */
-  public void deleteGraphType()
-  {
-    this._has_graphType = false;
-  }
-
-  /**
-     */
-  public void deleteScaleColLabels()
-  {
-    this._has_scaleColLabels = false;
-  }
-
-  /**
-     */
-  public void deleteScore()
-  {
-    this._has_score = false;
-  }
-
-  /**
-     */
-  public void deleteScoreOnly()
-  {
-    this._has_scoreOnly = false;
-  }
-
-  /**
-     */
-  public void deleteShowAllColLabels()
-  {
-    this._has_showAllColLabels = false;
-  }
-
-  /**
-     */
-  public void deleteVisible()
-  {
-    this._has_visible = false;
-  }
-
-  /**
-   * Method enumerateAnnotationElement.
-   * 
-   * @return an Enumeration over all
-   *         jalview.schemabinding.version2.AnnotationElement elements
-   */
-  public java.util.Enumeration enumerateAnnotationElement()
-  {
-    return this._annotationElementList.elements();
-  }
-
-  /**
-   * Method enumerateProperty.
-   * 
-   * @return an Enumeration over all jalview.schemabinding.version2.Property
-   *         elements
-   */
-  public java.util.Enumeration enumerateProperty()
-  {
-    return this._propertyList.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.schemabinding.version2.AnnotationElement
-   *         at the given index
-   */
-  public jalview.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.AnnotationElement[] getAnnotationElement()
-  {
-    jalview.schemabinding.version2.AnnotationElement[] array = new jalview.schemabinding.version2.AnnotationElement[0];
-    return (jalview.schemabinding.version2.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 'autoCalculated'. The field 'autoCalculated' has
-   * the following description: is an autocalculated annotation row
-   * 
-   * @return the value of field 'AutoCalculated'.
-   */
-  public boolean getAutoCalculated()
-  {
-    return this._autoCalculated;
-  }
-
-  /**
-   * Returns the value of field 'belowAlignment'. The field 'belowAlignment' has
-   * the following description: is to be shown below the alignment - introduced
-   * in Jalview 2.8 for visualizing T-COFFEE alignment scores
-   * 
-   * @return the value of field 'BelowAlignment'.
-   */
-  public boolean getBelowAlignment()
-  {
-    return this._belowAlignment;
-  }
-
-  /**
-   * Returns the value of field 'calcId'. The field 'calcId' has the following
-   * description: Optional string identifier used to group sets of annotation
-   * produced by a particular calculation. Values are opaque strings but have
-   * semantic meaning to Jalview's renderer, data importer and calculation
-   * system.
-   * 
-   * @return the value of field 'CalcId'.
-   */
-  public java.lang.String getCalcId()
-  {
-    return this._calcId;
-  }
-
-  /**
-   * Returns the value of field 'centreColLabels'.
-   * 
-   * @return the value of field 'CentreColLabels'.
-   */
-  public boolean getCentreColLabels()
-  {
-    return this._centreColLabels;
-  }
-
-  /**
-   * 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 'graphColour'.
-   * 
-   * @return the value of field 'GraphColour'.
-   */
-  public int getGraphColour()
-  {
-    return this._graphColour;
-  }
-
-  /**
-   * Returns the value of field 'graphGroup'.
-   * 
-   * @return the value of field 'GraphGroup'.
-   */
-  public int getGraphGroup()
-  {
-    return this._graphGroup;
-  }
-
-  /**
-   * Returns the value of field 'graphHeight'. The field 'graphHeight' has the
-   * following description: height in pixels for the graph if this is a
-   * graph-type annotation.
-   * 
-   * @return the value of field 'GraphHeight'.
-   */
-  public int getGraphHeight()
-  {
-    return this._graphHeight;
-  }
-
-  /**
-   * Returns the value of field 'graphType'.
-   * 
-   * @return the value of field 'GraphType'.
-   */
-  public int getGraphType()
-  {
-    return this._graphType;
-  }
-
-  /**
-   * Returns the value of field 'groupRef'.
-   * 
-   * @return the value of field 'GroupRef'.
-   */
-  public java.lang.String getGroupRef()
-  {
-    return this._groupRef;
-  }
-
-  /**
-   * 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 'label'.
-   * 
-   * @return the value of field 'Label'.
-   */
-  public java.lang.String getLabel()
-  {
-    return this._label;
-  }
-
-  /**
-   * 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.schemabinding.version2.Property at the
-   *         given index
-   */
-  public jalview.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.Property[] getProperty()
-  {
-    jalview.schemabinding.version2.Property[] array = new jalview.schemabinding.version2.Property[0];
-    return (jalview.schemabinding.version2.Property[]) this._propertyList
-            .toArray(array);
-  }
-
-  /**
-   * Method getPropertyCount.
-   * 
-   * @return the size of this collection
-   */
-  public int getPropertyCount()
-  {
-    return this._propertyList.size();
-  }
-
-  /**
-   * Returns the value of field 'scaleColLabels'.
-   * 
-   * @return the value of field 'ScaleColLabels'.
-   */
-  public boolean getScaleColLabels()
-  {
-    return this._scaleColLabels;
-  }
-
-  /**
-   * Returns the value of field 'score'.
-   * 
-   * @return the value of field 'Score'.
-   */
-  public double getScore()
-  {
-    return this._score;
-  }
-
-  /**
-   * Returns the value of field 'scoreOnly'.
-   * 
-   * @return the value of field 'ScoreOnly'.
-   */
-  public boolean getScoreOnly()
-  {
-    return this._scoreOnly;
-  }
-
-  /**
-   * Returns the value of field 'sequenceRef'.
-   * 
-   * @return the value of field 'SequenceRef'.
-   */
-  public java.lang.String getSequenceRef()
-  {
-    return this._sequenceRef;
-  }
-
-  /**
-   * Returns the value of field 'showAllColLabels'.
-   * 
-   * @return the value of field 'ShowAllColLabels'.
-   */
-  public boolean getShowAllColLabels()
-  {
-    return this._showAllColLabels;
-  }
-
-  /**
-   * Returns the value of field 'thresholdLine'.
-   * 
-   * @return the value of field 'ThresholdLine'.
-   */
-  public jalview.schemabinding.version2.ThresholdLine getThresholdLine()
-  {
-    return this._thresholdLine;
-  }
-
-  /**
-   * Returns the value of field 'visible'.
-   * 
-   * @return the value of field 'Visible'.
-   */
-  public boolean getVisible()
-  {
-    return this._visible;
-  }
-
-  /**
-   * Method hasAutoCalculated.
-   * 
-   * @return true if at least one AutoCalculated has been added
-   */
-  public boolean hasAutoCalculated()
-  {
-    return this._has_autoCalculated;
-  }
-
-  /**
-   * Method hasBelowAlignment.
-   * 
-   * @return true if at least one BelowAlignment has been added
-   */
-  public boolean hasBelowAlignment()
-  {
-    return this._has_belowAlignment;
-  }
-
-  /**
-   * Method hasCentreColLabels.
-   * 
-   * @return true if at least one CentreColLabels has been added
-   */
-  public boolean hasCentreColLabels()
-  {
-    return this._has_centreColLabels;
-  }
-
-  /**
-   * Method hasGraph.
-   * 
-   * @return true if at least one Graph has been added
-   */
-  public boolean hasGraph()
-  {
-    return this._has_graph;
-  }
-
-  /**
-   * Method hasGraphColour.
-   * 
-   * @return true if at least one GraphColour has been added
-   */
-  public boolean hasGraphColour()
-  {
-    return this._has_graphColour;
-  }
-
-  /**
-   * Method hasGraphGroup.
-   * 
-   * @return true if at least one GraphGroup has been added
-   */
-  public boolean hasGraphGroup()
-  {
-    return this._has_graphGroup;
-  }
-
-  /**
-   * Method hasGraphHeight.
-   * 
-   * @return true if at least one GraphHeight has been added
-   */
-  public boolean hasGraphHeight()
-  {
-    return this._has_graphHeight;
-  }
-
-  /**
-   * Method hasGraphType.
-   * 
-   * @return true if at least one GraphType has been added
-   */
-  public boolean hasGraphType()
-  {
-    return this._has_graphType;
-  }
-
-  /**
-   * Method hasScaleColLabels.
-   * 
-   * @return true if at least one ScaleColLabels has been added
-   */
-  public boolean hasScaleColLabels()
-  {
-    return this._has_scaleColLabels;
-  }
-
-  /**
-   * Method hasScore.
-   * 
-   * @return true if at least one Score has been added
-   */
-  public boolean hasScore()
-  {
-    return this._has_score;
-  }
-
-  /**
-   * Method hasScoreOnly.
-   * 
-   * @return true if at least one ScoreOnly has been added
-   */
-  public boolean hasScoreOnly()
-  {
-    return this._has_scoreOnly;
-  }
-
-  /**
-   * Method hasShowAllColLabels.
-   * 
-   * @return true if at least one ShowAllColLabels has been added
-   */
-  public boolean hasShowAllColLabels()
-  {
-    return this._has_showAllColLabels;
-  }
-
-  /**
-   * Method hasVisible.
-   * 
-   * @return true if at least one Visible has been added
-   */
-  public boolean hasVisible()
-  {
-    return this._has_visible;
-  }
-
-  /**
-   * Returns the value of field 'autoCalculated'. The field 'autoCalculated' has
-   * the following description: is an autocalculated annotation row
-   * 
-   * @return the value of field 'AutoCalculated'.
-   */
-  public boolean isAutoCalculated()
-  {
-    return this._autoCalculated;
-  }
-
-  /**
-   * Returns the value of field 'belowAlignment'. The field 'belowAlignment' has
-   * the following description: is to be shown below the alignment - introduced
-   * in Jalview 2.8 for visualizing T-COFFEE alignment scores
-   * 
-   * @return the value of field 'BelowAlignment'.
-   */
-  public boolean isBelowAlignment()
-  {
-    return this._belowAlignment;
-  }
-
-  /**
-   * Returns the value of field 'centreColLabels'.
-   * 
-   * @return the value of field 'CentreColLabels'.
-   */
-  public boolean isCentreColLabels()
-  {
-    return this._centreColLabels;
-  }
-
-  /**
-   * Returns the value of field 'graph'.
-   * 
-   * @return the value of field 'Graph'.
-   */
-  public boolean isGraph()
-  {
-    return this._graph;
-  }
-
-  /**
-   * Returns the value of field 'scaleColLabels'.
-   * 
-   * @return the value of field 'ScaleColLabels'.
-   */
-  public boolean isScaleColLabels()
-  {
-    return this._scaleColLabels;
-  }
-
-  /**
-   * Returns the value of field 'scoreOnly'.
-   * 
-   * @return the value of field 'ScoreOnly'.
-   */
-  public boolean isScoreOnly()
-  {
-    return this._scoreOnly;
-  }
-
-  /**
-   * Returns the value of field 'showAllColLabels'.
-   * 
-   * @return the value of field 'ShowAllColLabels'.
-   */
-  public boolean isShowAllColLabels()
-  {
-    return this._showAllColLabels;
-  }
-
-  /**
-   * 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 'visible'.
-   * 
-   * @return the value of field 'Visible'.
-   */
-  public boolean isVisible()
-  {
-    return this._visible;
-  }
-
-  /**
-   * 
-   * 
-   * @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();
-  }
-
-  /**
-     */
-  public void removeAllProperty()
-  {
-    this._propertyList.clear();
-  }
-
-  /**
-   * Method removeAnnotationElement.
-   * 
-   * @param vAnnotationElement
-   * @return true if the object was removed from the collection.
-   */
-  public boolean removeAnnotationElement(
-          final jalview.schemabinding.version2.AnnotationElement vAnnotationElement)
-  {
-    boolean removed = _annotationElementList.remove(vAnnotationElement);
-    return removed;
-  }
-
-  /**
-   * Method removeAnnotationElementAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public jalview.schemabinding.version2.AnnotationElement removeAnnotationElementAt(
-          final int index)
-  {
-    java.lang.Object obj = this._annotationElementList.remove(index);
-    return (jalview.schemabinding.version2.AnnotationElement) obj;
-  }
-
-  /**
-   * Method removeProperty.
-   * 
-   * @param vProperty
-   * @return true if the object was removed from the collection.
-   */
-  public boolean removeProperty(
-          final jalview.schemabinding.version2.Property vProperty)
-  {
-    boolean removed = _propertyList.remove(vProperty);
-    return removed;
-  }
-
-  /**
-   * Method removePropertyAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public jalview.schemabinding.version2.Property removePropertyAt(
-          final int index)
-  {
-    java.lang.Object obj = this._propertyList.remove(index);
-    return (jalview.schemabinding.version2.Property) 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.schemabinding.version2.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.schemabinding.version2.AnnotationElement[] vAnnotationElementArray)
-  {
-    // -- copy array
-    _annotationElementList.clear();
-
-    for (int i = 0; i < vAnnotationElementArray.length; i++)
-    {
-      this._annotationElementList.add(vAnnotationElementArray[i]);
-    }
-  }
-
-  /**
-   * Sets the value of field 'autoCalculated'. The field 'autoCalculated' has
-   * the following description: is an autocalculated annotation row
-   * 
-   * @param autoCalculated
-   *          the value of field 'autoCalculated'.
-   */
-  public void setAutoCalculated(final boolean autoCalculated)
-  {
-    this._autoCalculated = autoCalculated;
-    this._has_autoCalculated = true;
-  }
-
-  /**
-   * Sets the value of field 'belowAlignment'. The field 'belowAlignment' has
-   * the following description: is to be shown below the alignment - introduced
-   * in Jalview 2.8 for visualizing T-COFFEE alignment scores
-   * 
-   * @param belowAlignment
-   *          the value of field 'belowAlignment'.
-   */
-  public void setBelowAlignment(final boolean belowAlignment)
-  {
-    this._belowAlignment = belowAlignment;
-    this._has_belowAlignment = true;
-  }
-
-  /**
-   * Sets the value of field 'calcId'. The field 'calcId' has the following
-   * description: Optional string identifier used to group sets of annotation
-   * produced by a particular calculation. Values are opaque strings but have
-   * semantic meaning to Jalview's renderer, data importer and calculation
-   * system.
-   * 
-   * @param calcId
-   *          the value of field 'calcId'.
-   */
-  public void setCalcId(final java.lang.String calcId)
-  {
-    this._calcId = calcId;
-  }
-
-  /**
-   * Sets the value of field 'centreColLabels'.
-   * 
-   * @param centreColLabels
-   *          the value of field 'centreColLabels'.
-   */
-  public void setCentreColLabels(final boolean centreColLabels)
-  {
-    this._centreColLabels = centreColLabels;
-    this._has_centreColLabels = 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 '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 'graphColour'.
-   * 
-   * @param graphColour
-   *          the value of field 'graphColour'.
-   */
-  public void setGraphColour(final int graphColour)
-  {
-    this._graphColour = graphColour;
-    this._has_graphColour = true;
-  }
-
-  /**
-   * Sets the value of field 'graphGroup'.
-   * 
-   * @param graphGroup
-   *          the value of field 'graphGroup'.
-   */
-  public void setGraphGroup(final int graphGroup)
-  {
-    this._graphGroup = graphGroup;
-    this._has_graphGroup = true;
-  }
-
-  /**
-   * Sets the value of field 'graphHeight'. The field 'graphHeight' has the
-   * following description: height in pixels for the graph if this is a
-   * graph-type annotation.
-   * 
-   * @param graphHeight
-   *          the value of field 'graphHeight'.
-   */
-  public void setGraphHeight(final int graphHeight)
-  {
-    this._graphHeight = graphHeight;
-    this._has_graphHeight = 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 'groupRef'.
-   * 
-   * @param groupRef
-   *          the value of field 'groupRef'.
-   */
-  public void setGroupRef(final java.lang.String groupRef)
-  {
-    this._groupRef = groupRef;
-  }
-
-  /**
-   * 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 'label'.
-   * 
-   * @param label
-   *          the value of field 'label'.
-   */
-  public void setLabel(final java.lang.String label)
-  {
-    this._label = label;
-  }
-
-  /**
-   * 
-   * 
-   * @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.schemabinding.version2.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.schemabinding.version2.Property[] vPropertyArray)
-  {
-    // -- copy array
-    _propertyList.clear();
-
-    for (int i = 0; i < vPropertyArray.length; i++)
-    {
-      this._propertyList.add(vPropertyArray[i]);
-    }
-  }
-
-  /**
-   * Sets the value of field 'scaleColLabels'.
-   * 
-   * @param scaleColLabels
-   *          the value of field 'scaleColLabels'.
-   */
-  public void setScaleColLabels(final boolean scaleColLabels)
-  {
-    this._scaleColLabels = scaleColLabels;
-    this._has_scaleColLabels = true;
-  }
-
-  /**
-   * Sets the value of field 'score'.
-   * 
-   * @param score
-   *          the value of field 'score'.
-   */
-  public void setScore(final double score)
-  {
-    this._score = score;
-    this._has_score = true;
-  }
-
-  /**
-   * Sets the value of field 'scoreOnly'.
-   * 
-   * @param scoreOnly
-   *          the value of field 'scoreOnly'.
-   */
-  public void setScoreOnly(final boolean scoreOnly)
-  {
-    this._scoreOnly = scoreOnly;
-    this._has_scoreOnly = true;
-  }
-
-  /**
-   * Sets the value of field 'sequenceRef'.
-   * 
-   * @param sequenceRef
-   *          the value of field 'sequenceRef'.
-   */
-  public void setSequenceRef(final java.lang.String sequenceRef)
-  {
-    this._sequenceRef = sequenceRef;
-  }
-
-  /**
-   * Sets the value of field 'showAllColLabels'.
-   * 
-   * @param showAllColLabels
-   *          the value of field 'showAllColLabels'
-   */
-  public void setShowAllColLabels(final boolean showAllColLabels)
-  {
-    this._showAllColLabels = showAllColLabels;
-    this._has_showAllColLabels = true;
-  }
-
-  /**
-   * Sets the value of field 'thresholdLine'.
-   * 
-   * @param thresholdLine
-   *          the value of field 'thresholdLine'.
-   */
-  public void setThresholdLine(
-          final jalview.schemabinding.version2.ThresholdLine thresholdLine)
-  {
-    this._thresholdLine = thresholdLine;
-  }
-
-  /**
-   * Sets the value of field 'visible'.
-   * 
-   * @param visible
-   *          the value of field 'visible'.
-   */
-  public void setVisible(final boolean visible)
-  {
-    this._visible = visible;
-    this._has_visible = 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.Annotation
-   */
-  public static jalview.schemabinding.version2.Annotation unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.Annotation) Unmarshaller
-            .unmarshal(jalview.schemabinding.version2.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/AnnotationColourScheme.java b/src/jalview/schemabinding/version2/AnnotationColourScheme.java
deleted file mode 100644 (file)
index 2f76e76..0000000
+++ /dev/null
@@ -1,497 +0,0 @@
-/*
- * 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 AnnotationColourScheme.
- * 
- * @version $Revision$ $Date$
- */
-public class AnnotationColourScheme implements java.io.Serializable
-{
-
-  // --------------------------/
-  // - Class/Member Variables -/
-  // --------------------------/
-
-  /**
-   * Field _aboveThreshold.
-   */
-  private int _aboveThreshold;
-
-  /**
-   * keeps track of state for field: _aboveThreshold
-   */
-  private boolean _has_aboveThreshold;
-
-  /**
-   * Field _annotation.
-   */
-  private java.lang.String _annotation;
-
-  /**
-   * Field _minColour.
-   */
-  private int _minColour;
-
-  /**
-   * keeps track of state for field: _minColour
-   */
-  private boolean _has_minColour;
-
-  /**
-   * Field _maxColour.
-   */
-  private int _maxColour;
-
-  /**
-   * keeps track of state for field: _maxColour
-   */
-  private boolean _has_maxColour;
-
-  /**
-   * Field _colourScheme.
-   */
-  private java.lang.String _colourScheme;
-
-  /**
-   * Field _threshold.
-   */
-  private float _threshold;
-
-  /**
-   * keeps track of state for field: _threshold
-   */
-  private boolean _has_threshold;
-
-  /**
-   * Field _perSequence.
-   */
-  private boolean _perSequence;
-
-  /**
-   * keeps track of state for field: _perSequence
-   */
-  private boolean _has_perSequence;
-
-  /**
-   * Field _predefinedColours.
-   */
-  private boolean _predefinedColours;
-
-  /**
-   * keeps track of state for field: _predefinedColours
-   */
-  private boolean _has_predefinedColours;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public AnnotationColourScheme()
-  {
-    super();
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-     */
-  public void deleteAboveThreshold()
-  {
-    this._has_aboveThreshold = false;
-  }
-
-  /**
-     */
-  public void deleteMaxColour()
-  {
-    this._has_maxColour = false;
-  }
-
-  /**
-     */
-  public void deleteMinColour()
-  {
-    this._has_minColour = false;
-  }
-
-  /**
-     */
-  public void deletePerSequence()
-  {
-    this._has_perSequence = false;
-  }
-
-  /**
-     */
-  public void deletePredefinedColours()
-  {
-    this._has_predefinedColours = false;
-  }
-
-  /**
-     */
-  public void deleteThreshold()
-  {
-    this._has_threshold = false;
-  }
-
-  /**
-   * Returns the value of field 'aboveThreshold'.
-   * 
-   * @return the value of field 'AboveThreshold'.
-   */
-  public int getAboveThreshold()
-  {
-    return this._aboveThreshold;
-  }
-
-  /**
-   * Returns the value of field 'annotation'.
-   * 
-   * @return the value of field 'Annotation'.
-   */
-  public java.lang.String getAnnotation()
-  {
-    return this._annotation;
-  }
-
-  /**
-   * Returns the value of field 'colourScheme'.
-   * 
-   * @return the value of field 'ColourScheme'.
-   */
-  public java.lang.String getColourScheme()
-  {
-    return this._colourScheme;
-  }
-
-  /**
-   * Returns the value of field 'maxColour'.
-   * 
-   * @return the value of field 'MaxColour'.
-   */
-  public int getMaxColour()
-  {
-    return this._maxColour;
-  }
-
-  /**
-   * Returns the value of field 'minColour'.
-   * 
-   * @return the value of field 'MinColour'.
-   */
-  public int getMinColour()
-  {
-    return this._minColour;
-  }
-
-  /**
-   * Returns the value of field 'perSequence'.
-   * 
-   * @return the value of field 'PerSequence'.
-   */
-  public boolean getPerSequence()
-  {
-    return this._perSequence;
-  }
-
-  /**
-   * Returns the value of field 'predefinedColours'.
-   * 
-   * @return the value of field 'PredefinedColours'.
-   */
-  public boolean getPredefinedColours()
-  {
-    return this._predefinedColours;
-  }
-
-  /**
-   * Returns the value of field 'threshold'.
-   * 
-   * @return the value of field 'Threshold'.
-   */
-  public float getThreshold()
-  {
-    return this._threshold;
-  }
-
-  /**
-   * Method hasAboveThreshold.
-   * 
-   * @return true if at least one AboveThreshold has been added
-   */
-  public boolean hasAboveThreshold()
-  {
-    return this._has_aboveThreshold;
-  }
-
-  /**
-   * Method hasMaxColour.
-   * 
-   * @return true if at least one MaxColour has been added
-   */
-  public boolean hasMaxColour()
-  {
-    return this._has_maxColour;
-  }
-
-  /**
-   * Method hasMinColour.
-   * 
-   * @return true if at least one MinColour has been added
-   */
-  public boolean hasMinColour()
-  {
-    return this._has_minColour;
-  }
-
-  /**
-   * Method hasPerSequence.
-   * 
-   * @return true if at least one PerSequence has been added
-   */
-  public boolean hasPerSequence()
-  {
-    return this._has_perSequence;
-  }
-
-  /**
-   * Method hasPredefinedColours.
-   * 
-   * @return true if at least one PredefinedColours has been added
-   */
-  public boolean hasPredefinedColours()
-  {
-    return this._has_predefinedColours;
-  }
-
-  /**
-   * Method hasThreshold.
-   * 
-   * @return true if at least one Threshold has been added
-   */
-  public boolean hasThreshold()
-  {
-    return this._has_threshold;
-  }
-
-  /**
-   * Returns the value of field 'perSequence'.
-   * 
-   * @return the value of field 'PerSequence'.
-   */
-  public boolean isPerSequence()
-  {
-    return this._perSequence;
-  }
-
-  /**
-   * Returns the value of field 'predefinedColours'.
-   * 
-   * @return the value of field 'PredefinedColours'.
-   */
-  public boolean isPredefinedColours()
-  {
-    return this._predefinedColours;
-  }
-
-  /**
-   * Method isValid.
-   * 
-   * @return true if this object is valid according to the schema
-   */
-  public boolean isValid()
-  {
-    try
-    {
-      validate();
-    } catch (org.exolab.castor.xml.ValidationException vex)
-    {
-      return false;
-    }
-    return true;
-  }
-
-  /**
-   * 
-   * 
-   * @param out
-   * @throws org.exolab.castor.xml.MarshalException
-   *           if object is null or if any SAXException is thrown during
-   *           marshaling
-   * @throws org.exolab.castor.xml.ValidationException
-   *           if this object is an invalid instance according to the schema
-   */
-  public void marshal(final java.io.Writer out)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    Marshaller.marshal(this, out);
-  }
-
-  /**
-   * 
-   * 
-   * @param handler
-   * @throws java.io.IOException
-   *           if an IOException occurs during marshaling
-   * @throws org.exolab.castor.xml.ValidationException
-   *           if this object is an invalid instance according to the schema
-   * @throws org.exolab.castor.xml.MarshalException
-   *           if object is null or if any SAXException is thrown during
-   *           marshaling
-   */
-  public void marshal(final org.xml.sax.ContentHandler handler)
-          throws java.io.IOException,
-          org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    Marshaller.marshal(this, handler);
-  }
-
-  /**
-   * Sets the value of field 'aboveThreshold'.
-   * 
-   * @param aboveThreshold
-   *          the value of field 'aboveThreshold'.
-   */
-  public void setAboveThreshold(final int aboveThreshold)
-  {
-    this._aboveThreshold = aboveThreshold;
-    this._has_aboveThreshold = true;
-  }
-
-  /**
-   * Sets the value of field 'annotation'.
-   * 
-   * @param annotation
-   *          the value of field 'annotation'.
-   */
-  public void setAnnotation(final java.lang.String annotation)
-  {
-    this._annotation = annotation;
-  }
-
-  /**
-   * Sets the value of field 'colourScheme'.
-   * 
-   * @param colourScheme
-   *          the value of field 'colourScheme'.
-   */
-  public void setColourScheme(final java.lang.String colourScheme)
-  {
-    this._colourScheme = colourScheme;
-  }
-
-  /**
-   * Sets the value of field 'maxColour'.
-   * 
-   * @param maxColour
-   *          the value of field 'maxColour'.
-   */
-  public void setMaxColour(final int maxColour)
-  {
-    this._maxColour = maxColour;
-    this._has_maxColour = true;
-  }
-
-  /**
-   * Sets the value of field 'minColour'.
-   * 
-   * @param minColour
-   *          the value of field 'minColour'.
-   */
-  public void setMinColour(final int minColour)
-  {
-    this._minColour = minColour;
-    this._has_minColour = true;
-  }
-
-  /**
-   * Sets the value of field 'perSequence'.
-   * 
-   * @param perSequence
-   *          the value of field 'perSequence'.
-   */
-  public void setPerSequence(final boolean perSequence)
-  {
-    this._perSequence = perSequence;
-    this._has_perSequence = true;
-  }
-
-  /**
-   * Sets the value of field 'predefinedColours'.
-   * 
-   * @param predefinedColours
-   *          the value of field 'predefinedColours'.
-   */
-  public void setPredefinedColours(final boolean predefinedColours)
-  {
-    this._predefinedColours = predefinedColours;
-    this._has_predefinedColours = true;
-  }
-
-  /**
-   * Sets the value of field 'threshold'.
-   * 
-   * @param threshold
-   *          the value of field 'threshold'.
-   */
-  public void setThreshold(final float threshold)
-  {
-    this._threshold = threshold;
-    this._has_threshold = true;
-  }
-
-  /**
-   * Method unmarshal.
-   * 
-   * @param reader
-   * @throws org.exolab.castor.xml.MarshalException
-   *           if object is null or if any SAXException is thrown during
-   *           marshaling
-   * @throws org.exolab.castor.xml.ValidationException
-   *           if this object is an invalid instance according to the schema
-   * @return the unmarshaled
-   *         jalview.schemabinding.version2.AnnotationColourScheme
-   */
-  public static jalview.schemabinding.version2.AnnotationColourScheme unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.AnnotationColourScheme) Unmarshaller
-            .unmarshal(
-                    jalview.schemabinding.version2.AnnotationColourScheme.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/AnnotationColours.java b/src/jalview/schemabinding/version2/AnnotationColours.java
deleted file mode 100644 (file)
index 350ebce..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * 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 AnnotationColours.
- * 
- * @version $Revision$ $Date$
- */
-public class AnnotationColours extends AnnotationColourScheme implements
-        java.io.Serializable
-{
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public AnnotationColours()
-  {
-    super();
-  }
-
-  // -----------/
-  // - 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;
-    }
-    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 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.AnnotationColourScheme
-   */
-  public static jalview.schemabinding.version2.AnnotationColourScheme unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.AnnotationColourScheme) Unmarshaller
-            .unmarshal(
-                    jalview.schemabinding.version2.AnnotationColours.class,
-                    reader);
-  }
-
-  /**
-   * 
-   * 
-   * @throws org.exolab.castor.xml.ValidationException
-   *           if this object is an invalid instance according to the schema
-   */
-  public void validate() throws org.exolab.castor.xml.ValidationException
-  {
-    org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
-    validator.validate(this);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/AnnotationElement.java b/src/jalview/schemabinding/version2/AnnotationElement.java
deleted file mode 100644 (file)
index 2a765ea..0000000
+++ /dev/null
@@ -1,356 +0,0 @@
-/*
- * 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 AnnotationElement.
- * 
- * @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 _colour.
-   */
-  private int _colour;
-
-  /**
-   * keeps track of state for field: _colour
-   */
-  private boolean _has_colour;
-
-  /**
-   * 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 deleteColour()
-  {
-    this._has_colour = false;
-  }
-
-  /**
-     */
-  public void deletePosition()
-  {
-    this._has_position = false;
-  }
-
-  /**
-     */
-  public void deleteValue()
-  {
-    this._has_value = false;
-  }
-
-  /**
-   * Returns the value of field 'colour'.
-   * 
-   * @return the value of field 'Colour'.
-   */
-  public int getColour()
-  {
-    return this._colour;
-  }
-
-  /**
-   * 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 hasColour.
-   * 
-   * @return true if at least one Colour has been added
-   */
-  public boolean hasColour()
-  {
-    return this._has_colour;
-  }
-
-  /**
-   * 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 '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 '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.schemabinding.version2.AnnotationElement
-   */
-  public static jalview.schemabinding.version2.AnnotationElement unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.AnnotationElement) Unmarshaller
-            .unmarshal(
-                    jalview.schemabinding.version2.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/CalcIdParam.java b/src/jalview/schemabinding/version2/CalcIdParam.java
deleted file mode 100644 (file)
index 57d6986..0000000
+++ /dev/null
@@ -1,300 +0,0 @@
-/*
- * 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 CalcIdParam.
- * 
- * @version $Revision$ $Date$
- */
-public class CalcIdParam extends WebServiceParameterSet implements
-        java.io.Serializable
-{
-
-  // --------------------------/
-  // - Class/Member Variables -/
-  // --------------------------/
-
-  /**
-   * 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
-   * 
-   */
-  private boolean _needsUpdate = false;
-
-  /**
-   * keeps track of state for field: _needsUpdate
-   */
-  private boolean _has_needsUpdate;
-
-  /**
-   * should the calculation be automatically performed on edits
-   * 
-   */
-  private boolean _autoUpdate;
-
-  /**
-   * keeps track of state for field: _autoUpdate
-   */
-  private boolean _has_autoUpdate;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public CalcIdParam()
-  {
-    super();
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-     */
-  public void deleteAutoUpdate()
-  {
-    this._has_autoUpdate = false;
-  }
-
-  /**
-     */
-  public void deleteNeedsUpdate()
-  {
-    this._has_needsUpdate = false;
-  }
-
-  /**
-   * Returns the value of field 'autoUpdate'. The field 'autoUpdate' has the
-   * following description: should the calculation be automatically performed on
-   * edits
-   * 
-   * 
-   * @return the value of field 'AutoUpdate'.
-   */
-  public boolean getAutoUpdate()
-  {
-    return this._autoUpdate;
-  }
-
-  /**
-   * Returns the value of field 'calcId'. The field 'calcId' has the following
-   * description: handle for the calculation which uses this parameter set
-   * 
-   * 
-   * @return the value of field 'CalcId'.
-   */
-  public java.lang.String getCalcId()
-  {
-    return this._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
-   * 
-   * 
-   * @return the value of field 'NeedsUpdate'.
-   */
-  public boolean getNeedsUpdate()
-  {
-    return this._needsUpdate;
-  }
-
-  /**
-   * Method hasAutoUpdate.
-   * 
-   * @return true if at least one AutoUpdate has been added
-   */
-  public boolean hasAutoUpdate()
-  {
-    return this._has_autoUpdate;
-  }
-
-  /**
-   * Method hasNeedsUpdate.
-   * 
-   * @return true if at least one NeedsUpdate has been added
-   */
-  public boolean hasNeedsUpdate()
-  {
-    return this._has_needsUpdate;
-  }
-
-  /**
-   * Returns the value of field 'autoUpdate'. The field 'autoUpdate' has the
-   * following description: should the calculation be automatically performed on
-   * edits
-   * 
-   * 
-   * @return the value of field 'AutoUpdate'.
-   */
-  public boolean isAutoUpdate()
-  {
-    return this._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
-   * 
-   * 
-   * @return the value of field 'NeedsUpdate'.
-   */
-  public boolean isNeedsUpdate()
-  {
-    return this._needsUpdate;
-  }
-
-  /**
-   * 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 'autoUpdate'. The field 'autoUpdate' has the
-   * following description: should the calculation be automatically performed on
-   * edits
-   * 
-   * 
-   * @param autoUpdate
-   *          the value of field 'autoUpdate'.
-   */
-  public void setAutoUpdate(final boolean autoUpdate)
-  {
-    this._autoUpdate = autoUpdate;
-    this._has_autoUpdate = true;
-  }
-
-  /**
-   * Sets the value of field 'calcId'. The field 'calcId' has the following
-   * description: handle for the calculation which uses this parameter set
-   * 
-   * 
-   * @param calcId
-   *          the value of field 'calcId'.
-   */
-  public void setCalcId(final java.lang.String calcId)
-  {
-    this._calcId = 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
-   * 
-   * 
-   * @param needsUpdate
-   *          the value of field 'needsUpdate'.
-   */
-  public void setNeedsUpdate(final boolean needsUpdate)
-  {
-    this._needsUpdate = needsUpdate;
-    this._has_needsUpdate = 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.CalcIdParam
-   */
-  public static jalview.schemabinding.version2.CalcIdParam unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.CalcIdParam) Unmarshaller
-            .unmarshal(jalview.schemabinding.version2.CalcIdParam.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/Colour.java b/src/jalview/schemabinding/version2/Colour.java
deleted file mode 100644 (file)
index d1c7297..0000000
+++ /dev/null
@@ -1,708 +0,0 @@
-/*
- * 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 Colour.
- * 
- * @version $Revision$ $Date$
- */
-public class Colour implements java.io.Serializable
-{
-
-  // --------------------------/
-  // - Class/Member Variables -/
-  // --------------------------/
-
-  /**
-   * Single letter residue code for an alignment colour scheme, or feature type
-   * for a feature colour scheme
-   */
-  private java.lang.String _name;
-
-  /**
-   * Field _RGB.
-   */
-  private java.lang.String _RGB;
-
-  /**
-   * Field _minRGB.
-   */
-  private java.lang.String _minRGB;
-
-  /**
-   * Field _noValueColour.
-   */
-  private jalview.schemabinding.version2.types.NoValueColour _noValueColour = jalview.schemabinding.version2.types.NoValueColour
-          .valueOf("Min");
-
-  /**
-   * Field _threshType.
-   */
-  private jalview.schemabinding.version2.types.ColourThreshTypeType _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;
-
-  /**
-   * name of feature attribute to colour by, or attribute and sub-attribute
-   */
-  private java.util.Vector _attributeNameList;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public Colour()
-  {
-    super();
-    setNoValueColour(jalview.schemabinding.version2.types.NoValueColour
-            .valueOf("Min"));
-    this._attributeNameList = new java.util.Vector();
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-   * 
-   * 
-   * @param vAttributeName
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addAttributeName(final java.lang.String vAttributeName)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check for the maximum size
-    if (this._attributeNameList.size() >= 2)
-    {
-      throw new IndexOutOfBoundsException(
-              "addAttributeName has a maximum of 2");
-    }
-
-    this._attributeNameList.addElement(vAttributeName);
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vAttributeName
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addAttributeName(final int index,
-          final java.lang.String vAttributeName)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check for the maximum size
-    if (this._attributeNameList.size() >= 2)
-    {
-      throw new IndexOutOfBoundsException(
-              "addAttributeName has a maximum of 2");
-    }
-
-    this._attributeNameList.add(index, vAttributeName);
-  }
-
-  /**
-   */
-  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;
-  }
-
-  /**
-   * Method enumerateAttributeName.
-   * 
-   * @return an Enumeration over all java.lang.String elements
-   */
-  public java.util.Enumeration enumerateAttributeName()
-  {
-    return this._attributeNameList.elements();
-  }
-
-  /**
-   * Method getAttributeName.
-   * 
-   * @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 getAttributeName(final int index)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._attributeNameList.size())
-    {
-      throw new IndexOutOfBoundsException("getAttributeName: Index value '"
-              + index + "' not in range [0.."
-              + (this._attributeNameList.size() - 1) + "]");
-    }
-
-    return (java.lang.String) _attributeNameList.get(index);
-  }
-
-  /**
-   * Method getAttributeName.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[] getAttributeName()
-  {
-    java.lang.String[] array = new java.lang.String[0];
-    return (java.lang.String[]) this._attributeNameList.toArray(array);
-  }
-
-  /**
-   * Method getAttributeNameCount.
-   * 
-   * @return the size of this collection
-   */
-  public int getAttributeNameCount()
-  {
-    return this._attributeNameList.size();
-  }
-
-  /**
-   * 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'. The field 'name' has the following
-   * description: Single letter residue code for an alignment colour scheme, or
-   * feature type for a feature colour scheme
-   * 
-   * @return the value of field 'Name'.
-   */
-  public java.lang.String getName()
-  {
-    return this._name;
-  }
-
-  /**
-   * Returns the value of field 'noValueColour'.
-   * 
-   * @return the value of field 'NoValueColour'.
-   */
-  public jalview.schemabinding.version2.types.NoValueColour getNoValueColour()
-  {
-    return this._noValueColour;
-  }
-
-  /**
-   * 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'.
-   * 
-   * @return the value of field 'ThreshType'.
-   */
-  public jalview.schemabinding.version2.types.ColourThreshTypeType 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);
-  }
-
-  /**
-   */
-  public void removeAllAttributeName()
-  {
-    this._attributeNameList.clear();
-  }
-
-  /**
-   * Method removeAttributeName.
-   * 
-   * @param vAttributeName
-   * @return true if the object was removed from the collection.
-   */
-  public boolean removeAttributeName(final java.lang.String vAttributeName)
-  {
-    boolean removed = _attributeNameList.remove(vAttributeName);
-    return removed;
-  }
-
-  /**
-   * Method removeAttributeNameAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public java.lang.String removeAttributeNameAt(final int index)
-  {
-    java.lang.Object obj = this._attributeNameList.remove(index);
-    return (java.lang.String) obj;
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vAttributeName
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void setAttributeName(final int index,
-          final java.lang.String vAttributeName)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._attributeNameList.size())
-    {
-      throw new IndexOutOfBoundsException("setAttributeName: Index value '"
-              + index + "' not in range [0.."
-              + (this._attributeNameList.size() - 1) + "]");
-    }
-
-    this._attributeNameList.set(index, vAttributeName);
-  }
-
-  /**
-   * 
-   * 
-   * @param vAttributeNameArray
-   */
-  public void setAttributeName(final java.lang.String[] vAttributeNameArray)
-  {
-    // -- copy array
-    _attributeNameList.clear();
-
-    for (int i = 0; i < vAttributeNameArray.length; i++)
-    {
-      this._attributeNameList.add(vAttributeNameArray[i]);
-    }
-  }
-
-  /**
-   * 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'. The field 'name' has the following
-   * description: Single letter residue code for an alignment colour scheme, or
-   * feature type for a feature colour scheme
-   * 
-   * @param name
-   *          the value of field 'name'.
-   */
-  public void setName(final java.lang.String name)
-  {
-    this._name = name;
-  }
-
-  /**
-   * Sets the value of field 'noValueColour'.
-   * 
-   * @param noValueColour
-   *          the value of field 'noValueColour'.
-   */
-  public void setNoValueColour(
-          final jalview.schemabinding.version2.types.NoValueColour noValueColour)
-  {
-    this._noValueColour = noValueColour;
-  }
-
-  /**
-   * 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'.
-   * 
-   * @param threshType
-   *          the value of field 'threshType'.
-   */
-  public void setThreshType(
-          final jalview.schemabinding.version2.types.ColourThreshTypeType 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.schemabinding.version2.Colour
-   */
-  public static jalview.schemabinding.version2.Colour unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.Colour) Unmarshaller
-            .unmarshal(jalview.schemabinding.version2.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/CompoundMatcher.java b/src/jalview/schemabinding/version2/CompoundMatcher.java
deleted file mode 100644 (file)
index 27714e2..0000000
+++ /dev/null
@@ -1,374 +0,0 @@
-/*
- * 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 CompoundMatcher.
- * 
- * @version $Revision$ $Date$
- */
-public class CompoundMatcher implements java.io.Serializable
-{
-
-  // --------------------------/
-  // - Class/Member Variables -/
-  // --------------------------/
-
-  /**
-   * If true, matchers are AND-ed, if false they are OR-ed
-   */
-  private boolean _and;
-
-  /**
-   * keeps track of state for field: _and
-   */
-  private boolean _has_and;
-
-  /**
-   * Field _matcherSetList.
-   */
-  private java.util.Vector _matcherSetList;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public CompoundMatcher()
-  {
-    super();
-    this._matcherSetList = new java.util.Vector();
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-   * 
-   * 
-   * @param vMatcherSet
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addMatcherSet(
-          final jalview.schemabinding.version2.MatcherSet vMatcherSet)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check for the maximum size
-    if (this._matcherSetList.size() >= 2)
-    {
-      throw new IndexOutOfBoundsException(
-              "addMatcherSet has a maximum of 2");
-    }
-
-    this._matcherSetList.addElement(vMatcherSet);
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vMatcherSet
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addMatcherSet(final int index,
-          final jalview.schemabinding.version2.MatcherSet vMatcherSet)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check for the maximum size
-    if (this._matcherSetList.size() >= 2)
-    {
-      throw new IndexOutOfBoundsException(
-              "addMatcherSet has a maximum of 2");
-    }
-
-    this._matcherSetList.add(index, vMatcherSet);
-  }
-
-  /**
-   */
-  public void deleteAnd()
-  {
-    this._has_and = false;
-  }
-
-  /**
-   * Method enumerateMatcherSet.
-   * 
-   * @return an Enumeration over all jalview.schemabinding.version2.MatcherSet
-   *         elements
-   */
-  public java.util.Enumeration enumerateMatcherSet()
-  {
-    return this._matcherSetList.elements();
-  }
-
-  /**
-   * Returns the value of field 'and'. The field 'and' has the following
-   * description: If true, matchers are AND-ed, if false they are OR-ed
-   * 
-   * @return the value of field 'And'.
-   */
-  public boolean getAnd()
-  {
-    return this._and;
-  }
-
-  /**
-   * Method getMatcherSet.
-   * 
-   * @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.MatcherSet at the
-   *         given index
-   */
-  public jalview.schemabinding.version2.MatcherSet getMatcherSet(
-          final int index) throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._matcherSetList.size())
-    {
-      throw new IndexOutOfBoundsException(
-              "getMatcherSet: Index value '" + index + "' not in range [0.."
-                      + (this._matcherSetList.size() - 1) + "]");
-    }
-
-    return (jalview.schemabinding.version2.MatcherSet) _matcherSetList
-            .get(index);
-  }
-
-  /**
-   * Method getMatcherSet.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.MatcherSet[] getMatcherSet()
-  {
-    jalview.schemabinding.version2.MatcherSet[] array = new jalview.schemabinding.version2.MatcherSet[0];
-    return (jalview.schemabinding.version2.MatcherSet[]) this._matcherSetList
-            .toArray(array);
-  }
-
-  /**
-   * Method getMatcherSetCount.
-   * 
-   * @return the size of this collection
-   */
-  public int getMatcherSetCount()
-  {
-    return this._matcherSetList.size();
-  }
-
-  /**
-   * Method hasAnd.
-   * 
-   * @return true if at least one And has been added
-   */
-  public boolean hasAnd()
-  {
-    return this._has_and;
-  }
-
-  /**
-   * Returns the value of field 'and'. The field 'and' has the following
-   * description: If true, matchers are AND-ed, if false they are OR-ed
-   * 
-   * @return the value of field 'And'.
-   */
-  public boolean isAnd()
-  {
-    return this._and;
-  }
-
-  /**
-   * 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 removeAllMatcherSet()
-  {
-    this._matcherSetList.clear();
-  }
-
-  /**
-   * Method removeMatcherSet.
-   * 
-   * @param vMatcherSet
-   * @return true if the object was removed from the collection.
-   */
-  public boolean removeMatcherSet(
-          final jalview.schemabinding.version2.MatcherSet vMatcherSet)
-  {
-    boolean removed = _matcherSetList.remove(vMatcherSet);
-    return removed;
-  }
-
-  /**
-   * Method removeMatcherSetAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public jalview.schemabinding.version2.MatcherSet removeMatcherSetAt(
-          final int index)
-  {
-    java.lang.Object obj = this._matcherSetList.remove(index);
-    return (jalview.schemabinding.version2.MatcherSet) obj;
-  }
-
-  /**
-   * Sets the value of field 'and'. The field 'and' has the following
-   * description: If true, matchers are AND-ed, if false they are OR-ed
-   * 
-   * @param and
-   *          the value of field 'and'.
-   */
-  public void setAnd(final boolean and)
-  {
-    this._and = and;
-    this._has_and = true;
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vMatcherSet
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void setMatcherSet(final int index,
-          final jalview.schemabinding.version2.MatcherSet vMatcherSet)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._matcherSetList.size())
-    {
-      throw new IndexOutOfBoundsException(
-              "setMatcherSet: Index value '" + index + "' not in range [0.."
-                      + (this._matcherSetList.size() - 1) + "]");
-    }
-
-    this._matcherSetList.set(index, vMatcherSet);
-  }
-
-  /**
-   * 
-   * 
-   * @param vMatcherSetArray
-   */
-  public void setMatcherSet(
-          final jalview.schemabinding.version2.MatcherSet[] vMatcherSetArray)
-  {
-    // -- copy array
-    _matcherSetList.clear();
-
-    for (int i = 0; i < vMatcherSetArray.length; i++)
-    {
-      this._matcherSetList.add(vMatcherSetArray[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.schemabinding.version2.CompoundMatcher
-   */
-  public static jalview.schemabinding.version2.CompoundMatcher unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.CompoundMatcher) Unmarshaller
-            .unmarshal(jalview.schemabinding.version2.CompoundMatcher.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/DBRef.java b/src/jalview/schemabinding/version2/DBRef.java
deleted file mode 100644 (file)
index 85997ff..0000000
+++ /dev/null
@@ -1,233 +0,0 @@
-/*
- * 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 DBRef.
- * 
- * @version $Revision$ $Date$
- */
-public class DBRef implements java.io.Serializable
-{
-
-  // --------------------------/
-  // - Class/Member Variables -/
-  // --------------------------/
-
-  /**
-   * Field _source.
-   */
-  private java.lang.String _source;
-
-  /**
-   * Field _version.
-   */
-  private java.lang.String _version;
-
-  /**
-   * Field _accessionId.
-   */
-  private java.lang.String _accessionId;
-
-  /**
-   * Field _mapping.
-   */
-  private jalview.schemabinding.version2.Mapping _mapping;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public DBRef()
-  {
-    super();
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-   * Returns the value of field 'accessionId'.
-   * 
-   * @return the value of field 'AccessionId'.
-   */
-  public java.lang.String getAccessionId()
-  {
-    return this._accessionId;
-  }
-
-  /**
-   * Returns the value of field 'mapping'.
-   * 
-   * @return the value of field 'Mapping'.
-   */
-  public jalview.schemabinding.version2.Mapping getMapping()
-  {
-    return this._mapping;
-  }
-
-  /**
-   * Returns the value of field 'source'.
-   * 
-   * @return the value of field 'Source'.
-   */
-  public java.lang.String getSource()
-  {
-    return this._source;
-  }
-
-  /**
-   * 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 'accessionId'.
-   * 
-   * @param accessionId
-   *          the value of field 'accessionId'.
-   */
-  public void setAccessionId(final java.lang.String accessionId)
-  {
-    this._accessionId = accessionId;
-  }
-
-  /**
-   * Sets the value of field 'mapping'.
-   * 
-   * @param mapping
-   *          the value of field 'mapping'.
-   */
-  public void setMapping(
-          final jalview.schemabinding.version2.Mapping mapping)
-  {
-    this._mapping = mapping;
-  }
-
-  /**
-   * Sets the value of field 'source'.
-   * 
-   * @param source
-   *          the value of field 'source'.
-   */
-  public void setSource(final java.lang.String source)
-  {
-    this._source = source;
-  }
-
-  /**
-   * 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.schemabinding.version2.DBRef
-   */
-  public static jalview.schemabinding.version2.DBRef unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.DBRef) Unmarshaller.unmarshal(
-            jalview.schemabinding.version2.DBRef.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/Feature.java b/src/jalview/schemabinding/version2/Feature.java
deleted file mode 100644 (file)
index 9e484d5..0000000
+++ /dev/null
@@ -1,548 +0,0 @@
-/*
- * 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 Feature.
- * 
- * @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;
-
-  /**
-   * Field _featureGroup.
-   */
-  private java.lang.String _featureGroup;
-
-  /**
-   * Field _score.
-   */
-  private float _score;
-
-  /**
-   * keeps track of state for field: _score
-   */
-  private boolean _has_score;
-
-  /**
-   * Field _otherDataList.
-   */
-  private java.util.Vector _otherDataList;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public Feature()
-  {
-    super();
-    this._otherDataList = new java.util.Vector();
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-   * 
-   * 
-   * @param vOtherData
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addOtherData(
-          final jalview.schemabinding.version2.OtherData vOtherData)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._otherDataList.addElement(vOtherData);
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vOtherData
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addOtherData(final int index,
-          final jalview.schemabinding.version2.OtherData vOtherData)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._otherDataList.add(index, vOtherData);
-  }
-
-  /**
-     */
-  public void deleteBegin()
-  {
-    this._has_begin = false;
-  }
-
-  /**
-     */
-  public void deleteEnd()
-  {
-    this._has_end = false;
-  }
-
-  /**
-     */
-  public void deleteScore()
-  {
-    this._has_score = false;
-  }
-
-  /**
-   * Method enumerateOtherData.
-   * 
-   * @return an Enumeration over all jalview.schemabinding.version2.OtherData
-   *         elements
-   */
-  public java.util.Enumeration enumerateOtherData()
-  {
-    return this._otherDataList.elements();
-  }
-
-  /**
-   * 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 'featureGroup'.
-   * 
-   * @return the value of field 'FeatureGroup'.
-   */
-  public java.lang.String getFeatureGroup()
-  {
-    return this._featureGroup;
-  }
-
-  /**
-   * Method getOtherData.
-   * 
-   * @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.OtherData at the
-   *         given index
-   */
-  public jalview.schemabinding.version2.OtherData getOtherData(
-          final int index) throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._otherDataList.size())
-    {
-      throw new IndexOutOfBoundsException("getOtherData: Index value '"
-              + index + "' not in range [0.."
-              + (this._otherDataList.size() - 1) + "]");
-    }
-
-    return (jalview.schemabinding.version2.OtherData) _otherDataList
-            .get(index);
-  }
-
-  /**
-   * Method getOtherData.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.OtherData[] getOtherData()
-  {
-    jalview.schemabinding.version2.OtherData[] array = new jalview.schemabinding.version2.OtherData[0];
-    return (jalview.schemabinding.version2.OtherData[]) this._otherDataList
-            .toArray(array);
-  }
-
-  /**
-   * Method getOtherDataCount.
-   * 
-   * @return the size of this collection
-   */
-  public int getOtherDataCount()
-  {
-    return this._otherDataList.size();
-  }
-
-  /**
-   * Returns the value of field 'score'.
-   * 
-   * @return the value of field 'Score'.
-   */
-  public float getScore()
-  {
-    return this._score;
-  }
-
-  /**
-   * 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 hasScore.
-   * 
-   * @return true if at least one Score has been added
-   */
-  public boolean hasScore()
-  {
-    return this._has_score;
-  }
-
-  /**
-   * 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 removeAllOtherData()
-  {
-    this._otherDataList.clear();
-  }
-
-  /**
-   * Method removeOtherData.
-   * 
-   * @param vOtherData
-   * @return true if the object was removed from the collection.
-   */
-  public boolean removeOtherData(
-          final jalview.schemabinding.version2.OtherData vOtherData)
-  {
-    boolean removed = _otherDataList.remove(vOtherData);
-    return removed;
-  }
-
-  /**
-   * Method removeOtherDataAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public jalview.schemabinding.version2.OtherData removeOtherDataAt(
-          final int index)
-  {
-    java.lang.Object obj = this._otherDataList.remove(index);
-    return (jalview.schemabinding.version2.OtherData) obj;
-  }
-
-  /**
-   * 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 'featureGroup'.
-   * 
-   * @param featureGroup
-   *          the value of field 'featureGroup'.
-   */
-  public void setFeatureGroup(final java.lang.String featureGroup)
-  {
-    this._featureGroup = featureGroup;
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vOtherData
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void setOtherData(final int index,
-          final jalview.schemabinding.version2.OtherData vOtherData)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._otherDataList.size())
-    {
-      throw new IndexOutOfBoundsException("setOtherData: Index value '"
-              + index + "' not in range [0.."
-              + (this._otherDataList.size() - 1) + "]");
-    }
-
-    this._otherDataList.set(index, vOtherData);
-  }
-
-  /**
-   * 
-   * 
-   * @param vOtherDataArray
-   */
-  public void setOtherData(
-          final jalview.schemabinding.version2.OtherData[] vOtherDataArray)
-  {
-    // -- copy array
-    _otherDataList.clear();
-
-    for (int i = 0; i < vOtherDataArray.length; i++)
-    {
-      this._otherDataList.add(vOtherDataArray[i]);
-    }
-  }
-
-  /**
-   * Sets the value of field 'score'.
-   * 
-   * @param score
-   *          the value of field 'score'.
-   */
-  public void setScore(final float score)
-  {
-    this._score = score;
-    this._has_score = 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.schemabinding.version2.Featur
-   */
-  public static jalview.schemabinding.version2.Feature unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.Feature) Unmarshaller.unmarshal(
-            jalview.schemabinding.version2.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/FeatureMatcher.java b/src/jalview/schemabinding/version2/FeatureMatcher.java
deleted file mode 100644 (file)
index 4d29cab..0000000
+++ /dev/null
@@ -1,383 +0,0 @@
-/*
- * 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 FeatureMatcher.
- * 
- * @version $Revision$ $Date$
- */
-public class FeatureMatcher implements java.io.Serializable
-{
-
-  // --------------------------/
-  // - Class/Member Variables -/
-  // --------------------------/
-
-  /**
-   * Field _by.
-   */
-  private jalview.schemabinding.version2.types.FeatureMatcherByType _by;
-
-  /**
-   * name of feature attribute to filter on, or attribute and sub-attribute
-   */
-  private java.util.Vector _attributeNameList;
-
-  /**
-   * Field _condition.
-   */
-  private java.lang.String _condition;
-
-  /**
-   * Field _value.
-   */
-  private java.lang.String _value;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public FeatureMatcher()
-  {
-    super();
-    this._attributeNameList = new java.util.Vector();
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-   * 
-   * 
-   * @param vAttributeName
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addAttributeName(final java.lang.String vAttributeName)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check for the maximum size
-    if (this._attributeNameList.size() >= 2)
-    {
-      throw new IndexOutOfBoundsException(
-              "addAttributeName has a maximum of 2");
-    }
-
-    this._attributeNameList.addElement(vAttributeName);
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vAttributeName
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addAttributeName(final int index,
-          final java.lang.String vAttributeName)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check for the maximum size
-    if (this._attributeNameList.size() >= 2)
-    {
-      throw new IndexOutOfBoundsException(
-              "addAttributeName has a maximum of 2");
-    }
-
-    this._attributeNameList.add(index, vAttributeName);
-  }
-
-  /**
-   * Method enumerateAttributeName.
-   * 
-   * @return an Enumeration over all java.lang.String elements
-   */
-  public java.util.Enumeration enumerateAttributeName()
-  {
-    return this._attributeNameList.elements();
-  }
-
-  /**
-   * Method getAttributeName.
-   * 
-   * @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 getAttributeName(final int index)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._attributeNameList.size())
-    {
-      throw new IndexOutOfBoundsException("getAttributeName: Index value '"
-              + index + "' not in range [0.."
-              + (this._attributeNameList.size() - 1) + "]");
-    }
-
-    return (java.lang.String) _attributeNameList.get(index);
-  }
-
-  /**
-   * Method getAttributeName.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[] getAttributeName()
-  {
-    java.lang.String[] array = new java.lang.String[0];
-    return (java.lang.String[]) this._attributeNameList.toArray(array);
-  }
-
-  /**
-   * Method getAttributeNameCount.
-   * 
-   * @return the size of this collection
-   */
-  public int getAttributeNameCount()
-  {
-    return this._attributeNameList.size();
-  }
-
-  /**
-   * Returns the value of field 'by'.
-   * 
-   * @return the value of field 'By'.
-   */
-  public jalview.schemabinding.version2.types.FeatureMatcherByType getBy()
-  {
-    return this._by;
-  }
-
-  /**
-   * Returns the value of field 'condition'.
-   * 
-   * @return the value of field 'Condition'.
-   */
-  public java.lang.String getCondition()
-  {
-    return this._condition;
-  }
-
-  /**
-   * 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);
-  }
-
-  /**
-   */
-  public void removeAllAttributeName()
-  {
-    this._attributeNameList.clear();
-  }
-
-  /**
-   * Method removeAttributeName.
-   * 
-   * @param vAttributeName
-   * @return true if the object was removed from the collection.
-   */
-  public boolean removeAttributeName(final java.lang.String vAttributeName)
-  {
-    boolean removed = _attributeNameList.remove(vAttributeName);
-    return removed;
-  }
-
-  /**
-   * Method removeAttributeNameAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public java.lang.String removeAttributeNameAt(final int index)
-  {
-    java.lang.Object obj = this._attributeNameList.remove(index);
-    return (java.lang.String) obj;
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vAttributeName
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void setAttributeName(final int index,
-          final java.lang.String vAttributeName)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._attributeNameList.size())
-    {
-      throw new IndexOutOfBoundsException("setAttributeName: Index value '"
-              + index + "' not in range [0.."
-              + (this._attributeNameList.size() - 1) + "]");
-    }
-
-    this._attributeNameList.set(index, vAttributeName);
-  }
-
-  /**
-   * 
-   * 
-   * @param vAttributeNameArray
-   */
-  public void setAttributeName(final java.lang.String[] vAttributeNameArray)
-  {
-    // -- copy array
-    _attributeNameList.clear();
-
-    for (int i = 0; i < vAttributeNameArray.length; i++)
-    {
-      this._attributeNameList.add(vAttributeNameArray[i]);
-    }
-  }
-
-  /**
-   * Sets the value of field 'by'.
-   * 
-   * @param by
-   *          the value of field 'by'.
-   */
-  public void setBy(
-          final jalview.schemabinding.version2.types.FeatureMatcherByType by)
-  {
-    this._by = by;
-  }
-
-  /**
-   * Sets the value of field 'condition'.
-   * 
-   * @param condition
-   *          the value of field 'condition'.
-   */
-  public void setCondition(final java.lang.String condition)
-  {
-    this._condition = condition;
-  }
-
-  /**
-   * 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.schemabinding.version2.FeatureMatcher
-   */
-  public static jalview.schemabinding.version2.FeatureMatcher unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.FeatureMatcher) Unmarshaller
-            .unmarshal(jalview.schemabinding.version2.FeatureMatcher.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/FeatureMatcherSet.java b/src/jalview/schemabinding/version2/FeatureMatcherSet.java
deleted file mode 100644 (file)
index 2d79a98..0000000
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * 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;
-
-/**
- * A feature match condition, which may be simple or compound
- * 
- * @version $Revision$ $Date$
- */
-public class FeatureMatcherSet implements java.io.Serializable
-{
-
-  // --------------------------/
-  // - Class/Member Variables -/
-  // --------------------------/
-
-  /**
-   * Internal choice value storage
-   */
-  private java.lang.Object _choiceValue;
-
-  /**
-   * Field _matchCondition.
-   */
-  private MatchCondition _matchCondition;
-
-  /**
-   * Field _compoundMatcher.
-   */
-  private CompoundMatcher _compoundMatcher;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public FeatureMatcherSet()
-  {
-    super();
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-   * Returns the value of field 'choiceValue'. The field 'choiceValue' has the
-   * following description: Internal choice value storage
-   * 
-   * @return the value of field 'ChoiceValue'.
-   */
-  public java.lang.Object getChoiceValue()
-  {
-    return this._choiceValue;
-  }
-
-  /**
-   * Returns the value of field 'compoundMatcher'.
-   * 
-   * @return the value of field 'CompoundMatcher'.
-   */
-  public CompoundMatcher getCompoundMatcher()
-  {
-    return this._compoundMatcher;
-  }
-
-  /**
-   * Returns the value of field 'matchCondition'.
-   * 
-   * @return the value of field 'MatchCondition'.
-   */
-  public MatchCondition getMatchCondition()
-  {
-    return this._matchCondition;
-  }
-
-  /**
-   * 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 'compoundMatcher'.
-   * 
-   * @param compoundMatcher
-   *          the value of field 'compoundMatcher'.
-   */
-  public void setCompoundMatcher(final CompoundMatcher compoundMatcher)
-  {
-    this._compoundMatcher = compoundMatcher;
-    this._choiceValue = compoundMatcher;
-  }
-
-  /**
-   * Sets the value of field 'matchCondition'.
-   * 
-   * @param matchCondition
-   *          the value of field 'matchCondition'.
-   */
-  public void setMatchCondition(final MatchCondition matchCondition)
-  {
-    this._matchCondition = matchCondition;
-    this._choiceValue = matchCondition;
-  }
-
-  /**
-   * 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.FeatureMatcherSet
-   */
-  public static jalview.schemabinding.version2.FeatureMatcherSet unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.FeatureMatcherSet) Unmarshaller
-            .unmarshal(
-                    jalview.schemabinding.version2.FeatureMatcherSet.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/FeatureSettings.java b/src/jalview/schemabinding/version2/FeatureSettings.java
deleted file mode 100644 (file)
index fa75e76..0000000
+++ /dev/null
@@ -1,462 +0,0 @@
-/*
- * 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 FeatureSettings.
- * 
- * @version $Revision$ $Date$
- */
-public class FeatureSettings implements java.io.Serializable
-{
-
-  // --------------------------/
-  // - Class/Member Variables -/
-  // --------------------------/
-
-  /**
-   * Field _settingList.
-   */
-  private java.util.Vector _settingList;
-
-  /**
-   * Field _groupList.
-   */
-  private java.util.Vector _groupList;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public FeatureSettings()
-  {
-    super();
-    this._settingList = new java.util.Vector();
-    this._groupList = new java.util.Vector();
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-   * 
-   * 
-   * @param vGroup
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addGroup(final jalview.schemabinding.version2.Group vGroup)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._groupList.addElement(vGroup);
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vGroup
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addGroup(final int index,
-          final jalview.schemabinding.version2.Group vGroup)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._groupList.add(index, vGroup);
-  }
-
-  /**
-   * 
-   * 
-   * @param vSetting
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addSetting(
-          final jalview.schemabinding.version2.Setting vSetting)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._settingList.addElement(vSetting);
-  }
-
-  /**
-   * 
-   * 
-   * @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.schemabinding.version2.Setting vSetting)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._settingList.add(index, vSetting);
-  }
-
-  /**
-   * Method enumerateGroup.
-   * 
-   * @return an Enumeration over all jalview.schemabinding.version2.Group
-   *         elements
-   */
-  public java.util.Enumeration enumerateGroup()
-  {
-    return this._groupList.elements();
-  }
-
-  /**
-   * Method enumerateSetting.
-   * 
-   * @return an Enumeration over all jalview.schemabinding.version2.Setting
-   *         elements
-   */
-  public java.util.Enumeration enumerateSetting()
-  {
-    return this._settingList.elements();
-  }
-
-  /**
-   * Method getGroup.
-   * 
-   * @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.Group at the given
-   *         index
-   */
-  public jalview.schemabinding.version2.Group getGroup(final int index)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._groupList.size())
-    {
-      throw new IndexOutOfBoundsException("getGroup: Index value '" + index
-              + "' not in range [0.." + (this._groupList.size() - 1) + "]");
-    }
-
-    return (jalview.schemabinding.version2.Group) _groupList.get(index);
-  }
-
-  /**
-   * Method getGroup.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.Group[] getGroup()
-  {
-    jalview.schemabinding.version2.Group[] array = new jalview.schemabinding.version2.Group[0];
-    return (jalview.schemabinding.version2.Group[]) this._groupList
-            .toArray(array);
-  }
-
-  /**
-   * Method getGroupCount.
-   * 
-   * @return the size of this collection
-   */
-  public int getGroupCount()
-  {
-    return this._groupList.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.schemabinding.version2.Setting at the
-   *         given index
-   */
-  public jalview.schemabinding.version2.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.schemabinding.version2.Setting) _settingList.get(index);
-  }
-
-  /**
-   * 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.schemabinding.version2.Setting[] getSetting()
-  {
-    jalview.schemabinding.version2.Setting[] array = new jalview.schemabinding.version2.Setting[0];
-    return (jalview.schemabinding.version2.Setting[]) this._settingList
-            .toArray(array);
-  }
-
-  /**
-   * Method getSettingCount.
-   * 
-   * @return the size of this collection
-   */
-  public int getSettingCount()
-  {
-    return this._settingList.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 removeAllGroup()
-  {
-    this._groupList.clear();
-  }
-
-  /**
-     */
-  public void removeAllSetting()
-  {
-    this._settingList.clear();
-  }
-
-  /**
-   * Method removeGroup.
-   * 
-   * @param vGroup
-   * @return true if the object was removed from the collection.
-   */
-  public boolean removeGroup(
-          final jalview.schemabinding.version2.Group vGroup)
-  {
-    boolean removed = _groupList.remove(vGroup);
-    return removed;
-  }
-
-  /**
-   * Method removeGroupAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public jalview.schemabinding.version2.Group removeGroupAt(final int index)
-  {
-    java.lang.Object obj = this._groupList.remove(index);
-    return (jalview.schemabinding.version2.Group) obj;
-  }
-
-  /**
-   * Method removeSetting.
-   * 
-   * @param vSetting
-   * @return true if the object was removed from the collection.
-   */
-  public boolean removeSetting(
-          final jalview.schemabinding.version2.Setting vSetting)
-  {
-    boolean removed = _settingList.remove(vSetting);
-    return removed;
-  }
-
-  /**
-   * Method removeSettingAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public jalview.schemabinding.version2.Setting removeSettingAt(
-          final int index)
-  {
-    java.lang.Object obj = this._settingList.remove(index);
-    return (jalview.schemabinding.version2.Setting) obj;
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vGroup
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void setGroup(final int index,
-          final jalview.schemabinding.version2.Group vGroup)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._groupList.size())
-    {
-      throw new IndexOutOfBoundsException("setGroup: Index value '" + index
-              + "' not in range [0.." + (this._groupList.size() - 1) + "]");
-    }
-
-    this._groupList.set(index, vGroup);
-  }
-
-  /**
-   * 
-   * 
-   * @param vGroupArray
-   */
-  public void setGroup(
-          final jalview.schemabinding.version2.Group[] vGroupArray)
-  {
-    // -- copy array
-    _groupList.clear();
-
-    for (int i = 0; i < vGroupArray.length; i++)
-    {
-      this._groupList.add(vGroupArray[i]);
-    }
-  }
-
-  /**
-   * 
-   * 
-   * @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.schemabinding.version2.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);
-  }
-
-  /**
-   * 
-   * 
-   * @param vSettingArray
-   */
-  public void setSetting(
-          final jalview.schemabinding.version2.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.schemabinding.version2.FeatureSettings
-   */
-  public static jalview.schemabinding.version2.FeatureSettings unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.FeatureSettings) Unmarshaller
-            .unmarshal(
-                    jalview.schemabinding.version2.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/Features.java b/src/jalview/schemabinding/version2/Features.java
deleted file mode 100644 (file)
index 5d17512..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * 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 Features.
- * 
- * @version $Revision$ $Date$
- */
-public class Features extends Feature implements java.io.Serializable
-{
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public Features()
-  {
-    super();
-  }
-
-  // -----------/
-  // - 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;
-    }
-    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 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.Featur
-   */
-  public static jalview.schemabinding.version2.Feature unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.Feature) Unmarshaller.unmarshal(
-            jalview.schemabinding.version2.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/Filter.java b/src/jalview/schemabinding/version2/Filter.java
deleted file mode 100644 (file)
index 45323a7..0000000
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * 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 Filter.
- * 
- * @version $Revision$ $Date$
- */
-public class Filter implements java.io.Serializable
-{
-
-  // --------------------------/
-  // - Class/Member Variables -/
-  // --------------------------/
-
-  /**
-   * Field _featureType.
-   */
-  private java.lang.String _featureType;
-
-  /**
-   * Field _matcherSet.
-   */
-  private jalview.schemabinding.version2.MatcherSet _matcherSet;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public Filter()
-  {
-    super();
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-   * Returns the value of field 'featureType'.
-   * 
-   * @return the value of field 'FeatureType'.
-   */
-  public java.lang.String getFeatureType()
-  {
-    return this._featureType;
-  }
-
-  /**
-   * Returns the value of field 'matcherSet'.
-   * 
-   * @return the value of field 'MatcherSet'.
-   */
-  public jalview.schemabinding.version2.MatcherSet getMatcherSet()
-  {
-    return this._matcherSet;
-  }
-
-  /**
-   * 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 'featureType'.
-   * 
-   * @param featureType
-   *          the value of field 'featureType'.
-   */
-  public void setFeatureType(final java.lang.String featureType)
-  {
-    this._featureType = featureType;
-  }
-
-  /**
-   * Sets the value of field 'matcherSet'.
-   * 
-   * @param matcherSet
-   *          the value of field 'matcherSet'.
-   */
-  public void setMatcherSet(
-          final jalview.schemabinding.version2.MatcherSet matcherSet)
-  {
-    this._matcherSet = matcherSet;
-  }
-
-  /**
-   * 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.Filter
-   */
-  public static jalview.schemabinding.version2.Filter unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.Filter) Unmarshaller
-            .unmarshal(jalview.schemabinding.version2.Filter.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/Group.java b/src/jalview/schemabinding/version2/Group.java
deleted file mode 100644 (file)
index ec1af95..0000000
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * 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 Group.
- * 
- * @version $Revision$ $Date$
- */
-public class Group implements java.io.Serializable
-{
-
-  // --------------------------/
-  // - Class/Member Variables -/
-  // --------------------------/
-
-  /**
-   * Field _name.
-   */
-  private java.lang.String _name;
-
-  /**
-   * Field _display.
-   */
-  private boolean _display;
-
-  /**
-   * keeps track of state for field: _display
-   */
-  private boolean _has_display;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public Group()
-  {
-    super();
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-     */
-  public void deleteDisplay()
-  {
-    this._has_display = false;
-  }
-
-  /**
-   * Returns the value of field 'display'.
-   * 
-   * @return the value of field 'Display'.
-   */
-  public boolean getDisplay()
-  {
-    return this._display;
-  }
-
-  /**
-   * Returns the value of field 'name'.
-   * 
-   * @return the value of field 'Name'.
-   */
-  public java.lang.String getName()
-  {
-    return this._name;
-  }
-
-  /**
-   * 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 '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 'name'.
-   * 
-   * @param name
-   *          the value of field 'name'.
-   */
-  public void setName(final java.lang.String name)
-  {
-    this._name = name;
-  }
-
-  /**
-   * 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.Group
-   */
-  public static jalview.schemabinding.version2.Group unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.Group) Unmarshaller.unmarshal(
-            jalview.schemabinding.version2.Group.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/HiddenColumns.java b/src/jalview/schemabinding/version2/HiddenColumns.java
deleted file mode 100644 (file)
index beac4e0..0000000
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
- * 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 HiddenColumns.
- * 
- * @version $Revision$ $Date$
- */
-public class HiddenColumns 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;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public HiddenColumns()
-  {
-    super();
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-     */
-  public void deleteEnd()
-  {
-    this._has_end = false;
-  }
-
-  /**
-     */
-  public void deleteStart()
-  {
-    this._has_start = false;
-  }
-
-  /**
-   * Returns the value of field 'end'.
-   * 
-   * @return the value of field 'End'.
-   */
-  public int getEnd()
-  {
-    return this._end;
-  }
-
-  /**
-   * Returns the value of field 'start'.
-   * 
-   * @return the value of field 'Start'.
-   */
-  public int getStart()
-  {
-    return this._start;
-  }
-
-  /**
-   * Method hasEnd.
-   * 
-   * @return true if at least one End has been added
-   */
-  public boolean hasEnd()
-  {
-    return this._has_end;
-  }
-
-  /**
-   * 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);
-  }
-
-  /**
-   * 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 '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.schemabinding.version2.HiddenColumns
-   */
-  public static jalview.schemabinding.version2.HiddenColumns unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.HiddenColumns) Unmarshaller
-            .unmarshal(jalview.schemabinding.version2.HiddenColumns.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/JGroup.java b/src/jalview/schemabinding/version2/JGroup.java
deleted file mode 100644 (file)
index 962569f..0000000
+++ /dev/null
@@ -1,1260 +0,0 @@
-/*
- * 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 JGroup.
- * 
- * @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 _textCol1.
-   */
-  private int _textCol1;
-
-  /**
-   * keeps track of state for field: _textCol1
-   */
-  private boolean _has_textCol1;
-
-  /**
-   * Field _textCol2.
-   */
-  private int _textCol2;
-
-  /**
-   * keeps track of state for field: _textCol2
-   */
-  private boolean _has_textCol2;
-
-  /**
-   * Field _textColThreshold.
-   */
-  private int _textColThreshold;
-
-  /**
-   * keeps track of state for field: _textColThreshold
-   */
-  private boolean _has_textColThreshold;
-
-  /**
-   * Field _showUnconserved.
-   */
-  private boolean _showUnconserved;
-
-  /**
-   * keeps track of state for field: _showUnconserved
-   */
-  private boolean _has_showUnconserved;
-
-  /**
-   * Field _ignoreGapsinConsensus.
-   */
-  private boolean _ignoreGapsinConsensus = true;
-
-  /**
-   * keeps track of state for field: _ignoreGapsinConsensus
-   */
-  private boolean _has_ignoreGapsinConsensus;
-
-  /**
-   * Field _showConsensusHistogram.
-   */
-  private boolean _showConsensusHistogram = true;
-
-  /**
-   * keeps track of state for field: _showConsensusHistogram
-   */
-  private boolean _has_showConsensusHistogram;
-
-  /**
-   * Field _showSequenceLogo.
-   */
-  private boolean _showSequenceLogo = false;
-
-  /**
-   * keeps track of state for field: _showSequenceLogo
-   */
-  private boolean _has_showSequenceLogo;
-
-  /**
-   * Field _normaliseSequenceLogo.
-   */
-  private boolean _normaliseSequenceLogo = false;
-
-  /**
-   * keeps track of state for field: _normaliseSequenceLogo
-   */
-  private boolean _has_normaliseSequenceLogo;
-
-  /**
-   * Optional sequence group ID (only needs to be unique for this alignment)
-   * 
-   */
-  private java.lang.String _id;
-
-  /**
-   * Field _seqList.
-   */
-  private java.util.Vector _seqList;
-
-  /**
-   * Field _annotationColours.
-   */
-  private jalview.schemabinding.version2.AnnotationColours _annotationColours;
-
-  // ----------------/
-  // - 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 java.lang.String vSeq)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._seqList.addElement(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 java.lang.String vSeq)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._seqList.add(index, 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 deleteIgnoreGapsinConsensus()
-  {
-    this._has_ignoreGapsinConsensus = false;
-  }
-
-  /**
-     */
-  public void deleteNormaliseSequenceLogo()
-  {
-    this._has_normaliseSequenceLogo = false;
-  }
-
-  /**
-     */
-  public void deleteOutlineColour()
-  {
-    this._has_outlineColour = false;
-  }
-
-  /**
-     */
-  public void deletePidThreshold()
-  {
-    this._has_pidThreshold = false;
-  }
-
-  /**
-     */
-  public void deleteShowConsensusHistogram()
-  {
-    this._has_showConsensusHistogram = false;
-  }
-
-  /**
-     */
-  public void deleteShowSequenceLogo()
-  {
-    this._has_showSequenceLogo = false;
-  }
-
-  /**
-     */
-  public void deleteShowUnconserved()
-  {
-    this._has_showUnconserved = false;
-  }
-
-  /**
-     */
-  public void deleteStart()
-  {
-    this._has_start = false;
-  }
-
-  /**
-     */
-  public void deleteTextCol1()
-  {
-    this._has_textCol1 = false;
-  }
-
-  /**
-     */
-  public void deleteTextCol2()
-  {
-    this._has_textCol2 = false;
-  }
-
-  /**
-     */
-  public void deleteTextColThreshold()
-  {
-    this._has_textColThreshold = false;
-  }
-
-  /**
-   * Method enumerateSeq.
-   * 
-   * @return an Enumeration over all java.lang.String elements
-   */
-  public java.util.Enumeration enumerateSeq()
-  {
-    return this._seqList.elements();
-  }
-
-  /**
-   * Returns the value of field 'annotationColours'.
-   * 
-   * @return the value of field 'AnnotationColours'.
-   */
-  public jalview.schemabinding.version2.AnnotationColours getAnnotationColours()
-  {
-    return this._annotationColours;
-  }
-
-  /**
-   * 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 'id'. The field 'id' has the following
-   * description: Optional sequence group ID (only needs to be unique for this
-   * alignment)
-   * 
-   * 
-   * @return the value of field 'Id'.
-   */
-  public java.lang.String getId()
-  {
-    return this._id;
-  }
-
-  /**
-   * Returns the value of field 'ignoreGapsinConsensus'.
-   * 
-   * @return the value of field 'IgnoreGapsinConsensus'.
-   */
-  public boolean getIgnoreGapsinConsensus()
-  {
-    return this._ignoreGapsinConsensus;
-  }
-
-  /**
-   * 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 'normaliseSequenceLogo'.
-   * 
-   * @return the value of field 'NormaliseSequenceLogo'.
-   */
-  public boolean getNormaliseSequenceLogo()
-  {
-    return this._normaliseSequenceLogo;
-  }
-
-  /**
-   * 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 java.lang.String at the given index
-   */
-  public java.lang.String 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.String) _seqList.get(index);
-  }
-
-  /**
-   * Method getSeq.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[] getSeq()
-  {
-    java.lang.String[] array = new java.lang.String[0];
-    return (java.lang.String[]) this._seqList.toArray(array);
-  }
-
-  /**
-   * Method getSeqCount.
-   * 
-   * @return the size of this collection
-   */
-  public int getSeqCount()
-  {
-    return this._seqList.size();
-  }
-
-  /**
-   * Returns the value of field 'showConsensusHistogram'.
-   * 
-   * @return the value of field 'ShowConsensusHistogram'.
-   */
-  public boolean getShowConsensusHistogram()
-  {
-    return this._showConsensusHistogram;
-  }
-
-  /**
-   * Returns the value of field 'showSequenceLogo'.
-   * 
-   * @return the value of field 'ShowSequenceLogo'.
-   */
-  public boolean getShowSequenceLogo()
-  {
-    return this._showSequenceLogo;
-  }
-
-  /**
-   * Returns the value of field 'showUnconserved'.
-   * 
-   * @return the value of field 'ShowUnconserved'.
-   */
-  public boolean getShowUnconserved()
-  {
-    return this._showUnconserved;
-  }
-
-  /**
-   * Returns the value of field 'start'.
-   * 
-   * @return the value of field 'Start'.
-   */
-  public int getStart()
-  {
-    return this._start;
-  }
-
-  /**
-   * Returns the value of field 'textCol1'.
-   * 
-   * @return the value of field 'TextCol1'.
-   */
-  public int getTextCol1()
-  {
-    return this._textCol1;
-  }
-
-  /**
-   * Returns the value of field 'textCol2'.
-   * 
-   * @return the value of field 'TextCol2'.
-   */
-  public int getTextCol2()
-  {
-    return this._textCol2;
-  }
-
-  /**
-   * Returns the value of field 'textColThreshold'.
-   * 
-   * @return the value of field 'TextColThreshold'.
-   */
-  public int getTextColThreshold()
-  {
-    return this._textColThreshold;
-  }
-
-  /**
-   * 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 hasIgnoreGapsinConsensus.
-   * 
-   * @return true if at least one IgnoreGapsinConsensus has been added
-   */
-  public boolean hasIgnoreGapsinConsensus()
-  {
-    return this._has_ignoreGapsinConsensus;
-  }
-
-  /**
-   * Method hasNormaliseSequenceLogo.
-   * 
-   * @return true if at least one NormaliseSequenceLogo has been added
-   */
-  public boolean hasNormaliseSequenceLogo()
-  {
-    return this._has_normaliseSequenceLogo;
-  }
-
-  /**
-   * 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 hasShowConsensusHistogram.
-   * 
-   * @return true if at least one ShowConsensusHistogram has been added
-   */
-  public boolean hasShowConsensusHistogram()
-  {
-    return this._has_showConsensusHistogram;
-  }
-
-  /**
-   * Method hasShowSequenceLogo.
-   * 
-   * @return true if at least one ShowSequenceLogo has been added
-   */
-  public boolean hasShowSequenceLogo()
-  {
-    return this._has_showSequenceLogo;
-  }
-
-  /**
-   * Method hasShowUnconserved.
-   * 
-   * @return true if at least one ShowUnconserved has been added
-   */
-  public boolean hasShowUnconserved()
-  {
-    return this._has_showUnconserved;
-  }
-
-  /**
-   * Method hasStart.
-   * 
-   * @return true if at least one Start has been added
-   */
-  public boolean hasStart()
-  {
-    return this._has_start;
-  }
-
-  /**
-   * Method hasTextCol1.
-   * 
-   * @return true if at least one TextCol1 has been added
-   */
-  public boolean hasTextCol1()
-  {
-    return this._has_textCol1;
-  }
-
-  /**
-   * Method hasTextCol2.
-   * 
-   * @return true if at least one TextCol2 has been added
-   */
-  public boolean hasTextCol2()
-  {
-    return this._has_textCol2;
-  }
-
-  /**
-   * Method hasTextColThreshold.
-   * 
-   * @return true if at least one TextColThreshold has been added
-   */
-  public boolean hasTextColThreshold()
-  {
-    return this._has_textColThreshold;
-  }
-
-  /**
-   * 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;
-  }
-
-  /**
-   * Returns the value of field 'ignoreGapsinConsensus'.
-   * 
-   * @return the value of field 'IgnoreGapsinConsensus'.
-   */
-  public boolean isIgnoreGapsinConsensus()
-  {
-    return this._ignoreGapsinConsensus;
-  }
-
-  /**
-   * Returns the value of field 'normaliseSequenceLogo'.
-   * 
-   * @return the value of field 'NormaliseSequenceLogo'.
-   */
-  public boolean isNormaliseSequenceLogo()
-  {
-    return this._normaliseSequenceLogo;
-  }
-
-  /**
-   * Returns the value of field 'showConsensusHistogram'.
-   * 
-   * @return the value of field 'ShowConsensusHistogram'.
-   */
-  public boolean isShowConsensusHistogram()
-  {
-    return this._showConsensusHistogram;
-  }
-
-  /**
-   * Returns the value of field 'showSequenceLogo'.
-   * 
-   * @return the value of field 'ShowSequenceLogo'.
-   */
-  public boolean isShowSequenceLogo()
-  {
-    return this._showSequenceLogo;
-  }
-
-  /**
-   * Returns the value of field 'showUnconserved'.
-   * 
-   * @return the value of field 'ShowUnconserved'.
-   */
-  public boolean isShowUnconserved()
-  {
-    return this._showUnconserved;
-  }
-
-  /**
-   * 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 java.lang.String vSeq)
-  {
-    boolean removed = _seqList.remove(vSeq);
-    return removed;
-  }
-
-  /**
-   * Method removeSeqAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public java.lang.String removeSeqAt(final int index)
-  {
-    java.lang.Object obj = this._seqList.remove(index);
-    return (java.lang.String) obj;
-  }
-
-  /**
-   * Sets the value of field 'annotationColours'.
-   * 
-   * @param annotationColours
-   *          the value of field 'annotationColours'.
-   */
-  public void setAnnotationColours(
-          final jalview.schemabinding.version2.AnnotationColours annotationColours)
-  {
-    this._annotationColours = annotationColours;
-  }
-
-  /**
-   * 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 'id'. The field 'id' has the following description:
-   * Optional sequence group ID (only needs to be unique for this alignment)
-   * 
-   * 
-   * @param id
-   *          the value of field 'id'.
-   */
-  public void setId(final java.lang.String id)
-  {
-    this._id = id;
-  }
-
-  /**
-   * Sets the value of field 'ignoreGapsinConsensus'.
-   * 
-   * @param ignoreGapsinConsensus
-   *          the value of field 'ignoreGapsinConsensus'.
-   */
-  public void setIgnoreGapsinConsensus(final boolean ignoreGapsinConsensus)
-  {
-    this._ignoreGapsinConsensus = ignoreGapsinConsensus;
-    this._has_ignoreGapsinConsensus = 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 'normaliseSequenceLogo'.
-   * 
-   * @param normaliseSequenceLogo
-   *          the value of field 'normaliseSequenceLogo'.
-   */
-  public void setNormaliseSequenceLogo(final boolean normaliseSequenceLogo)
-  {
-    this._normaliseSequenceLogo = normaliseSequenceLogo;
-    this._has_normaliseSequenceLogo = true;
-  }
-
-  /**
-   * 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 java.lang.String 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, vSeq);
-  }
-
-  /**
-   * 
-   * 
-   * @param vSeqArray
-   */
-  public void setSeq(final java.lang.String[] vSeqArray)
-  {
-    // -- copy array
-    _seqList.clear();
-
-    for (int i = 0; i < vSeqArray.length; i++)
-    {
-      this._seqList.add(vSeqArray[i]);
-    }
-  }
-
-  /**
-   * Sets the value of field 'showConsensusHistogram'.
-   * 
-   * @param showConsensusHistogram
-   *          the value of field 'showConsensusHistogram'.
-   */
-  public void setShowConsensusHistogram(final boolean showConsensusHistogram)
-  {
-    this._showConsensusHistogram = showConsensusHistogram;
-    this._has_showConsensusHistogram = true;
-  }
-
-  /**
-   * Sets the value of field 'showSequenceLogo'.
-   * 
-   * @param showSequenceLogo
-   *          the value of field 'showSequenceLogo'
-   */
-  public void setShowSequenceLogo(final boolean showSequenceLogo)
-  {
-    this._showSequenceLogo = showSequenceLogo;
-    this._has_showSequenceLogo = true;
-  }
-
-  /**
-   * Sets the value of field 'showUnconserved'.
-   * 
-   * @param showUnconserved
-   *          the value of field 'showUnconserved'.
-   */
-  public void setShowUnconserved(final boolean showUnconserved)
-  {
-    this._showUnconserved = showUnconserved;
-    this._has_showUnconserved = true;
-  }
-
-  /**
-   * 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;
-  }
-
-  /**
-   * Sets the value of field 'textCol1'.
-   * 
-   * @param textCol1
-   *          the value of field 'textCol1'.
-   */
-  public void setTextCol1(final int textCol1)
-  {
-    this._textCol1 = textCol1;
-    this._has_textCol1 = true;
-  }
-
-  /**
-   * Sets the value of field 'textCol2'.
-   * 
-   * @param textCol2
-   *          the value of field 'textCol2'.
-   */
-  public void setTextCol2(final int textCol2)
-  {
-    this._textCol2 = textCol2;
-    this._has_textCol2 = true;
-  }
-
-  /**
-   * Sets the value of field 'textColThreshold'.
-   * 
-   * @param textColThreshold
-   *          the value of field 'textColThreshold'
-   */
-  public void setTextColThreshold(final int textColThreshold)
-  {
-    this._textColThreshold = textColThreshold;
-    this._has_textColThreshold = 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.JGroup
-   */
-  public static jalview.schemabinding.version2.JGroup unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.JGroup) Unmarshaller.unmarshal(
-            jalview.schemabinding.version2.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/JSeq.java b/src/jalview/schemabinding/version2/JSeq.java
deleted file mode 100644 (file)
index 7c6308e..0000000
+++ /dev/null
@@ -1,1097 +0,0 @@
-/*
- * 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 JSeq.
- * 
- * @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 java.lang.String _id;
-
-  /**
-   * Field _hidden.
-   */
-  private boolean _hidden;
-
-  /**
-   * keeps track of state for field: _hidden
-   */
-  private boolean _has_hidden;
-
-  /**
-   * Field _viewreference.
-   */
-  private boolean _viewreference;
-
-  /**
-   * keeps track of state for field: _viewreference
-   */
-  private boolean _has_viewreference;
-
-  /**
-   * Field _featuresList.
-   */
-  private java.util.Vector _featuresList;
-
-  /**
-   * Field _pdbidsList.
-   */
-  private java.util.Vector _pdbidsList;
-
-  /**
-   * Field _hiddenSequencesList.
-   */
-  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 -/
-  // ----------------/
-
-  public JSeq()
-  {
-    super();
-    this._featuresList = new java.util.Vector();
-    this._pdbidsList = new java.util.Vector();
-    this._hiddenSequencesList = new java.util.Vector();
-    this._rnaViewerList = 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.schemabinding.version2.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.schemabinding.version2.Features vFeatures)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._featuresList.add(index, vFeatures);
-  }
-
-  /**
-   * 
-   * 
-   * @param vHiddenSequences
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addHiddenSequences(final int vHiddenSequences)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._hiddenSequencesList.addElement(new java.lang.Integer(
-            vHiddenSequences));
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vHiddenSequences
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addHiddenSequences(final int index, final int vHiddenSequences)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._hiddenSequencesList.add(index, new java.lang.Integer(
-            vHiddenSequences));
-  }
-
-  /**
-   * 
-   * 
-   * @param vPdbids
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addPdbids(final jalview.schemabinding.version2.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.schemabinding.version2.Pdbids vPdbids)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._pdbidsList.add(index, vPdbids);
-  }
-
-  /**
-   * 
-   * 
-   * @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()
-  {
-    this._has_colour = false;
-  }
-
-  /**
-     */
-  public void deleteEnd()
-  {
-    this._has_end = false;
-  }
-
-  /**
-     */
-  public void deleteHidden()
-  {
-    this._has_hidden = false;
-  }
-
-  /**
-     */
-  public void deleteStart()
-  {
-    this._has_start = false;
-  }
-
-  /**
-     */
-  public void deleteViewreference()
-  {
-    this._has_viewreference = false;
-  }
-
-  /**
-   * Method enumerateFeatures.
-   * 
-   * @return an Enumeration over all jalview.schemabinding.version2.Features
-   *         elements
-   */
-  public java.util.Enumeration enumerateFeatures()
-  {
-    return this._featuresList.elements();
-  }
-
-  /**
-   * Method enumerateHiddenSequences.
-   * 
-   * @return an Enumeration over all int elements
-   */
-  public java.util.Enumeration enumerateHiddenSequences()
-  {
-    return this._hiddenSequencesList.elements();
-  }
-
-  /**
-   * Method enumeratePdbids.
-   * 
-   * @return an Enumeration over all jalview.schemabinding.version2.Pdbids
-   *         elements
-   */
-  public java.util.Enumeration enumeratePdbids()
-  {
-    return this._pdbidsList.elements();
-  }
-
-  /**
-   * 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'.
-   */
-  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.schemabinding.version2.Features at the
-   *         given index
-   */
-  public jalview.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.Features[] getFeatures()
-  {
-    jalview.schemabinding.version2.Features[] array = new jalview.schemabinding.version2.Features[0];
-    return (jalview.schemabinding.version2.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 'hidden'.
-   * 
-   * @return the value of field 'Hidden'.
-   */
-  public boolean getHidden()
-  {
-    return this._hidden;
-  }
-
-  /**
-   * Method getHiddenSequences.
-   * 
-   * @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 getHiddenSequences(final int index)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._hiddenSequencesList.size())
-    {
-      throw new IndexOutOfBoundsException(
-              "getHiddenSequences: Index value '" + index
-                      + "' not in range [0.."
-                      + (this._hiddenSequencesList.size() - 1) + "]");
-    }
-
-    return ((java.lang.Integer) _hiddenSequencesList.get(index)).intValue();
-  }
-
-  /**
-   * Method getHiddenSequences.Returns the contents of the collection in an
-   * Array.
-   * 
-   * @return this collection as an Array
-   */
-  public int[] getHiddenSequences()
-  {
-    int size = this._hiddenSequencesList.size();
-    int[] array = new int[size];
-    java.util.Iterator iter = _hiddenSequencesList.iterator();
-    for (int index = 0; index < size; index++)
-    {
-      array[index] = ((java.lang.Integer) iter.next()).intValue();
-    }
-    return array;
-  }
-
-  /**
-   * Method getHiddenSequencesCount.
-   * 
-   * @return the size of this collection
-   */
-  public int getHiddenSequencesCount()
-  {
-    return this._hiddenSequencesList.size();
-  }
-
-  /**
-   * Returns the value of field 'id'.
-   * 
-   * @return the value of field 'Id'.
-   */
-  public java.lang.String 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.schemabinding.version2.Pdbids at the given
-   *         index
-   */
-  public jalview.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.Pdbids[] getPdbids()
-  {
-    jalview.schemabinding.version2.Pdbids[] array = new jalview.schemabinding.version2.Pdbids[0];
-    return (jalview.schemabinding.version2.Pdbids[]) this._pdbidsList
-            .toArray(array);
-  }
-
-  /**
-   * Method getPdbidsCount.
-   * 
-   * @return the size of this collection
-   */
-  public int getPdbidsCount()
-  {
-    return this._pdbidsList.size();
-  }
-
-  /**
-   * 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 int getStart()
-  {
-    return this._start;
-  }
-
-  /**
-   * Returns the value of field 'viewreference'.
-   * 
-   * @return the value of field 'Viewreference'.
-   */
-  public boolean getViewreference()
-  {
-    return this._viewreference;
-  }
-
-  /**
-   * 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 hasHidden.
-   * 
-   * @return true if at least one Hidden has been added
-   */
-  public boolean hasHidden()
-  {
-    return this._has_hidden;
-  }
-
-  /**
-   * Method hasStart.
-   * 
-   * @return true if at least one Start has been added
-   */
-  public boolean hasStart()
-  {
-    return this._has_start;
-  }
-
-  /**
-   * Method hasViewreference.
-   * 
-   * @return true if at least one Viewreference has been added
-   */
-  public boolean hasViewreference()
-  {
-    return this._has_viewreference;
-  }
-
-  /**
-   * Returns the value of field 'hidden'.
-   * 
-   * @return the value of field 'Hidden'.
-   */
-  public boolean isHidden()
-  {
-    return this._hidden;
-  }
-
-  /**
-   * 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 'viewreference'.
-   * 
-   * @return the value of field 'Viewreference'.
-   */
-  public boolean isViewreference()
-  {
-    return this._viewreference;
-  }
-
-  /**
-   * 
-   * 
-   * @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 removeAllHiddenSequences()
-  {
-    this._hiddenSequencesList.clear();
-  }
-
-  /**
-     */
-  public void removeAllPdbids()
-  {
-    this._pdbidsList.clear();
-  }
-
-  /**
-     */
-  public void removeAllRnaViewer()
-  {
-    this._rnaViewerList.clear();
-  }
-
-  /**
-   * Method removeFeatures.
-   * 
-   * @param vFeatures
-   * @return true if the object was removed from the collection.
-   */
-  public boolean removeFeatures(
-          final jalview.schemabinding.version2.Features vFeatures)
-  {
-    boolean removed = _featuresList.remove(vFeatures);
-    return removed;
-  }
-
-  /**
-   * Method removeFeaturesAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public jalview.schemabinding.version2.Features removeFeaturesAt(
-          final int index)
-  {
-    java.lang.Object obj = this._featuresList.remove(index);
-    return (jalview.schemabinding.version2.Features) obj;
-  }
-
-  /**
-   * Method removeHiddenSequences.
-   * 
-   * @param vHiddenSequences
-   * @return true if the object was removed from the collection.
-   */
-  public boolean removeHiddenSequences(final int vHiddenSequences)
-  {
-    boolean removed = _hiddenSequencesList.remove(new java.lang.Integer(
-            vHiddenSequences));
-    return removed;
-  }
-
-  /**
-   * Method removeHiddenSequencesAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public int removeHiddenSequencesAt(final int index)
-  {
-    java.lang.Object obj = this._hiddenSequencesList.remove(index);
-    return ((java.lang.Integer) obj).intValue();
-  }
-
-  /**
-   * Method removePdbids.
-   * 
-   * @param vPdbids
-   * @return true if the object was removed from the collection.
-   */
-  public boolean removePdbids(
-          final jalview.schemabinding.version2.Pdbids vPdbids)
-  {
-    boolean removed = _pdbidsList.remove(vPdbids);
-    return removed;
-  }
-
-  /**
-   * Method removePdbidsAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public jalview.schemabinding.version2.Pdbids removePdbidsAt(
-          final int index)
-  {
-    java.lang.Object obj = this._pdbidsList.remove(index);
-    return (jalview.schemabinding.version2.Pdbids) obj;
-  }
-
-  /**
-   * 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'.
-   */
-  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.schemabinding.version2.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.schemabinding.version2.Features[] vFeaturesArray)
-  {
-    // -- copy array
-    _featuresList.clear();
-
-    for (int i = 0; i < vFeaturesArray.length; i++)
-    {
-      this._featuresList.add(vFeaturesArray[i]);
-    }
-  }
-
-  /**
-   * Sets the value of field 'hidden'.
-   * 
-   * @param hidden
-   *          the value of field 'hidden'.
-   */
-  public void setHidden(final boolean hidden)
-  {
-    this._hidden = hidden;
-    this._has_hidden = true;
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vHiddenSequences
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void setHiddenSequences(final int index, final int vHiddenSequences)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._hiddenSequencesList.size())
-    {
-      throw new IndexOutOfBoundsException(
-              "setHiddenSequences: Index value '" + index
-                      + "' not in range [0.."
-                      + (this._hiddenSequencesList.size() - 1) + "]");
-    }
-
-    this._hiddenSequencesList.set(index, new java.lang.Integer(
-            vHiddenSequences));
-  }
-
-  /**
-   * 
-   * 
-   * @param vHiddenSequencesArray
-   */
-  public void setHiddenSequences(final int[] vHiddenSequencesArray)
-  {
-    // -- copy array
-    _hiddenSequencesList.clear();
-
-    for (int i = 0; i < vHiddenSequencesArray.length; i++)
-    {
-      this._hiddenSequencesList.add(new java.lang.Integer(
-              vHiddenSequencesArray[i]));
-    }
-  }
-
-  /**
-   * 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 vPdbids
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void setPdbids(final int index,
-          final jalview.schemabinding.version2.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.schemabinding.version2.Pdbids[] vPdbidsArray)
-  {
-    // -- copy array
-    _pdbidsList.clear();
-
-    for (int i = 0; i < vPdbidsArray.length; i++)
-    {
-      this._pdbidsList.add(vPdbidsArray[i]);
-    }
-  }
-
-  /**
-   * 
-   * 
-   * @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'.
-   */
-  public void setStart(final int start)
-  {
-    this._start = start;
-    this._has_start = true;
-  }
-
-  /**
-   * Sets the value of field 'viewreference'.
-   * 
-   * @param viewreference
-   *          the value of field 'viewreference'.
-   */
-  public void setViewreference(final boolean viewreference)
-  {
-    this._viewreference = viewreference;
-    this._has_viewreference = 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.JSeq
-   */
-  public static jalview.schemabinding.version2.JSeq unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.JSeq) Unmarshaller.unmarshal(
-            jalview.schemabinding.version2.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/JalviewModel.java b/src/jalview/schemabinding/version2/JalviewModel.java
deleted file mode 100644 (file)
index c13ef64..0000000
+++ /dev/null
@@ -1,235 +0,0 @@
-/*
- * 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 JalviewModel.
- * 
- * @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.schemabinding.version2.VamsasModel _vamsasModel;
-
-  /**
-   * Field _jalviewModelSequence.
-   */
-  private jalview.schemabinding.version2.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.schemabinding.version2.JalviewModelSequence getJalviewModelSequence()
-  {
-    return this._jalviewModelSequence;
-  }
-
-  /**
-   * Returns the value of field 'vamsasModel'.
-   * 
-   * @return the value of field 'VamsasModel'.
-   */
-  public jalview.schemabinding.version2.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.schemabinding.version2.JalviewModelSequence jalviewModelSequence)
-  {
-    this._jalviewModelSequence = jalviewModelSequence;
-  }
-
-  /**
-   * Sets the value of field 'vamsasModel'.
-   * 
-   * @param vamsasModel
-   *          the value of field 'vamsasModel'.
-   */
-  public void setVamsasModel(
-          final jalview.schemabinding.version2.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.schemabinding.version2.JalviewModel
-   */
-  public static jalview.schemabinding.version2.JalviewModel unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.JalviewModel) Unmarshaller
-            .unmarshal(jalview.schemabinding.version2.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/JalviewModelSequence.java b/src/jalview/schemabinding/version2/JalviewModelSequence.java
deleted file mode 100644 (file)
index c7c02c5..0000000
+++ /dev/null
@@ -1,986 +0,0 @@
-/*
- * 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 JalviewModelSequence.
- * 
- * @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.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.Viewport vViewport)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._viewportList.add(index, vViewport);
-  }
-
-  /**
-   * Method enumerateJGroup.
-   * 
-   * @return an Enumeration over all jalview.schemabinding.version2.JGroup
-   *         elements
-   */
-  public java.util.Enumeration enumerateJGroup()
-  {
-    return this._JGroupList.elements();
-  }
-
-  /**
-   * Method enumerateJSeq.
-   * 
-   * @return an Enumeration over all jalview.schemabinding.version2.JSeq
-   *         elements
-   */
-  public java.util.Enumeration enumerateJSeq()
-  {
-    return this._JSeqList.elements();
-  }
-
-  /**
-   * Method enumerateTree.
-   * 
-   * @return an Enumeration over all jalview.schemabinding.version2.Tree
-   *         elements
-   */
-  public java.util.Enumeration enumerateTree()
-  {
-    return this._treeList.elements();
-  }
-
-  /**
-   * Method enumerateUserColours.
-   * 
-   * @return an Enumeration over all jalview.schemabinding.version2.UserColours
-   *         elements
-   */
-  public java.util.Enumeration enumerateUserColours()
-  {
-    return this._userColoursList.elements();
-  }
-
-  /**
-   * Method enumerateViewport.
-   * 
-   * @return an Enumeration over all jalview.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.JGroup at the given
-   *         index
-   */
-  public jalview.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.JGroup[] getJGroup()
-  {
-    jalview.schemabinding.version2.JGroup[] array = new jalview.schemabinding.version2.JGroup[0];
-    return (jalview.schemabinding.version2.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.schemabinding.version2.JSeq at the given
-   *         index
-   */
-  public jalview.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.JSeq[] getJSeq()
-  {
-    jalview.schemabinding.version2.JSeq[] array = new jalview.schemabinding.version2.JSeq[0];
-    return (jalview.schemabinding.version2.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.schemabinding.version2.Tree at the given
-   *         index
-   */
-  public jalview.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.Tree[] getTree()
-  {
-    jalview.schemabinding.version2.Tree[] array = new jalview.schemabinding.version2.Tree[0];
-    return (jalview.schemabinding.version2.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.schemabinding.version2.UserColours at the
-   *         given index
-   */
-  public jalview.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.UserColours[] getUserColours()
-  {
-    jalview.schemabinding.version2.UserColours[] array = new jalview.schemabinding.version2.UserColours[0];
-    return (jalview.schemabinding.version2.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.schemabinding.version2.Viewport at the
-   *         given index
-   */
-  public jalview.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.Viewport[] getViewport()
-  {
-    jalview.schemabinding.version2.Viewport[] array = new jalview.schemabinding.version2.Viewport[0];
-    return (jalview.schemabinding.version2.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.schemabinding.version2.JGroup vJGroup)
-  {
-    boolean removed = _JGroupList.remove(vJGroup);
-    return removed;
-  }
-
-  /**
-   * Method removeJGroupAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public jalview.schemabinding.version2.JGroup removeJGroupAt(
-          final int index)
-  {
-    java.lang.Object obj = this._JGroupList.remove(index);
-    return (jalview.schemabinding.version2.JGroup) obj;
-  }
-
-  /**
-   * Method removeJSeq.
-   * 
-   * @param vJSeq
-   * @return true if the object was removed from the collection.
-   */
-  public boolean removeJSeq(final jalview.schemabinding.version2.JSeq vJSeq)
-  {
-    boolean removed = _JSeqList.remove(vJSeq);
-    return removed;
-  }
-
-  /**
-   * Method removeJSeqAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public jalview.schemabinding.version2.JSeq removeJSeqAt(final int index)
-  {
-    java.lang.Object obj = this._JSeqList.remove(index);
-    return (jalview.schemabinding.version2.JSeq) obj;
-  }
-
-  /**
-   * Method removeTree.
-   * 
-   * @param vTree
-   * @return true if the object was removed from the collection.
-   */
-  public boolean removeTree(final jalview.schemabinding.version2.Tree vTree)
-  {
-    boolean removed = _treeList.remove(vTree);
-    return removed;
-  }
-
-  /**
-   * Method removeTreeAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public jalview.schemabinding.version2.Tree removeTreeAt(final int index)
-  {
-    java.lang.Object obj = this._treeList.remove(index);
-    return (jalview.schemabinding.version2.Tree) obj;
-  }
-
-  /**
-   * Method removeUserColours.
-   * 
-   * @param vUserColours
-   * @return true if the object was removed from the collection.
-   */
-  public boolean removeUserColours(
-          final jalview.schemabinding.version2.UserColours vUserColours)
-  {
-    boolean removed = _userColoursList.remove(vUserColours);
-    return removed;
-  }
-
-  /**
-   * Method removeUserColoursAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public jalview.schemabinding.version2.UserColours removeUserColoursAt(
-          final int index)
-  {
-    java.lang.Object obj = this._userColoursList.remove(index);
-    return (jalview.schemabinding.version2.UserColours) obj;
-  }
-
-  /**
-   * Method removeViewport.
-   * 
-   * @param vViewport
-   * @return true if the object was removed from the collection.
-   */
-  public boolean removeViewport(
-          final jalview.schemabinding.version2.Viewport vViewport)
-  {
-    boolean removed = _viewportList.remove(vViewport);
-    return removed;
-  }
-
-  /**
-   * Method removeViewportAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public jalview.schemabinding.version2.Viewport removeViewportAt(
-          final int index)
-  {
-    java.lang.Object obj = this._viewportList.remove(index);
-    return (jalview.schemabinding.version2.Viewport) obj;
-  }
-
-  /**
-   * Sets the value of field 'featureSettings'.
-   * 
-   * @param featureSettings
-   *          the value of field 'featureSettings'.
-   */
-  public void setFeatureSettings(
-          final jalview.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.JalviewModelSequence
-   */
-  public static jalview.schemabinding.version2.JalviewModelSequence unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.JalviewModelSequence) Unmarshaller
-            .unmarshal(
-                    jalview.schemabinding.version2.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/JalviewUserColours.java b/src/jalview/schemabinding/version2/JalviewUserColours.java
deleted file mode 100644 (file)
index c8d52ac..0000000
+++ /dev/null
@@ -1,505 +0,0 @@
-/*
- * 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 JalviewUserColours.
- * 
- * @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;
-
-  /**
-   * Field _filterList.
-   */
-  private java.util.Vector _filterList;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public JalviewUserColours()
-  {
-    super();
-    this._colourList = new java.util.Vector();
-    this._filterList = 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);
-  }
-
-  /**
-   * 
-   * 
-   * @param vFilter
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addFilter(final Filter vFilter)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._filterList.addElement(vFilter);
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vFilter
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addFilter(final int index, final Filter vFilter)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._filterList.add(index, vFilter);
-  }
-
-  /**
-   * Method enumerateColour.
-   * 
-   * @return an Enumeration over all Colour elements
-   */
-  public java.util.Enumeration enumerateColour()
-  {
-    return this._colourList.elements();
-  }
-
-  /**
-   * Method enumerateFilter.
-   * 
-   * @return an Enumeration over all Filter elements
-   */
-  public java.util.Enumeration enumerateFilter()
-  {
-    return this._filterList.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);
-  }
-
-  /**
-   * 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();
-  }
-
-  /**
-   * Method getFilter.
-   * 
-   * @param index
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   * @return the value of the Filter at the given index
-   */
-  public Filter getFilter(final int index)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._filterList.size())
-    {
-      throw new IndexOutOfBoundsException(
-              "getFilter: Index value '" + index + "' not in range [0.."
-                      + (this._filterList.size() - 1) + "]");
-    }
-
-    return (Filter) _filterList.get(index);
-  }
-
-  /**
-   * Method getFilter.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 Filter[] getFilter()
-  {
-    Filter[] array = new Filter[0];
-    return (Filter[]) this._filterList.toArray(array);
-  }
-
-  /**
-   * Method getFilterCount.
-   * 
-   * @return the size of this collection
-   */
-  public int getFilterCount()
-  {
-    return this._filterList.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;
-    }
-    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();
-  }
-
-  /**
-   */
-  public void removeAllFilter()
-  {
-    this._filterList.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;
-  }
-
-  /**
-   * Method removeFilter.
-   * 
-   * @param vFilter
-   * @return true if the object was removed from the collection.
-   */
-  public boolean removeFilter(final Filter vFilter)
-  {
-    boolean removed = _filterList.remove(vFilter);
-    return removed;
-  }
-
-  /**
-   * Method removeFilterAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public Filter removeFilterAt(final int index)
-  {
-    java.lang.Object obj = this._filterList.remove(index);
-    return (Filter) 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]);
-    }
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vFilter
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void setFilter(final int index, final Filter vFilter)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._filterList.size())
-    {
-      throw new IndexOutOfBoundsException(
-              "setFilter: Index value '" + index + "' not in range [0.."
-                      + (this._filterList.size() - 1) + "]");
-    }
-
-    this._filterList.set(index, vFilter);
-  }
-
-  /**
-   * 
-   * 
-   * @param vFilterArray
-   */
-  public void setFilter(final Filter[] vFilterArray)
-  {
-    // -- copy array
-    _filterList.clear();
-
-    for (int i = 0; i < vFilterArray.length; i++)
-    {
-      this._filterList.add(vFilterArray[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.schemabinding.version2.JalviewUserColours
-   */
-  public static jalview.schemabinding.version2.JalviewUserColours unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.JalviewUserColours) Unmarshaller
-            .unmarshal(
-                    jalview.schemabinding.version2.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/MapListFrom.java b/src/jalview/schemabinding/version2/MapListFrom.java
deleted file mode 100644 (file)
index 67bf1dc..0000000
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
- * 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;
-
-/**
- * a region from start to end inclusive
- * 
- * @version $Revision$ $Date$
- */
-public class MapListFrom 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;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public MapListFrom()
-  {
-    super();
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-     */
-  public void deleteEnd()
-  {
-    this._has_end = false;
-  }
-
-  /**
-     */
-  public void deleteStart()
-  {
-    this._has_start = false;
-  }
-
-  /**
-   * Returns the value of field 'end'.
-   * 
-   * @return the value of field 'End'.
-   */
-  public int getEnd()
-  {
-    return this._end;
-  }
-
-  /**
-   * Returns the value of field 'start'.
-   * 
-   * @return the value of field 'Start'.
-   */
-  public int getStart()
-  {
-    return this._start;
-  }
-
-  /**
-   * Method hasEnd.
-   * 
-   * @return true if at least one End has been added
-   */
-  public boolean hasEnd()
-  {
-    return this._has_end;
-  }
-
-  /**
-   * 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);
-  }
-
-  /**
-   * 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 '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.schemabinding.version2.MapListFrom
-   */
-  public static jalview.schemabinding.version2.MapListFrom unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.MapListFrom) Unmarshaller
-            .unmarshal(jalview.schemabinding.version2.MapListFrom.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/MapListTo.java b/src/jalview/schemabinding/version2/MapListTo.java
deleted file mode 100644 (file)
index e59baf8..0000000
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
- * 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;
-
-/**
- * a region from start to end inclusive
- * 
- * @version $Revision$ $Date$
- */
-public class MapListTo 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;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public MapListTo()
-  {
-    super();
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-     */
-  public void deleteEnd()
-  {
-    this._has_end = false;
-  }
-
-  /**
-     */
-  public void deleteStart()
-  {
-    this._has_start = false;
-  }
-
-  /**
-   * Returns the value of field 'end'.
-   * 
-   * @return the value of field 'End'.
-   */
-  public int getEnd()
-  {
-    return this._end;
-  }
-
-  /**
-   * Returns the value of field 'start'.
-   * 
-   * @return the value of field 'Start'.
-   */
-  public int getStart()
-  {
-    return this._start;
-  }
-
-  /**
-   * Method hasEnd.
-   * 
-   * @return true if at least one End has been added
-   */
-  public boolean hasEnd()
-  {
-    return this._has_end;
-  }
-
-  /**
-   * 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);
-  }
-
-  /**
-   * 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 '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.schemabinding.version2.MapListTo
-   */
-  public static jalview.schemabinding.version2.MapListTo unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.MapListTo) Unmarshaller
-            .unmarshal(jalview.schemabinding.version2.MapListTo.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/MapListType.java b/src/jalview/schemabinding/version2/MapListType.java
deleted file mode 100644 (file)
index cfb0752..0000000
+++ /dev/null
@@ -1,597 +0,0 @@
-/*
- * 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;
-
-/**
- * developed after mapRangeType from
- * http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes
- * 
- * This effectively represents a java.util.MapList object
- * 
- * 
- * @version $Revision$ $Date$
- */
-public class MapListType implements java.io.Serializable
-{
-
-  // --------------------------/
-  // - Class/Member Variables -/
-  // --------------------------/
-
-  /**
-   * number of dictionary symbol widths involved in each mapped position on this
-   * sequence (for example, 3 for a dna sequence exon region that is being
-   * mapped to a protein sequence). This is optional, since the unit can be
-   * usually be inferred from the dictionary type of each sequence involved in
-   * the mapping.
-   */
-  private long _mapFromUnit;
-
-  /**
-   * keeps track of state for field: _mapFromUnit
-   */
-  private boolean _has_mapFromUnit;
-
-  /**
-   * number of dictionary symbol widths involved in each mapped position on this
-   * sequence (for example, 3 for a dna sequence exon region that is being
-   * mapped to a protein sequence). This is optional, since the unit can be
-   * usually be inferred from the dictionary type of each sequence involved in
-   * the mapping.
-   */
-  private long _mapToUnit;
-
-  /**
-   * keeps track of state for field: _mapToUnit
-   */
-  private boolean _has_mapToUnit;
-
-  /**
-   * a region from start to end inclusive
-   */
-  private java.util.Vector _mapListFromList;
-
-  /**
-   * a region from start to end inclusive
-   */
-  private java.util.Vector _mapListToList;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public MapListType()
-  {
-    super();
-    this._mapListFromList = new java.util.Vector();
-    this._mapListToList = new java.util.Vector();
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-   * 
-   * 
-   * @param vMapListFrom
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addMapListFrom(
-          final jalview.schemabinding.version2.MapListFrom vMapListFrom)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._mapListFromList.addElement(vMapListFrom);
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vMapListFrom
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addMapListFrom(final int index,
-          final jalview.schemabinding.version2.MapListFrom vMapListFrom)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._mapListFromList.add(index, vMapListFrom);
-  }
-
-  /**
-   * 
-   * 
-   * @param vMapListTo
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addMapListTo(
-          final jalview.schemabinding.version2.MapListTo vMapListTo)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._mapListToList.addElement(vMapListTo);
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vMapListTo
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addMapListTo(final int index,
-          final jalview.schemabinding.version2.MapListTo vMapListTo)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._mapListToList.add(index, vMapListTo);
-  }
-
-  /**
-     */
-  public void deleteMapFromUnit()
-  {
-    this._has_mapFromUnit = false;
-  }
-
-  /**
-     */
-  public void deleteMapToUnit()
-  {
-    this._has_mapToUnit = false;
-  }
-
-  /**
-   * Method enumerateMapListFrom.
-   * 
-   * @return an Enumeration over all jalview.schemabinding.version2.MapListFrom
-   *         elements
-   */
-  public java.util.Enumeration enumerateMapListFrom()
-  {
-    return this._mapListFromList.elements();
-  }
-
-  /**
-   * Method enumerateMapListTo.
-   * 
-   * @return an Enumeration over all jalview.schemabinding.version2.MapListTo
-   *         elements
-   */
-  public java.util.Enumeration enumerateMapListTo()
-  {
-    return this._mapListToList.elements();
-  }
-
-  /**
-   * Returns the value of field 'mapFromUnit'. The field 'mapFromUnit' has the
-   * following description: number of dictionary symbol widths involved in each
-   * mapped position on this sequence (for example, 3 for a dna sequence exon
-   * region that is being mapped to a protein sequence). This is optional, since
-   * the unit can be usually be inferred from the dictionary type of each
-   * sequence involved in the mapping.
-   * 
-   * @return the value of field 'MapFromUnit'.
-   */
-  public long getMapFromUnit()
-  {
-    return this._mapFromUnit;
-  }
-
-  /**
-   * Method getMapListFrom.
-   * 
-   * @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.MapListFrom at the
-   *         given index
-   */
-  public jalview.schemabinding.version2.MapListFrom getMapListFrom(
-          final int index) throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._mapListFromList.size())
-    {
-      throw new IndexOutOfBoundsException("getMapListFrom: Index value '"
-              + index + "' not in range [0.."
-              + (this._mapListFromList.size() - 1) + "]");
-    }
-
-    return (jalview.schemabinding.version2.MapListFrom) _mapListFromList
-            .get(index);
-  }
-
-  /**
-   * Method getMapListFrom.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.MapListFrom[] getMapListFrom()
-  {
-    jalview.schemabinding.version2.MapListFrom[] array = new jalview.schemabinding.version2.MapListFrom[0];
-    return (jalview.schemabinding.version2.MapListFrom[]) this._mapListFromList
-            .toArray(array);
-  }
-
-  /**
-   * Method getMapListFromCount.
-   * 
-   * @return the size of this collection
-   */
-  public int getMapListFromCount()
-  {
-    return this._mapListFromList.size();
-  }
-
-  /**
-   * Method getMapListTo.
-   * 
-   * @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.MapListTo at the
-   *         given index
-   */
-  public jalview.schemabinding.version2.MapListTo getMapListTo(
-          final int index) throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._mapListToList.size())
-    {
-      throw new IndexOutOfBoundsException("getMapListTo: Index value '"
-              + index + "' not in range [0.."
-              + (this._mapListToList.size() - 1) + "]");
-    }
-
-    return (jalview.schemabinding.version2.MapListTo) _mapListToList
-            .get(index);
-  }
-
-  /**
-   * Method getMapListTo.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.MapListTo[] getMapListTo()
-  {
-    jalview.schemabinding.version2.MapListTo[] array = new jalview.schemabinding.version2.MapListTo[0];
-    return (jalview.schemabinding.version2.MapListTo[]) this._mapListToList
-            .toArray(array);
-  }
-
-  /**
-   * Method getMapListToCount.
-   * 
-   * @return the size of this collection
-   */
-  public int getMapListToCount()
-  {
-    return this._mapListToList.size();
-  }
-
-  /**
-   * Returns the value of field 'mapToUnit'. The field 'mapToUnit' has the
-   * following description: number of dictionary symbol widths involved in each
-   * mapped position on this sequence (for example, 3 for a dna sequence exon
-   * region that is being mapped to a protein sequence). This is optional, since
-   * the unit can be usually be inferred from the dictionary type of each
-   * sequence involved in the mapping.
-   * 
-   * @return the value of field 'MapToUnit'.
-   */
-  public long getMapToUnit()
-  {
-    return this._mapToUnit;
-  }
-
-  /**
-   * Method hasMapFromUnit.
-   * 
-   * @return true if at least one MapFromUnit has been added
-   */
-  public boolean hasMapFromUnit()
-  {
-    return this._has_mapFromUnit;
-  }
-
-  /**
-   * Method hasMapToUnit.
-   * 
-   * @return true if at least one MapToUnit has been added
-   */
-  public boolean hasMapToUnit()
-  {
-    return this._has_mapToUnit;
-  }
-
-  /**
-   * 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 removeAllMapListFrom()
-  {
-    this._mapListFromList.clear();
-  }
-
-  /**
-     */
-  public void removeAllMapListTo()
-  {
-    this._mapListToList.clear();
-  }
-
-  /**
-   * Method removeMapListFrom.
-   * 
-   * @param vMapListFrom
-   * @return true if the object was removed from the collection.
-   */
-  public boolean removeMapListFrom(
-          final jalview.schemabinding.version2.MapListFrom vMapListFrom)
-  {
-    boolean removed = _mapListFromList.remove(vMapListFrom);
-    return removed;
-  }
-
-  /**
-   * Method removeMapListFromAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public jalview.schemabinding.version2.MapListFrom removeMapListFromAt(
-          final int index)
-  {
-    java.lang.Object obj = this._mapListFromList.remove(index);
-    return (jalview.schemabinding.version2.MapListFrom) obj;
-  }
-
-  /**
-   * Method removeMapListTo.
-   * 
-   * @param vMapListTo
-   * @return true if the object was removed from the collection.
-   */
-  public boolean removeMapListTo(
-          final jalview.schemabinding.version2.MapListTo vMapListTo)
-  {
-    boolean removed = _mapListToList.remove(vMapListTo);
-    return removed;
-  }
-
-  /**
-   * Method removeMapListToAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public jalview.schemabinding.version2.MapListTo removeMapListToAt(
-          final int index)
-  {
-    java.lang.Object obj = this._mapListToList.remove(index);
-    return (jalview.schemabinding.version2.MapListTo) obj;
-  }
-
-  /**
-   * Sets the value of field 'mapFromUnit'. The field 'mapFromUnit' has the
-   * following description: number of dictionary symbol widths involved in each
-   * mapped position on this sequence (for example, 3 for a dna sequence exon
-   * region that is being mapped to a protein sequence). This is optional, since
-   * the unit can be usually be inferred from the dictionary type of each
-   * sequence involved in the mapping.
-   * 
-   * @param mapFromUnit
-   *          the value of field 'mapFromUnit'.
-   */
-  public void setMapFromUnit(final long mapFromUnit)
-  {
-    this._mapFromUnit = mapFromUnit;
-    this._has_mapFromUnit = true;
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vMapListFrom
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void setMapListFrom(final int index,
-          final jalview.schemabinding.version2.MapListFrom vMapListFrom)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._mapListFromList.size())
-    {
-      throw new IndexOutOfBoundsException("setMapListFrom: Index value '"
-              + index + "' not in range [0.."
-              + (this._mapListFromList.size() - 1) + "]");
-    }
-
-    this._mapListFromList.set(index, vMapListFrom);
-  }
-
-  /**
-   * 
-   * 
-   * @param vMapListFromArray
-   */
-  public void setMapListFrom(
-          final jalview.schemabinding.version2.MapListFrom[] vMapListFromArray)
-  {
-    // -- copy array
-    _mapListFromList.clear();
-
-    for (int i = 0; i < vMapListFromArray.length; i++)
-    {
-      this._mapListFromList.add(vMapListFromArray[i]);
-    }
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vMapListTo
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void setMapListTo(final int index,
-          final jalview.schemabinding.version2.MapListTo vMapListTo)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._mapListToList.size())
-    {
-      throw new IndexOutOfBoundsException("setMapListTo: Index value '"
-              + index + "' not in range [0.."
-              + (this._mapListToList.size() - 1) + "]");
-    }
-
-    this._mapListToList.set(index, vMapListTo);
-  }
-
-  /**
-   * 
-   * 
-   * @param vMapListToArray
-   */
-  public void setMapListTo(
-          final jalview.schemabinding.version2.MapListTo[] vMapListToArray)
-  {
-    // -- copy array
-    _mapListToList.clear();
-
-    for (int i = 0; i < vMapListToArray.length; i++)
-    {
-      this._mapListToList.add(vMapListToArray[i]);
-    }
-  }
-
-  /**
-   * Sets the value of field 'mapToUnit'. The field 'mapToUnit' has the
-   * following description: number of dictionary symbol widths involved in each
-   * mapped position on this sequence (for example, 3 for a dna sequence exon
-   * region that is being mapped to a protein sequence). This is optional, since
-   * the unit can be usually be inferred from the dictionary type of each
-   * sequence involved in the mapping.
-   * 
-   * @param mapToUnit
-   *          the value of field 'mapToUnit'.
-   */
-  public void setMapToUnit(final long mapToUnit)
-  {
-    this._mapToUnit = mapToUnit;
-    this._has_mapToUnit = 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.MapListType
-   */
-  public static jalview.schemabinding.version2.MapListType unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.MapListType) Unmarshaller
-            .unmarshal(jalview.schemabinding.version2.MapListType.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/Mapping.java b/src/jalview/schemabinding/version2/Mapping.java
deleted file mode 100644 (file)
index 9d71e1d..0000000
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * 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 Mapping.
- * 
- * @version $Revision$ $Date$
- */
-public class Mapping extends jalview.schemabinding.version2.MapListType
-        implements java.io.Serializable
-{
-
-  // --------------------------/
-  // - Class/Member Variables -/
-  // --------------------------/
-
-  /**
-   * Internal choice value storage
-   */
-  private java.lang.Object _choiceValue;
-
-  /**
-   * Field _mappingChoice.
-   */
-  private jalview.schemabinding.version2.MappingChoice _mappingChoice;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public Mapping()
-  {
-    super();
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-   * Returns the value of field 'choiceValue'. The field 'choiceValue' has the
-   * following description: Internal choice value storage
-   * 
-   * @return the value of field 'ChoiceValue'.
-   */
-  public java.lang.Object getChoiceValue()
-  {
-    return this._choiceValue;
-  }
-
-  /**
-   * Returns the value of field 'mappingChoice'.
-   * 
-   * @return the value of field 'MappingChoice'.
-   */
-  public jalview.schemabinding.version2.MappingChoice getMappingChoice()
-  {
-    return this._mappingChoice;
-  }
-
-  /**
-   * 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 'mappingChoice'.
-   * 
-   * @param mappingChoice
-   *          the value of field 'mappingChoice'.
-   */
-  public void setMappingChoice(
-          final jalview.schemabinding.version2.MappingChoice mappingChoice)
-  {
-    this._mappingChoice = mappingChoice;
-    this._choiceValue = mappingChoice;
-  }
-
-  /**
-   * 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.MapListType
-   */
-  public static jalview.schemabinding.version2.MapListType unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.MapListType) Unmarshaller
-            .unmarshal(jalview.schemabinding.version2.Mapping.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/MappingChoice.java b/src/jalview/schemabinding/version2/MappingChoice.java
deleted file mode 100644 (file)
index e50efa7..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * 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 MappingChoice.
- * 
- * @version $Revision$ $Date$
- */
-public class MappingChoice implements java.io.Serializable
-{
-
-  // --------------------------/
-  // - Class/Member Variables -/
-  // --------------------------/
-
-  /**
-   * Field _sequence.
-   */
-  private jalview.schemabinding.version2.Sequence _sequence;
-
-  /**
-   * Field _dseqFor.
-   */
-  private java.lang.String _dseqFor;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public MappingChoice()
-  {
-    super();
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-   * Returns the value of field 'dseqFor'.
-   * 
-   * @return the value of field 'DseqFor'.
-   */
-  public java.lang.String getDseqFor()
-  {
-    return this._dseqFor;
-  }
-
-  /**
-   * Returns the value of field 'sequence'.
-   * 
-   * @return the value of field 'Sequence'.
-   */
-  public jalview.schemabinding.version2.Sequence 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 'dseqFor'.
-   * 
-   * @param dseqFor
-   *          the value of field 'dseqFor'.
-   */
-  public void setDseqFor(final java.lang.String dseqFor)
-  {
-    this._dseqFor = dseqFor;
-  }
-
-  /**
-   * Sets the value of field 'sequence'.
-   * 
-   * @param sequence
-   *          the value of field 'sequence'.
-   */
-  public void setSequence(
-          final jalview.schemabinding.version2.Sequence 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.schemabinding.version2.MappingChoice
-   */
-  public static jalview.schemabinding.version2.MappingChoice unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.MappingChoice) Unmarshaller
-            .unmarshal(jalview.schemabinding.version2.MappingChoice.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/MatchCondition.java b/src/jalview/schemabinding/version2/MatchCondition.java
deleted file mode 100644 (file)
index af2f3f5..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * 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 MatchCondition.
- * 
- * @version $Revision$ $Date$
- */
-public class MatchCondition extends FeatureMatcher
-        implements java.io.Serializable
-{
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public MatchCondition()
-  {
-    super();
-  }
-
-  // -----------/
-  // - 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;
-    }
-    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 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.FeatureMatcher
-   */
-  public static jalview.schemabinding.version2.FeatureMatcher unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.FeatureMatcher) Unmarshaller
-            .unmarshal(jalview.schemabinding.version2.MatchCondition.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/MatcherSet.java b/src/jalview/schemabinding/version2/MatcherSet.java
deleted file mode 100644 (file)
index 6fde9e4..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * 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;
-
-/**
- * optional filter(s) applied to the feature type
- * 
- * @version $Revision$ $Date$
- */
-public class MatcherSet extends FeatureMatcherSet
-        implements java.io.Serializable
-{
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public MatcherSet()
-  {
-    super();
-  }
-
-  // -----------/
-  // - 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;
-    }
-    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 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.FeatureMatcherSet
-   */
-  public static jalview.schemabinding.version2.FeatureMatcherSet unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.FeatureMatcherSet) Unmarshaller
-            .unmarshal(jalview.schemabinding.version2.MatcherSet.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/OtherData.java b/src/jalview/schemabinding/version2/OtherData.java
deleted file mode 100644 (file)
index 31797fe..0000000
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * 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 OtherData.
- * 
- * @version $Revision$ $Date$
- */
-public class OtherData implements java.io.Serializable {
-
-
-      //--------------------------/
-     //- Class/Member Variables -/
-    //--------------------------/
-
-    /**
-     * Field _key.
-     */
-    private java.lang.String _key;
-
-    /**
-     * key2 may be used for a sub-attribute of key
-     */
-    private java.lang.String _key2;
-
-    /**
-     * Field _value.
-     */
-    private java.lang.String _value;
-
-
-      //----------------/
-     //- Constructors -/
-    //----------------/
-
-    public OtherData() {
-        super();
-    }
-
-
-      //-----------/
-     //- Methods -/
-    //-----------/
-
-    /**
-     * Returns the value of field 'key'.
-     * 
-     * @return the value of field 'Key'.
-     */
-    public java.lang.String getKey(
-    ) {
-        return this._key;
-    }
-
-    /**
-     * Returns the value of field 'key2'. The field 'key2' has the
-     * following description: key2 may be used for a sub-attribute
-     * of key
-     * 
-     * @return the value of field 'Key2'.
-     */
-    public java.lang.String getKey2(
-    ) {
-        return this._key2;
-    }
-
-    /**
-     * 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 'key'.
-     * 
-     * @param key the value of field 'key'.
-     */
-    public void setKey(
-            final java.lang.String key) {
-        this._key = key;
-    }
-
-    /**
-     * Sets the value of field 'key2'. The field 'key2' has the
-     * following description: key2 may be used for a sub-attribute
-     * of key
-     * 
-     * @param key2 the value of field 'key2'.
-     */
-    public void setKey2(
-            final java.lang.String key2) {
-        this._key2 = key2;
-    }
-
-    /**
-     * 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.schemabinding.version2.OtherData
-     */
-    public static jalview.schemabinding.version2.OtherData unmarshal(
-            final java.io.Reader reader)
-    throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
-        return (jalview.schemabinding.version2.OtherData) Unmarshaller.unmarshal(jalview.schemabinding.version2.OtherData.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);
-    }
-
-}
diff --git a/src/jalview/schemabinding/version2/Pdbentry.java b/src/jalview/schemabinding/version2/Pdbentry.java
deleted file mode 100644 (file)
index 65de364..0000000
+++ /dev/null
@@ -1,375 +0,0 @@
-/*
- * 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 Pdbentry.
- * 
- * @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 _file.
-   */
-  private java.lang.String _file;
-
-  /**
-   * 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.schemabinding.version2.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.schemabinding.version2.PdbentryItem vPdbentryItem)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._items.add(index, vPdbentryItem);
-  }
-
-  /**
-   * Method enumeratePdbentryItem.
-   * 
-   * @return an Enumeration over all jalview.schemabinding.version2.PdbentryItem
-   *         elements
-   */
-  public java.util.Enumeration enumeratePdbentryItem()
-  {
-    return this._items.elements();
-  }
-
-  /**
-   * Returns the value of field 'file'.
-   * 
-   * @return the value of field 'File'.
-   */
-  public java.lang.String getFile()
-  {
-    return this._file;
-  }
-
-  /**
-   * 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.schemabinding.version2.PdbentryItem at the
-   *         given inde
-   */
-  public jalview.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.PdbentryItem[] getPdbentryItem()
-  {
-    jalview.schemabinding.version2.PdbentryItem[] array = new jalview.schemabinding.version2.PdbentryItem[0];
-    return (jalview.schemabinding.version2.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;
-    }
-    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.schemabinding.version2.PdbentryItem vPdbentryItem)
-  {
-    boolean removed = _items.remove(vPdbentryItem);
-    return removed;
-  }
-
-  /**
-   * Method removePdbentryItemAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public jalview.schemabinding.version2.PdbentryItem removePdbentryItemAt(
-          final int index)
-  {
-    java.lang.Object obj = this._items.remove(index);
-    return (jalview.schemabinding.version2.PdbentryItem) obj;
-  }
-
-  /**
-   * Sets the value of field 'file'.
-   * 
-   * @param file
-   *          the value of field 'file'.
-   */
-  public void setFile(final java.lang.String file)
-  {
-    this._file = file;
-  }
-
-  /**
-   * 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.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.Pdbentry
-   */
-  public static jalview.schemabinding.version2.Pdbentry unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.Pdbentry) Unmarshaller
-            .unmarshal(jalview.schemabinding.version2.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/PdbentryItem.java b/src/jalview/schemabinding/version2/PdbentryItem.java
deleted file mode 100644 (file)
index 5554b49..0000000
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- * 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;
-
-/**
- * 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.schemabinding.version2.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.schemabinding.version2.Property vProperty)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._propertyList.add(index, vProperty);
-  }
-
-  /**
-   * Method enumerateProperty.
-   * 
-   * @return an Enumeration over all jalview.schemabinding.version2.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.schemabinding.version2.Property at the
-   *         given index
-   */
-  public jalview.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.Property[] getProperty()
-  {
-    jalview.schemabinding.version2.Property[] array = new jalview.schemabinding.version2.Property[0];
-    return (jalview.schemabinding.version2.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.schemabinding.version2.Property vProperty)
-  {
-    boolean removed = _propertyList.remove(vProperty);
-    return removed;
-  }
-
-  /**
-   * Method removePropertyAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public jalview.schemabinding.version2.Property removePropertyAt(
-          final int index)
-  {
-    java.lang.Object obj = this._propertyList.remove(index);
-    return (jalview.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.Property[] vPropertyArray)
-  {
-    // -- copy array
-    _propertyList.clear();
-
-    for (int i = 0; i < vPropertyArray.length; i++)
-    {
-      this._propertyList.add(vPropertyArray[i]);
-    }
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/Pdbids.java b/src/jalview/schemabinding/version2/Pdbids.java
deleted file mode 100644 (file)
index 978df5b..0000000
+++ /dev/null
@@ -1,303 +0,0 @@
-/*
- * 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 Pdbids.
- * 
- * @version $Revision$ $Date$
- */
-public class Pdbids extends jalview.schemabinding.version2.Pdbentry
-        implements java.io.Serializable
-{
-
-  // --------------------------/
-  // - Class/Member Variables -/
-  // --------------------------/
-
-  /**
-   * Field _structureStateList.
-   */
-  private java.util.Vector _structureStateList;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public Pdbids()
-  {
-    super();
-    this._structureStateList = new java.util.Vector();
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-   * 
-   * 
-   * @param vStructureState
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addStructureState(
-          final jalview.schemabinding.version2.StructureState vStructureState)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._structureStateList.addElement(vStructureState);
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vStructureState
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addStructureState(
-          final int index,
-          final jalview.schemabinding.version2.StructureState vStructureState)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._structureStateList.add(index, vStructureState);
-  }
-
-  /**
-   * Method enumerateStructureState.
-   * 
-   * @return an Enumeration over all
-   *         jalview.schemabinding.version2.StructureState elements
-   */
-  public java.util.Enumeration enumerateStructureState()
-  {
-    return this._structureStateList.elements();
-  }
-
-  /**
-   * Method getStructureState.
-   * 
-   * @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.StructureState at
-   *         the given index
-   */
-  public jalview.schemabinding.version2.StructureState getStructureState(
-          final int index) throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._structureStateList.size())
-    {
-      throw new IndexOutOfBoundsException(
-              "getStructureState: Index value '" + index
-                      + "' not in range [0.."
-                      + (this._structureStateList.size() - 1) + "]");
-    }
-
-    return (jalview.schemabinding.version2.StructureState) _structureStateList
-            .get(index);
-  }
-
-  /**
-   * Method getStructureState.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.StructureState[] getStructureState()
-  {
-    jalview.schemabinding.version2.StructureState[] array = new jalview.schemabinding.version2.StructureState[0];
-    return (jalview.schemabinding.version2.StructureState[]) this._structureStateList
-            .toArray(array);
-  }
-
-  /**
-   * Method getStructureStateCount.
-   * 
-   * @return the size of this collection
-   */
-  public int getStructureStateCount()
-  {
-    return this._structureStateList.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 removeAllStructureState()
-  {
-    this._structureStateList.clear();
-  }
-
-  /**
-   * Method removeStructureState.
-   * 
-   * @param vStructureState
-   * @return true if the object was removed from the collection.
-   */
-  public boolean removeStructureState(
-          final jalview.schemabinding.version2.StructureState vStructureState)
-  {
-    boolean removed = _structureStateList.remove(vStructureState);
-    return removed;
-  }
-
-  /**
-   * Method removeStructureStateAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public jalview.schemabinding.version2.StructureState removeStructureStateAt(
-          final int index)
-  {
-    java.lang.Object obj = this._structureStateList.remove(index);
-    return (jalview.schemabinding.version2.StructureState) obj;
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vStructureState
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void setStructureState(
-          final int index,
-          final jalview.schemabinding.version2.StructureState vStructureState)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._structureStateList.size())
-    {
-      throw new IndexOutOfBoundsException(
-              "setStructureState: Index value '" + index
-                      + "' not in range [0.."
-                      + (this._structureStateList.size() - 1) + "]");
-    }
-
-    this._structureStateList.set(index, vStructureState);
-  }
-
-  /**
-   * 
-   * 
-   * @param vStructureStateArray
-   */
-  public void setStructureState(
-          final jalview.schemabinding.version2.StructureState[] vStructureStateArray)
-  {
-    // -- copy array
-    _structureStateList.clear();
-
-    for (int i = 0; i < vStructureStateArray.length; i++)
-    {
-      this._structureStateList.add(vStructureStateArray[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.schemabinding.version2.Pdbentry
-   */
-  public static jalview.schemabinding.version2.Pdbentry unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.Pdbentry) Unmarshaller
-            .unmarshal(jalview.schemabinding.version2.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/Property.java b/src/jalview/schemabinding/version2/Property.java
deleted file mode 100644 (file)
index dbf96bf..0000000
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * 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 Property.
- * 
- * @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;
-    }
-    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.schemabinding.version2.Property
-   */
-  public static jalview.schemabinding.version2.Property unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.Property) Unmarshaller
-            .unmarshal(jalview.schemabinding.version2.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/RnaViewer.java b/src/jalview/schemabinding/version2/RnaViewer.java
deleted file mode 100644 (file)
index 543d053..0000000
+++ /dev/null
@@ -1,668 +0,0 @@
-/*
- * 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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/SecondaryStructure.java b/src/jalview/schemabinding/version2/SecondaryStructure.java
deleted file mode 100644 (file)
index eb88fc4..0000000
+++ /dev/null
@@ -1,290 +0,0 @@
-/*
- * 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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/Sequence.java b/src/jalview/schemabinding/version2/Sequence.java
deleted file mode 100644 (file)
index 531ca66..0000000
+++ /dev/null
@@ -1,328 +0,0 @@
-/*
- * 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 Sequence.
- * 
- * @version $Revision$ $Date$
- */
-public class Sequence extends jalview.schemabinding.version2.SequenceType
-        implements java.io.Serializable
-{
-
-  // --------------------------/
-  // - Class/Member Variables -/
-  // --------------------------/
-
-  /**
-   * dataset sequence id for this sequence. Will be created as union of
-   * sequences.
-   * 
-   */
-  private java.lang.String _dsseqid;
-
-  /**
-   * Field _DBRefList.
-   */
-  private java.util.Vector _DBRefList;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public Sequence()
-  {
-    super();
-    this._DBRefList = new java.util.Vector();
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-   * 
-   * 
-   * @param vDBRef
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addDBRef(final jalview.schemabinding.version2.DBRef vDBRef)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._DBRefList.addElement(vDBRef);
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vDBRef
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addDBRef(final int index,
-          final jalview.schemabinding.version2.DBRef vDBRef)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._DBRefList.add(index, vDBRef);
-  }
-
-  /**
-   * Method enumerateDBRef.
-   * 
-   * @return an Enumeration over all jalview.schemabinding.version2.DBRef
-   *         elements
-   */
-  public java.util.Enumeration enumerateDBRef()
-  {
-    return this._DBRefList.elements();
-  }
-
-  /**
-   * Method getDBRef.
-   * 
-   * @param index
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   * @return the value of the jalview.schemabinding.version2.DBRef at the given
-   *         index
-   */
-  public jalview.schemabinding.version2.DBRef getDBRef(final int index)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._DBRefList.size())
-    {
-      throw new IndexOutOfBoundsException("getDBRef: Index value '" + index
-              + "' not in range [0.." + (this._DBRefList.size() - 1) + "]");
-    }
-
-    return (jalview.schemabinding.version2.DBRef) _DBRefList.get(index);
-  }
-
-  /**
-   * Method getDBRef.Returns the contents of the collection in an Array.
-   * <p>
-   * Note: Just in case the collection contents are changing in another thread,
-   * we pass a 0-length Array of the correct type into the API call. This way we
-   * <i>know</i> that the Array returned is of exactly the correct length.
-   * 
-   * @return this collection as an Array
-   */
-  public jalview.schemabinding.version2.DBRef[] getDBRef()
-  {
-    jalview.schemabinding.version2.DBRef[] array = new jalview.schemabinding.version2.DBRef[0];
-    return (jalview.schemabinding.version2.DBRef[]) this._DBRefList
-            .toArray(array);
-  }
-
-  /**
-   * Method getDBRefCount.
-   * 
-   * @return the size of this collection
-   */
-  public int getDBRefCount()
-  {
-    return this._DBRefList.size();
-  }
-
-  /**
-   * Returns the value of field 'dsseqid'. The field 'dsseqid' has the following
-   * description: dataset sequence id for this sequence. Will be created as
-   * union of sequences.
-   * 
-   * 
-   * @return the value of field 'Dsseqid'.
-   */
-  public java.lang.String getDsseqid()
-  {
-    return this._dsseqid;
-  }
-
-  /**
-   * 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 removeAllDBRef()
-  {
-    this._DBRefList.clear();
-  }
-
-  /**
-   * Method removeDBRef.
-   * 
-   * @param vDBRef
-   * @return true if the object was removed from the collection.
-   */
-  public boolean removeDBRef(
-          final jalview.schemabinding.version2.DBRef vDBRef)
-  {
-    boolean removed = _DBRefList.remove(vDBRef);
-    return removed;
-  }
-
-  /**
-   * Method removeDBRefAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public jalview.schemabinding.version2.DBRef removeDBRefAt(final int index)
-  {
-    java.lang.Object obj = this._DBRefList.remove(index);
-    return (jalview.schemabinding.version2.DBRef) obj;
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vDBRef
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void setDBRef(final int index,
-          final jalview.schemabinding.version2.DBRef vDBRef)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._DBRefList.size())
-    {
-      throw new IndexOutOfBoundsException("setDBRef: Index value '" + index
-              + "' not in range [0.." + (this._DBRefList.size() - 1) + "]");
-    }
-
-    this._DBRefList.set(index, vDBRef);
-  }
-
-  /**
-   * 
-   * 
-   * @param vDBRefArray
-   */
-  public void setDBRef(
-          final jalview.schemabinding.version2.DBRef[] vDBRefArray)
-  {
-    // -- copy array
-    _DBRefList.clear();
-
-    for (int i = 0; i < vDBRefArray.length; i++)
-    {
-      this._DBRefList.add(vDBRefArray[i]);
-    }
-  }
-
-  /**
-   * Sets the value of field 'dsseqid'. The field 'dsseqid' has the following
-   * description: dataset sequence id for this sequence. Will be created as
-   * union of sequences.
-   * 
-   * 
-   * @param dsseqid
-   *          the value of field 'dsseqid'.
-   */
-  public void setDsseqid(final java.lang.String dsseqid)
-  {
-    this._dsseqid = dsseqid;
-  }
-
-  /**
-   * 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.SequenceType
-   */
-  public static jalview.schemabinding.version2.SequenceType unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.SequenceType) Unmarshaller
-            .unmarshal(jalview.schemabinding.version2.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/SequenceSet.java b/src/jalview/schemabinding/version2/SequenceSet.java
deleted file mode 100644 (file)
index 8be8022..0000000
+++ /dev/null
@@ -1,872 +0,0 @@
-/*
- * 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 SequenceSet.
- * 
- * @version $Revision$ $Date$
- */
-public class SequenceSet implements java.io.Serializable
-{
-
-  // --------------------------/
-  // - Class/Member Variables -/
-  // --------------------------/
-
-  /**
-   * Field _gapChar.
-   */
-  private java.lang.String _gapChar;
-
-  /**
-   * reference to set where jalview will gather the dataset sequences for all
-   * sequences in the set.
-   * 
-   */
-  private java.lang.String _datasetId;
-
-  /**
-   * Field _sequenceList.
-   */
-  private java.util.Vector _sequenceList;
-
-  /**
-   * Field _annotationList.
-   */
-  private java.util.Vector _annotationList;
-
-  /**
-   * Field _sequenceSetPropertiesList.
-   */
-  private java.util.Vector _sequenceSetPropertiesList;
-
-  /**
-   * Field _alcodonFrameList.
-   */
-  private java.util.Vector _alcodonFrameList;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public SequenceSet()
-  {
-    super();
-    this._sequenceList = new java.util.Vector();
-    this._annotationList = new java.util.Vector();
-    this._sequenceSetPropertiesList = new java.util.Vector();
-    this._alcodonFrameList = new java.util.Vector();
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-   * 
-   * 
-   * @param vAlcodonFrame
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addAlcodonFrame(
-          final jalview.schemabinding.version2.AlcodonFrame vAlcodonFrame)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._alcodonFrameList.addElement(vAlcodonFrame);
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vAlcodonFrame
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addAlcodonFrame(final int index,
-          final jalview.schemabinding.version2.AlcodonFrame vAlcodonFrame)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._alcodonFrameList.add(index, vAlcodonFrame);
-  }
-
-  /**
-   * 
-   * 
-   * @param vAnnotation
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addAnnotation(
-          final jalview.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.Sequence vSequence)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._sequenceList.add(index, vSequence);
-  }
-
-  /**
-   * 
-   * 
-   * @param vSequenceSetProperties
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addSequenceSetProperties(
-          final jalview.schemabinding.version2.SequenceSetProperties vSequenceSetProperties)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._sequenceSetPropertiesList.addElement(vSequenceSetProperties);
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vSequenceSetProperties
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addSequenceSetProperties(
-          final int index,
-          final jalview.schemabinding.version2.SequenceSetProperties vSequenceSetProperties)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._sequenceSetPropertiesList.add(index, vSequenceSetProperties);
-  }
-
-  /**
-   * Method enumerateAlcodonFrame.
-   * 
-   * @return an Enumeration over all jalview.schemabinding.version2.AlcodonFrame
-   *         elements
-   */
-  public java.util.Enumeration enumerateAlcodonFrame()
-  {
-    return this._alcodonFrameList.elements();
-  }
-
-  /**
-   * Method enumerateAnnotation.
-   * 
-   * @return an Enumeration over all jalview.schemabinding.version2.Annotation
-   *         elements
-   */
-  public java.util.Enumeration enumerateAnnotation()
-  {
-    return this._annotationList.elements();
-  }
-
-  /**
-   * Method enumerateSequence.
-   * 
-   * @return an Enumeration over all jalview.schemabinding.version2.Sequence
-   *         elements
-   */
-  public java.util.Enumeration enumerateSequence()
-  {
-    return this._sequenceList.elements();
-  }
-
-  /**
-   * Method enumerateSequenceSetProperties.
-   * 
-   * @return an Enumeration over all
-   *         jalview.schemabinding.version2.SequenceSetProperties elements
-   */
-  public java.util.Enumeration enumerateSequenceSetProperties()
-  {
-    return this._sequenceSetPropertiesList.elements();
-  }
-
-  /**
-   * Method getAlcodonFrame.
-   * 
-   * @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.AlcodonFrame at the
-   *         given inde
-   */
-  public jalview.schemabinding.version2.AlcodonFrame getAlcodonFrame(
-          final int index) throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._alcodonFrameList.size())
-    {
-      throw new IndexOutOfBoundsException("getAlcodonFrame: Index value '"
-              + index + "' not in range [0.."
-              + (this._alcodonFrameList.size() - 1) + "]");
-    }
-
-    return (jalview.schemabinding.version2.AlcodonFrame) _alcodonFrameList
-            .get(index);
-  }
-
-  /**
-   * Method getAlcodonFrame.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.AlcodonFrame[] getAlcodonFrame()
-  {
-    jalview.schemabinding.version2.AlcodonFrame[] array = new jalview.schemabinding.version2.AlcodonFrame[0];
-    return (jalview.schemabinding.version2.AlcodonFrame[]) this._alcodonFrameList
-            .toArray(array);
-  }
-
-  /**
-   * Method getAlcodonFrameCount.
-   * 
-   * @return the size of this collection
-   */
-  public int getAlcodonFrameCount()
-  {
-    return this._alcodonFrameList.size();
-  }
-
-  /**
-   * 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.schemabinding.version2.Annotation at the
-   *         given index
-   */
-  public jalview.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.Annotation[] getAnnotation()
-  {
-    jalview.schemabinding.version2.Annotation[] array = new jalview.schemabinding.version2.Annotation[0];
-    return (jalview.schemabinding.version2.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 'datasetId'. The field 'datasetId' has the
-   * following description: reference to set where jalview will gather the
-   * dataset sequences for all sequences in the set.
-   * 
-   * 
-   * @return the value of field 'DatasetId'.
-   */
-  public java.lang.String getDatasetId()
-  {
-    return this._datasetId;
-  }
-
-  /**
-   * 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.schemabinding.version2.Sequence at the
-   *         given index
-   */
-  public jalview.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.Sequence[] getSequence()
-  {
-    jalview.schemabinding.version2.Sequence[] array = new jalview.schemabinding.version2.Sequence[0];
-    return (jalview.schemabinding.version2.Sequence[]) this._sequenceList
-            .toArray(array);
-  }
-
-  /**
-   * Method getSequenceCount.
-   * 
-   * @return the size of this collection
-   */
-  public int getSequenceCount()
-  {
-    return this._sequenceList.size();
-  }
-
-  /**
-   * Method getSequenceSetProperties.
-   * 
-   * @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.SequenceSetProperties at the given
-   *         index
-   */
-  public jalview.schemabinding.version2.SequenceSetProperties getSequenceSetProperties(
-          final int index) throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._sequenceSetPropertiesList.size())
-    {
-      throw new IndexOutOfBoundsException(
-              "getSequenceSetProperties: Index value '" + index
-                      + "' not in range [0.."
-                      + (this._sequenceSetPropertiesList.size() - 1) + "]");
-    }
-
-    return (jalview.schemabinding.version2.SequenceSetProperties) _sequenceSetPropertiesList
-            .get(index);
-  }
-
-  /**
-   * Method getSequenceSetProperties.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.SequenceSetProperties[] getSequenceSetProperties()
-  {
-    jalview.schemabinding.version2.SequenceSetProperties[] array = new jalview.schemabinding.version2.SequenceSetProperties[0];
-    return (jalview.schemabinding.version2.SequenceSetProperties[]) this._sequenceSetPropertiesList
-            .toArray(array);
-  }
-
-  /**
-   * Method getSequenceSetPropertiesCount.
-   * 
-   * @return the size of this collection
-   */
-  public int getSequenceSetPropertiesCount()
-  {
-    return this._sequenceSetPropertiesList.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 removeAlcodonFrame.
-   * 
-   * @param vAlcodonFrame
-   * @return true if the object was removed from the collection.
-   */
-  public boolean removeAlcodonFrame(
-          final jalview.schemabinding.version2.AlcodonFrame vAlcodonFrame)
-  {
-    boolean removed = _alcodonFrameList.remove(vAlcodonFrame);
-    return removed;
-  }
-
-  /**
-   * Method removeAlcodonFrameAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public jalview.schemabinding.version2.AlcodonFrame removeAlcodonFrameAt(
-          final int index)
-  {
-    java.lang.Object obj = this._alcodonFrameList.remove(index);
-    return (jalview.schemabinding.version2.AlcodonFrame) obj;
-  }
-
-  /**
-     */
-  public void removeAllAlcodonFrame()
-  {
-    this._alcodonFrameList.clear();
-  }
-
-  /**
-     */
-  public void removeAllAnnotation()
-  {
-    this._annotationList.clear();
-  }
-
-  /**
-     */
-  public void removeAllSequence()
-  {
-    this._sequenceList.clear();
-  }
-
-  /**
-     */
-  public void removeAllSequenceSetProperties()
-  {
-    this._sequenceSetPropertiesList.clear();
-  }
-
-  /**
-   * Method removeAnnotation.
-   * 
-   * @param vAnnotation
-   * @return true if the object was removed from the collection.
-   */
-  public boolean removeAnnotation(
-          final jalview.schemabinding.version2.Annotation vAnnotation)
-  {
-    boolean removed = _annotationList.remove(vAnnotation);
-    return removed;
-  }
-
-  /**
-   * Method removeAnnotationAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public jalview.schemabinding.version2.Annotation removeAnnotationAt(
-          final int index)
-  {
-    java.lang.Object obj = this._annotationList.remove(index);
-    return (jalview.schemabinding.version2.Annotation) obj;
-  }
-
-  /**
-   * Method removeSequence.
-   * 
-   * @param vSequence
-   * @return true if the object was removed from the collection.
-   */
-  public boolean removeSequence(
-          final jalview.schemabinding.version2.Sequence vSequence)
-  {
-    boolean removed = _sequenceList.remove(vSequence);
-    return removed;
-  }
-
-  /**
-   * Method removeSequenceAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public jalview.schemabinding.version2.Sequence removeSequenceAt(
-          final int index)
-  {
-    java.lang.Object obj = this._sequenceList.remove(index);
-    return (jalview.schemabinding.version2.Sequence) obj;
-  }
-
-  /**
-   * Method removeSequenceSetProperties.
-   * 
-   * @param vSequenceSetProperties
-   * @return true if the object was removed from the collection.
-   */
-  public boolean removeSequenceSetProperties(
-          final jalview.schemabinding.version2.SequenceSetProperties vSequenceSetProperties)
-  {
-    boolean removed = _sequenceSetPropertiesList
-            .remove(vSequenceSetProperties);
-    return removed;
-  }
-
-  /**
-   * Method removeSequenceSetPropertiesAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public jalview.schemabinding.version2.SequenceSetProperties removeSequenceSetPropertiesAt(
-          final int index)
-  {
-    java.lang.Object obj = this._sequenceSetPropertiesList.remove(index);
-    return (jalview.schemabinding.version2.SequenceSetProperties) obj;
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vAlcodonFrame
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void setAlcodonFrame(final int index,
-          final jalview.schemabinding.version2.AlcodonFrame vAlcodonFrame)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._alcodonFrameList.size())
-    {
-      throw new IndexOutOfBoundsException("setAlcodonFrame: Index value '"
-              + index + "' not in range [0.."
-              + (this._alcodonFrameList.size() - 1) + "]");
-    }
-
-    this._alcodonFrameList.set(index, vAlcodonFrame);
-  }
-
-  /**
-   * 
-   * 
-   * @param vAlcodonFrameArray
-   */
-  public void setAlcodonFrame(
-          final jalview.schemabinding.version2.AlcodonFrame[] vAlcodonFrameArray)
-  {
-    // -- copy array
-    _alcodonFrameList.clear();
-
-    for (int i = 0; i < vAlcodonFrameArray.length; i++)
-    {
-      this._alcodonFrameList.add(vAlcodonFrameArray[i]);
-    }
-  }
-
-  /**
-   * 
-   * 
-   * @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.schemabinding.version2.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.schemabinding.version2.Annotation[] vAnnotationArray)
-  {
-    // -- copy array
-    _annotationList.clear();
-
-    for (int i = 0; i < vAnnotationArray.length; i++)
-    {
-      this._annotationList.add(vAnnotationArray[i]);
-    }
-  }
-
-  /**
-   * Sets the value of field 'datasetId'. The field 'datasetId' has the
-   * following description: reference to set where jalview will gather the
-   * dataset sequences for all sequences in the set.
-   * 
-   * 
-   * @param datasetId
-   *          the value of field 'datasetId'.
-   */
-  public void setDatasetId(final java.lang.String datasetId)
-  {
-    this._datasetId = datasetId;
-  }
-
-  /**
-   * 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.schemabinding.version2.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.schemabinding.version2.Sequence[] vSequenceArray)
-  {
-    // -- copy array
-    _sequenceList.clear();
-
-    for (int i = 0; i < vSequenceArray.length; i++)
-    {
-      this._sequenceList.add(vSequenceArray[i]);
-    }
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vSequenceSetProperties
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void setSequenceSetProperties(
-          final int index,
-          final jalview.schemabinding.version2.SequenceSetProperties vSequenceSetProperties)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._sequenceSetPropertiesList.size())
-    {
-      throw new IndexOutOfBoundsException(
-              "setSequenceSetProperties: Index value '" + index
-                      + "' not in range [0.."
-                      + (this._sequenceSetPropertiesList.size() - 1) + "]");
-    }
-
-    this._sequenceSetPropertiesList.set(index, vSequenceSetProperties);
-  }
-
-  /**
-   * 
-   * 
-   * @param vSequenceSetPropertiesArray
-   */
-  public void setSequenceSetProperties(
-          final jalview.schemabinding.version2.SequenceSetProperties[] vSequenceSetPropertiesArray)
-  {
-    // -- copy array
-    _sequenceSetPropertiesList.clear();
-
-    for (int i = 0; i < vSequenceSetPropertiesArray.length; i++)
-    {
-      this._sequenceSetPropertiesList.add(vSequenceSetPropertiesArray[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.schemabinding.version2.SequenceSet
-   */
-  public static jalview.schemabinding.version2.SequenceSet unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.SequenceSet) Unmarshaller
-            .unmarshal(jalview.schemabinding.version2.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/SequenceSetProperties.java b/src/jalview/schemabinding/version2/SequenceSetProperties.java
deleted file mode 100644 (file)
index 3a7d172..0000000
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * 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 SequenceSetProperties.
- * 
- * @version $Revision$ $Date$
- */
-public class SequenceSetProperties implements java.io.Serializable
-{
-
-  // --------------------------/
-  // - Class/Member Variables -/
-  // --------------------------/
-
-  /**
-   * Field _key.
-   */
-  private java.lang.String _key;
-
-  /**
-   * Field _value.
-   */
-  private java.lang.String _value;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public SequenceSetProperties()
-  {
-    super();
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-   * Returns the value of field 'key'.
-   * 
-   * @return the value of field 'Key'.
-   */
-  public java.lang.String getKey()
-  {
-    return this._key;
-  }
-
-  /**
-   * 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 'key'.
-   * 
-   * @param key
-   *          the value of field 'key'.
-   */
-  public void setKey(final java.lang.String key)
-  {
-    this._key = key;
-  }
-
-  /**
-   * 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.schemabinding.version2.SequenceSetProperties
-   */
-  public static jalview.schemabinding.version2.SequenceSetProperties unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.SequenceSetProperties) Unmarshaller
-            .unmarshal(
-                    jalview.schemabinding.version2.SequenceSetProperties.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/SequenceType.java b/src/jalview/schemabinding/version2/SequenceType.java
deleted file mode 100644 (file)
index f213ebb..0000000
+++ /dev/null
@@ -1,233 +0,0 @@
-/*
- * 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 SequenceType.
- * 
- * @version $Revision$ $Date$
- */
-public class SequenceType implements java.io.Serializable
-{
-
-  // --------------------------/
-  // - Class/Member Variables -/
-  // --------------------------/
-
-  /**
-   * Field _id.
-   */
-  private java.lang.String _id;
-
-  /**
-   * Field _description.
-   */
-  private java.lang.String _description;
-
-  /**
-   * Field _sequence.
-   */
-  private java.lang.String _sequence;
-
-  /**
-   * Field _name.
-   */
-  private java.lang.String _name;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public SequenceType()
-  {
-    super();
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-   * 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 '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 'description'.
-   * 
-   * @param description
-   *          the value of field 'description'.
-   */
-  public void setDescription(final java.lang.String description)
-  {
-    this._description = description;
-  }
-
-  /**
-   * 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.schemabinding.version2.SequenceType
-   */
-  public static jalview.schemabinding.version2.SequenceType unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.SequenceType) Unmarshaller
-            .unmarshal(jalview.schemabinding.version2.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/Setting.java b/src/jalview/schemabinding/version2/Setting.java
deleted file mode 100644 (file)
index 59e9522..0000000
+++ /dev/null
@@ -1,923 +0,0 @@
-/*
- * 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 Setting.
- * 
- * @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;
-
-  /**
-   * Field _order.
-   */
-  private float _order;
-
-  /**
-   * keeps track of state for field: _order
-   */
-  private boolean _has_order;
-
-  /**
-   * Optional minimum colour for graduated feature colour
-   * 
-   */
-  private int _mincolour;
-
-  /**
-   * keeps track of state for field: _mincolour
-   */
-  private boolean _has_mincolour;
-
-  /**
-   * Field _noValueColour.
-   */
-  private jalview.schemabinding.version2.types.NoValueColour _noValueColour = jalview.schemabinding.version2.types.NoValueColour
-          .valueOf("Min");
-
-  /**
-   * threshold value for graduated feature colour
-   * 
-   */
-  private float _threshold;
-
-  /**
-   * keeps track of state for field: _threshold
-   */
-  private boolean _has_threshold;
-
-  /**
-   * threshold type for graduated feature colour
-   * 
-   */
-  private int _threshstate;
-
-  /**
-   * keeps track of state for field: _threshstate
-   */
-  private boolean _has_threshstate;
-
-  /**
-   * 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;
-
-  /**
-   * name of feature attribute to colour by, or attribute and sub-attribute
-   */
-  private java.util.Vector _attributeNameList;
-
-  /**
-   * optional filter(s) applied to the feature type
-   */
-  private jalview.schemabinding.version2.MatcherSet _matcherSet;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public Setting()
-  {
-    super();
-    setNoValueColour(jalview.schemabinding.version2.types.NoValueColour
-            .valueOf("Min"));
-    this._attributeNameList = new java.util.Vector();
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-   * 
-   * 
-   * @param vAttributeName
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addAttributeName(final java.lang.String vAttributeName)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check for the maximum size
-    if (this._attributeNameList.size() >= 2)
-    {
-      throw new IndexOutOfBoundsException(
-              "addAttributeName has a maximum of 2");
-    }
-
-    this._attributeNameList.addElement(vAttributeName);
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vAttributeName
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addAttributeName(final int index,
-          final java.lang.String vAttributeName)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check for the maximum size
-    if (this._attributeNameList.size() >= 2)
-    {
-      throw new IndexOutOfBoundsException(
-              "addAttributeName has a maximum of 2");
-    }
-
-    this._attributeNameList.add(index, vAttributeName);
-  }
-
-  /**
-   */
-  public void deleteAutoScale()
-  {
-    this._has_autoScale = false;
-  }
-
-  /**
-   */
-  public void deleteColour()
-  {
-    this._has_colour = false;
-  }
-
-  /**
-   */
-  public void deleteColourByLabel()
-  {
-    this._has_colourByLabel = false;
-  }
-
-  /**
-   */
-  public void deleteDisplay()
-  {
-    this._has_display = false;
-  }
-
-  /**
-   */
-  public void deleteMax()
-  {
-    this._has_max = false;
-  }
-
-  /**
-   */
-  public void deleteMin()
-  {
-    this._has_min = false;
-  }
-
-  /**
-   */
-  public void deleteMincolour()
-  {
-    this._has_mincolour = false;
-  }
-
-  /**
-   */
-  public void deleteOrder()
-  {
-    this._has_order = false;
-  }
-
-  /**
-   */
-  public void deleteThreshold()
-  {
-    this._has_threshold = false;
-  }
-
-  /**
-   */
-  public void deleteThreshstate()
-  {
-    this._has_threshstate = false;
-  }
-
-  /**
-   * Method enumerateAttributeName.
-   * 
-   * @return an Enumeration over all java.lang.String elements
-   */
-  public java.util.Enumeration enumerateAttributeName()
-  {
-    return this._attributeNameList.elements();
-  }
-
-  /**
-   * Method getAttributeName.
-   * 
-   * @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 getAttributeName(final int index)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._attributeNameList.size())
-    {
-      throw new IndexOutOfBoundsException("getAttributeName: Index value '"
-              + index + "' not in range [0.."
-              + (this._attributeNameList.size() - 1) + "]");
-    }
-
-    return (java.lang.String) _attributeNameList.get(index);
-  }
-
-  /**
-   * Method getAttributeName.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[] getAttributeName()
-  {
-    java.lang.String[] array = new java.lang.String[0];
-    return (java.lang.String[]) this._attributeNameList.toArray(array);
-  }
-
-  /**
-   * Method getAttributeNameCount.
-   * 
-   * @return the size of this collection
-   */
-  public int getAttributeNameCount()
-  {
-    return this._attributeNameList.size();
-  }
-
-  /**
-   * Returns the value of field 'autoScale'.
-   * 
-   * @return the value of field 'AutoScale'.
-   */
-  public boolean getAutoScale()
-  {
-    return this._autoScale;
-  }
-
-  /**
-   * Returns the value of field 'colour'.
-   * 
-   * @return the value of field 'Colour'.
-   */
-  public int getColour()
-  {
-    return this._colour;
-  }
-
-  /**
-   * Returns the value of field 'colourByLabel'.
-   * 
-   * @return the value of field 'ColourByLabel'.
-   */
-  public boolean getColourByLabel()
-  {
-    return this._colourByLabel;
-  }
-
-  /**
-   * Returns the value of field 'display'.
-   * 
-   * @return the value of field 'Display'.
-   */
-  public boolean getDisplay()
-  {
-    return this._display;
-  }
-
-  /**
-   * Returns the value of field 'matcherSet'. The field 'matcherSet' has the
-   * following description: optional filter(s) applied to the feature type
-   * 
-   * @return the value of field 'MatcherSet'.
-   */
-  public jalview.schemabinding.version2.MatcherSet getMatcherSet()
-  {
-    return this._matcherSet;
-  }
-
-  /**
-   * 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 'mincolour'. The field 'mincolour' has the
-   * following description: Optional minimum colour for graduated feature colour
-   * 
-   * 
-   * @return the value of field 'Mincolour'.
-   */
-  public int getMincolour()
-  {
-    return this._mincolour;
-  }
-
-  /**
-   * Returns the value of field 'noValueColour'.
-   * 
-   * @return the value of field 'NoValueColour'.
-   */
-  public jalview.schemabinding.version2.types.NoValueColour getNoValueColour()
-  {
-    return this._noValueColour;
-  }
-
-  /**
-   * Returns the value of field 'order'.
-   * 
-   * @return the value of field 'Order'.
-   */
-  public float getOrder()
-  {
-    return this._order;
-  }
-
-  /**
-   * Returns the value of field 'threshold'. The field 'threshold' has the
-   * following description: threshold value for graduated feature colour
-   * 
-   * 
-   * @return the value of field 'Threshold'.
-   */
-  public float getThreshold()
-  {
-    return this._threshold;
-  }
-
-  /**
-   * Returns the value of field 'threshstate'. The field 'threshstate' has the
-   * following description: threshold type for graduated feature colour
-   * 
-   * 
-   * @return the value of field 'Threshstate'.
-   */
-  public int getThreshstate()
-  {
-    return this._threshstate;
-  }
-
-  /**
-   * Returns the value of field 'type'.
-   * 
-   * @return the value of field 'Type'.
-   */
-  public java.lang.String getType()
-  {
-    return this._type;
-  }
-
-  /**
-   * Method hasAutoScale.
-   * 
-   * @return true if at least one AutoScale has been added
-   */
-  public boolean hasAutoScale()
-  {
-    return this._has_autoScale;
-  }
-
-  /**
-   * Method hasColour.
-   * 
-   * @return true if at least one Colour has been added
-   */
-  public boolean hasColour()
-  {
-    return this._has_colour;
-  }
-
-  /**
-   * Method hasColourByLabel.
-   * 
-   * @return true if at least one ColourByLabel has been added
-   */
-  public boolean hasColourByLabel()
-  {
-    return this._has_colourByLabel;
-  }
-
-  /**
-   * Method hasDisplay.
-   * 
-   * @return true if at least one Display has been added
-   */
-  public boolean hasDisplay()
-  {
-    return this._has_display;
-  }
-
-  /**
-   * 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 hasMincolour.
-   * 
-   * @return true if at least one Mincolour has been added
-   */
-  public boolean hasMincolour()
-  {
-    return this._has_mincolour;
-  }
-
-  /**
-   * Method hasOrder.
-   * 
-   * @return true if at least one Order has been added
-   */
-  public boolean hasOrder()
-  {
-    return this._has_order;
-  }
-
-  /**
-   * Method hasThreshold.
-   * 
-   * @return true if at least one Threshold has been added
-   */
-  public boolean hasThreshold()
-  {
-    return this._has_threshold;
-  }
-
-  /**
-   * Method hasThreshstate.
-   * 
-   * @return true if at least one Threshstate has been added
-   */
-  public boolean hasThreshstate()
-  {
-    return this._has_threshstate;
-  }
-
-  /**
-   * 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;
-  }
-
-  /**
-   * 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);
-  }
-
-  /**
-   */
-  public void removeAllAttributeName()
-  {
-    this._attributeNameList.clear();
-  }
-
-  /**
-   * Method removeAttributeName.
-   * 
-   * @param vAttributeName
-   * @return true if the object was removed from the collection.
-   */
-  public boolean removeAttributeName(final java.lang.String vAttributeName)
-  {
-    boolean removed = _attributeNameList.remove(vAttributeName);
-    return removed;
-  }
-
-  /**
-   * Method removeAttributeNameAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public java.lang.String removeAttributeNameAt(final int index)
-  {
-    java.lang.Object obj = this._attributeNameList.remove(index);
-    return (java.lang.String) obj;
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vAttributeName
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void setAttributeName(final int index,
-          final java.lang.String vAttributeName)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._attributeNameList.size())
-    {
-      throw new IndexOutOfBoundsException("setAttributeName: Index value '"
-              + index + "' not in range [0.."
-              + (this._attributeNameList.size() - 1) + "]");
-    }
-
-    this._attributeNameList.set(index, vAttributeName);
-  }
-
-  /**
-   * 
-   * 
-   * @param vAttributeNameArray
-   */
-  public void setAttributeName(final java.lang.String[] vAttributeNameArray)
-  {
-    // -- copy array
-    _attributeNameList.clear();
-
-    for (int i = 0; i < vAttributeNameArray.length; i++)
-    {
-      this._attributeNameList.add(vAttributeNameArray[i]);
-    }
-  }
-
-  /**
-   * 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 '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 '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 '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 'matcherSet'. The field 'matcherSet' has the
-   * following description: optional filter(s) applied to the feature type
-   * 
-   * @param matcherSet
-   *          the value of field 'matcherSet'.
-   */
-  public void setMatcherSet(
-          final jalview.schemabinding.version2.MatcherSet matcherSet)
-  {
-    this._matcherSet = matcherSet;
-  }
-
-  /**
-   * 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 'mincolour'. The field 'mincolour' has the
-   * following description: Optional minimum colour for graduated feature colour
-   * 
-   * 
-   * @param mincolour
-   *          the value of field 'mincolour'.
-   */
-  public void setMincolour(final int mincolour)
-  {
-    this._mincolour = mincolour;
-    this._has_mincolour = true;
-  }
-
-  /**
-   * Sets the value of field 'noValueColour'.
-   * 
-   * @param noValueColour
-   *          the value of field 'noValueColour'.
-   */
-  public void setNoValueColour(
-          final jalview.schemabinding.version2.types.NoValueColour noValueColour)
-  {
-    this._noValueColour = noValueColour;
-  }
-
-  /**
-   * Sets the value of field 'order'.
-   * 
-   * @param order
-   *          the value of field 'order'.
-   */
-  public void setOrder(final float order)
-  {
-    this._order = order;
-    this._has_order = true;
-  }
-
-  /**
-   * Sets the value of field 'threshold'. The field 'threshold' has the
-   * following description: threshold value for graduated feature colour
-   * 
-   * 
-   * @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 'threshstate'. The field 'threshstate' has the
-   * following description: threshold type for graduated feature colour
-   * 
-   * 
-   * @param threshstate
-   *          the value of field 'threshstate'.
-   */
-  public void setThreshstate(final int threshstate)
-  {
-    this._threshstate = threshstate;
-    this._has_threshstate = 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.schemabinding.version2.Settin
-   */
-  public static jalview.schemabinding.version2.Setting unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.Setting) Unmarshaller.unmarshal(
-            jalview.schemabinding.version2.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/StructureState.java b/src/jalview/schemabinding/version2/StructureState.java
deleted file mode 100644 (file)
index 186e4e6..0000000
+++ /dev/null
@@ -1,706 +0,0 @@
-/*
- * 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 StructureState.
- * 
- * @version $Revision$ $Date$
- */
-public class StructureState implements java.io.Serializable
-{
-
-  // --------------------------/
-  // - Class/Member Variables -/
-  // --------------------------/
-
-  /**
-   * internal content storage
-   */
-  private java.lang.String _content = "";
-
-  /**
-   * Field _visible.
-   */
-  private boolean _visible;
-
-  /**
-   * keeps track of state for field: _visible
-   */
-  private boolean _has_visible;
-
-  /**
-   * additional identifier which properly disambiguates the structure view from
-   * any other view with the same attributes. This is not an ID, because it is
-   * possible to have many references to the same physical structure view from
-   * different sequences in an alignment. A structureState element citing the
-   * same viewId will appear for each instance.
-   * 
-   */
-  private java.lang.String _viewId;
-
-  /**
-   * Flag set if the alignment panel containing this JSeq should be included in
-   * those used to perform a structure superposition (since Jalview 2.7).
-   * 
-   */
-  private boolean _alignwithAlignPanel = true;
-
-  /**
-   * keeps track of state for field: _alignwithAlignPanel
-   */
-  private boolean _has_alignwithAlignPanel;
-
-  /**
-   * Flag set if the alignment panel containing this JSeq should be included in
-   * those used to colour its associated sequences in this structureState(since
-   * Jalview 2.7).
-   * 
-   */
-  private boolean _colourwithAlignPanel = false;
-
-  /**
-   * keeps track of state for field: _colourwithAlignPanel
-   */
-  private boolean _has_colourwithAlignPanel;
-
-  /**
-   * Flag set if the structure display is coloured by the Jmol state, rather
-   * than by one or more linked alignment views.
-   * 
-   */
-  private boolean _colourByJmol = true;
-
-  /**
-   * keeps track of state for field: _colourByJmol
-   */
-  private boolean _has_colourByJmol;
-
-  /**
-   * An identifier for the viewer type, currently either JMOL or CHIMERA
-   * 
-   */
-  private java.lang.String _type;
-
-  /**
-   * 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;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public StructureState()
-  {
-    super();
-    setContent("");
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-     */
-  public void deleteAlignwithAlignPanel()
-  {
-    this._has_alignwithAlignPanel = false;
-  }
-
-  /**
-     */
-  public void deleteColourByJmol()
-  {
-    this._has_colourByJmol = false;
-  }
-
-  /**
-     */
-  public void deleteColourwithAlignPanel()
-  {
-    this._has_colourwithAlignPanel = false;
-  }
-
-  /**
-     */
-  public void deleteHeight()
-  {
-    this._has_height = false;
-  }
-
-  /**
-     */
-  public void deleteVisible()
-  {
-    this._has_visible = false;
-  }
-
-  /**
-     */
-  public void deleteWidth()
-  {
-    this._has_width = false;
-  }
-
-  /**
-     */
-  public void deleteXpos()
-  {
-    this._has_xpos = false;
-  }
-
-  /**
-     */
-  public void deleteYpos()
-  {
-    this._has_ypos = false;
-  }
-
-  /**
-   * Returns the value of field 'alignwithAlignPanel'. The field
-   * 'alignwithAlignPanel' has the following description: Flag set if the
-   * alignment panel containing this JSeq should be included in those used to
-   * perform a structure superposition (since Jalview 2.7).
-   * 
-   * 
-   * @return the value of field 'AlignwithAlignPanel'.
-   */
-  public boolean getAlignwithAlignPanel()
-  {
-    return this._alignwithAlignPanel;
-  }
-
-  /**
-   * Returns the value of field 'colourByJmol'. The field 'colourByJmol' has the
-   * following description: Flag set if the structure display is coloured by the
-   * Jmol state, rather than by one or more linked alignment views.
-   * 
-   * 
-   * @return the value of field 'ColourByJmol'.
-   */
-  public boolean getColourByJmol()
-  {
-    return this._colourByJmol;
-  }
-
-  /**
-   * Returns the value of field 'colourwithAlignPanel'. The field
-   * 'colourwithAlignPanel' has the following description: Flag set if the
-   * alignment panel containing this JSeq should be included in those used to
-   * colour its associated sequences in this structureState(since Jalview 2.7).
-   * 
-   * 
-   * @return the value of field 'ColourwithAlignPanel'.
-   */
-  public boolean getColourwithAlignPanel()
-  {
-    return this._colourwithAlignPanel;
-  }
-
-  /**
-   * Returns the value of field 'content'. The field 'content' has the following
-   * description: internal content storage
-   * 
-   * @return the value of field 'Content'.
-   */
-  public java.lang.String getContent()
-  {
-    return this._content;
-  }
-
-  /**
-   * Returns the value of field 'height'.
-   * 
-   * @return the value of field 'Height'.
-   */
-  public int getHeight()
-  {
-    return this._height;
-  }
-
-  /**
-   * Returns the value of field 'type'. The field 'type' has the following
-   * description: An identifier for the viewer type, currently either JMOL or
-   * CHIMERA
-   * 
-   * 
-   * @return the value of field 'Type'.
-   */
-  public java.lang.String getType()
-  {
-    return this._type;
-  }
-
-  /**
-   * Returns the value of field 'viewId'. The field 'viewId' has the following
-   * description: additional identifier which properly disambiguates the
-   * structure view from any other view with the same attributes. This is not an
-   * ID, because it is possible to have many references to the same physical
-   * structure view from different sequences in an alignment. A structureState
-   * element citing the same viewId will appear for each instance.
-   * 
-   * 
-   * @return the value of field 'ViewId'.
-   */
-  public java.lang.String getViewId()
-  {
-    return this._viewId;
-  }
-
-  /**
-   * Returns the value of field 'visible'.
-   * 
-   * @return the value of field 'Visible'.
-   */
-  public boolean getVisible()
-  {
-    return this._visible;
-  }
-
-  /**
-   * 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 hasAlignwithAlignPanel.
-   * 
-   * @return true if at least one AlignwithAlignPanel has been added
-   */
-  public boolean hasAlignwithAlignPanel()
-  {
-    return this._has_alignwithAlignPanel;
-  }
-
-  /**
-   * Method hasColourByJmol.
-   * 
-   * @return true if at least one ColourByJmol has been added
-   */
-  public boolean hasColourByJmol()
-  {
-    return this._has_colourByJmol;
-  }
-
-  /**
-   * Method hasColourwithAlignPanel.
-   * 
-   * @return true if at least one ColourwithAlignPanel has been added
-   */
-  public boolean hasColourwithAlignPanel()
-  {
-    return this._has_colourwithAlignPanel;
-  }
-
-  /**
-   * Method hasHeight.
-   * 
-   * @return true if at least one Height has been added
-   */
-  public boolean hasHeight()
-  {
-    return this._has_height;
-  }
-
-  /**
-   * Method hasVisible.
-   * 
-   * @return true if at least one Visible has been added
-   */
-  public boolean hasVisible()
-  {
-    return this._has_visible;
-  }
-
-  /**
-   * 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 'alignwithAlignPanel'. The field
-   * 'alignwithAlignPanel' has the following description: Flag set if the
-   * alignment panel containing this JSeq should be included in those used to
-   * perform a structure superposition (since Jalview 2.7).
-   * 
-   * 
-   * @return the value of field 'AlignwithAlignPanel'.
-   */
-  public boolean isAlignwithAlignPanel()
-  {
-    return this._alignwithAlignPanel;
-  }
-
-  /**
-   * Returns the value of field 'colourByJmol'. The field 'colourByJmol' has the
-   * following description: Flag set if the structure display is coloured by the
-   * Jmol state, rather than by one or more linked alignment views.
-   * 
-   * 
-   * @return the value of field 'ColourByJmol'.
-   */
-  public boolean isColourByJmol()
-  {
-    return this._colourByJmol;
-  }
-
-  /**
-   * Returns the value of field 'colourwithAlignPanel'. The field
-   * 'colourwithAlignPanel' has the following description: Flag set if the
-   * alignment panel containing this JSeq should be included in those used to
-   * colour its associated sequences in this structureState(since Jalview 2.7).
-   * 
-   * 
-   * @return the value of field 'ColourwithAlignPanel'.
-   */
-  public boolean isColourwithAlignPanel()
-  {
-    return this._colourwithAlignPanel;
-  }
-
-  /**
-   * 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 'visible'.
-   * 
-   * @return the value of field 'Visible'.
-   */
-  public boolean isVisible()
-  {
-    return this._visible;
-  }
-
-  /**
-   * 
-   * 
-   * @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 'alignwithAlignPanel'. The field
-   * 'alignwithAlignPanel' has the following description: Flag set if the
-   * alignment panel containing this JSeq should be included in those used to
-   * perform a structure superposition (since Jalview 2.7).
-   * 
-   * 
-   * @param alignwithAlignPanel
-   *          the value of field 'alignwithAlignPanel'.
-   */
-  public void setAlignwithAlignPanel(final boolean alignwithAlignPanel)
-  {
-    this._alignwithAlignPanel = alignwithAlignPanel;
-    this._has_alignwithAlignPanel = true;
-  }
-
-  /**
-   * Sets the value of field 'colourByJmol'. The field 'colourByJmol' has the
-   * following description: Flag set if the structure display is coloured by the
-   * Jmol state, rather than by one or more linked alignment views.
-   * 
-   * 
-   * @param colourByJmol
-   *          the value of field 'colourByJmol'.
-   */
-  public void setColourByJmol(final boolean colourByJmol)
-  {
-    this._colourByJmol = colourByJmol;
-    this._has_colourByJmol = true;
-  }
-
-  /**
-   * Sets the value of field 'colourwithAlignPanel'. The field
-   * 'colourwithAlignPanel' has the following description: Flag set if the
-   * alignment panel containing this JSeq should be included in those used to
-   * colour its associated sequences in this structureState(since Jalview 2.7).
-   * 
-   * 
-   * @param colourwithAlignPanel
-   *          the value of field 'colourwithAlignPanel'.
-   */
-  public void setColourwithAlignPanel(final boolean colourwithAlignPanel)
-  {
-    this._colourwithAlignPanel = colourwithAlignPanel;
-    this._has_colourwithAlignPanel = true;
-  }
-
-  /**
-   * Sets the value of field 'content'. The field 'content' has the following
-   * description: internal content storage
-   * 
-   * @param content
-   *          the value of field 'content'.
-   */
-  public void setContent(final java.lang.String content)
-  {
-    this._content = content;
-  }
-
-  /**
-   * 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 'type'. The field 'type' has the following
-   * description: An identifier for the viewer type, currently either JMOL or
-   * CHIMERA
-   * 
-   * 
-   * @param type
-   *          the value of field 'type'.
-   */
-  public void setType(final java.lang.String type)
-  {
-    this._type = type;
-  }
-
-  /**
-   * Sets the value of field 'viewId'. The field 'viewId' has the following
-   * description: additional identifier which properly disambiguates the
-   * structure view from any other view with the same attributes. This is not an
-   * ID, because it is possible to have many references to the same physical
-   * structure view from different sequences in an alignment. A structureState
-   * element citing the same viewId will appear for each instance.
-   * 
-   * 
-   * @param viewId
-   *          the value of field 'viewId'.
-   */
-  public void setViewId(final java.lang.String viewId)
-  {
-    this._viewId = viewId;
-  }
-
-  /**
-   * Sets the value of field 'visible'.
-   * 
-   * @param visible
-   *          the value of field 'visible'.
-   */
-  public void setVisible(final boolean visible)
-  {
-    this._visible = visible;
-    this._has_visible = true;
-  }
-
-  /**
-   * 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.StructureState
-   */
-  public static jalview.schemabinding.version2.StructureState unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.StructureState) Unmarshaller
-            .unmarshal(jalview.schemabinding.version2.StructureState.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/ThresholdLine.java b/src/jalview/schemabinding/version2/ThresholdLine.java
deleted file mode 100644 (file)
index d70d855..0000000
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
- * 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 ThresholdLine.
- * 
- * @version $Revision$ $Date$
- */
-public class ThresholdLine implements java.io.Serializable
-{
-
-  // --------------------------/
-  // - Class/Member Variables -/
-  // --------------------------/
-
-  /**
-   * Field _label.
-   */
-  private java.lang.String _label;
-
-  /**
-   * Field _value.
-   */
-  private float _value;
-
-  /**
-   * keeps track of state for field: _value
-   */
-  private boolean _has_value;
-
-  /**
-   * Field _colour.
-   */
-  private int _colour;
-
-  /**
-   * keeps track of state for field: _colour
-   */
-  private boolean _has_colour;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public ThresholdLine()
-  {
-    super();
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-     */
-  public void deleteColour()
-  {
-    this._has_colour = false;
-  }
-
-  /**
-     */
-  public void deleteValue()
-  {
-    this._has_value = false;
-  }
-
-  /**
-   * Returns the value of field 'colour'.
-   * 
-   * @return the value of field 'Colour'.
-   */
-  public int getColour()
-  {
-    return this._colour;
-  }
-
-  /**
-   * Returns the value of field 'label'.
-   * 
-   * @return the value of field 'Label'.
-   */
-  public java.lang.String getLabel()
-  {
-    return this._label;
-  }
-
-  /**
-   * Returns the value of field 'value'.
-   * 
-   * @return the value of field 'Value'.
-   */
-  public float getValue()
-  {
-    return this._value;
-  }
-
-  /**
-   * Method hasColour.
-   * 
-   * @return true if at least one Colour has been added
-   */
-  public boolean hasColour()
-  {
-    return this._has_colour;
-  }
-
-  /**
-   * 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 '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 'label'.
-   * 
-   * @param label
-   *          the value of field 'label'.
-   */
-  public void setLabel(final java.lang.String label)
-  {
-    this._label = label;
-  }
-
-  /**
-   * 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.schemabinding.version2.ThresholdLine
-   */
-  public static jalview.schemabinding.version2.ThresholdLine unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.ThresholdLine) Unmarshaller
-            .unmarshal(jalview.schemabinding.version2.ThresholdLine.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/Tree.java b/src/jalview/schemabinding/version2/Tree.java
deleted file mode 100644 (file)
index 19b3eb1..0000000
+++ /dev/null
@@ -1,878 +0,0 @@
-/*
- * 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 Tree.
- * 
- * @version $Revision$ $Date$
- */
-public class Tree implements java.io.Serializable
-{
-
-  // --------------------------/
-  // - Class/Member Variables -/
-  // --------------------------/
-
-  /**
-   * 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;
-
-  /**
-   * Tree ID added for binding tree visualization settings to vamsas document
-   * trees in jalview 2.4.1
-   * 
-   */
-  private java.lang.String _id;
-
-  /**
-   * 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 _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 'id'. The field 'id' has the following
-   * description: Tree ID added for binding tree visualization settings to
-   * vamsas document trees in jalview 2.4.1
-   * 
-   * 
-   * @return the value of field 'Id'.
-   */
-  public java.lang.String getId()
-  {
-    return this._id;
-  }
-
-  /**
-   * 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 'id'. The field 'id' has the following description:
-   * Tree ID added for binding tree visualization settings to vamsas document
-   * trees in jalview 2.4.1
-   * 
-   * 
-   * @param id
-   *          the value of field 'id'.
-   */
-  public void setId(final java.lang.String id)
-  {
-    this._id = id;
-  }
-
-  /**
-   * 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.schemabinding.version2.Tree
-   */
-  public static jalview.schemabinding.version2.Tree unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.Tree) Unmarshaller.unmarshal(
-            jalview.schemabinding.version2.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/UserColourScheme.java b/src/jalview/schemabinding/version2/UserColourScheme.java
deleted file mode 100644 (file)
index e4983bd..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * 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 UserColourScheme.
- * 
- * @version $Revision$ $Date$
- */
-public class UserColourScheme extends JalviewUserColours implements
-        java.io.Serializable
-{
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public UserColourScheme()
-  {
-    super();
-  }
-
-  // -----------/
-  // - 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;
-    }
-    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 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.JalviewUserColours
-   */
-  public static jalview.schemabinding.version2.JalviewUserColours unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.JalviewUserColours) Unmarshaller
-            .unmarshal(
-                    jalview.schemabinding.version2.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/UserColours.java b/src/jalview/schemabinding/version2/UserColours.java
deleted file mode 100644 (file)
index b02d0cd..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * 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 UserColours.
- * 
- * @version $Revision$ $Date$
- */
-public class UserColours implements java.io.Serializable
-{
-
-  // --------------------------/
-  // - Class/Member Variables -/
-  // --------------------------/
-
-  /**
-   * Field _id.
-   */
-  private java.lang.String _id;
-
-  /**
-   * Field _userColourScheme.
-   */
-  private jalview.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.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.schemabinding.version2.UserColours
-   */
-  public static jalview.schemabinding.version2.UserColours unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.UserColours) Unmarshaller
-            .unmarshal(jalview.schemabinding.version2.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/VAMSAS.java b/src/jalview/schemabinding/version2/VAMSAS.java
deleted file mode 100644 (file)
index d025824..0000000
+++ /dev/null
@@ -1,454 +0,0 @@
-/*
- * 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 VAMSAS.
- * 
- * @version $Revision$ $Date$
- */
-public class VAMSAS implements java.io.Serializable
-{
-
-  // --------------------------/
-  // - Class/Member Variables -/
-  // --------------------------/
-
-  /**
-   * Field _treeList.
-   */
-  private java.util.Vector _treeList;
-
-  /**
-   * Field _sequenceSetList.
-   */
-  private java.util.Vector _sequenceSetList;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public VAMSAS()
-  {
-    super();
-    this._treeList = new java.util.Vector();
-    this._sequenceSetList = new java.util.Vector();
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-   * 
-   * 
-   * @param vSequenceSet
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addSequenceSet(
-          final jalview.schemabinding.version2.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 jalview.schemabinding.version2.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 enumerateSequenceSet.
-   * 
-   * @return an Enumeration over all jalview.schemabinding.version2.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 getSequenceSet.
-   * 
-   * @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.SequenceSet at the
-   *         given index
-   */
-  public jalview.schemabinding.version2.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 (jalview.schemabinding.version2.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 jalview.schemabinding.version2.SequenceSet[] getSequenceSet()
-  {
-    jalview.schemabinding.version2.SequenceSet[] array = new jalview.schemabinding.version2.SequenceSet[0];
-    return (jalview.schemabinding.version2.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);
-  }
-
-  /**
-     */
-  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 jalview.schemabinding.version2.SequenceSet vSequenceSet)
-  {
-    boolean removed = _sequenceSetList.remove(vSequenceSet);
-    return removed;
-  }
-
-  /**
-   * Method removeSequenceSetAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public jalview.schemabinding.version2.SequenceSet removeSequenceSetAt(
-          final int index)
-  {
-    java.lang.Object obj = this._sequenceSetList.remove(index);
-    return (jalview.schemabinding.version2.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 vSequenceSet
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void setSequenceSet(final int index,
-          final jalview.schemabinding.version2.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 jalview.schemabinding.version2.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.schemabinding.version2.VAMSAS
-   */
-  public static jalview.schemabinding.version2.VAMSAS unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.VAMSAS) Unmarshaller.unmarshal(
-            jalview.schemabinding.version2.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/VamsasModel.java b/src/jalview/schemabinding/version2/VamsasModel.java
deleted file mode 100644 (file)
index d3fe796..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * 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 VamsasModel.
- * 
- * @version $Revision$ $Date$
- */
-public class VamsasModel extends VAMSAS implements java.io.Serializable
-{
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public VamsasModel()
-  {
-    super();
-  }
-
-  // -----------/
-  // - 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;
-    }
-    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 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.VAMSAS
-   */
-  public static jalview.schemabinding.version2.VAMSAS unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.VAMSAS) Unmarshaller.unmarshal(
-            jalview.schemabinding.version2.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/Viewport.java b/src/jalview/schemabinding/version2/Viewport.java
deleted file mode 100644 (file)
index 159f7ae..0000000
+++ /dev/null
@@ -1,2803 +0,0 @@
-/*
- * 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 Viewport.
- * 
- * @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 _rightAlignIds.
-   */
-  private boolean _rightAlignIds;
-
-  /**
-   * keeps track of state for field: _rightAlignIds
-   */
-  private boolean _has_rightAlignIds;
-
-  /**
-   * 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 _showUnconserved.
-   */
-  private boolean _showUnconserved = false;
-
-  /**
-   * keeps track of state for field: _showUnconserved
-   */
-  private boolean _has_showUnconserved;
-
-  /**
-   * 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 _showNPfeatureTooltip.
-   */
-  private boolean _showNPfeatureTooltip;
-
-  /**
-   * keeps track of state for field: _showNPfeatureTooltip
-   */
-  private boolean _has_showNPfeatureTooltip;
-
-  /**
-   * Field _showDbRefTooltip.
-   */
-  private boolean _showDbRefTooltip;
-
-  /**
-   * keeps track of state for field: _showDbRefTooltip
-   */
-  private boolean _has_showDbRefTooltip;
-
-  /**
-   * Field _followHighlight.
-   */
-  private boolean _followHighlight = true;
-
-  /**
-   * keeps track of state for field: _followHighlight
-   */
-  private boolean _has_followHighlight;
-
-  /**
-   * Field _followSelection.
-   */
-  private boolean _followSelection = true;
-
-  /**
-   * keeps track of state for field: _followSelection
-   */
-  private boolean _has_followSelection;
-
-  /**
-   * Field _showAnnotation.
-   */
-  private boolean _showAnnotation;
-
-  /**
-   * keeps track of state for field: _showAnnotation
-   */
-  private boolean _has_showAnnotation;
-
-  /**
-   * Field _centreColumnLabels.
-   */
-  private boolean _centreColumnLabels = false;
-
-  /**
-   * keeps track of state for field: _centreColumnLabels
-   */
-  private boolean _has_centreColumnLabels;
-
-  /**
-   * Field _showGroupConservation.
-   */
-  private boolean _showGroupConservation = false;
-
-  /**
-   * keeps track of state for field: _showGroupConservation
-   */
-  private boolean _has_showGroupConservation;
-
-  /**
-   * Field _showGroupConsensus.
-   */
-  private boolean _showGroupConsensus = false;
-
-  /**
-   * keeps track of state for field: _showGroupConsensus
-   */
-  private boolean _has_showGroupConsensus;
-
-  /**
-   * Field _showConsensusHistogram.
-   */
-  private boolean _showConsensusHistogram = true;
-
-  /**
-   * keeps track of state for field: _showConsensusHistogram
-   */
-  private boolean _has_showConsensusHistogram;
-
-  /**
-   * Field _showSequenceLogo.
-   */
-  private boolean _showSequenceLogo = false;
-
-  /**
-   * keeps track of state for field: _showSequenceLogo
-   */
-  private boolean _has_showSequenceLogo;
-
-  /**
-   * Field _normaliseSequenceLogo.
-   */
-  private boolean _normaliseSequenceLogo = false;
-
-  /**
-   * keeps track of state for field: _normaliseSequenceLogo
-   */
-  private boolean _has_normaliseSequenceLogo;
-
-  /**
-   * Field _ignoreGapsinConsensus.
-   */
-  private boolean _ignoreGapsinConsensus = true;
-
-  /**
-   * keeps track of state for field: _ignoreGapsinConsensus
-   */
-  private boolean _has_ignoreGapsinConsensus;
-
-  /**
-   * 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;
-
-  /**
-   * Field _scaleProteinAsCdna.
-   */
-  private boolean _scaleProteinAsCdna = true;
-
-  /**
-   * keeps track of state for field: _scaleProteinAsCdna
-   */
-  private boolean _has_scaleProteinAsCdna;
-
-  /**
-   * Field _viewName.
-   */
-  private java.lang.String _viewName;
-
-  /**
-   * Field _sequenceSetId.
-   */
-  private java.lang.String _sequenceSetId;
-
-  /**
-   * Field _gatheredViews.
-   */
-  private boolean _gatheredViews;
-
-  /**
-   * keeps track of state for field: _gatheredViews
-   */
-  private boolean _has_gatheredViews;
-
-  /**
-   * Field _textCol1.
-   */
-  private int _textCol1;
-
-  /**
-   * keeps track of state for field: _textCol1
-   */
-  private boolean _has_textCol1;
-
-  /**
-   * Field _textCol2.
-   */
-  private int _textCol2;
-
-  /**
-   * keeps track of state for field: _textCol2
-   */
-  private boolean _has_textCol2;
-
-  /**
-   * Field _textColThreshold.
-   */
-  private int _textColThreshold;
-
-  /**
-   * keeps track of state for field: _textColThreshold
-   */
-  private boolean _has_textColThreshold;
-
-  /**
-   * unique id used by jalview to synchronize between stored and instantiated
-   * views
-   * 
-   */
-  private java.lang.String _id;
-
-  /**
-   * The viewport id of this viewport's (cdna/protein) coding complement, if any
-   * 
-   */
-  private java.lang.String _complementId;
-
-  /**
-   * 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 _annotationColours.
-   */
-  private jalview.schemabinding.version2.AnnotationColours _annotationColours;
-
-  /**
-   * Field _hiddenColumnsList.
-   */
-  private java.util.Vector _hiddenColumnsList;
-
-  /**
-   * Field _calcIdParamList.
-   */
-  private java.util.Vector _calcIdParamList;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public Viewport()
-  {
-    super();
-    this._hiddenColumnsList = new java.util.Vector();
-    this._calcIdParamList = new java.util.Vector();
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-   * 
-   * 
-   * @param vCalcIdParam
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addCalcIdParam(
-          final jalview.schemabinding.version2.CalcIdParam vCalcIdParam)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._calcIdParamList.addElement(vCalcIdParam);
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vCalcIdParam
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addCalcIdParam(final int index,
-          final jalview.schemabinding.version2.CalcIdParam vCalcIdParam)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._calcIdParamList.add(index, vCalcIdParam);
-  }
-
-  /**
-   * 
-   * 
-   * @param vHiddenColumns
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addHiddenColumns(
-          final jalview.schemabinding.version2.HiddenColumns vHiddenColumns)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._hiddenColumnsList.addElement(vHiddenColumns);
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vHiddenColumns
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addHiddenColumns(final int index,
-          final jalview.schemabinding.version2.HiddenColumns vHiddenColumns)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._hiddenColumnsList.add(index, vHiddenColumns);
-  }
-
-  /**
-     */
-  public void deleteCentreColumnLabels()
-  {
-    this._has_centreColumnLabels = false;
-  }
-
-  /**
-     */
-  public void deleteConsThreshold()
-  {
-    this._has_consThreshold = false;
-  }
-
-  /**
-     */
-  public void deleteConservationSelected()
-  {
-    this._has_conservationSelected = false;
-  }
-
-  /**
-     */
-  public void deleteFollowHighlight()
-  {
-    this._has_followHighlight = false;
-  }
-
-  /**
-     */
-  public void deleteFollowSelection()
-  {
-    this._has_followSelection = false;
-  }
-
-  /**
-     */
-  public void deleteFontSize()
-  {
-    this._has_fontSize = false;
-  }
-
-  /**
-     */
-  public void deleteFontStyle()
-  {
-    this._has_fontStyle = false;
-  }
-
-  /**
-     */
-  public void deleteGatheredViews()
-  {
-    this._has_gatheredViews = false;
-  }
-
-  /**
-     */
-  public void deleteHeight()
-  {
-    this._has_height = false;
-  }
-
-  /**
-     */
-  public void deleteIgnoreGapsinConsensus()
-  {
-    this._has_ignoreGapsinConsensus = false;
-  }
-
-  /**
-     */
-  public void deleteNormaliseSequenceLogo()
-  {
-    this._has_normaliseSequenceLogo = false;
-  }
-
-  /**
-     */
-  public void deletePidSelected()
-  {
-    this._has_pidSelected = false;
-  }
-
-  /**
-     */
-  public void deletePidThreshold()
-  {
-    this._has_pidThreshold = false;
-  }
-
-  /**
-     */
-  public void deleteRenderGaps()
-  {
-    this._has_renderGaps = false;
-  }
-
-  /**
-     */
-  public void deleteRightAlignIds()
-  {
-    this._has_rightAlignIds = false;
-  }
-
-  /**
-     */
-  public void deleteScaleProteinAsCdna()
-  {
-    this._has_scaleProteinAsCdna = false;
-  }
-
-  /**
-     */
-  public void deleteShowAnnotation()
-  {
-    this._has_showAnnotation = false;
-  }
-
-  /**
-     */
-  public void deleteShowBoxes()
-  {
-    this._has_showBoxes = false;
-  }
-
-  /**
-     */
-  public void deleteShowColourText()
-  {
-    this._has_showColourText = false;
-  }
-
-  /**
-     */
-  public void deleteShowConsensusHistogram()
-  {
-    this._has_showConsensusHistogram = false;
-  }
-
-  /**
-     */
-  public void deleteShowDbRefTooltip()
-  {
-    this._has_showDbRefTooltip = false;
-  }
-
-  /**
-     */
-  public void deleteShowFullId()
-  {
-    this._has_showFullId = false;
-  }
-
-  /**
-     */
-  public void deleteShowGroupConsensus()
-  {
-    this._has_showGroupConsensus = false;
-  }
-
-  /**
-     */
-  public void deleteShowGroupConservation()
-  {
-    this._has_showGroupConservation = false;
-  }
-
-  /**
-     */
-  public void deleteShowNPfeatureTooltip()
-  {
-    this._has_showNPfeatureTooltip = false;
-  }
-
-  /**
-     */
-  public void deleteShowSequenceFeatures()
-  {
-    this._has_showSequenceFeatures = false;
-  }
-
-  /**
-     */
-  public void deleteShowSequenceLogo()
-  {
-    this._has_showSequenceLogo = false;
-  }
-
-  /**
-     */
-  public void deleteShowText()
-  {
-    this._has_showText = false;
-  }
-
-  /**
-     */
-  public void deleteShowUnconserved()
-  {
-    this._has_showUnconserved = false;
-  }
-
-  /**
-     */
-  public void deleteStartRes()
-  {
-    this._has_startRes = false;
-  }
-
-  /**
-     */
-  public void deleteStartSeq()
-  {
-    this._has_startSeq = false;
-  }
-
-  /**
-     */
-  public void deleteTextCol1()
-  {
-    this._has_textCol1 = false;
-  }
-
-  /**
-     */
-  public void deleteTextCol2()
-  {
-    this._has_textCol2 = false;
-  }
-
-  /**
-     */
-  public void deleteTextColThreshold()
-  {
-    this._has_textColThreshold = 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;
-  }
-
-  /**
-   * Method enumerateCalcIdParam.
-   * 
-   * @return an Enumeration over all jalview.schemabinding.version2.CalcIdParam
-   *         elements
-   */
-  public java.util.Enumeration enumerateCalcIdParam()
-  {
-    return this._calcIdParamList.elements();
-  }
-
-  /**
-   * Method enumerateHiddenColumns.
-   * 
-   * @return an Enumeration over all
-   *         jalview.schemabinding.version2.HiddenColumns elements
-   */
-  public java.util.Enumeration enumerateHiddenColumns()
-  {
-    return this._hiddenColumnsList.elements();
-  }
-
-  /**
-   * Returns the value of field 'annotationColours'.
-   * 
-   * @return the value of field 'AnnotationColours'.
-   */
-  public jalview.schemabinding.version2.AnnotationColours getAnnotationColours()
-  {
-    return this._annotationColours;
-  }
-
-  /**
-   * Returns the value of field 'bgColour'.
-   * 
-   * @return the value of field 'BgColour'.
-   */
-  public java.lang.String getBgColour()
-  {
-    return this._bgColour;
-  }
-
-  /**
-   * Method getCalcIdParam.
-   * 
-   * @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.CalcIdParam at the
-   *         given index
-   */
-  public jalview.schemabinding.version2.CalcIdParam getCalcIdParam(
-          final int index) throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._calcIdParamList.size())
-    {
-      throw new IndexOutOfBoundsException("getCalcIdParam: Index value '"
-              + index + "' not in range [0.."
-              + (this._calcIdParamList.size() - 1) + "]");
-    }
-
-    return (jalview.schemabinding.version2.CalcIdParam) _calcIdParamList
-            .get(index);
-  }
-
-  /**
-   * Method getCalcIdParam.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.CalcIdParam[] getCalcIdParam()
-  {
-    jalview.schemabinding.version2.CalcIdParam[] array = new jalview.schemabinding.version2.CalcIdParam[0];
-    return (jalview.schemabinding.version2.CalcIdParam[]) this._calcIdParamList
-            .toArray(array);
-  }
-
-  /**
-   * Method getCalcIdParamCount.
-   * 
-   * @return the size of this collection
-   */
-  public int getCalcIdParamCount()
-  {
-    return this._calcIdParamList.size();
-  }
-
-  /**
-   * Returns the value of field 'centreColumnLabels'.
-   * 
-   * @return the value of field 'CentreColumnLabels'.
-   */
-  public boolean getCentreColumnLabels()
-  {
-    return this._centreColumnLabels;
-  }
-
-  /**
-   * 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
-   * 
-   * 
-   * @return the value of field 'ComplementId'.
-   */
-  public java.lang.String getComplementId()
-  {
-    return this._complementId;
-  }
-
-  /**
-   * 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 'followHighlight'.
-   * 
-   * @return the value of field 'FollowHighlight'.
-   */
-  public boolean getFollowHighlight()
-  {
-    return this._followHighlight;
-  }
-
-  /**
-   * Returns the value of field 'followSelection'.
-   * 
-   * @return the value of field 'FollowSelection'.
-   */
-  public boolean getFollowSelection()
-  {
-    return this._followSelection;
-  }
-
-  /**
-   * 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 'gatheredViews'.
-   * 
-   * @return the value of field 'GatheredViews'.
-   */
-  public boolean getGatheredViews()
-  {
-    return this._gatheredViews;
-  }
-
-  /**
-   * Returns the value of field 'height'.
-   * 
-   * @return the value of field 'Height'.
-   */
-  public int getHeight()
-  {
-    return this._height;
-  }
-
-  /**
-   * Method getHiddenColumns.
-   * 
-   * @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.HiddenColumns at
-   *         the given index
-   */
-  public jalview.schemabinding.version2.HiddenColumns getHiddenColumns(
-          final int index) throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._hiddenColumnsList.size())
-    {
-      throw new IndexOutOfBoundsException("getHiddenColumns: Index value '"
-              + index + "' not in range [0.."
-              + (this._hiddenColumnsList.size() - 1) + "]");
-    }
-
-    return (jalview.schemabinding.version2.HiddenColumns) _hiddenColumnsList
-            .get(index);
-  }
-
-  /**
-   * Method getHiddenColumns.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.HiddenColumns[] getHiddenColumns()
-  {
-    jalview.schemabinding.version2.HiddenColumns[] array = new jalview.schemabinding.version2.HiddenColumns[0];
-    return (jalview.schemabinding.version2.HiddenColumns[]) this._hiddenColumnsList
-            .toArray(array);
-  }
-
-  /**
-   * Method getHiddenColumnsCount.
-   * 
-   * @return the size of this collection
-   */
-  public int getHiddenColumnsCount()
-  {
-    return this._hiddenColumnsList.size();
-  }
-
-  /**
-   * Returns the value of field 'id'. The field 'id' has the following
-   * description: unique id used by jalview to synchronize between stored and
-   * instantiated views
-   * 
-   * 
-   * @return the value of field 'Id'.
-   */
-  public java.lang.String getId()
-  {
-    return this._id;
-  }
-
-  /**
-   * Returns the value of field 'ignoreGapsinConsensus'.
-   * 
-   * @return the value of field 'IgnoreGapsinConsensus'.
-   */
-  public boolean getIgnoreGapsinConsensus()
-  {
-    return this._ignoreGapsinConsensus;
-  }
-
-  /**
-   * Returns the value of field 'normaliseSequenceLogo'.
-   * 
-   * @return the value of field 'NormaliseSequenceLogo'.
-   */
-  public boolean getNormaliseSequenceLogo()
-  {
-    return this._normaliseSequenceLogo;
-  }
-
-  /**
-   * 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 'rightAlignIds'.
-   * 
-   * @return the value of field 'RightAlignIds'.
-   */
-  public boolean getRightAlignIds()
-  {
-    return this._rightAlignIds;
-  }
-
-  /**
-   * Returns the value of field 'scaleProteinAsCdna'.
-   * 
-   * @return the value of field 'ScaleProteinAsCdna'.
-   */
-  public boolean getScaleProteinAsCdna()
-  {
-    return this._scaleProteinAsCdna;
-  }
-
-  /**
-   * Returns the value of field 'sequenceSetId'.
-   * 
-   * @return the value of field 'SequenceSetId'.
-   */
-  public java.lang.String getSequenceSetId()
-  {
-    return this._sequenceSetId;
-  }
-
-  /**
-   * 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 'showConsensusHistogram'.
-   * 
-   * @return the value of field 'ShowConsensusHistogram'.
-   */
-  public boolean getShowConsensusHistogram()
-  {
-    return this._showConsensusHistogram;
-  }
-
-  /**
-   * Returns the value of field 'showDbRefTooltip'.
-   * 
-   * @return the value of field 'ShowDbRefTooltip'.
-   */
-  public boolean getShowDbRefTooltip()
-  {
-    return this._showDbRefTooltip;
-  }
-
-  /**
-   * Returns the value of field 'showFullId'.
-   * 
-   * @return the value of field 'ShowFullId'.
-   */
-  public boolean getShowFullId()
-  {
-    return this._showFullId;
-  }
-
-  /**
-   * Returns the value of field 'showGroupConsensus'.
-   * 
-   * @return the value of field 'ShowGroupConsensus'.
-   */
-  public boolean getShowGroupConsensus()
-  {
-    return this._showGroupConsensus;
-  }
-
-  /**
-   * Returns the value of field 'showGroupConservation'.
-   * 
-   * @return the value of field 'ShowGroupConservation'.
-   */
-  public boolean getShowGroupConservation()
-  {
-    return this._showGroupConservation;
-  }
-
-  /**
-   * Returns the value of field 'showNPfeatureTooltip'.
-   * 
-   * @return the value of field 'ShowNPfeatureTooltip'.
-   */
-  public boolean getShowNPfeatureTooltip()
-  {
-    return this._showNPfeatureTooltip;
-  }
-
-  /**
-   * Returns the value of field 'showSequenceFeatures'.
-   * 
-   * @return the value of field 'ShowSequenceFeatures'.
-   */
-  public boolean getShowSequenceFeatures()
-  {
-    return this._showSequenceFeatures;
-  }
-
-  /**
-   * Returns the value of field 'showSequenceLogo'.
-   * 
-   * @return the value of field 'ShowSequenceLogo'.
-   */
-  public boolean getShowSequenceLogo()
-  {
-    return this._showSequenceLogo;
-  }
-
-  /**
-   * Returns the value of field 'showText'.
-   * 
-   * @return the value of field 'ShowText'.
-   */
-  public boolean getShowText()
-  {
-    return this._showText;
-  }
-
-  /**
-   * Returns the value of field 'showUnconserved'.
-   * 
-   * @return the value of field 'ShowUnconserved'.
-   */
-  public boolean getShowUnconserved()
-  {
-    return this._showUnconserved;
-  }
-
-  /**
-   * 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 'textCol1'.
-   * 
-   * @return the value of field 'TextCol1'.
-   */
-  public int getTextCol1()
-  {
-    return this._textCol1;
-  }
-
-  /**
-   * Returns the value of field 'textCol2'.
-   * 
-   * @return the value of field 'TextCol2'.
-   */
-  public int getTextCol2()
-  {
-    return this._textCol2;
-  }
-
-  /**
-   * Returns the value of field 'textColThreshold'.
-   * 
-   * @return the value of field 'TextColThreshold'.
-   */
-  public int getTextColThreshold()
-  {
-    return this._textColThreshold;
-  }
-
-  /**
-   * 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 'viewName'.
-   * 
-   * @return the value of field 'ViewName'.
-   */
-  public java.lang.String getViewName()
-  {
-    return this._viewName;
-  }
-
-  /**
-   * 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 hasCentreColumnLabels.
-   * 
-   * @return true if at least one CentreColumnLabels has been adde
-   */
-  public boolean hasCentreColumnLabels()
-  {
-    return this._has_centreColumnLabels;
-  }
-
-  /**
-   * 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 hasFollowHighlight.
-   * 
-   * @return true if at least one FollowHighlight has been added
-   */
-  public boolean hasFollowHighlight()
-  {
-    return this._has_followHighlight;
-  }
-
-  /**
-   * Method hasFollowSelection.
-   * 
-   * @return true if at least one FollowSelection has been added
-   */
-  public boolean hasFollowSelection()
-  {
-    return this._has_followSelection;
-  }
-
-  /**
-   * 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 hasGatheredViews.
-   * 
-   * @return true if at least one GatheredViews has been added
-   */
-  public boolean hasGatheredViews()
-  {
-    return this._has_gatheredViews;
-  }
-
-  /**
-   * Method hasHeight.
-   * 
-   * @return true if at least one Height has been added
-   */
-  public boolean hasHeight()
-  {
-    return this._has_height;
-  }
-
-  /**
-   * Method hasIgnoreGapsinConsensus.
-   * 
-   * @return true if at least one IgnoreGapsinConsensus has been added
-   */
-  public boolean hasIgnoreGapsinConsensus()
-  {
-    return this._has_ignoreGapsinConsensus;
-  }
-
-  /**
-   * Method hasNormaliseSequenceLogo.
-   * 
-   * @return true if at least one NormaliseSequenceLogo has been added
-   */
-  public boolean hasNormaliseSequenceLogo()
-  {
-    return this._has_normaliseSequenceLogo;
-  }
-
-  /**
-   * 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 hasRightAlignIds.
-   * 
-   * @return true if at least one RightAlignIds has been added
-   */
-  public boolean hasRightAlignIds()
-  {
-    return this._has_rightAlignIds;
-  }
-
-  /**
-   * Method hasScaleProteinAsCdna.
-   * 
-   * @return true if at least one ScaleProteinAsCdna has been adde
-   */
-  public boolean hasScaleProteinAsCdna()
-  {
-    return this._has_scaleProteinAsCdna;
-  }
-
-  /**
-   * 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 hasShowConsensusHistogram.
-   * 
-   * @return true if at least one ShowConsensusHistogram has been added
-   */
-  public boolean hasShowConsensusHistogram()
-  {
-    return this._has_showConsensusHistogram;
-  }
-
-  /**
-   * Method hasShowDbRefTooltip.
-   * 
-   * @return true if at least one ShowDbRefTooltip has been added
-   */
-  public boolean hasShowDbRefTooltip()
-  {
-    return this._has_showDbRefTooltip;
-  }
-
-  /**
-   * Method hasShowFullId.
-   * 
-   * @return true if at least one ShowFullId has been added
-   */
-  public boolean hasShowFullId()
-  {
-    return this._has_showFullId;
-  }
-
-  /**
-   * Method hasShowGroupConsensus.
-   * 
-   * @return true if at least one ShowGroupConsensus has been adde
-   */
-  public boolean hasShowGroupConsensus()
-  {
-    return this._has_showGroupConsensus;
-  }
-
-  /**
-   * Method hasShowGroupConservation.
-   * 
-   * @return true if at least one ShowGroupConservation has been added
-   */
-  public boolean hasShowGroupConservation()
-  {
-    return this._has_showGroupConservation;
-  }
-
-  /**
-   * Method hasShowNPfeatureTooltip.
-   * 
-   * @return true if at least one ShowNPfeatureTooltip has been added
-   */
-  public boolean hasShowNPfeatureTooltip()
-  {
-    return this._has_showNPfeatureTooltip;
-  }
-
-  /**
-   * Method hasShowSequenceFeatures.
-   * 
-   * @return true if at least one ShowSequenceFeatures has been added
-   */
-  public boolean hasShowSequenceFeatures()
-  {
-    return this._has_showSequenceFeatures;
-  }
-
-  /**
-   * Method hasShowSequenceLogo.
-   * 
-   * @return true if at least one ShowSequenceLogo has been added
-   */
-  public boolean hasShowSequenceLogo()
-  {
-    return this._has_showSequenceLogo;
-  }
-
-  /**
-   * Method hasShowText.
-   * 
-   * @return true if at least one ShowText has been added
-   */
-  public boolean hasShowText()
-  {
-    return this._has_showText;
-  }
-
-  /**
-   * Method hasShowUnconserved.
-   * 
-   * @return true if at least one ShowUnconserved has been added
-   */
-  public boolean hasShowUnconserved()
-  {
-    return this._has_showUnconserved;
-  }
-
-  /**
-   * 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 hasTextCol1.
-   * 
-   * @return true if at least one TextCol1 has been added
-   */
-  public boolean hasTextCol1()
-  {
-    return this._has_textCol1;
-  }
-
-  /**
-   * Method hasTextCol2.
-   * 
-   * @return true if at least one TextCol2 has been added
-   */
-  public boolean hasTextCol2()
-  {
-    return this._has_textCol2;
-  }
-
-  /**
-   * Method hasTextColThreshold.
-   * 
-   * @return true if at least one TextColThreshold has been added
-   */
-  public boolean hasTextColThreshold()
-  {
-    return this._has_textColThreshold;
-  }
-
-  /**
-   * 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 'centreColumnLabels'.
-   * 
-   * @return the value of field 'CentreColumnLabels'.
-   */
-  public boolean isCentreColumnLabels()
-  {
-    return this._centreColumnLabels;
-  }
-
-  /**
-   * Returns the value of field 'conservationSelected'.
-   * 
-   * @return the value of field 'ConservationSelected'.
-   */
-  public boolean isConservationSelected()
-  {
-    return this._conservationSelected;
-  }
-
-  /**
-   * Returns the value of field 'followHighlight'.
-   * 
-   * @return the value of field 'FollowHighlight'.
-   */
-  public boolean isFollowHighlight()
-  {
-    return this._followHighlight;
-  }
-
-  /**
-   * Returns the value of field 'followSelection'.
-   * 
-   * @return the value of field 'FollowSelection'.
-   */
-  public boolean isFollowSelection()
-  {
-    return this._followSelection;
-  }
-
-  /**
-   * Returns the value of field 'gatheredViews'.
-   * 
-   * @return the value of field 'GatheredViews'.
-   */
-  public boolean isGatheredViews()
-  {
-    return this._gatheredViews;
-  }
-
-  /**
-   * Returns the value of field 'ignoreGapsinConsensus'.
-   * 
-   * @return the value of field 'IgnoreGapsinConsensus'.
-   */
-  public boolean isIgnoreGapsinConsensus()
-  {
-    return this._ignoreGapsinConsensus;
-  }
-
-  /**
-   * Returns the value of field 'normaliseSequenceLogo'.
-   * 
-   * @return the value of field 'NormaliseSequenceLogo'.
-   */
-  public boolean isNormaliseSequenceLogo()
-  {
-    return this._normaliseSequenceLogo;
-  }
-
-  /**
-   * 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 'rightAlignIds'.
-   * 
-   * @return the value of field 'RightAlignIds'.
-   */
-  public boolean isRightAlignIds()
-  {
-    return this._rightAlignIds;
-  }
-
-  /**
-   * Returns the value of field 'scaleProteinAsCdna'.
-   * 
-   * @return the value of field 'ScaleProteinAsCdna'.
-   */
-  public boolean isScaleProteinAsCdna()
-  {
-    return this._scaleProteinAsCdna;
-  }
-
-  /**
-   * 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 'showConsensusHistogram'.
-   * 
-   * @return the value of field 'ShowConsensusHistogram'.
-   */
-  public boolean isShowConsensusHistogram()
-  {
-    return this._showConsensusHistogram;
-  }
-
-  /**
-   * Returns the value of field 'showDbRefTooltip'.
-   * 
-   * @return the value of field 'ShowDbRefTooltip'.
-   */
-  public boolean isShowDbRefTooltip()
-  {
-    return this._showDbRefTooltip;
-  }
-
-  /**
-   * Returns the value of field 'showFullId'.
-   * 
-   * @return the value of field 'ShowFullId'.
-   */
-  public boolean isShowFullId()
-  {
-    return this._showFullId;
-  }
-
-  /**
-   * Returns the value of field 'showGroupConsensus'.
-   * 
-   * @return the value of field 'ShowGroupConsensus'.
-   */
-  public boolean isShowGroupConsensus()
-  {
-    return this._showGroupConsensus;
-  }
-
-  /**
-   * Returns the value of field 'showGroupConservation'.
-   * 
-   * @return the value of field 'ShowGroupConservation'.
-   */
-  public boolean isShowGroupConservation()
-  {
-    return this._showGroupConservation;
-  }
-
-  /**
-   * Returns the value of field 'showNPfeatureTooltip'.
-   * 
-   * @return the value of field 'ShowNPfeatureTooltip'.
-   */
-  public boolean isShowNPfeatureTooltip()
-  {
-    return this._showNPfeatureTooltip;
-  }
-
-  /**
-   * Returns the value of field 'showSequenceFeatures'.
-   * 
-   * @return the value of field 'ShowSequenceFeatures'.
-   */
-  public boolean isShowSequenceFeatures()
-  {
-    return this._showSequenceFeatures;
-  }
-
-  /**
-   * Returns the value of field 'showSequenceLogo'.
-   * 
-   * @return the value of field 'ShowSequenceLogo'.
-   */
-  public boolean isShowSequenceLogo()
-  {
-    return this._showSequenceLogo;
-  }
-
-  /**
-   * Returns the value of field 'showText'.
-   * 
-   * @return the value of field 'ShowText'.
-   */
-  public boolean isShowText()
-  {
-    return this._showText;
-  }
-
-  /**
-   * Returns the value of field 'showUnconserved'.
-   * 
-   * @return the value of field 'ShowUnconserved'.
-   */
-  public boolean isShowUnconserved()
-  {
-    return this._showUnconserved;
-  }
-
-  /**
-   * 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);
-  }
-
-  /**
-     */
-  public void removeAllCalcIdParam()
-  {
-    this._calcIdParamList.clear();
-  }
-
-  /**
-     */
-  public void removeAllHiddenColumns()
-  {
-    this._hiddenColumnsList.clear();
-  }
-
-  /**
-   * Method removeCalcIdParam.
-   * 
-   * @param vCalcIdParam
-   * @return true if the object was removed from the collection.
-   */
-  public boolean removeCalcIdParam(
-          final jalview.schemabinding.version2.CalcIdParam vCalcIdParam)
-  {
-    boolean removed = _calcIdParamList.remove(vCalcIdParam);
-    return removed;
-  }
-
-  /**
-   * Method removeCalcIdParamAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public jalview.schemabinding.version2.CalcIdParam removeCalcIdParamAt(
-          final int index)
-  {
-    java.lang.Object obj = this._calcIdParamList.remove(index);
-    return (jalview.schemabinding.version2.CalcIdParam) obj;
-  }
-
-  /**
-   * Method removeHiddenColumns.
-   * 
-   * @param vHiddenColumns
-   * @return true if the object was removed from the collection.
-   */
-  public boolean removeHiddenColumns(
-          final jalview.schemabinding.version2.HiddenColumns vHiddenColumns)
-  {
-    boolean removed = _hiddenColumnsList.remove(vHiddenColumns);
-    return removed;
-  }
-
-  /**
-   * Method removeHiddenColumnsAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public jalview.schemabinding.version2.HiddenColumns removeHiddenColumnsAt(
-          final int index)
-  {
-    java.lang.Object obj = this._hiddenColumnsList.remove(index);
-    return (jalview.schemabinding.version2.HiddenColumns) obj;
-  }
-
-  /**
-   * Sets the value of field 'annotationColours'.
-   * 
-   * @param annotationColours
-   *          the value of field 'annotationColours'.
-   */
-  public void setAnnotationColours(
-          final jalview.schemabinding.version2.AnnotationColours annotationColours)
-  {
-    this._annotationColours = annotationColours;
-  }
-
-  /**
-   * Sets the value of field 'bgColour'.
-   * 
-   * @param bgColour
-   *          the value of field 'bgColour'.
-   */
-  public void setBgColour(final java.lang.String bgColour)
-  {
-    this._bgColour = bgColour;
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vCalcIdParam
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void setCalcIdParam(final int index,
-          final jalview.schemabinding.version2.CalcIdParam vCalcIdParam)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._calcIdParamList.size())
-    {
-      throw new IndexOutOfBoundsException("setCalcIdParam: Index value '"
-              + index + "' not in range [0.."
-              + (this._calcIdParamList.size() - 1) + "]");
-    }
-
-    this._calcIdParamList.set(index, vCalcIdParam);
-  }
-
-  /**
-   * 
-   * 
-   * @param vCalcIdParamArray
-   */
-  public void setCalcIdParam(
-          final jalview.schemabinding.version2.CalcIdParam[] vCalcIdParamArray)
-  {
-    // -- copy array
-    _calcIdParamList.clear();
-
-    for (int i = 0; i < vCalcIdParamArray.length; i++)
-    {
-      this._calcIdParamList.add(vCalcIdParamArray[i]);
-    }
-  }
-
-  /**
-   * Sets the value of field 'centreColumnLabels'.
-   * 
-   * @param centreColumnLabels
-   *          the value of field 'centreColumnLabels'.
-   */
-  public void setCentreColumnLabels(final boolean centreColumnLabels)
-  {
-    this._centreColumnLabels = centreColumnLabels;
-    this._has_centreColumnLabels = true;
-  }
-
-  /**
-   * 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
-   * 
-   * 
-   * @param complementId
-   *          the value of field 'complementId'.
-   */
-  public void setComplementId(final java.lang.String complementId)
-  {
-    this._complementId = complementId;
-  }
-
-  /**
-   * 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 'followHighlight'.
-   * 
-   * @param followHighlight
-   *          the value of field 'followHighlight'.
-   */
-  public void setFollowHighlight(final boolean followHighlight)
-  {
-    this._followHighlight = followHighlight;
-    this._has_followHighlight = true;
-  }
-
-  /**
-   * Sets the value of field 'followSelection'.
-   * 
-   * @param followSelection
-   *          the value of field 'followSelection'.
-   */
-  public void setFollowSelection(final boolean followSelection)
-  {
-    this._followSelection = followSelection;
-    this._has_followSelection = 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 'gatheredViews'.
-   * 
-   * @param gatheredViews
-   *          the value of field 'gatheredViews'.
-   */
-  public void setGatheredViews(final boolean gatheredViews)
-  {
-    this._gatheredViews = gatheredViews;
-    this._has_gatheredViews = 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 vHiddenColumns
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void setHiddenColumns(final int index,
-          final jalview.schemabinding.version2.HiddenColumns vHiddenColumns)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._hiddenColumnsList.size())
-    {
-      throw new IndexOutOfBoundsException("setHiddenColumns: Index value '"
-              + index + "' not in range [0.."
-              + (this._hiddenColumnsList.size() - 1) + "]");
-    }
-
-    this._hiddenColumnsList.set(index, vHiddenColumns);
-  }
-
-  /**
-   * 
-   * 
-   * @param vHiddenColumnsArray
-   */
-  public void setHiddenColumns(
-          final jalview.schemabinding.version2.HiddenColumns[] vHiddenColumnsArray)
-  {
-    // -- copy array
-    _hiddenColumnsList.clear();
-
-    for (int i = 0; i < vHiddenColumnsArray.length; i++)
-    {
-      this._hiddenColumnsList.add(vHiddenColumnsArray[i]);
-    }
-  }
-
-  /**
-   * Sets the value of field 'id'. The field 'id' has the following description:
-   * unique id used by jalview to synchronize between stored and instantiated
-   * views
-   * 
-   * 
-   * @param id
-   *          the value of field 'id'.
-   */
-  public void setId(final java.lang.String id)
-  {
-    this._id = id;
-  }
-
-  /**
-   * Sets the value of field 'ignoreGapsinConsensus'.
-   * 
-   * @param ignoreGapsinConsensus
-   *          the value of field 'ignoreGapsinConsensus'.
-   */
-  public void setIgnoreGapsinConsensus(final boolean ignoreGapsinConsensus)
-  {
-    this._ignoreGapsinConsensus = ignoreGapsinConsensus;
-    this._has_ignoreGapsinConsensus = true;
-  }
-
-  /**
-   * Sets the value of field 'normaliseSequenceLogo'.
-   * 
-   * @param normaliseSequenceLogo
-   *          the value of field 'normaliseSequenceLogo'.
-   */
-  public void setNormaliseSequenceLogo(final boolean normaliseSequenceLogo)
-  {
-    this._normaliseSequenceLogo = normaliseSequenceLogo;
-    this._has_normaliseSequenceLogo = 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 'rightAlignIds'.
-   * 
-   * @param rightAlignIds
-   *          the value of field 'rightAlignIds'.
-   */
-  public void setRightAlignIds(final boolean rightAlignIds)
-  {
-    this._rightAlignIds = rightAlignIds;
-    this._has_rightAlignIds = true;
-  }
-
-  /**
-   * Sets the value of field 'scaleProteinAsCdna'.
-   * 
-   * @param scaleProteinAsCdna
-   *          the value of field 'scaleProteinAsCdna'.
-   */
-  public void setScaleProteinAsCdna(final boolean scaleProteinAsCdna)
-  {
-    this._scaleProteinAsCdna = scaleProteinAsCdna;
-    this._has_scaleProteinAsCdna = true;
-  }
-
-  /**
-   * Sets the value of field 'sequenceSetId'.
-   * 
-   * @param sequenceSetId
-   *          the value of field 'sequenceSetId'.
-   */
-  public void setSequenceSetId(final java.lang.String sequenceSetId)
-  {
-    this._sequenceSetId = sequenceSetId;
-  }
-
-  /**
-   * 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 'showConsensusHistogram'.
-   * 
-   * @param showConsensusHistogram
-   *          the value of field 'showConsensusHistogram'.
-   */
-  public void setShowConsensusHistogram(final boolean showConsensusHistogram)
-  {
-    this._showConsensusHistogram = showConsensusHistogram;
-    this._has_showConsensusHistogram = true;
-  }
-
-  /**
-   * Sets the value of field 'showDbRefTooltip'.
-   * 
-   * @param showDbRefTooltip
-   *          the value of field 'showDbRefTooltip'
-   */
-  public void setShowDbRefTooltip(final boolean showDbRefTooltip)
-  {
-    this._showDbRefTooltip = showDbRefTooltip;
-    this._has_showDbRefTooltip = 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 'showGroupConsensus'.
-   * 
-   * @param showGroupConsensus
-   *          the value of field 'showGroupConsensus'.
-   */
-  public void setShowGroupConsensus(final boolean showGroupConsensus)
-  {
-    this._showGroupConsensus = showGroupConsensus;
-    this._has_showGroupConsensus = true;
-  }
-
-  /**
-   * Sets the value of field 'showGroupConservation'.
-   * 
-   * @param showGroupConservation
-   *          the value of field 'showGroupConservation'.
-   */
-  public void setShowGroupConservation(final boolean showGroupConservation)
-  {
-    this._showGroupConservation = showGroupConservation;
-    this._has_showGroupConservation = true;
-  }
-
-  /**
-   * Sets the value of field 'showNPfeatureTooltip'.
-   * 
-   * @param showNPfeatureTooltip
-   *          the value of field 'showNPfeatureTooltip'.
-   */
-  public void setShowNPfeatureTooltip(final boolean showNPfeatureTooltip)
-  {
-    this._showNPfeatureTooltip = showNPfeatureTooltip;
-    this._has_showNPfeatureTooltip = 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 'showSequenceLogo'.
-   * 
-   * @param showSequenceLogo
-   *          the value of field 'showSequenceLogo'
-   */
-  public void setShowSequenceLogo(final boolean showSequenceLogo)
-  {
-    this._showSequenceLogo = showSequenceLogo;
-    this._has_showSequenceLogo = 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 'showUnconserved'.
-   * 
-   * @param showUnconserved
-   *          the value of field 'showUnconserved'.
-   */
-  public void setShowUnconserved(final boolean showUnconserved)
-  {
-    this._showUnconserved = showUnconserved;
-    this._has_showUnconserved = 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 'textCol1'.
-   * 
-   * @param textCol1
-   *          the value of field 'textCol1'.
-   */
-  public void setTextCol1(final int textCol1)
-  {
-    this._textCol1 = textCol1;
-    this._has_textCol1 = true;
-  }
-
-  /**
-   * Sets the value of field 'textCol2'.
-   * 
-   * @param textCol2
-   *          the value of field 'textCol2'.
-   */
-  public void setTextCol2(final int textCol2)
-  {
-    this._textCol2 = textCol2;
-    this._has_textCol2 = true;
-  }
-
-  /**
-   * Sets the value of field 'textColThreshold'.
-   * 
-   * @param textColThreshold
-   *          the value of field 'textColThreshold'
-   */
-  public void setTextColThreshold(final int textColThreshold)
-  {
-    this._textColThreshold = textColThreshold;
-    this._has_textColThreshold = 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 'viewName'.
-   * 
-   * @param viewName
-   *          the value of field 'viewName'.
-   */
-  public void setViewName(final java.lang.String viewName)
-  {
-    this._viewName = viewName;
-  }
-
-  /**
-   * 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.schemabinding.version2.Viewport
-   */
-  public static jalview.schemabinding.version2.Viewport unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.Viewport) Unmarshaller
-            .unmarshal(jalview.schemabinding.version2.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/WebServiceParameterSet.java b/src/jalview/schemabinding/version2/WebServiceParameterSet.java
deleted file mode 100644 (file)
index 72d2f82..0000000
+++ /dev/null
@@ -1,436 +0,0 @@
-/*
- * 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 WebServiceParameterSet.
- * 
- * @version $Revision$ $Date$
- */
-public class WebServiceParameterSet implements java.io.Serializable
-{
-
-  // --------------------------/
-  // - Class/Member Variables -/
-  // --------------------------/
-
-  /**
-   * The short name for the parameter set. This will be shown amongst the other
-   * presets for the web service.
-   * 
-   */
-  private java.lang.String _name;
-
-  /**
-   * A Jalview Web Service Parameter Set container version number. Version 1
-   * created for storing Jaba user presets.
-   * 
-   */
-  private java.lang.String _version;
-
-  /**
-   * Short description - as utf8 encoded text. This is usually displayed in the
-   * body of an HTML capable tooltip, so HTML tags may be embedded using
-   * standard UTF8 encoding.
-   * 
-   */
-  private java.lang.String _description;
-
-  /**
-   * URL for which the parameter set is valid. Jalview will use it to match up
-   * parameter sets to service instances that can parse the parameter set
-   * payload.
-   * 
-   */
-  private java.util.Vector _serviceURLList;
-
-  /**
-   * UTF8 encoded string to be processed into a specific web services' parameter
-   * set. Note - newlines may be important to the structure of this file.
-   * 
-   */
-  private java.lang.String _parameters;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public WebServiceParameterSet()
-  {
-    super();
-    this._serviceURLList = new java.util.Vector();
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-   * 
-   * 
-   * @param vServiceURL
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addServiceURL(final java.lang.String vServiceURL)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._serviceURLList.addElement(vServiceURL);
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vServiceURL
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void addServiceURL(final int index,
-          final java.lang.String vServiceURL)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    this._serviceURLList.add(index, vServiceURL);
-  }
-
-  /**
-   * Method enumerateServiceURL.
-   * 
-   * @return an Enumeration over all java.lang.String elements
-   */
-  public java.util.Enumeration enumerateServiceURL()
-  {
-    return this._serviceURLList.elements();
-  }
-
-  /**
-   * Returns the value of field 'description'. The field 'description' has the
-   * following description: Short description - as utf8 encoded text. This is
-   * usually displayed in the body of an HTML capable tooltip, so HTML tags may
-   * be embedded using standard UTF8 encoding.
-   * 
-   * 
-   * @return the value of field 'Description'.
-   */
-  public java.lang.String getDescription()
-  {
-    return this._description;
-  }
-
-  /**
-   * Returns the value of field 'name'. The field 'name' has the following
-   * description: The short name for the parameter set. This will be shown
-   * amongst the other presets for the web service.
-   * 
-   * 
-   * @return the value of field 'Name'.
-   */
-  public java.lang.String getName()
-  {
-    return this._name;
-  }
-
-  /**
-   * Returns the value of field 'parameters'. The field 'parameters' has the
-   * following description: UTF8 encoded string to be processed into a specific
-   * web services' parameter set. Note - newlines may be important to the
-   * structure of this file.
-   * 
-   * 
-   * @return the value of field 'Parameters'.
-   */
-  public java.lang.String getParameters()
-  {
-    return this._parameters;
-  }
-
-  /**
-   * Method getServiceURL.
-   * 
-   * @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 getServiceURL(final int index)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._serviceURLList.size())
-    {
-      throw new IndexOutOfBoundsException("getServiceURL: Index value '"
-              + index + "' not in range [0.."
-              + (this._serviceURLList.size() - 1) + "]");
-    }
-
-    return (java.lang.String) _serviceURLList.get(index);
-  }
-
-  /**
-   * Method getServiceURL.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[] getServiceURL()
-  {
-    java.lang.String[] array = new java.lang.String[0];
-    return (java.lang.String[]) this._serviceURLList.toArray(array);
-  }
-
-  /**
-   * Method getServiceURLCount.
-   * 
-   * @return the size of this collection
-   */
-  public int getServiceURLCount()
-  {
-    return this._serviceURLList.size();
-  }
-
-  /**
-   * Returns the value of field 'version'. The field 'version' has the following
-   * description: A Jalview Web Service Parameter Set container version number.
-   * Version 1 created for storing Jaba user presets.
-   * 
-   * 
-   * @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 removeAllServiceURL()
-  {
-    this._serviceURLList.clear();
-  }
-
-  /**
-   * Method removeServiceURL.
-   * 
-   * @param vServiceURL
-   * @return true if the object was removed from the collection.
-   */
-  public boolean removeServiceURL(final java.lang.String vServiceURL)
-  {
-    boolean removed = _serviceURLList.remove(vServiceURL);
-    return removed;
-  }
-
-  /**
-   * Method removeServiceURLAt.
-   * 
-   * @param index
-   * @return the element removed from the collection
-   */
-  public java.lang.String removeServiceURLAt(final int index)
-  {
-    java.lang.Object obj = this._serviceURLList.remove(index);
-    return (java.lang.String) obj;
-  }
-
-  /**
-   * Sets the value of field 'description'. The field 'description' has the
-   * following description: Short description - as utf8 encoded text. This is
-   * usually displayed in the body of an HTML capable tooltip, so HTML tags may
-   * be embedded using standard UTF8 encoding.
-   * 
-   * 
-   * @param description
-   *          the value of field 'description'.
-   */
-  public void setDescription(final java.lang.String description)
-  {
-    this._description = description;
-  }
-
-  /**
-   * Sets the value of field 'name'. The field 'name' has the following
-   * description: The short name for the parameter set. This will be shown
-   * amongst the other presets for the web service.
-   * 
-   * 
-   * @param name
-   *          the value of field 'name'.
-   */
-  public void setName(final java.lang.String name)
-  {
-    this._name = name;
-  }
-
-  /**
-   * Sets the value of field 'parameters'. The field 'parameters' has the
-   * following description: UTF8 encoded string to be processed into a specific
-   * web services' parameter set. Note - newlines may be important to the
-   * structure of this file.
-   * 
-   * 
-   * @param parameters
-   *          the value of field 'parameters'.
-   */
-  public void setParameters(final java.lang.String parameters)
-  {
-    this._parameters = parameters;
-  }
-
-  /**
-   * 
-   * 
-   * @param index
-   * @param vServiceURL
-   * @throws java.lang.IndexOutOfBoundsException
-   *           if the index given is outside the bounds of the collection
-   */
-  public void setServiceURL(final int index,
-          final java.lang.String vServiceURL)
-          throws java.lang.IndexOutOfBoundsException
-  {
-    // check bounds for index
-    if (index < 0 || index >= this._serviceURLList.size())
-    {
-      throw new IndexOutOfBoundsException("setServiceURL: Index value '"
-              + index + "' not in range [0.."
-              + (this._serviceURLList.size() - 1) + "]");
-    }
-
-    this._serviceURLList.set(index, vServiceURL);
-  }
-
-  /**
-   * 
-   * 
-   * @param vServiceURLArray
-   */
-  public void setServiceURL(final java.lang.String[] vServiceURLArray)
-  {
-    // -- copy array
-    _serviceURLList.clear();
-
-    for (int i = 0; i < vServiceURLArray.length; i++)
-    {
-      this._serviceURLList.add(vServiceURLArray[i]);
-    }
-  }
-
-  /**
-   * Sets the value of field 'version'. The field 'version' has the following
-   * description: A Jalview Web Service Parameter Set container version number.
-   * Version 1 created for storing Jaba user presets.
-   * 
-   * 
-   * @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.schemabinding.version2.WebServiceParameterSet
-   */
-  public static jalview.schemabinding.version2.WebServiceParameterSet unmarshal(
-          final java.io.Reader reader)
-          throws org.exolab.castor.xml.MarshalException,
-          org.exolab.castor.xml.ValidationException
-  {
-    return (jalview.schemabinding.version2.WebServiceParameterSet) Unmarshaller
-            .unmarshal(
-                    jalview.schemabinding.version2.WebServiceParameterSet.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);
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/AlcodMapDescriptor.java b/src/jalview/schemabinding/version2/descriptors/AlcodMapDescriptor.java
deleted file mode 100644 (file)
index 1447978..0000000
+++ /dev/null
@@ -1,247 +0,0 @@
-/*
- * 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.AlcodMap;
-
-/**
- * Class AlcodMapDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class AlcodMapDescriptor 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 AlcodMapDescriptor()
-  {
-    super();
-    _nsURI = "www.vamsas.ac.uk/jalview/version2";
-    _xmlName = "alcodMap";
-    _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
-
-    // -- _dnasq
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_dnasq", "dnasq",
-            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
-      {
-        AlcodMap target = (AlcodMap) object;
-        return target.getDnasq();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          AlcodMap target = (AlcodMap) object;
-          target.setDnasq((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: _dnasq
-    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);
-    // -- initialize element descriptors
-
-    // -- _mapping
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.Mapping.class, "_mapping",
-            "Mapping", org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        AlcodMap target = (AlcodMap) object;
-        return target.getMapping();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          AlcodMap target = (AlcodMap) object;
-          target.setMapping((jalview.schemabinding.version2.Mapping) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.Mapping();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
-    desc.setRequired(true);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _mapping
-    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.AlcodMap.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/AlcodonDescriptor.java b/src/jalview/schemabinding/version2/descriptors/AlcodonDescriptor.java
deleted file mode 100644 (file)
index c1a0eab..0000000
+++ /dev/null
@@ -1,313 +0,0 @@
-/*
- * 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.Alcodon;
-
-/**
- * Class AlcodonDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class AlcodonDescriptor 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 AlcodonDescriptor()
-  {
-    super();
-    _nsURI = "www.vamsas.ac.uk/jalview/version2";
-    _xmlName = "alcodon";
-    _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
-
-    // -- _pos1
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Long.TYPE, "_pos1", "pos1",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Alcodon target = (Alcodon) object;
-        if (!target.hasPos1())
-        {
-          return null;
-        }
-        return new java.lang.Long(target.getPos1());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Alcodon target = (Alcodon) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deletePos1();
-            return;
-          }
-          target.setPos1(((java.lang.Long) value).longValue());
-        } 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: _pos1
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- local scope
-      org.exolab.castor.xml.validators.LongValidator typeValidator;
-      typeValidator = new org.exolab.castor.xml.validators.LongValidator();
-      fieldValidator.setValidator(typeValidator);
-    }
-    desc.setValidator(fieldValidator);
-    // -- _pos2
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Long.TYPE, "_pos2", "pos2",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Alcodon target = (Alcodon) object;
-        if (!target.hasPos2())
-        {
-          return null;
-        }
-        return new java.lang.Long(target.getPos2());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Alcodon target = (Alcodon) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deletePos2();
-            return;
-          }
-          target.setPos2(((java.lang.Long) value).longValue());
-        } 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: _pos2
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- local scope
-      org.exolab.castor.xml.validators.LongValidator typeValidator;
-      typeValidator = new org.exolab.castor.xml.validators.LongValidator();
-      fieldValidator.setValidator(typeValidator);
-    }
-    desc.setValidator(fieldValidator);
-    // -- _pos3
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Long.TYPE, "_pos3", "pos3",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Alcodon target = (Alcodon) object;
-        if (!target.hasPos3())
-        {
-          return null;
-        }
-        return new java.lang.Long(target.getPos3());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Alcodon target = (Alcodon) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deletePos3();
-            return;
-          }
-          target.setPos3(((java.lang.Long) value).longValue());
-        } 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: _pos3
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- local scope
-      org.exolab.castor.xml.validators.LongValidator typeValidator;
-      typeValidator = new org.exolab.castor.xml.validators.LongValidator();
-      fieldValidator.setValidator(typeValidator);
-    }
-    desc.setValidator(fieldValidator);
-    // -- initialize element descriptors
-
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-   * Method getAccessMode.
-   * 
-   * @return the access mode specified for this class.
-   */
-  public org.exolab.castor.mapping.AccessMode getAccessMode()
-  {
-    return null;
-  }
-
-  /**
-   * Method getIdentity.
-   * 
-   * @return the identity field, null if this class has no identity.
-   */
-  public org.exolab.castor.mapping.FieldDescriptor getIdentity()
-  {
-    return super.getIdentity();
-  }
-
-  /**
-   * Method getJavaClass.
-   * 
-   * @return the Java class represented by this descriptor.
-   */
-  public java.lang.Class getJavaClass()
-  {
-    return jalview.schemabinding.version2.Alcodon.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/AlcodonFrameDescriptor.java b/src/jalview/schemabinding/version2/descriptors/AlcodonFrameDescriptor.java
deleted file mode 100644 (file)
index 919941e..0000000
+++ /dev/null
@@ -1,267 +0,0 @@
-/*
- * 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.AlcodonFrame;
-
-/**
- * Class AlcodonFrameDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class AlcodonFrameDescriptor 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 AlcodonFrameDescriptor()
-  {
-    super();
-    _nsURI = "www.vamsas.ac.uk/jalview/version2";
-    _xmlName = "AlcodonFrame";
-    _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
-
-    // -- initialize element descriptors
-
-    // -- _alcodonList
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.Alcodon.class, "_alcodonList",
-            "alcodon", org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        AlcodonFrame target = (AlcodonFrame) object;
-        return target.getAlcodon();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          AlcodonFrame target = (AlcodonFrame) object;
-          target.addAlcodon((jalview.schemabinding.version2.Alcodon) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public void resetValue(Object object) throws IllegalStateException,
-              IllegalArgumentException
-      {
-        try
-        {
-          AlcodonFrame target = (AlcodonFrame) object;
-          target.removeAllAlcodon();
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.Alcodon();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
-    desc.setMultivalued(true);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _alcodonList
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(0);
-    { // -- local scope
-    }
-    desc.setValidator(fieldValidator);
-    // -- _alcodMapList
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.AlcodMap.class, "_alcodMapList",
-            "alcodMap", org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        AlcodonFrame target = (AlcodonFrame) object;
-        return target.getAlcodMap();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          AlcodonFrame target = (AlcodonFrame) object;
-          target.addAlcodMap((jalview.schemabinding.version2.AlcodMap) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public void resetValue(Object object) throws IllegalStateException,
-              IllegalArgumentException
-      {
-        try
-        {
-          AlcodonFrame target = (AlcodonFrame) object;
-          target.removeAllAlcodMap();
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.AlcodMap();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
-    desc.setMultivalued(true);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _alcodMapList
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(0);
-    { // -- 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.AlcodonFrame.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/AnnotationColourSchemeDescriptor.java b/src/jalview/schemabinding/version2/descriptors/AnnotationColourSchemeDescriptor.java
deleted file mode 100644 (file)
index 804b49e..0000000
+++ /dev/null
@@ -1,573 +0,0 @@
-/*
- * 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.AnnotationColourScheme;
-
-/**
- * Class AnnotationColourSchemeDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class AnnotationColourSchemeDescriptor 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 AnnotationColourSchemeDescriptor()
-  {
-    super();
-    _nsURI = "www.jalview.org";
-    _xmlName = "AnnotationColourScheme";
-    _elementDefinition = false;
-    org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
-    org.exolab.castor.mapping.FieldHandler handler = null;
-    org.exolab.castor.xml.FieldValidator fieldValidator = null;
-    // -- initialize attribute descriptors
-
-    // -- _aboveThreshold
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_aboveThreshold", "aboveThreshold",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        AnnotationColourScheme target = (AnnotationColourScheme) object;
-        if (!target.hasAboveThreshold())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getAboveThreshold());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          AnnotationColourScheme target = (AnnotationColourScheme) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteAboveThreshold();
-            return;
-          }
-          target.setAboveThreshold(((java.lang.Integer) value).intValue());
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return null;
-      }
-    };
-    desc.setHandler(handler);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _aboveThreshold
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- local scope
-      org.exolab.castor.xml.validators.IntValidator typeValidator;
-      typeValidator = new org.exolab.castor.xml.validators.IntValidator();
-      fieldValidator.setValidator(typeValidator);
-      typeValidator.setMinInclusive(-2147483648);
-      typeValidator.setMaxInclusive(2147483647);
-    }
-    desc.setValidator(fieldValidator);
-    // -- _annotation
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_annotation", "annotation",
-            org.exolab.castor.xml.NodeType.Attribute);
-    desc.setImmutable(true);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        AnnotationColourScheme target = (AnnotationColourScheme) object;
-        return target.getAnnotation();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          AnnotationColourScheme target = (AnnotationColourScheme) object;
-          target.setAnnotation((java.lang.String) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return null;
-      }
-    };
-    desc.setHandler(handler);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _annotation
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- local scope
-      org.exolab.castor.xml.validators.StringValidator typeValidator;
-      typeValidator = new org.exolab.castor.xml.validators.StringValidator();
-      fieldValidator.setValidator(typeValidator);
-      typeValidator.setWhiteSpace("preserve");
-    }
-    desc.setValidator(fieldValidator);
-    // -- _minColour
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_minColour", "minColour",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        AnnotationColourScheme target = (AnnotationColourScheme) object;
-        if (!target.hasMinColour())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getMinColour());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          AnnotationColourScheme target = (AnnotationColourScheme) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteMinColour();
-            return;
-          }
-          target.setMinColour(((java.lang.Integer) value).intValue());
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return null;
-      }
-    };
-    desc.setHandler(handler);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _minColour
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- local scope
-      org.exolab.castor.xml.validators.IntValidator typeValidator;
-      typeValidator = new org.exolab.castor.xml.validators.IntValidator();
-      fieldValidator.setValidator(typeValidator);
-      typeValidator.setMinInclusive(-2147483648);
-      typeValidator.setMaxInclusive(2147483647);
-    }
-    desc.setValidator(fieldValidator);
-    // -- _maxColour
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_maxColour", "maxColour",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        AnnotationColourScheme target = (AnnotationColourScheme) object;
-        if (!target.hasMaxColour())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getMaxColour());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          AnnotationColourScheme target = (AnnotationColourScheme) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteMaxColour();
-            return;
-          }
-          target.setMaxColour(((java.lang.Integer) value).intValue());
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return null;
-      }
-    };
-    desc.setHandler(handler);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _maxColour
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- local scope
-      org.exolab.castor.xml.validators.IntValidator typeValidator;
-      typeValidator = new org.exolab.castor.xml.validators.IntValidator();
-      fieldValidator.setValidator(typeValidator);
-      typeValidator.setMinInclusive(-2147483648);
-      typeValidator.setMaxInclusive(2147483647);
-    }
-    desc.setValidator(fieldValidator);
-    // -- _colourScheme
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_colourScheme", "colourScheme",
-            org.exolab.castor.xml.NodeType.Attribute);
-    desc.setImmutable(true);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        AnnotationColourScheme target = (AnnotationColourScheme) object;
-        return target.getColourScheme();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          AnnotationColourScheme target = (AnnotationColourScheme) object;
-          target.setColourScheme((java.lang.String) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return null;
-      }
-    };
-    desc.setHandler(handler);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _colourScheme
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- local scope
-      org.exolab.castor.xml.validators.StringValidator typeValidator;
-      typeValidator = new org.exolab.castor.xml.validators.StringValidator();
-      fieldValidator.setValidator(typeValidator);
-      typeValidator.setWhiteSpace("preserve");
-    }
-    desc.setValidator(fieldValidator);
-    // -- _threshold
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Float.TYPE, "_threshold", "threshold",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        AnnotationColourScheme target = (AnnotationColourScheme) object;
-        if (!target.hasThreshold())
-        {
-          return null;
-        }
-        return new java.lang.Float(target.getThreshold());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          AnnotationColourScheme target = (AnnotationColourScheme) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteThreshold();
-            return;
-          }
-          target.setThreshold(((java.lang.Float) value).floatValue());
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return null;
-      }
-    };
-    desc.setHandler(handler);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _threshold
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- local scope
-      org.exolab.castor.xml.validators.FloatValidator typeValidator;
-      typeValidator = new org.exolab.castor.xml.validators.FloatValidator();
-      fieldValidator.setValidator(typeValidator);
-      typeValidator.setMinInclusive((float) -3.4028235E38);
-      typeValidator.setMaxInclusive((float) 3.4028235E38);
-    }
-    desc.setValidator(fieldValidator);
-    // -- _perSequence
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_perSequence", "perSequence",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        AnnotationColourScheme target = (AnnotationColourScheme) object;
-        if (!target.hasPerSequence())
-        {
-          return null;
-        }
-        return (target.getPerSequence() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          AnnotationColourScheme target = (AnnotationColourScheme) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deletePerSequence();
-            return;
-          }
-          target.setPerSequence(((java.lang.Boolean) value).booleanValue());
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return null;
-      }
-    };
-    desc.setHandler(handler);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _perSequence
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- local scope
-      org.exolab.castor.xml.validators.BooleanValidator typeValidator;
-      typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
-      fieldValidator.setValidator(typeValidator);
-    }
-    desc.setValidator(fieldValidator);
-    // -- _predefinedColours
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_predefinedColours",
-            "predefinedColours", org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        AnnotationColourScheme target = (AnnotationColourScheme) object;
-        if (!target.hasPredefinedColours())
-        {
-          return null;
-        }
-        return (target.getPredefinedColours() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          AnnotationColourScheme target = (AnnotationColourScheme) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deletePredefinedColours();
-            return;
-          }
-          target.setPredefinedColours(((java.lang.Boolean) value)
-                  .booleanValue());
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return null;
-      }
-    };
-    desc.setHandler(handler);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _predefinedColours
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- local scope
-      org.exolab.castor.xml.validators.BooleanValidator typeValidator;
-      typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
-      fieldValidator.setValidator(typeValidator);
-    }
-    desc.setValidator(fieldValidator);
-    // -- initialize element descriptors
-
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-   * Method getAccessMode.
-   * 
-   * @return the access mode specified for this class.
-   */
-  public org.exolab.castor.mapping.AccessMode getAccessMode()
-  {
-    return null;
-  }
-
-  /**
-   * Method getIdentity.
-   * 
-   * @return the identity field, null if this class has no identity.
-   */
-  public org.exolab.castor.mapping.FieldDescriptor getIdentity()
-  {
-    return super.getIdentity();
-  }
-
-  /**
-   * Method getJavaClass.
-   * 
-   * @return the Java class represented by this descriptor.
-   */
-  public java.lang.Class getJavaClass()
-  {
-    return jalview.schemabinding.version2.AnnotationColourScheme.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/AnnotationColoursDescriptor.java b/src/jalview/schemabinding/version2/descriptors/AnnotationColoursDescriptor.java
deleted file mode 100644 (file)
index 5739d90..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * 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.AnnotationColours;
-
-/**
- * Class AnnotationColoursDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class AnnotationColoursDescriptor
-        extends
-        jalview.schemabinding.version2.descriptors.AnnotationColourSchemeDescriptor
-{
-
-  // --------------------------/
-  // - Class/Member Variables -/
-  // --------------------------/
-
-  /**
-   * Field _elementDefinition.
-   */
-  private boolean _elementDefinition;
-
-  /**
-   * Field _nsPrefix.
-   */
-  private java.lang.String _nsPrefix;
-
-  /**
-   * Field _nsURI.
-   */
-  private java.lang.String _nsURI;
-
-  /**
-   * Field _xmlName.
-   */
-  private java.lang.String _xmlName;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  public AnnotationColoursDescriptor()
-  {
-    super();
-    setExtendsWithoutFlatten(new jalview.schemabinding.version2.descriptors.AnnotationColourSchemeDescriptor());
-    _nsURI = "www.jalview.org";
-    _xmlName = "AnnotationColours";
-    _elementDefinition = true;
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-   * Method getAccessMode.
-   * 
-   * @return the access mode specified for this class.
-   */
-  public org.exolab.castor.mapping.AccessMode getAccessMode()
-  {
-    return null;
-  }
-
-  /**
-   * Method getIdentity.
-   * 
-   * @return the identity field, null if this class has no identity.
-   */
-  public org.exolab.castor.mapping.FieldDescriptor getIdentity()
-  {
-    return super.getIdentity();
-  }
-
-  /**
-   * Method getJavaClass.
-   * 
-   * @return the Java class represented by this descriptor.
-   */
-  public java.lang.Class getJavaClass()
-  {
-    return jalview.schemabinding.version2.AnnotationColours.class;
-  }
-
-  /**
-   * Method getNameSpacePrefix.
-   * 
-   * @return the namespace prefix to use when marshaling as XML.
-   */
-  public java.lang.String getNameSpacePrefix()
-  {
-    return _nsPrefix;
-  }
-
-  /**
-   * Method getNameSpaceURI.
-   * 
-   * @return the namespace URI used when marshaling and unmarshaling as XML.
-   */
-  public java.lang.String getNameSpaceURI()
-  {
-    return _nsURI;
-  }
-
-  /**
-   * Method getValidator.
-   * 
-   * @return a specific validator for the class described by this
-   *         ClassDescriptor.
-   */
-  public org.exolab.castor.xml.TypeValidator getValidator()
-  {
-    return this;
-  }
-
-  /**
-   * Method getXMLName.
-   * 
-   * @return the XML Name for the Class being described.
-   */
-  public java.lang.String getXMLName()
-  {
-    return _xmlName;
-  }
-
-  /**
-   * Method isElementDefinition.
-   * 
-   * @return true if XML schema definition of this Class is that of a global
-   *         element or element with anonymous type definition.
-   */
-  public boolean isElementDefinition()
-  {
-    return _elementDefinition;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/AnnotationDescriptor.java b/src/jalview/schemabinding/version2/descriptors/AnnotationDescriptor.java
deleted file mode 100644 (file)
index e2331f4..0000000
+++ /dev/null
@@ -1,1298 +0,0 @@
-/*
- * 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.Annotation;
-
-/**
- * Class AnnotationDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class AnnotationDescriptor 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 AnnotationDescriptor()
-  {
-    super();
-    _nsURI = "www.vamsas.ac.uk/jalview/version2";
-    _xmlName = "Annotation";
-    _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
-
-    // -- _graph
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_graph", "graph",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Annotation target = (Annotation) object;
-        if (!target.hasGraph())
-        {
-          return null;
-        }
-        return (target.getGraph() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Annotation target = (Annotation) object;
-          // ignore null values for non optional primitives
-          if (value == null)
-          {
-            return;
-          }
-
-          target.setGraph(((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.setRequired(true);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _graph
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(1);
-    { // -- local scope
-      org.exolab.castor.xml.validators.BooleanValidator typeValidator;
-      typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
-      fieldValidator.setValidator(typeValidator);
-    }
-    desc.setValidator(fieldValidator);
-    // -- _graphType
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_graphType", "graphType",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Annotation target = (Annotation) object;
-        if (!target.hasGraphType())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getGraphType());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Annotation target = (Annotation) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteGraphType();
-            return;
-          }
-          target.setGraphType(((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: _graphType
-    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);
-    // -- _sequenceRef
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_sequenceRef", "sequenceRef",
-            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
-      {
-        Annotation target = (Annotation) object;
-        return target.getSequenceRef();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Annotation target = (Annotation) object;
-          target.setSequenceRef((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: _sequenceRef
-    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);
-    // -- _groupRef
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_groupRef", "groupRef",
-            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
-      {
-        Annotation target = (Annotation) object;
-        return target.getGroupRef();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Annotation target = (Annotation) object;
-          target.setGroupRef((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: _groupRef
-    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);
-    // -- _graphColour
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_graphColour", "graphColour",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Annotation target = (Annotation) object;
-        if (!target.hasGraphColour())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getGraphColour());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Annotation target = (Annotation) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteGraphColour();
-            return;
-          }
-          target.setGraphColour(((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: _graphColour
-    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);
-    // -- _graphGroup
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_graphGroup", "graphGroup",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Annotation target = (Annotation) object;
-        if (!target.hasGraphGroup())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getGraphGroup());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Annotation target = (Annotation) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteGraphGroup();
-            return;
-          }
-          target.setGraphGroup(((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: _graphGroup
-    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);
-    // -- _graphHeight
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_graphHeight", "graphHeight",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Annotation target = (Annotation) object;
-        if (!target.hasGraphHeight())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getGraphHeight());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Annotation target = (Annotation) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteGraphHeight();
-            return;
-          }
-          target.setGraphHeight(((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: _graphHeight
-    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);
-    // -- _id
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_id", "id",
-            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
-      {
-        Annotation target = (Annotation) object;
-        return target.getId();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Annotation target = (Annotation) object;
-          target.setId((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: _id
-    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);
-    // -- _scoreOnly
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_scoreOnly", "scoreOnly",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Annotation target = (Annotation) object;
-        if (!target.hasScoreOnly())
-        {
-          return null;
-        }
-        return (target.getScoreOnly() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Annotation target = (Annotation) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteScoreOnly();
-            return;
-          }
-          target.setScoreOnly(((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: _scoreOnly
-    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);
-    // -- _score
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Double.TYPE, "_score", "score",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Annotation target = (Annotation) object;
-        if (!target.hasScore())
-        {
-          return null;
-        }
-        return new java.lang.Double(target.getScore());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Annotation target = (Annotation) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteScore();
-            return;
-          }
-          target.setScore(((java.lang.Double) value).doubleValue());
-        } 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: _score
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- local scope
-      org.exolab.castor.xml.validators.DoubleValidator typeValidator;
-      typeValidator = new org.exolab.castor.xml.validators.DoubleValidator();
-      fieldValidator.setValidator(typeValidator);
-      typeValidator.setMinInclusive(-1.7976931348623157E308);
-      typeValidator.setMaxInclusive(1.7976931348623157E308);
-    }
-    desc.setValidator(fieldValidator);
-    // -- _visible
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_visible", "visible",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Annotation target = (Annotation) object;
-        if (!target.hasVisible())
-        {
-          return null;
-        }
-        return (target.getVisible() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Annotation target = (Annotation) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteVisible();
-            return;
-          }
-          target.setVisible(((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: _visible
-    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);
-    // -- _centreColLabels
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_centreColLabels", "centreColLabels",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Annotation target = (Annotation) object;
-        if (!target.hasCentreColLabels())
-        {
-          return null;
-        }
-        return (target.getCentreColLabels() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Annotation target = (Annotation) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteCentreColLabels();
-            return;
-          }
-          target.setCentreColLabels(((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: _centreColLabels
-    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);
-    // -- _scaleColLabels
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_scaleColLabels", "scaleColLabels",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Annotation target = (Annotation) object;
-        if (!target.hasScaleColLabels())
-        {
-          return null;
-        }
-        return (target.getScaleColLabels() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Annotation target = (Annotation) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteScaleColLabels();
-            return;
-          }
-          target.setScaleColLabels(((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: _scaleColLabels
-    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);
-    // -- _showAllColLabels
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_showAllColLabels",
-            "showAllColLabels", org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Annotation target = (Annotation) object;
-        if (!target.hasShowAllColLabels())
-        {
-          return null;
-        }
-        return (target.getShowAllColLabels() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Annotation target = (Annotation) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteShowAllColLabels();
-            return;
-          }
-          target.setShowAllColLabels(((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: _showAllColLabels
-    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);
-    // -- _autoCalculated
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_autoCalculated", "autoCalculated",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Annotation target = (Annotation) object;
-        if (!target.hasAutoCalculated())
-        {
-          return null;
-        }
-        return (target.getAutoCalculated() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Annotation target = (Annotation) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteAutoCalculated();
-            return;
-          }
-          target.setAutoCalculated(((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: _autoCalculated
-    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);
-    // -- _belowAlignment
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_belowAlignment", "belowAlignment",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Annotation target = (Annotation) object;
-        if (!target.hasBelowAlignment())
-        {
-          return null;
-        }
-        return (target.getBelowAlignment() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Annotation target = (Annotation) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteBelowAlignment();
-            return;
-          }
-          target.setBelowAlignment(((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: _belowAlignment
-    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);
-    // -- _calcId
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_calcId", "calcId",
-            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
-      {
-        Annotation target = (Annotation) object;
-        return target.getCalcId();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Annotation target = (Annotation) object;
-          target.setCalcId((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: _calcId
-    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
-
-    // -- _annotationElementList
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.AnnotationElement.class,
-            "_annotationElementList", "annotationElement",
-            org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Annotation target = (Annotation) object;
-        return target.getAnnotationElement();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Annotation target = (Annotation) object;
-          target.addAnnotationElement((jalview.schemabinding.version2.AnnotationElement) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public void resetValue(Object object) throws IllegalStateException,
-              IllegalArgumentException
-      {
-        try
-        {
-          Annotation target = (Annotation) object;
-          target.removeAllAnnotationElement();
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.AnnotationElement();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
-    desc.setMultivalued(true);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _annotationElementList
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(0);
-    { // -- local scope
-    }
-    desc.setValidator(fieldValidator);
-    // -- _label
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_label", "label",
-            org.exolab.castor.xml.NodeType.Element);
-    desc.setImmutable(true);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Annotation target = (Annotation) object;
-        return target.getLabel();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Annotation target = (Annotation) object;
-          target.setLabel((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.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
-    desc.setRequired(true);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _label
-    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);
-    // -- _description
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_description", "description",
-            org.exolab.castor.xml.NodeType.Element);
-    desc.setImmutable(true);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Annotation target = (Annotation) object;
-        return target.getDescription();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Annotation target = (Annotation) object;
-          target.setDescription((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.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _description
-    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);
-    // -- _thresholdLine
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.ThresholdLine.class,
-            "_thresholdLine", "thresholdLine",
-            org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Annotation target = (Annotation) object;
-        return target.getThresholdLine();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Annotation target = (Annotation) object;
-          target.setThresholdLine((jalview.schemabinding.version2.ThresholdLine) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.ThresholdLine();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _thresholdLine
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- local scope
-    }
-    desc.setValidator(fieldValidator);
-    // -- _propertyList
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.Property.class, "_propertyList",
-            "property", org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Annotation target = (Annotation) object;
-        return target.getProperty();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Annotation target = (Annotation) object;
-          target.addProperty((jalview.schemabinding.version2.Property) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public void resetValue(Object object) throws IllegalStateException,
-              IllegalArgumentException
-      {
-        try
-        {
-          Annotation target = (Annotation) object;
-          target.removeAllProperty();
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.Property();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
-    desc.setMultivalued(true);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _propertyList
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(0);
-    { // -- 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.Annotation.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/AnnotationElementDescriptor.java b/src/jalview/schemabinding/version2/descriptors/AnnotationElementDescriptor.java
deleted file mode 100644 (file)
index 4416bbf..0000000
+++ /dev/null
@@ -1,464 +0,0 @@
-/*
- * 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.AnnotationElement;
-
-/**
- * Class AnnotationElementDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class AnnotationElementDescriptor 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 AnnotationElementDescriptor()
-  {
-    super();
-    _nsURI = "www.vamsas.ac.uk/jalview/version2";
-    _xmlName = "annotationElement";
-    _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
-
-    // -- _position
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_position", "position",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        AnnotationElement target = (AnnotationElement) object;
-        if (!target.hasPosition())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getPosition());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          AnnotationElement target = (AnnotationElement) object;
-          // ignore null values for non optional primitives
-          if (value == null)
-          {
-            return;
-          }
-
-          target.setPosition(((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.setRequired(true);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _position
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(1);
-    { // -- 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);
-    // -- _colour
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_colour", "colour",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        AnnotationElement target = (AnnotationElement) object;
-        if (!target.hasColour())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getColour());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          AnnotationElement target = (AnnotationElement) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteColour();
-            return;
-          }
-          target.setColour(((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: _colour
-    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
-
-    // -- _displayCharacter
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_displayCharacter",
-            "displayCharacter", org.exolab.castor.xml.NodeType.Element);
-    desc.setImmutable(true);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        AnnotationElement target = (AnnotationElement) object;
-        return target.getDisplayCharacter();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          AnnotationElement target = (AnnotationElement) object;
-          target.setDisplayCharacter((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.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _displayCharacter
-    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);
-    // -- _description
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_description", "description",
-            org.exolab.castor.xml.NodeType.Element);
-    desc.setImmutable(true);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        AnnotationElement target = (AnnotationElement) object;
-        return target.getDescription();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          AnnotationElement target = (AnnotationElement) object;
-          target.setDescription((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.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _description
-    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);
-    // -- _secondaryStructure
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_secondaryStructure",
-            "secondaryStructure", org.exolab.castor.xml.NodeType.Element);
-    desc.setImmutable(true);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        AnnotationElement target = (AnnotationElement) object;
-        return target.getSecondaryStructure();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          AnnotationElement target = (AnnotationElement) object;
-          target.setSecondaryStructure((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.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _secondaryStructure
-    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");
-      typeValidator.setLength(1);
-    }
-    desc.setValidator(fieldValidator);
-    // -- _value
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Float.TYPE, "_value", "value",
-            org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        AnnotationElement target = (AnnotationElement) object;
-        if (!target.hasValue())
-        {
-          return null;
-        }
-        return new java.lang.Float(target.getValue());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          AnnotationElement target = (AnnotationElement) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteValue();
-            return;
-          }
-          target.setValue(((java.lang.Float) value).floatValue());
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return null;
-      }
-    };
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _value
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- local scope
-      org.exolab.castor.xml.validators.FloatValidator typeValidator;
-      typeValidator = new org.exolab.castor.xml.validators.FloatValidator();
-      fieldValidator.setValidator(typeValidator);
-      typeValidator.setMinInclusive((float) -3.4028235E38);
-      typeValidator.setMaxInclusive((float) 3.4028235E38);
-    }
-    desc.setValidator(fieldValidator);
-  }
-
-  // -----------/
-  // - 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.AnnotationElement.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/CalcIdParamDescriptor.java b/src/jalview/schemabinding/version2/descriptors/CalcIdParamDescriptor.java
deleted file mode 100644 (file)
index 6dbea24..0000000
+++ /dev/null
@@ -1,313 +0,0 @@
-/*
- * 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.CalcIdParam;
-
-/**
- * Class CalcIdParamDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class CalcIdParamDescriptor
-        extends
-        jalview.schemabinding.version2.descriptors.WebServiceParameterSetDescriptor
-{
-
-  // --------------------------/
-  // - 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 CalcIdParamDescriptor()
-  {
-    super();
-    setExtendsWithoutFlatten(new jalview.schemabinding.version2.descriptors.WebServiceParameterSetDescriptor());
-    _nsURI = "www.jalview.org";
-    _xmlName = "calcIdParam";
-    _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
-
-    // -- _calcId
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_calcId", "calcId",
-            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
-      {
-        CalcIdParam target = (CalcIdParam) object;
-        return target.getCalcId();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          CalcIdParam target = (CalcIdParam) object;
-          target.setCalcId((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: _calcId
-    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);
-    // -- _needsUpdate
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_needsUpdate", "needsUpdate",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        CalcIdParam target = (CalcIdParam) object;
-        if (!target.hasNeedsUpdate())
-        {
-          return null;
-        }
-        return (target.getNeedsUpdate() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          CalcIdParam target = (CalcIdParam) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteNeedsUpdate();
-            return;
-          }
-          target.setNeedsUpdate(((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: _needsUpdate
-    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);
-    // -- _autoUpdate
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_autoUpdate", "autoUpdate",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        CalcIdParam target = (CalcIdParam) object;
-        if (!target.hasAutoUpdate())
-        {
-          return null;
-        }
-        return (target.getAutoUpdate() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          CalcIdParam target = (CalcIdParam) object;
-          // ignore null values for non optional primitives
-          if (value == null)
-          {
-            return;
-          }
-
-          target.setAutoUpdate(((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.setRequired(true);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _autoUpdate
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(1);
-    { // -- local scope
-      org.exolab.castor.xml.validators.BooleanValidator typeValidator;
-      typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
-      fieldValidator.setValidator(typeValidator);
-    }
-    desc.setValidator(fieldValidator);
-    // -- initialize element descriptors
-
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-   * Method getAccessMode.
-   * 
-   * @return the access mode specified for this class.
-   */
-  public org.exolab.castor.mapping.AccessMode getAccessMode()
-  {
-    return null;
-  }
-
-  /**
-   * Method getIdentity.
-   * 
-   * @return the identity field, null if this class has no identity.
-   */
-  public org.exolab.castor.mapping.FieldDescriptor getIdentity()
-  {
-    return super.getIdentity();
-  }
-
-  /**
-   * Method getJavaClass.
-   * 
-   * @return the Java class represented by this descriptor.
-   */
-  public java.lang.Class getJavaClass()
-  {
-    return jalview.schemabinding.version2.CalcIdParam.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/ColourDescriptor.java b/src/jalview/schemabinding/version2/descriptors/ColourDescriptor.java
deleted file mode 100644 (file)
index cca4ef1..0000000
+++ /dev/null
@@ -1,719 +0,0 @@
-/*
- * 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.Colour;
-
-/**
- * Class ColourDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class ColourDescriptor
-        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 ColourDescriptor()
-  {
-    super();
-    _xmlName = "colour";
-    _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
-
-    // -- _name
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_name", "Name",
-            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
-      {
-        Colour target = (Colour) object;
-        return target.getName();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Colour target = (Colour) object;
-          target.setName((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: _name
-    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);
-    // -- _RGB
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_RGB", "RGB",
-            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
-      {
-        Colour target = (Colour) object;
-        return target.getRGB();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Colour target = (Colour) object;
-          target.setRGB((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: _RGB
-    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);
-    // -- _minRGB
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_minRGB", "minRGB",
-            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
-      {
-        Colour target = (Colour) object;
-        return target.getMinRGB();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Colour target = (Colour) object;
-          target.setMinRGB((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: _minRGB
-    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);
-    // -- _noValueColour
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.types.NoValueColour.class,
-            "_noValueColour", "noValueColour",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Colour target = (Colour) object;
-        return target.getNoValueColour();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Colour target = (Colour) object;
-          target.setNoValueColour(
-                  (jalview.schemabinding.version2.types.NoValueColour) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return null;
-      }
-    };
-    handler = new org.exolab.castor.xml.handlers.EnumFieldHandler(
-            jalview.schemabinding.version2.types.NoValueColour.class,
-            handler);
-    desc.setImmutable(true);
-    desc.setHandler(handler);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _noValueColour
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- local scope
-    }
-    desc.setValidator(fieldValidator);
-    // -- _threshType
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.types.ColourThreshTypeType.class,
-            "_threshType", "threshType",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Colour target = (Colour) object;
-        return target.getThreshType();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Colour target = (Colour) object;
-          target.setThreshType(
-                  (jalview.schemabinding.version2.types.ColourThreshTypeType) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return null;
-      }
-    };
-    handler = new org.exolab.castor.xml.handlers.EnumFieldHandler(
-            jalview.schemabinding.version2.types.ColourThreshTypeType.class,
-            handler);
-    desc.setImmutable(true);
-    desc.setHandler(handler);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _threshType
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- local scope
-    }
-    desc.setValidator(fieldValidator);
-    // -- _threshold
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Float.TYPE, "_threshold", "threshold",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Colour target = (Colour) object;
-        if (!target.hasThreshold())
-        {
-          return null;
-        }
-        return new java.lang.Float(target.getThreshold());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Colour target = (Colour) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteThreshold();
-            return;
-          }
-          target.setThreshold(((java.lang.Float) value).floatValue());
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return null;
-      }
-    };
-    desc.setHandler(handler);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _threshold
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- local scope
-      org.exolab.castor.xml.validators.FloatValidator typeValidator;
-      typeValidator = new org.exolab.castor.xml.validators.FloatValidator();
-      fieldValidator.setValidator(typeValidator);
-      typeValidator.setMinInclusive((float) -3.4028235E38);
-      typeValidator.setMaxInclusive((float) 3.4028235E38);
-    }
-    desc.setValidator(fieldValidator);
-    // -- _max
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Float.TYPE, "_max", "max",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Colour target = (Colour) object;
-        if (!target.hasMax())
-        {
-          return null;
-        }
-        return new java.lang.Float(target.getMax());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Colour target = (Colour) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteMax();
-            return;
-          }
-          target.setMax(((java.lang.Float) value).floatValue());
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return null;
-      }
-    };
-    desc.setHandler(handler);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _max
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- local scope
-      org.exolab.castor.xml.validators.FloatValidator typeValidator;
-      typeValidator = new org.exolab.castor.xml.validators.FloatValidator();
-      fieldValidator.setValidator(typeValidator);
-      typeValidator.setMinInclusive((float) -3.4028235E38);
-      typeValidator.setMaxInclusive((float) 3.4028235E38);
-    }
-    desc.setValidator(fieldValidator);
-    // -- _min
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Float.TYPE, "_min", "min",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Colour target = (Colour) object;
-        if (!target.hasMin())
-        {
-          return null;
-        }
-        return new java.lang.Float(target.getMin());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Colour target = (Colour) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteMin();
-            return;
-          }
-          target.setMin(((java.lang.Float) value).floatValue());
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return null;
-      }
-    };
-    desc.setHandler(handler);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _min
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- local scope
-      org.exolab.castor.xml.validators.FloatValidator typeValidator;
-      typeValidator = new org.exolab.castor.xml.validators.FloatValidator();
-      fieldValidator.setValidator(typeValidator);
-      typeValidator.setMinInclusive((float) -3.4028235E38);
-      typeValidator.setMaxInclusive((float) 3.4028235E38);
-    }
-    desc.setValidator(fieldValidator);
-    // -- _colourByLabel
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_colourByLabel", "colourByLabel",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Colour target = (Colour) object;
-        if (!target.hasColourByLabel())
-        {
-          return null;
-        }
-        return (target.getColourByLabel() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Colour target = (Colour) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteColourByLabel();
-            return;
-          }
-          target.setColourByLabel(
-                  ((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: _colourByLabel
-    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);
-    // -- _autoScale
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_autoScale", "autoScale",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Colour target = (Colour) object;
-        if (!target.hasAutoScale())
-        {
-          return null;
-        }
-        return (target.getAutoScale() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Colour target = (Colour) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteAutoScale();
-            return;
-          }
-          target.setAutoScale(((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: _autoScale
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- local scope
-      org.exolab.castor.xml.validators.BooleanValidator typeValidator;
-      typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
-      fieldValidator.setValidator(typeValidator);
-    }
-    desc.setValidator(fieldValidator);
-    // -- initialize element descriptors
-
-    // -- _attributeNameList
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_attributeNameList", "attributeName",
-            org.exolab.castor.xml.NodeType.Element);
-    desc.setImmutable(true);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Colour target = (Colour) object;
-        return target.getAttributeName();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Colour target = (Colour) object;
-          target.addAttributeName((java.lang.String) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public void resetValue(Object object)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Colour target = (Colour) object;
-          target.removeAllAttributeName();
-        } 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(true);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _attributeNameList
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(0);
-    fieldValidator.setMaxOccurs(2);
-    { // -- 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);
-  }
-
-  // -----------/
-  // - 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.Colour.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/CompoundMatcherDescriptor.java b/src/jalview/schemabinding/version2/descriptors/CompoundMatcherDescriptor.java
deleted file mode 100644 (file)
index 2402d68..0000000
+++ /dev/null
@@ -1,270 +0,0 @@
-/*
- * 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.CompoundMatcher;
-
-/**
- * Class CompoundMatcherDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class CompoundMatcherDescriptor
-        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 CompoundMatcherDescriptor()
-  {
-    super();
-    _xmlName = "compoundMatcher";
-    _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
-
-    // -- _and
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_and", "and",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        CompoundMatcher target = (CompoundMatcher) object;
-        if (!target.hasAnd())
-        {
-          return null;
-        }
-        return (target.getAnd() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          CompoundMatcher target = (CompoundMatcher) object;
-          // ignore null values for non optional primitives
-          if (value == null)
-          {
-            return;
-          }
-
-          target.setAnd(((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.setRequired(true);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _and
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(1);
-    { // -- local scope
-      org.exolab.castor.xml.validators.BooleanValidator typeValidator;
-      typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
-      fieldValidator.setValidator(typeValidator);
-    }
-    desc.setValidator(fieldValidator);
-    // -- initialize element descriptors
-
-    // -- _matcherSetList
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.MatcherSet.class,
-            "_matcherSetList", "matcherSet",
-            org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        CompoundMatcher target = (CompoundMatcher) object;
-        return target.getMatcherSet();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          CompoundMatcher target = (CompoundMatcher) object;
-          target.addMatcherSet(
-                  (jalview.schemabinding.version2.MatcherSet) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public void resetValue(Object object)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          CompoundMatcher target = (CompoundMatcher) object;
-          target.removeAllMatcherSet();
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.MatcherSet();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setRequired(true);
-    desc.setMultivalued(true);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _matcherSetList
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(2);
-    fieldValidator.setMaxOccurs(2);
-    { // -- 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.CompoundMatcher.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/DBRefDescriptor.java b/src/jalview/schemabinding/version2/descriptors/DBRefDescriptor.java
deleted file mode 100644 (file)
index e896d7a..0000000
+++ /dev/null
@@ -1,333 +0,0 @@
-/*
- * 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.DBRef;
-
-/**
- * Class DBRefDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class DBRefDescriptor 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 DBRefDescriptor()
-  {
-    super();
-    _nsURI = "www.vamsas.ac.uk/jalview/version2";
-    _xmlName = "DBRef";
-    _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
-
-    // -- _source
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_source", "source",
-            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
-      {
-        DBRef target = (DBRef) object;
-        return target.getSource();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          DBRef target = (DBRef) object;
-          target.setSource((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: _source
-    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);
-    // -- _version
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_version", "version",
-            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
-      {
-        DBRef target = (DBRef) object;
-        return target.getVersion();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          DBRef target = (DBRef) object;
-          target.setVersion((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: _version
-    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);
-    // -- _accessionId
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_accessionId", "accessionId",
-            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
-      {
-        DBRef target = (DBRef) object;
-        return target.getAccessionId();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          DBRef target = (DBRef) object;
-          target.setAccessionId((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: _accessionId
-    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
-
-    // -- _mapping
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.Mapping.class, "_mapping",
-            "Mapping", org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        DBRef target = (DBRef) object;
-        return target.getMapping();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          DBRef target = (DBRef) object;
-          target.setMapping((jalview.schemabinding.version2.Mapping) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.Mapping();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _mapping
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- 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.DBRef.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/FeatureDescriptor.java b/src/jalview/schemabinding/version2/descriptors/FeatureDescriptor.java
deleted file mode 100644 (file)
index 64ed3a5..0000000
+++ /dev/null
@@ -1,564 +0,0 @@
-/*
- * 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.Feature;
-
-/**
- * Class FeatureDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class FeatureDescriptor 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 FeatureDescriptor()
-  {
-    super();
-    _nsURI = "www.jalview.org";
-    _xmlName = "feature";
-    _elementDefinition = false;
-
-    // -- 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
-
-    // -- _begin
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_begin", "begin",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Feature target = (Feature) object;
-        if (!target.hasBegin())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getBegin());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Feature target = (Feature) object;
-          // ignore null values for non optional primitives
-          if (value == null)
-          {
-            return;
-          }
-
-          target.setBegin(((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.setRequired(true);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _begin
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(1);
-    { // -- 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);
-    // -- _end
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_end", "end",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Feature target = (Feature) object;
-        if (!target.hasEnd())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getEnd());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Feature target = (Feature) object;
-          // ignore null values for non optional primitives
-          if (value == null)
-          {
-            return;
-          }
-
-          target.setEnd(((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.setRequired(true);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _end
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(1);
-    { // -- 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);
-    // -- _type
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_type", "type",
-            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
-      {
-        Feature target = (Feature) object;
-        return target.getType();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Feature target = (Feature) object;
-          target.setType((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: _type
-    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);
-    // -- _description
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_description", "description",
-            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
-      {
-        Feature target = (Feature) object;
-        return target.getDescription();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Feature target = (Feature) object;
-          target.setDescription((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: _description
-    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);
-    // -- _status
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_status", "status",
-            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
-      {
-        Feature target = (Feature) object;
-        return target.getStatus();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Feature target = (Feature) object;
-          target.setStatus((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: _status
-    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);
-    // -- _featureGroup
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_featureGroup", "featureGroup",
-            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
-      {
-        Feature target = (Feature) object;
-        return target.getFeatureGroup();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Feature target = (Feature) object;
-          target.setFeatureGroup((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: _featureGroup
-    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);
-    // -- _score
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Float.TYPE, "_score", "score",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Feature target = (Feature) object;
-        if (!target.hasScore())
-        {
-          return null;
-        }
-        return new java.lang.Float(target.getScore());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Feature target = (Feature) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteScore();
-            return;
-          }
-          target.setScore(((java.lang.Float) value).floatValue());
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return null;
-      }
-    };
-    desc.setHandler(handler);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _score
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- local scope
-      org.exolab.castor.xml.validators.FloatValidator typeValidator;
-      typeValidator = new org.exolab.castor.xml.validators.FloatValidator();
-      fieldValidator.setValidator(typeValidator);
-      typeValidator.setMinInclusive((float) -3.4028235E38);
-      typeValidator.setMaxInclusive((float) 3.4028235E38);
-    }
-    desc.setValidator(fieldValidator);
-    // -- initialize element descriptors
-
-    // -- _otherDataList
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.OtherData.class,
-            "_otherDataList", "otherData",
-            org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Feature target = (Feature) object;
-        return target.getOtherData();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Feature target = (Feature) object;
-          target.addOtherData((jalview.schemabinding.version2.OtherData) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public void resetValue(Object object) throws IllegalStateException,
-              IllegalArgumentException
-      {
-        try
-        {
-          Feature target = (Feature) object;
-          target.removeAllOtherData();
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.OtherData();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.jalview.org");
-    desc.setMultivalued(true);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _otherDataList
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(0);
-    { // -- 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.Feature.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/FeatureMatcherDescriptor.java b/src/jalview/schemabinding/version2/descriptors/FeatureMatcherDescriptor.java
deleted file mode 100644 (file)
index 2df2f5b..0000000
+++ /dev/null
@@ -1,356 +0,0 @@
-/*
- * 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.FeatureMatcher;
-
-/**
- * Class FeatureMatcherDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class FeatureMatcherDescriptor
-        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 FeatureMatcherDescriptor()
-  {
-    super();
-    _nsURI = "www.jalview.org/colours";
-    _xmlName = "FeatureMatcher";
-    _elementDefinition = false;
-
-    // -- 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
-
-    // -- _by
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.types.FeatureMatcherByType.class,
-            "_by", "by", org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        FeatureMatcher target = (FeatureMatcher) object;
-        return target.getBy();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          FeatureMatcher target = (FeatureMatcher) object;
-          target.setBy(
-                  (jalview.schemabinding.version2.types.FeatureMatcherByType) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return null;
-      }
-    };
-    handler = new org.exolab.castor.xml.handlers.EnumFieldHandler(
-            jalview.schemabinding.version2.types.FeatureMatcherByType.class,
-            handler);
-    desc.setImmutable(true);
-    desc.setHandler(handler);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _by
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- local scope
-    }
-    desc.setValidator(fieldValidator);
-    // -- initialize element descriptors
-
-    // -- _attributeNameList
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_attributeNameList", "attributeName",
-            org.exolab.castor.xml.NodeType.Element);
-    desc.setImmutable(true);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        FeatureMatcher target = (FeatureMatcher) object;
-        return target.getAttributeName();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          FeatureMatcher target = (FeatureMatcher) object;
-          target.addAttributeName((java.lang.String) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public void resetValue(Object object)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          FeatureMatcher target = (FeatureMatcher) object;
-          target.removeAllAttributeName();
-        } 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(true);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _attributeNameList
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(0);
-    fieldValidator.setMaxOccurs(2);
-    { // -- 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);
-    // -- _condition
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_condition", "condition",
-            org.exolab.castor.xml.NodeType.Element);
-    desc.setImmutable(true);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        FeatureMatcher target = (FeatureMatcher) object;
-        return target.getCondition();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          FeatureMatcher target = (FeatureMatcher) object;
-          target.setCondition((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: _condition
-    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);
-    // -- _value
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_value", "value",
-            org.exolab.castor.xml.NodeType.Element);
-    desc.setImmutable(true);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        FeatureMatcher target = (FeatureMatcher) object;
-        return target.getValue();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          FeatureMatcher target = (FeatureMatcher) object;
-          target.setValue((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: _value
-    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);
-  }
-
-  // -----------/
-  // - 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.FeatureMatcher.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/FeatureMatcherSetDescriptor.java b/src/jalview/schemabinding/version2/descriptors/FeatureMatcherSetDescriptor.java
deleted file mode 100644 (file)
index b3d19bb..0000000
+++ /dev/null
@@ -1,258 +0,0 @@
-/*
- * 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;
-
-import jalview.schemabinding.version2.CompoundMatcher;
-
-//---------------------------------/
-//- Imported classes and packages -/
-//---------------------------------/
-
-import jalview.schemabinding.version2.FeatureMatcherSet;
-import jalview.schemabinding.version2.MatchCondition;
-
-/**
- * Class FeatureMatcherSetDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class FeatureMatcherSetDescriptor
-        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 FeatureMatcherSetDescriptor()
-  {
-    super();
-    _nsURI = "www.jalview.org/colours";
-    _xmlName = "FeatureMatcherSet";
-    _elementDefinition = false;
-
-    // -- set grouping compositor
-    setCompositorAsChoice();
-    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
-
-    // -- initialize element descriptors
-
-    // -- _matchCondition
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            MatchCondition.class, "_matchCondition", "matchCondition",
-            org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      @Override
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        FeatureMatcherSet target = (FeatureMatcherSet) object;
-        return target.getMatchCondition();
-      }
-
-      @Override
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          FeatureMatcherSet target = (FeatureMatcherSet) object;
-          target.setMatchCondition((MatchCondition) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      @Override
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new MatchCondition();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setRequired(true);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _matchCondition
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(1);
-    { // -- local scope
-    }
-    desc.setValidator(fieldValidator);
-    // -- _compoundMatcher
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            CompoundMatcher.class, "_compoundMatcher", "compoundMatcher",
-            org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      @Override
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        FeatureMatcherSet target = (FeatureMatcherSet) object;
-        return target.getCompoundMatcher();
-      }
-
-      @Override
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          FeatureMatcherSet target = (FeatureMatcherSet) object;
-          target.setCompoundMatcher((CompoundMatcher) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      @Override
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new CompoundMatcher();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setRequired(true);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _compoundMatcher
-    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.
-   */
-  @Override
-  public org.exolab.castor.mapping.AccessMode getAccessMode()
-  {
-    return null;
-  }
-
-  /**
-   * Method getIdentity.
-   * 
-   * @return the identity field, null if this class has no identity.
-   */
-  @Override
-  public org.exolab.castor.mapping.FieldDescriptor getIdentity()
-  {
-    return super.getIdentity();
-  }
-
-  /**
-   * Method getJavaClass.
-   * 
-   * @return the Java class represented by this descriptor.
-   */
-  @Override
-  public java.lang.Class getJavaClass()
-  {
-    return jalview.schemabinding.version2.FeatureMatcherSet.class;
-  }
-
-  /**
-   * Method getNameSpacePrefix.
-   * 
-   * @return the namespace prefix to use when marshaling as XML.
-   */
-  @Override
-  public java.lang.String getNameSpacePrefix()
-  {
-    return _nsPrefix;
-  }
-
-  /**
-   * Method getNameSpaceURI.
-   * 
-   * @return the namespace URI used when marshaling and unmarshaling as XML.
-   */
-  @Override
-  public java.lang.String getNameSpaceURI()
-  {
-    return _nsURI;
-  }
-
-  /**
-   * Method getValidator.
-   * 
-   * @return a specific validator for the class described by this
-   *         ClassDescriptor.
-   */
-  @Override
-  public org.exolab.castor.xml.TypeValidator getValidator()
-  {
-    return this;
-  }
-
-  /**
-   * Method getXMLName.
-   * 
-   * @return the XML Name for the Class being described.
-   */
-  @Override
-  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.
-   */
-  @Override
-  public boolean isElementDefinition()
-  {
-    return _elementDefinition;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/FeatureSettingsDescriptor.java b/src/jalview/schemabinding/version2/descriptors/FeatureSettingsDescriptor.java
deleted file mode 100644 (file)
index 44bc256..0000000
+++ /dev/null
@@ -1,267 +0,0 @@
-/*
- * 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.FeatureSettings;
-
-/**
- * Class FeatureSettingsDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class FeatureSettingsDescriptor 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 FeatureSettingsDescriptor()
-  {
-    super();
-    _nsURI = "www.jalview.org";
-    _xmlName = "FeatureSettings";
-    _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
-
-    // -- initialize element descriptors
-
-    // -- _settingList
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.Setting.class, "_settingList",
-            "setting", org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        FeatureSettings target = (FeatureSettings) object;
-        return target.getSetting();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          FeatureSettings target = (FeatureSettings) object;
-          target.addSetting((jalview.schemabinding.version2.Setting) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public void resetValue(Object object) throws IllegalStateException,
-              IllegalArgumentException
-      {
-        try
-        {
-          FeatureSettings target = (FeatureSettings) object;
-          target.removeAllSetting();
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.Setting();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.jalview.org");
-    desc.setMultivalued(true);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _settingList
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(0);
-    { // -- local scope
-    }
-    desc.setValidator(fieldValidator);
-    // -- _groupList
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.Group.class, "_groupList",
-            "group", org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        FeatureSettings target = (FeatureSettings) object;
-        return target.getGroup();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          FeatureSettings target = (FeatureSettings) object;
-          target.addGroup((jalview.schemabinding.version2.Group) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public void resetValue(Object object) throws IllegalStateException,
-              IllegalArgumentException
-      {
-        try
-        {
-          FeatureSettings target = (FeatureSettings) object;
-          target.removeAllGroup();
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.Group();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.jalview.org");
-    desc.setMultivalued(true);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _groupList
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(0);
-    { // -- 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.FeatureSettings.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/FeaturesDescriptor.java b/src/jalview/schemabinding/version2/descriptors/FeaturesDescriptor.java
deleted file mode 100644 (file)
index 107c06d..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * 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.Features;
-
-/**
- * Class FeaturesDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class FeaturesDescriptor extends
-        jalview.schemabinding.version2.descriptors.FeatureDescriptor
-{
-
-  // --------------------------/
-  // - 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 FeaturesDescriptor()
-  {
-    super();
-    setExtendsWithoutFlatten(new jalview.schemabinding.version2.descriptors.FeatureDescriptor());
-    _nsURI = "www.jalview.org";
-    _xmlName = "features";
-    _elementDefinition = true;
-  }
-
-  // -----------/
-  // - 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.Features.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/FilterDescriptor.java b/src/jalview/schemabinding/version2/descriptors/FilterDescriptor.java
deleted file mode 100644 (file)
index f58f9ae..0000000
+++ /dev/null
@@ -1,246 +0,0 @@
-/*
- * 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.Filter;
-
-/**
- * Class FilterDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class FilterDescriptor
-        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 FilterDescriptor()
-  {
-    super();
-    _xmlName = "filter";
-    _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
-
-    // -- _featureType
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_featureType", "featureType",
-            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
-      {
-        Filter target = (Filter) object;
-        return target.getFeatureType();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Filter target = (Filter) object;
-          target.setFeatureType((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: _featureType
-    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);
-    // -- initialize element descriptors
-
-    // -- _matcherSet
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.MatcherSet.class, "_matcherSet",
-            "matcherSet", org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Filter target = (Filter) object;
-        return target.getMatcherSet();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Filter target = (Filter) object;
-          target.setMatcherSet(
-                  (jalview.schemabinding.version2.MatcherSet) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.MatcherSet();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setRequired(true);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _matcherSet
-    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.Filter.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/GroupDescriptor.java b/src/jalview/schemabinding/version2/descriptors/GroupDescriptor.java
deleted file mode 100644 (file)
index 7aa6203..0000000
+++ /dev/null
@@ -1,257 +0,0 @@
-/*
- * 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.Group;
-
-/**
- * Class GroupDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class GroupDescriptor 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 GroupDescriptor()
-  {
-    super();
-    _nsURI = "www.jalview.org";
-    _xmlName = "group";
-    _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
-
-    // -- _name
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_name", "name",
-            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
-      {
-        Group target = (Group) object;
-        return target.getName();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Group target = (Group) object;
-          target.setName((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: _name
-    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);
-    // -- _display
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_display", "display",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Group target = (Group) object;
-        if (!target.hasDisplay())
-        {
-          return null;
-        }
-        return (target.getDisplay() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Group target = (Group) object;
-          // ignore null values for non optional primitives
-          if (value == null)
-          {
-            return;
-          }
-
-          target.setDisplay(((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.setRequired(true);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _display
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(1);
-    { // -- local scope
-      org.exolab.castor.xml.validators.BooleanValidator typeValidator;
-      typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
-      fieldValidator.setValidator(typeValidator);
-    }
-    desc.setValidator(fieldValidator);
-    // -- initialize element descriptors
-
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-   * Method getAccessMode.
-   * 
-   * @return the access mode specified for this class.
-   */
-  public org.exolab.castor.mapping.AccessMode getAccessMode()
-  {
-    return null;
-  }
-
-  /**
-   * Method getIdentity.
-   * 
-   * @return the identity field, null if this class has no identity.
-   */
-  public org.exolab.castor.mapping.FieldDescriptor getIdentity()
-  {
-    return super.getIdentity();
-  }
-
-  /**
-   * Method getJavaClass.
-   * 
-   * @return the Java class represented by this descriptor.
-   */
-  public java.lang.Class getJavaClass()
-  {
-    return jalview.schemabinding.version2.Group.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/HiddenColumnsDescriptor.java b/src/jalview/schemabinding/version2/descriptors/HiddenColumnsDescriptor.java
deleted file mode 100644 (file)
index a5607b7..0000000
+++ /dev/null
@@ -1,264 +0,0 @@
-/*
- * 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.HiddenColumns;
-
-/**
- * Class HiddenColumnsDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class HiddenColumnsDescriptor 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 HiddenColumnsDescriptor()
-  {
-    super();
-    _nsURI = "www.jalview.org";
-    _xmlName = "hiddenColumns";
-    _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
-
-    // -- _start
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_start", "start",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        HiddenColumns target = (HiddenColumns) object;
-        if (!target.hasStart())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getStart());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          HiddenColumns target = (HiddenColumns) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteStart();
-            return;
-          }
-          target.setStart(((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: _start
-    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);
-    // -- _end
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_end", "end",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        HiddenColumns target = (HiddenColumns) object;
-        if (!target.hasEnd())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getEnd());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          HiddenColumns target = (HiddenColumns) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteEnd();
-            return;
-          }
-          target.setEnd(((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: _end
-    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
-
-  }
-
-  // -----------/
-  // - 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.HiddenColumns.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/JGroupDescriptor.java b/src/jalview/schemabinding/version2/descriptors/JGroupDescriptor.java
deleted file mode 100644 (file)
index 620432f..0000000
+++ /dev/null
@@ -1,1275 +0,0 @@
-/*
- * 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.JGroup;
-
-/**
- * Class JGroupDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class JGroupDescriptor 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 JGroupDescriptor()
-  {
-    super();
-    _nsURI = "www.jalview.org";
-    _xmlName = "JGroup";
-    _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
-
-    // -- _start
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_start", "start",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        JGroup target = (JGroup) object;
-        if (!target.hasStart())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getStart());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JGroup target = (JGroup) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteStart();
-            return;
-          }
-          target.setStart(((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: _start
-    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);
-    // -- _end
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_end", "end",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        JGroup target = (JGroup) object;
-        if (!target.hasEnd())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getEnd());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JGroup target = (JGroup) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteEnd();
-            return;
-          }
-          target.setEnd(((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: _end
-    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);
-    // -- _name
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_name", "name",
-            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
-      {
-        JGroup target = (JGroup) object;
-        return target.getName();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JGroup target = (JGroup) object;
-          target.setName((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: _name
-    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);
-    // -- _colour
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_colour", "colour",
-            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
-      {
-        JGroup target = (JGroup) object;
-        return target.getColour();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JGroup target = (JGroup) object;
-          target.setColour((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: _colour
-    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);
-    // -- _consThreshold
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_consThreshold", "consThreshold",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        JGroup target = (JGroup) object;
-        if (!target.hasConsThreshold())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getConsThreshold());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JGroup target = (JGroup) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteConsThreshold();
-            return;
-          }
-          target.setConsThreshold(((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: _consThreshold
-    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);
-    // -- _pidThreshold
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_pidThreshold", "pidThreshold",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        JGroup target = (JGroup) object;
-        if (!target.hasPidThreshold())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getPidThreshold());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JGroup target = (JGroup) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deletePidThreshold();
-            return;
-          }
-          target.setPidThreshold(((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: _pidThreshold
-    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);
-    // -- _outlineColour
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_outlineColour", "outlineColour",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        JGroup target = (JGroup) object;
-        if (!target.hasOutlineColour())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getOutlineColour());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JGroup target = (JGroup) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteOutlineColour();
-            return;
-          }
-          target.setOutlineColour(((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: _outlineColour
-    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);
-    // -- _displayBoxes
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_displayBoxes", "displayBoxes",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        JGroup target = (JGroup) object;
-        if (!target.hasDisplayBoxes())
-        {
-          return null;
-        }
-        return (target.getDisplayBoxes() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JGroup target = (JGroup) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteDisplayBoxes();
-            return;
-          }
-          target.setDisplayBoxes(((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: _displayBoxes
-    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);
-    // -- _displayText
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_displayText", "displayText",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        JGroup target = (JGroup) object;
-        if (!target.hasDisplayText())
-        {
-          return null;
-        }
-        return (target.getDisplayText() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JGroup target = (JGroup) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteDisplayText();
-            return;
-          }
-          target.setDisplayText(((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: _displayText
-    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);
-    // -- _colourText
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_colourText", "colourText",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        JGroup target = (JGroup) object;
-        if (!target.hasColourText())
-        {
-          return null;
-        }
-        return (target.getColourText() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JGroup target = (JGroup) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteColourText();
-            return;
-          }
-          target.setColourText(((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: _colourText
-    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);
-    // -- _textCol1
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_textCol1", "textCol1",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        JGroup target = (JGroup) object;
-        if (!target.hasTextCol1())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getTextCol1());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JGroup target = (JGroup) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteTextCol1();
-            return;
-          }
-          target.setTextCol1(((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: _textCol1
-    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);
-    // -- _textCol2
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_textCol2", "textCol2",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        JGroup target = (JGroup) object;
-        if (!target.hasTextCol2())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getTextCol2());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JGroup target = (JGroup) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteTextCol2();
-            return;
-          }
-          target.setTextCol2(((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: _textCol2
-    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);
-    // -- _textColThreshold
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_textColThreshold",
-            "textColThreshold", org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        JGroup target = (JGroup) object;
-        if (!target.hasTextColThreshold())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getTextColThreshold());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JGroup target = (JGroup) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteTextColThreshold();
-            return;
-          }
-          target.setTextColThreshold(((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: _textColThreshold
-    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);
-    // -- _showUnconserved
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_showUnconserved", "showUnconserved",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        JGroup target = (JGroup) object;
-        if (!target.hasShowUnconserved())
-        {
-          return null;
-        }
-        return (target.getShowUnconserved() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JGroup target = (JGroup) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteShowUnconserved();
-            return;
-          }
-          target.setShowUnconserved(((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: _showUnconserved
-    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);
-    // -- _ignoreGapsinConsensus
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_ignoreGapsinConsensus",
-            "ignoreGapsinConsensus",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        JGroup target = (JGroup) object;
-        if (!target.hasIgnoreGapsinConsensus())
-        {
-          return null;
-        }
-        return (target.getIgnoreGapsinConsensus() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JGroup target = (JGroup) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteIgnoreGapsinConsensus();
-            return;
-          }
-          target.setIgnoreGapsinConsensus(((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: _ignoreGapsinConsensus
-    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);
-    // -- _showConsensusHistogram
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_showConsensusHistogram",
-            "showConsensusHistogram",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        JGroup target = (JGroup) object;
-        if (!target.hasShowConsensusHistogram())
-        {
-          return null;
-        }
-        return (target.getShowConsensusHistogram() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JGroup target = (JGroup) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteShowConsensusHistogram();
-            return;
-          }
-          target.setShowConsensusHistogram(((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: _showConsensusHistogram
-    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);
-    // -- _showSequenceLogo
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_showSequenceLogo",
-            "showSequenceLogo", org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        JGroup target = (JGroup) object;
-        if (!target.hasShowSequenceLogo())
-        {
-          return null;
-        }
-        return (target.getShowSequenceLogo() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JGroup target = (JGroup) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteShowSequenceLogo();
-            return;
-          }
-          target.setShowSequenceLogo(((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: _showSequenceLogo
-    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);
-    // -- _normaliseSequenceLogo
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_normaliseSequenceLogo",
-            "normaliseSequenceLogo",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        JGroup target = (JGroup) object;
-        if (!target.hasNormaliseSequenceLogo())
-        {
-          return null;
-        }
-        return (target.getNormaliseSequenceLogo() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JGroup target = (JGroup) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteNormaliseSequenceLogo();
-            return;
-          }
-          target.setNormaliseSequenceLogo(((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: _normaliseSequenceLogo
-    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);
-    // -- _id
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_id", "id",
-            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
-      {
-        JGroup target = (JGroup) object;
-        return target.getId();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JGroup target = (JGroup) object;
-          target.setId((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: _id
-    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
-
-    // -- _seqList
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_seqList", "seq",
-            org.exolab.castor.xml.NodeType.Element);
-    desc.setImmutable(true);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        JGroup target = (JGroup) object;
-        return target.getSeq();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JGroup target = (JGroup) object;
-          target.addSeq((java.lang.String) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public void resetValue(Object object) throws IllegalStateException,
-              IllegalArgumentException
-      {
-        try
-        {
-          JGroup target = (JGroup) object;
-          target.removeAllSeq();
-        } 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.setNameSpaceURI("www.jalview.org");
-    desc.setRequired(true);
-    desc.setMultivalued(true);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _seqList
-    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);
-    // -- _annotationColours
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.AnnotationColours.class,
-            "_annotationColours", "annotationColours",
-            org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        JGroup target = (JGroup) object;
-        return target.getAnnotationColours();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JGroup target = (JGroup) object;
-          target.setAnnotationColours((jalview.schemabinding.version2.AnnotationColours) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.AnnotationColours();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.jalview.org");
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _annotationColours
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- 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.JGroup.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/JSeqDescriptor.java b/src/jalview/schemabinding/version2/descriptors/JSeqDescriptor.java
deleted file mode 100644 (file)
index 28f23b2..0000000
+++ /dev/null
@@ -1,714 +0,0 @@
-/*
- * 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.JSeq;
-
-/**
- * Class JSeqDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class JSeqDescriptor 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 JSeqDescriptor()
-  {
-    super();
-    _nsURI = "www.jalview.org";
-    _xmlName = "JSeq";
-    _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
-
-    // -- _colour
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_colour", "colour",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        JSeq target = (JSeq) object;
-        if (!target.hasColour())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getColour());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JSeq target = (JSeq) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteColour();
-            return;
-          }
-          target.setColour(((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: _colour
-    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);
-    // -- _start
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_start", "start",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        JSeq target = (JSeq) object;
-        if (!target.hasStart())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getStart());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JSeq target = (JSeq) object;
-          // ignore null values for non optional primitives
-          if (value == null)
-          {
-            return;
-          }
-
-          target.setStart(((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.setRequired(true);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _start
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(1);
-    { // -- 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);
-    // -- _end
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_end", "end",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        JSeq target = (JSeq) object;
-        if (!target.hasEnd())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getEnd());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JSeq target = (JSeq) object;
-          // ignore null values for non optional primitives
-          if (value == null)
-          {
-            return;
-          }
-
-          target.setEnd(((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.setRequired(true);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _end
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(1);
-    { // -- 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);
-    // -- _id
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_id", "id",
-            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
-      {
-        JSeq target = (JSeq) object;
-        return target.getId();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JSeq target = (JSeq) object;
-          target.setId((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: _id
-    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);
-    // -- _hidden
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_hidden", "hidden",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        JSeq target = (JSeq) object;
-        if (!target.hasHidden())
-        {
-          return null;
-        }
-        return (target.getHidden() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JSeq target = (JSeq) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteHidden();
-            return;
-          }
-          target.setHidden(((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: _hidden
-    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);
-    // -- _viewreference
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_viewreference", "viewreference",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        JSeq target = (JSeq) object;
-        if (!target.hasViewreference())
-        {
-          return null;
-        }
-        return (target.getViewreference() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JSeq target = (JSeq) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteViewreference();
-            return;
-          }
-          target.setViewreference(((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: _viewreference
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- local scope
-      org.exolab.castor.xml.validators.BooleanValidator typeValidator;
-      typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
-      fieldValidator.setValidator(typeValidator);
-    }
-    desc.setValidator(fieldValidator);
-    // -- initialize element descriptors
-
-    // -- _featuresList
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.Features.class, "_featuresList",
-            "features", 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.getFeatures();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JSeq target = (JSeq) object;
-          target.addFeatures((jalview.schemabinding.version2.Features) 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.removeAllFeatures();
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.Features();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.jalview.org");
-    desc.setMultivalued(true);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _featuresList
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(0);
-    { // -- local scope
-    }
-    desc.setValidator(fieldValidator);
-    // -- _pdbidsList
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.Pdbids.class, "_pdbidsList",
-            "pdbids", 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.getPdbids();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JSeq target = (JSeq) object;
-          target.addPdbids((jalview.schemabinding.version2.Pdbids) 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.removeAllPdbids();
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.Pdbids();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.jalview.org");
-    desc.setMultivalued(true);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _pdbidsList
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(0);
-    { // -- local scope
-    }
-    desc.setValidator(fieldValidator);
-    // -- _hiddenSequencesList
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_hiddenSequencesList",
-            "hiddenSequences", 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.getHiddenSequences();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JSeq target = (JSeq) object;
-          // ignore null values for non optional primitives
-          if (value == null)
-          {
-            return;
-          }
-
-          target.addHiddenSequences(((java.lang.Integer) value).intValue());
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public void resetValue(Object object) throws IllegalStateException,
-              IllegalArgumentException
-      {
-        try
-        {
-          JSeq target = (JSeq) object;
-          target.removeAllHiddenSequences();
-        } 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.setNameSpaceURI("www.jalview.org");
-    desc.setMultivalued(true);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _hiddenSequencesList
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(0);
-    { // -- 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);
-    // -- _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);
-  }
-
-  // -----------/
-  // - 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.JSeq.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/JalviewModelDescriptor.java b/src/jalview/schemabinding/version2/descriptors/JalviewModelDescriptor.java
deleted file mode 100644 (file)
index f400c2c..0000000
+++ /dev/null
@@ -1,341 +0,0 @@
-/*
- * 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.JalviewModel;
-
-/**
- * Class JalviewModelDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class JalviewModelDescriptor 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 JalviewModelDescriptor()
-  {
-    super();
-    _nsURI = "www.jalview.org";
-    _xmlName = "JalviewModel";
-    _elementDefinition = false;
-
-    // -- 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
-
-    // -- initialize element descriptors
-
-    // -- _creationDate
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.util.Date.class, "_creationDate", "creationDate",
-            org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        JalviewModel target = (JalviewModel) object;
-        return target.getCreationDate();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JalviewModel target = (JalviewModel) object;
-          target.setCreationDate((java.util.Date) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new java.util.Date();
-      }
-    };
-    handler = new org.exolab.castor.xml.handlers.DateFieldHandler(handler);
-    desc.setImmutable(true);
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.jalview.org");
-    desc.setRequired(true);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _creationDate
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(1);
-    { // -- local scope
-      org.exolab.castor.xml.validators.DateTimeValidator typeValidator;
-      typeValidator = new org.exolab.castor.xml.validators.DateTimeValidator();
-      fieldValidator.setValidator(typeValidator);
-    }
-    desc.setValidator(fieldValidator);
-    // -- _version
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_version", "version",
-            org.exolab.castor.xml.NodeType.Element);
-    desc.setImmutable(true);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        JalviewModel target = (JalviewModel) object;
-        return target.getVersion();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JalviewModel target = (JalviewModel) object;
-          target.setVersion((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.setNameSpaceURI("www.jalview.org");
-    desc.setRequired(true);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _version
-    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);
-    // -- _vamsasModel
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.VamsasModel.class,
-            "_vamsasModel", "vamsasModel",
-            org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        JalviewModel target = (JalviewModel) object;
-        return target.getVamsasModel();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JalviewModel target = (JalviewModel) object;
-          target.setVamsasModel((jalview.schemabinding.version2.VamsasModel) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.VamsasModel();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.jalview.org");
-    desc.setRequired(true);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _vamsasModel
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(1);
-    { // -- local scope
-    }
-    desc.setValidator(fieldValidator);
-    // -- _jalviewModelSequence
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.JalviewModelSequence.class,
-            "_jalviewModelSequence", "-error-if-this-is-used-",
-            org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        JalviewModel target = (JalviewModel) object;
-        return target.getJalviewModelSequence();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JalviewModel target = (JalviewModel) object;
-          target.setJalviewModelSequence((jalview.schemabinding.version2.JalviewModelSequence) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.JalviewModelSequence();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setContainer(true);
-    desc.setClassDescriptor(new jalview.schemabinding.version2.descriptors.JalviewModelSequenceDescriptor());
-    desc.setNameSpaceURI("www.jalview.org");
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _jalviewModelSequence
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- 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.JalviewModel.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/JalviewModelSequenceDescriptor.java b/src/jalview/schemabinding/version2/descriptors/JalviewModelSequenceDescriptor.java
deleted file mode 100644 (file)
index e8c4ef4..0000000
+++ /dev/null
@@ -1,474 +0,0 @@
-/*
- * 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.JalviewModelSequence;
-
-/**
- * Class JalviewModelSequenceDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class JalviewModelSequenceDescriptor 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 JalviewModelSequenceDescriptor()
-  {
-    super();
-    _nsURI = "www.jalview.org";
-    _elementDefinition = false;
-
-    // -- 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
-
-    // -- initialize element descriptors
-
-    // -- _JSeqList
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.JSeq.class, "_JSeqList", "JSeq",
-            org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        JalviewModelSequence target = (JalviewModelSequence) object;
-        return target.getJSeq();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JalviewModelSequence target = (JalviewModelSequence) object;
-          target.addJSeq((jalview.schemabinding.version2.JSeq) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public void resetValue(Object object) throws IllegalStateException,
-              IllegalArgumentException
-      {
-        try
-        {
-          JalviewModelSequence target = (JalviewModelSequence) object;
-          target.removeAllJSeq();
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.JSeq();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.jalview.org");
-    desc.setMultivalued(true);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _JSeqList
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(0);
-    { // -- local scope
-    }
-    desc.setValidator(fieldValidator);
-    // -- _JGroupList
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.JGroup.class, "_JGroupList",
-            "JGroup", org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        JalviewModelSequence target = (JalviewModelSequence) object;
-        return target.getJGroup();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JalviewModelSequence target = (JalviewModelSequence) object;
-          target.addJGroup((jalview.schemabinding.version2.JGroup) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public void resetValue(Object object) throws IllegalStateException,
-              IllegalArgumentException
-      {
-        try
-        {
-          JalviewModelSequence target = (JalviewModelSequence) object;
-          target.removeAllJGroup();
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.JGroup();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.jalview.org");
-    desc.setMultivalued(true);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _JGroupList
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(0);
-    { // -- local scope
-    }
-    desc.setValidator(fieldValidator);
-    // -- _viewportList
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.Viewport.class, "_viewportList",
-            "Viewport", org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        JalviewModelSequence target = (JalviewModelSequence) object;
-        return target.getViewport();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JalviewModelSequence target = (JalviewModelSequence) object;
-          target.addViewport((jalview.schemabinding.version2.Viewport) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public void resetValue(Object object) throws IllegalStateException,
-              IllegalArgumentException
-      {
-        try
-        {
-          JalviewModelSequence target = (JalviewModelSequence) object;
-          target.removeAllViewport();
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.Viewport();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.jalview.org");
-    desc.setMultivalued(true);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _viewportList
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(0);
-    { // -- local scope
-    }
-    desc.setValidator(fieldValidator);
-    // -- _userColoursList
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.UserColours.class,
-            "_userColoursList", "UserColours",
-            org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        JalviewModelSequence target = (JalviewModelSequence) object;
-        return target.getUserColours();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JalviewModelSequence target = (JalviewModelSequence) object;
-          target.addUserColours((jalview.schemabinding.version2.UserColours) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public void resetValue(Object object) throws IllegalStateException,
-              IllegalArgumentException
-      {
-        try
-        {
-          JalviewModelSequence target = (JalviewModelSequence) object;
-          target.removeAllUserColours();
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.UserColours();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.jalview.org");
-    desc.setMultivalued(true);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _userColoursList
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(0);
-    { // -- local scope
-    }
-    desc.setValidator(fieldValidator);
-    // -- _treeList
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.Tree.class, "_treeList", "tree",
-            org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        JalviewModelSequence target = (JalviewModelSequence) object;
-        return target.getTree();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JalviewModelSequence target = (JalviewModelSequence) object;
-          target.addTree((jalview.schemabinding.version2.Tree) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public void resetValue(Object object) throws IllegalStateException,
-              IllegalArgumentException
-      {
-        try
-        {
-          JalviewModelSequence target = (JalviewModelSequence) object;
-          target.removeAllTree();
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.Tree();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.jalview.org");
-    desc.setMultivalued(true);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _treeList
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(0);
-    { // -- local scope
-    }
-    desc.setValidator(fieldValidator);
-    // -- _featureSettings
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.FeatureSettings.class,
-            "_featureSettings", "FeatureSettings",
-            org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        JalviewModelSequence target = (JalviewModelSequence) object;
-        return target.getFeatureSettings();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JalviewModelSequence target = (JalviewModelSequence) object;
-          target.setFeatureSettings((jalview.schemabinding.version2.FeatureSettings) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.FeatureSettings();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.jalview.org");
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _featureSettings
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- 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.JalviewModelSequence.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/JalviewUserColoursDescriptor.java b/src/jalview/schemabinding/version2/descriptors/JalviewUserColoursDescriptor.java
deleted file mode 100644 (file)
index 459d645..0000000
+++ /dev/null
@@ -1,380 +0,0 @@
-/*
- * 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;
-
-import jalview.schemabinding.version2.Colour;
-import jalview.schemabinding.version2.Filter;
-
-//---------------------------------/
-//- Imported classes and packages -/
-//---------------------------------/
-
-import jalview.schemabinding.version2.JalviewUserColours;
-
-/**
- * Class JalviewUserColoursDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class JalviewUserColoursDescriptor
-        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 JalviewUserColoursDescriptor()
-  {
-    super();
-    _nsURI = "www.jalview.org/colours";
-    _xmlName = "JalviewUserColours";
-    _elementDefinition = false;
-
-    // -- 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
-
-    // -- _schemeName
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_schemeName", "schemeName",
-            org.exolab.castor.xml.NodeType.Attribute);
-    desc.setImmutable(true);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      @Override
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        JalviewUserColours target = (JalviewUserColours) object;
-        return target.getSchemeName();
-      }
-
-      @Override
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JalviewUserColours target = (JalviewUserColours) object;
-          target.setSchemeName((java.lang.String) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      @Override
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return null;
-      }
-    };
-    desc.setHandler(handler);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _schemeName
-    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
-
-    // -- _version
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_version", "Version",
-            org.exolab.castor.xml.NodeType.Element);
-    desc.setImmutable(true);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      @Override
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        JalviewUserColours target = (JalviewUserColours) object;
-        return target.getVersion();
-      }
-
-      @Override
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JalviewUserColours target = (JalviewUserColours) object;
-          target.setVersion((java.lang.String) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      @Override
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return null;
-      }
-    };
-    desc.setHandler(handler);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _version
-    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);
-    // -- _colourList
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            Colour.class, "_colourList", "colour",
-            org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      @Override
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        JalviewUserColours target = (JalviewUserColours) object;
-        return target.getColour();
-      }
-
-      @Override
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JalviewUserColours target = (JalviewUserColours) object;
-          target.addColour((Colour) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      @Override
-      public void resetValue(Object object)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JalviewUserColours target = (JalviewUserColours) object;
-          target.removeAllColour();
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      @Override
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new Colour();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setMultivalued(true);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _colourList
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(0);
-    { // -- local scope
-    }
-    desc.setValidator(fieldValidator);
-    // -- _filterList
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            Filter.class, "_filterList", "filter",
-            org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      @Override
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        JalviewUserColours target = (JalviewUserColours) object;
-        return target.getFilter();
-      }
-
-      @Override
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JalviewUserColours target = (JalviewUserColours) object;
-          target.addFilter((Filter) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      @Override
-      public void resetValue(Object object)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          JalviewUserColours target = (JalviewUserColours) object;
-          target.removeAllFilter();
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      @Override
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new Filter();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setMultivalued(true);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _filterList
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(0);
-    { // -- local scope
-    }
-    desc.setValidator(fieldValidator);
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-   * Method getAccessMode.
-   * 
-   * @return the access mode specified for this class.
-   */
-  @Override
-  public org.exolab.castor.mapping.AccessMode getAccessMode()
-  {
-    return null;
-  }
-
-  /**
-   * Method getIdentity.
-   * 
-   * @return the identity field, null if this class has no identity.
-   */
-  @Override
-  public org.exolab.castor.mapping.FieldDescriptor getIdentity()
-  {
-    return super.getIdentity();
-  }
-
-  /**
-   * Method getJavaClass.
-   * 
-   * @return the Java class represented by this descriptor.
-   */
-  @Override
-  public java.lang.Class getJavaClass()
-  {
-    return jalview.schemabinding.version2.JalviewUserColours.class;
-  }
-
-  /**
-   * Method getNameSpacePrefix.
-   * 
-   * @return the namespace prefix to use when marshaling as XML.
-   */
-  @Override
-  public java.lang.String getNameSpacePrefix()
-  {
-    return _nsPrefix;
-  }
-
-  /**
-   * Method getNameSpaceURI.
-   * 
-   * @return the namespace URI used when marshaling and unmarshaling as XML.
-   */
-  @Override
-  public java.lang.String getNameSpaceURI()
-  {
-    return _nsURI;
-  }
-
-  /**
-   * Method getValidator.
-   * 
-   * @return a specific validator for the class described by this
-   *         ClassDescriptor.
-   */
-  @Override
-  public org.exolab.castor.xml.TypeValidator getValidator()
-  {
-    return this;
-  }
-
-  /**
-   * Method getXMLName.
-   * 
-   * @return the XML Name for the Class being described.
-   */
-  @Override
-  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.
-   */
-  @Override
-  public boolean isElementDefinition()
-  {
-    return _elementDefinition;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/MapListFromDescriptor.java b/src/jalview/schemabinding/version2/descriptors/MapListFromDescriptor.java
deleted file mode 100644 (file)
index 529f477..0000000
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- * 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.MapListFrom;
-
-/**
- * Class MapListFromDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class MapListFromDescriptor 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 MapListFromDescriptor()
-  {
-    super();
-    _nsURI = "www.vamsas.ac.uk/jalview/version2";
-    _xmlName = "mapListFrom";
-    _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
-
-    // -- _start
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_start", "start",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        MapListFrom target = (MapListFrom) object;
-        if (!target.hasStart())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getStart());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          MapListFrom target = (MapListFrom) object;
-          // ignore null values for non optional primitives
-          if (value == null)
-          {
-            return;
-          }
-
-          target.setStart(((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.setRequired(true);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _start
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(1);
-    { // -- 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);
-    // -- _end
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_end", "end",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        MapListFrom target = (MapListFrom) object;
-        if (!target.hasEnd())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getEnd());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          MapListFrom target = (MapListFrom) object;
-          // ignore null values for non optional primitives
-          if (value == null)
-          {
-            return;
-          }
-
-          target.setEnd(((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.setRequired(true);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _end
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(1);
-    { // -- 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
-
-  }
-
-  // -----------/
-  // - 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.MapListFrom.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/MapListToDescriptor.java b/src/jalview/schemabinding/version2/descriptors/MapListToDescriptor.java
deleted file mode 100644 (file)
index bed082a..0000000
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- * 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.MapListTo;
-
-/**
- * Class MapListToDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class MapListToDescriptor 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 MapListToDescriptor()
-  {
-    super();
-    _nsURI = "www.vamsas.ac.uk/jalview/version2";
-    _xmlName = "mapListTo";
-    _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
-
-    // -- _start
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_start", "start",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        MapListTo target = (MapListTo) object;
-        if (!target.hasStart())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getStart());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          MapListTo target = (MapListTo) object;
-          // ignore null values for non optional primitives
-          if (value == null)
-          {
-            return;
-          }
-
-          target.setStart(((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.setRequired(true);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _start
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(1);
-    { // -- 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);
-    // -- _end
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_end", "end",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        MapListTo target = (MapListTo) object;
-        if (!target.hasEnd())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getEnd());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          MapListTo target = (MapListTo) object;
-          // ignore null values for non optional primitives
-          if (value == null)
-          {
-            return;
-          }
-
-          target.setEnd(((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.setRequired(true);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _end
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(1);
-    { // -- 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
-
-  }
-
-  // -----------/
-  // - 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.MapListTo.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/MapListTypeDescriptor.java b/src/jalview/schemabinding/version2/descriptors/MapListTypeDescriptor.java
deleted file mode 100644 (file)
index fc24a78..0000000
+++ /dev/null
@@ -1,381 +0,0 @@
-/*
- * 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.MapListType;
-
-/**
- * Class MapListTypeDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class MapListTypeDescriptor 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 MapListTypeDescriptor()
-  {
-    super();
-    _nsURI = "www.vamsas.ac.uk/jalview/version2";
-    _xmlName = "mapListType";
-    _elementDefinition = false;
-
-    // -- 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
-
-    // -- _mapFromUnit
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Long.TYPE, "_mapFromUnit", "mapFromUnit",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        MapListType target = (MapListType) object;
-        if (!target.hasMapFromUnit())
-        {
-          return null;
-        }
-        return new java.lang.Long(target.getMapFromUnit());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          MapListType target = (MapListType) object;
-          // ignore null values for non optional primitives
-          if (value == null)
-          {
-            return;
-          }
-
-          target.setMapFromUnit(((java.lang.Long) value).longValue());
-        } 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: _mapFromUnit
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(1);
-    { // -- local scope
-      org.exolab.castor.xml.validators.LongValidator typeValidator;
-      typeValidator = new org.exolab.castor.xml.validators.LongValidator();
-      fieldValidator.setValidator(typeValidator);
-      typeValidator.setMinInclusive(1L);
-    }
-    desc.setValidator(fieldValidator);
-    // -- _mapToUnit
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Long.TYPE, "_mapToUnit", "mapToUnit",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        MapListType target = (MapListType) object;
-        if (!target.hasMapToUnit())
-        {
-          return null;
-        }
-        return new java.lang.Long(target.getMapToUnit());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          MapListType target = (MapListType) object;
-          // ignore null values for non optional primitives
-          if (value == null)
-          {
-            return;
-          }
-
-          target.setMapToUnit(((java.lang.Long) value).longValue());
-        } 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: _mapToUnit
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(1);
-    { // -- local scope
-      org.exolab.castor.xml.validators.LongValidator typeValidator;
-      typeValidator = new org.exolab.castor.xml.validators.LongValidator();
-      fieldValidator.setValidator(typeValidator);
-      typeValidator.setMinInclusive(1L);
-    }
-    desc.setValidator(fieldValidator);
-    // -- initialize element descriptors
-
-    // -- _mapListFromList
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.MapListFrom.class,
-            "_mapListFromList", "mapListFrom",
-            org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        MapListType target = (MapListType) object;
-        return target.getMapListFrom();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          MapListType target = (MapListType) object;
-          target.addMapListFrom((jalview.schemabinding.version2.MapListFrom) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public void resetValue(Object object) throws IllegalStateException,
-              IllegalArgumentException
-      {
-        try
-        {
-          MapListType target = (MapListType) object;
-          target.removeAllMapListFrom();
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.MapListFrom();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
-    desc.setMultivalued(true);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _mapListFromList
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(0);
-    { // -- local scope
-    }
-    desc.setValidator(fieldValidator);
-    // -- _mapListToList
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.MapListTo.class,
-            "_mapListToList", "mapListTo",
-            org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        MapListType target = (MapListType) object;
-        return target.getMapListTo();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          MapListType target = (MapListType) object;
-          target.addMapListTo((jalview.schemabinding.version2.MapListTo) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public void resetValue(Object object) throws IllegalStateException,
-              IllegalArgumentException
-      {
-        try
-        {
-          MapListType target = (MapListType) object;
-          target.removeAllMapListTo();
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.MapListTo();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
-    desc.setMultivalued(true);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _mapListToList
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(0);
-    { // -- 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.MapListType.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/MappingChoiceDescriptor.java b/src/jalview/schemabinding/version2/descriptors/MappingChoiceDescriptor.java
deleted file mode 100644 (file)
index ae460af..0000000
+++ /dev/null
@@ -1,243 +0,0 @@
-/*
- * 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.MappingChoice;
-
-/**
- * Class MappingChoiceDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class MappingChoiceDescriptor 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 MappingChoiceDescriptor()
-  {
-    super();
-    _nsURI = "www.vamsas.ac.uk/jalview/version2";
-    _elementDefinition = false;
-
-    // -- set grouping compositor
-    setCompositorAsChoice();
-    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
-
-    // -- initialize element descriptors
-
-    // -- _sequence
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.Sequence.class, "_sequence",
-            "Sequence", org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        MappingChoice target = (MappingChoice) object;
-        return target.getSequence();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          MappingChoice target = (MappingChoice) object;
-          target.setSequence((jalview.schemabinding.version2.Sequence) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.Sequence();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _sequence
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- local scope
-    }
-    desc.setValidator(fieldValidator);
-    // -- _dseqFor
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_dseqFor", "dseqFor",
-            org.exolab.castor.xml.NodeType.Element);
-    desc.setImmutable(true);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        MappingChoice target = (MappingChoice) object;
-        return target.getDseqFor();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          MappingChoice target = (MappingChoice) object;
-          target.setDseqFor((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.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _dseqFor
-    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);
-  }
-
-  // -----------/
-  // - 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.MappingChoice.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/MappingDescriptor.java b/src/jalview/schemabinding/version2/descriptors/MappingDescriptor.java
deleted file mode 100644 (file)
index fab0d2e..0000000
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * 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.Mapping;
-
-/**
- * Class MappingDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class MappingDescriptor extends
-        jalview.schemabinding.version2.descriptors.MapListTypeDescriptor
-{
-
-  // --------------------------/
-  // - 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 MappingDescriptor()
-  {
-    super();
-    setExtendsWithoutFlatten(new jalview.schemabinding.version2.descriptors.MapListTypeDescriptor());
-    _nsURI = "www.vamsas.ac.uk/jalview/version2";
-    _xmlName = "Mapping";
-    _elementDefinition = true;
-
-    // -- set grouping compositor
-    setCompositorAsChoice();
-    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
-
-    // -- initialize element descriptors
-
-    // -- _mappingChoice
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.MappingChoice.class,
-            "_mappingChoice", "-error-if-this-is-used-",
-            org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Mapping target = (Mapping) object;
-        return target.getMappingChoice();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Mapping target = (Mapping) object;
-          target.setMappingChoice((jalview.schemabinding.version2.MappingChoice) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.MappingChoice();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setContainer(true);
-    desc.setClassDescriptor(new jalview.schemabinding.version2.descriptors.MappingChoiceDescriptor());
-    desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _mappingChoice
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- 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.Mapping.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/MatchConditionDescriptor.java b/src/jalview/schemabinding/version2/descriptors/MatchConditionDescriptor.java
deleted file mode 100644 (file)
index 8373421..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * 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.MatchCondition;
-
-/**
- * Class MatchConditionDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class MatchConditionDescriptor extends
-        jalview.schemabinding.version2.descriptors.FeatureMatcherDescriptor
-{
-
-  // --------------------------/
-  // - 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 MatchConditionDescriptor()
-  {
-    super();
-    setExtendsWithoutFlatten(
-            new jalview.schemabinding.version2.descriptors.FeatureMatcherDescriptor());
-    _xmlName = "matchCondition";
-    _elementDefinition = true;
-  }
-
-  // -----------/
-  // - 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.MatchCondition.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/MatcherSetDescriptor.java b/src/jalview/schemabinding/version2/descriptors/MatcherSetDescriptor.java
deleted file mode 100644 (file)
index 2807f92..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * 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.MatcherSet;
-
-/**
- * Class MatcherSetDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class MatcherSetDescriptor extends
-        jalview.schemabinding.version2.descriptors.FeatureMatcherSetDescriptor
-{
-
-  // --------------------------/
-  // - 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 MatcherSetDescriptor()
-  {
-    super();
-    setExtendsWithoutFlatten(
-            new jalview.schemabinding.version2.descriptors.FeatureMatcherSetDescriptor());
-    _xmlName = "matcherSet";
-    _elementDefinition = true;
-  }
-
-  // -----------/
-  // - 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.MatcherSet.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/OtherDataDescriptor.java b/src/jalview/schemabinding/version2/descriptors/OtherDataDescriptor.java
deleted file mode 100644 (file)
index ab7a626..0000000
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- * 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.OtherData;
-
-/**
- * Class OtherDataDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class OtherDataDescriptor 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 OtherDataDescriptor() {
-        super();
-        _nsURI = "www.jalview.org";
-        _xmlName = "otherData";
-        _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
-        
-        //-- _key
-        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_key", "key", 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
-            {
-                OtherData target = (OtherData) object;
-                return target.getKey();
-            }
-            public void setValue( java.lang.Object object, java.lang.Object value) 
-                throws IllegalStateException, IllegalArgumentException
-            {
-                try {
-                    OtherData target = (OtherData) object;
-                    target.setKey( (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: _key
-        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);
-        //-- _key2
-        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_key2", "key2", 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
-            {
-                OtherData target = (OtherData) object;
-                return target.getKey2();
-            }
-            public void setValue( java.lang.Object object, java.lang.Object value) 
-                throws IllegalStateException, IllegalArgumentException
-            {
-                try {
-                    OtherData target = (OtherData) object;
-                    target.setKey2( (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: _key2
-        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);
-        //-- _value
-        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_value", "value", 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
-            {
-                OtherData target = (OtherData) object;
-                return target.getValue();
-            }
-            public void setValue( java.lang.Object object, java.lang.Object value) 
-                throws IllegalStateException, IllegalArgumentException
-            {
-                try {
-                    OtherData target = (OtherData) object;
-                    target.setValue( (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: _value
-        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);
-        //-- 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.OtherData.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;
-    }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/PdbentryDescriptor.java b/src/jalview/schemabinding/version2/descriptors/PdbentryDescriptor.java
deleted file mode 100644 (file)
index f19703a..0000000
+++ /dev/null
@@ -1,346 +0,0 @@
-/*
- * 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.Pdbentry;
-
-/**
- * Class PdbentryDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class PdbentryDescriptor 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 PdbentryDescriptor()
-  {
-    super();
-    _xmlName = "pdbentry";
-    _elementDefinition = false;
-    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
-
-    // -- _id
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_id", "id",
-            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
-      {
-        Pdbentry target = (Pdbentry) object;
-        return target.getId();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Pdbentry target = (Pdbentry) object;
-          target.setId((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: _id
-    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);
-    // -- _type
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_type", "type",
-            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
-      {
-        Pdbentry target = (Pdbentry) object;
-        return target.getType();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Pdbentry target = (Pdbentry) object;
-          target.setType((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: _type
-    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);
-    // -- _file
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_file", "file",
-            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
-      {
-        Pdbentry target = (Pdbentry) object;
-        return target.getFile();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Pdbentry target = (Pdbentry) object;
-          target.setFile((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: _file
-    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
-
-    // -- _items
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.PdbentryItem.class, "_items",
-            (java.lang.String) null, org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Pdbentry target = (Pdbentry) object;
-        return target.getPdbentryItem();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Pdbentry target = (Pdbentry) object;
-          target.addPdbentryItem((jalview.schemabinding.version2.PdbentryItem) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public void resetValue(Object object) throws IllegalStateException,
-              IllegalArgumentException
-      {
-        try
-        {
-          Pdbentry target = (Pdbentry) object;
-          target.removeAllPdbentryItem();
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.PdbentryItem();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setContainer(true);
-    desc.setClassDescriptor(new jalview.schemabinding.version2.descriptors.PdbentryItemDescriptor());
-    desc.setMultivalued(true);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _items
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(0);
-    { // -- 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.Pdbentry.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/PdbentryItemDescriptor.java b/src/jalview/schemabinding/version2/descriptors/PdbentryItemDescriptor.java
deleted file mode 100644 (file)
index 4e2fc87..0000000
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * 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.PdbentryItem;
-
-/**
- * Class PdbentryItemDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class PdbentryItemDescriptor 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 PdbentryItemDescriptor()
-  {
-    super();
-    _nsURI = "www.jalview.org";
-    _xmlName = "pdbentry";
-    _elementDefinition = false;
-
-    // -- 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
-
-    // -- initialize element descriptors
-
-    // -- _propertyList
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.Property.class, "_propertyList",
-            "property", org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        PdbentryItem target = (PdbentryItem) object;
-        return target.getProperty();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          PdbentryItem target = (PdbentryItem) object;
-          target.addProperty((jalview.schemabinding.version2.Property) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public void resetValue(Object object) throws IllegalStateException,
-              IllegalArgumentException
-      {
-        try
-        {
-          PdbentryItem target = (PdbentryItem) object;
-          target.removeAllProperty();
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.Property();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.jalview.org");
-    desc.setMultivalued(true);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _propertyList
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(0);
-    { // -- 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.PdbentryItem.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/PdbidsDescriptor.java b/src/jalview/schemabinding/version2/descriptors/PdbidsDescriptor.java
deleted file mode 100644 (file)
index 584607d..0000000
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- * 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.Pdbids;
-
-/**
- * Class PdbidsDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class PdbidsDescriptor extends
-        jalview.schemabinding.version2.descriptors.PdbentryDescriptor
-{
-
-  // --------------------------/
-  // - 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 PdbidsDescriptor()
-  {
-    super();
-    setExtendsWithoutFlatten(new jalview.schemabinding.version2.descriptors.PdbentryDescriptor());
-    _nsURI = "www.jalview.org";
-    _xmlName = "pdbids";
-    _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
-
-    // -- initialize element descriptors
-
-    // -- _structureStateList
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.StructureState.class,
-            "_structureStateList", "structureState",
-            org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Pdbids target = (Pdbids) object;
-        return target.getStructureState();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Pdbids target = (Pdbids) object;
-          target.addStructureState((jalview.schemabinding.version2.StructureState) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public void resetValue(Object object) throws IllegalStateException,
-              IllegalArgumentException
-      {
-        try
-        {
-          Pdbids target = (Pdbids) object;
-          target.removeAllStructureState();
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.StructureState();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.jalview.org");
-    desc.setMultivalued(true);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _structureStateList
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(0);
-    { // -- 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.Pdbids.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/PropertyDescriptor.java b/src/jalview/schemabinding/version2/descriptors/PropertyDescriptor.java
deleted file mode 100644 (file)
index 60d09b4..0000000
+++ /dev/null
@@ -1,248 +0,0 @@
-/*
- * 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.Property;
-
-/**
- * Class PropertyDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class PropertyDescriptor 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 PropertyDescriptor()
-  {
-    super();
-    _nsURI = "www.jalview.org";
-    _xmlName = "property";
-    _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
-
-    // -- _name
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_name", "name",
-            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
-      {
-        Property target = (Property) object;
-        return target.getName();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Property target = (Property) object;
-          target.setName((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: _name
-    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);
-    // -- _value
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_value", "value",
-            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
-      {
-        Property target = (Property) object;
-        return target.getValue();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Property target = (Property) object;
-          target.setValue((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: _value
-    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);
-    // -- 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.Property.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/RnaViewerDescriptor.java b/src/jalview/schemabinding/version2/descriptors/RnaViewerDescriptor.java
deleted file mode 100644 (file)
index 3344050..0000000
+++ /dev/null
@@ -1,634 +0,0 @@
-/*
- * 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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/SecondaryStructureDescriptor.java b/src/jalview/schemabinding/version2/descriptors/SecondaryStructureDescriptor.java
deleted file mode 100644 (file)
index c1e46b8..0000000
+++ /dev/null
@@ -1,345 +0,0 @@
-/*
- * 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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/SequenceDescriptor.java b/src/jalview/schemabinding/version2/descriptors/SequenceDescriptor.java
deleted file mode 100644 (file)
index 2303e1b..0000000
+++ /dev/null
@@ -1,258 +0,0 @@
-/*
- * 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.Sequence;
-
-/**
- * Class SequenceDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class SequenceDescriptor extends
-        jalview.schemabinding.version2.descriptors.SequenceTypeDescriptor
-{
-
-  // --------------------------/
-  // - 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 SequenceDescriptor()
-  {
-    super();
-    setExtendsWithoutFlatten(new jalview.schemabinding.version2.descriptors.SequenceTypeDescriptor());
-    _nsURI = "www.vamsas.ac.uk/jalview/version2";
-    _xmlName = "Sequence";
-    _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
-
-    // -- _dsseqid
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_dsseqid", "dsseqid",
-            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
-      {
-        Sequence target = (Sequence) object;
-        return target.getDsseqid();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Sequence target = (Sequence) object;
-          target.setDsseqid((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: _dsseqid
-    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
-
-    // -- _DBRefList
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.DBRef.class, "_DBRefList",
-            "DBRef", org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Sequence target = (Sequence) object;
-        return target.getDBRef();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Sequence target = (Sequence) object;
-          target.addDBRef((jalview.schemabinding.version2.DBRef) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public void resetValue(Object object) throws IllegalStateException,
-              IllegalArgumentException
-      {
-        try
-        {
-          Sequence target = (Sequence) object;
-          target.removeAllDBRef();
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.DBRef();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
-    desc.setMultivalued(true);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _DBRefList
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(0);
-    { // -- 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.Sequence.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/SequenceSetDescriptor.java b/src/jalview/schemabinding/version2/descriptors/SequenceSetDescriptor.java
deleted file mode 100644 (file)
index cd74c6e..0000000
+++ /dev/null
@@ -1,472 +0,0 @@
-/*
- * 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.SequenceSet;
-
-/**
- * Class SequenceSetDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class SequenceSetDescriptor 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 SequenceSetDescriptor()
-  {
-    super();
-    _nsURI = "www.vamsas.ac.uk/jalview/version2";
-    _xmlName = "SequenceSet";
-    _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
-
-    // -- _gapChar
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_gapChar", "gapChar",
-            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
-      {
-        SequenceSet target = (SequenceSet) object;
-        return target.getGapChar();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          SequenceSet target = (SequenceSet) object;
-          target.setGapChar((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: _gapChar
-    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);
-    // -- _datasetId
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_datasetId", "datasetId",
-            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
-      {
-        SequenceSet target = (SequenceSet) object;
-        return target.getDatasetId();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          SequenceSet target = (SequenceSet) object;
-          target.setDatasetId((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: _datasetId
-    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
-
-    // -- _sequenceList
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.Sequence.class, "_sequenceList",
-            "Sequence", org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        SequenceSet target = (SequenceSet) object;
-        return target.getSequence();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          SequenceSet target = (SequenceSet) object;
-          target.addSequence((jalview.schemabinding.version2.Sequence) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public void resetValue(Object object) throws IllegalStateException,
-              IllegalArgumentException
-      {
-        try
-        {
-          SequenceSet target = (SequenceSet) object;
-          target.removeAllSequence();
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.Sequence();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
-    desc.setMultivalued(true);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _sequenceList
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(0);
-    { // -- local scope
-    }
-    desc.setValidator(fieldValidator);
-    // -- _annotationList
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.Annotation.class,
-            "_annotationList", "Annotation",
-            org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        SequenceSet target = (SequenceSet) object;
-        return target.getAnnotation();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          SequenceSet target = (SequenceSet) object;
-          target.addAnnotation((jalview.schemabinding.version2.Annotation) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public void resetValue(Object object) throws IllegalStateException,
-              IllegalArgumentException
-      {
-        try
-        {
-          SequenceSet target = (SequenceSet) object;
-          target.removeAllAnnotation();
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.Annotation();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
-    desc.setMultivalued(true);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _annotationList
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(0);
-    { // -- local scope
-    }
-    desc.setValidator(fieldValidator);
-    // -- _sequenceSetPropertiesList
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.SequenceSetProperties.class,
-            "_sequenceSetPropertiesList", "sequenceSetProperties",
-            org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        SequenceSet target = (SequenceSet) object;
-        return target.getSequenceSetProperties();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          SequenceSet target = (SequenceSet) object;
-          target.addSequenceSetProperties((jalview.schemabinding.version2.SequenceSetProperties) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public void resetValue(Object object) throws IllegalStateException,
-              IllegalArgumentException
-      {
-        try
-        {
-          SequenceSet target = (SequenceSet) object;
-          target.removeAllSequenceSetProperties();
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.SequenceSetProperties();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
-    desc.setMultivalued(true);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _sequenceSetPropertiesList
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(0);
-    { // -- local scope
-    }
-    desc.setValidator(fieldValidator);
-    // -- _alcodonFrameList
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.AlcodonFrame.class,
-            "_alcodonFrameList", "AlcodonFrame",
-            org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        SequenceSet target = (SequenceSet) object;
-        return target.getAlcodonFrame();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          SequenceSet target = (SequenceSet) object;
-          target.addAlcodonFrame((jalview.schemabinding.version2.AlcodonFrame) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public void resetValue(Object object) throws IllegalStateException,
-              IllegalArgumentException
-      {
-        try
-        {
-          SequenceSet target = (SequenceSet) object;
-          target.removeAllAlcodonFrame();
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.AlcodonFrame();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
-    desc.setMultivalued(true);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _alcodonFrameList
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(0);
-    { // -- 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.SequenceSet.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/SequenceSetPropertiesDescriptor.java b/src/jalview/schemabinding/version2/descriptors/SequenceSetPropertiesDescriptor.java
deleted file mode 100644 (file)
index 409abdd..0000000
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * 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.SequenceSetProperties;
-
-/**
- * Class SequenceSetPropertiesDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class SequenceSetPropertiesDescriptor 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 SequenceSetPropertiesDescriptor()
-  {
-    super();
-    _nsURI = "www.vamsas.ac.uk/jalview/version2";
-    _xmlName = "sequenceSetProperties";
-    _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
-
-    // -- _key
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_key", "key",
-            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
-      {
-        SequenceSetProperties target = (SequenceSetProperties) object;
-        return target.getKey();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          SequenceSetProperties target = (SequenceSetProperties) object;
-          target.setKey((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: _key
-    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);
-    // -- _value
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_value", "value",
-            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
-      {
-        SequenceSetProperties target = (SequenceSetProperties) object;
-        return target.getValue();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          SequenceSetProperties target = (SequenceSetProperties) object;
-          target.setValue((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: _value
-    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.SequenceSetProperties.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/SequenceTypeDescriptor.java b/src/jalview/schemabinding/version2/descriptors/SequenceTypeDescriptor.java
deleted file mode 100644 (file)
index 3ee3fa9..0000000
+++ /dev/null
@@ -1,339 +0,0 @@
-/*
- * 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.SequenceType;
-
-/**
- * Class SequenceTypeDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class SequenceTypeDescriptor 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 SequenceTypeDescriptor()
-  {
-    super();
-    _nsURI = "www.vamsas.ac.uk/jalview/version2";
-    _xmlName = "SequenceType";
-    _elementDefinition = false;
-
-    // -- 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
-
-    // -- _id
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_id", "id",
-            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
-      {
-        SequenceType target = (SequenceType) object;
-        return target.getId();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          SequenceType target = (SequenceType) object;
-          target.setId((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: _id
-    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);
-    // -- _description
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_description", "description",
-            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
-      {
-        SequenceType target = (SequenceType) object;
-        return target.getDescription();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          SequenceType target = (SequenceType) object;
-          target.setDescription((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: _description
-    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
-
-    // -- _sequence
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_sequence", "sequence",
-            org.exolab.castor.xml.NodeType.Element);
-    desc.setImmutable(true);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        SequenceType target = (SequenceType) object;
-        return target.getSequence();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          SequenceType target = (SequenceType) object;
-          target.setSequence((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.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _sequence
-    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);
-    // -- _name
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_name", "name",
-            org.exolab.castor.xml.NodeType.Element);
-    desc.setImmutable(true);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        SequenceType target = (SequenceType) object;
-        return target.getName();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          SequenceType target = (SequenceType) object;
-          target.setName((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.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _name
-    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);
-  }
-
-  // -----------/
-  // - 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.SequenceType.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/SettingDescriptor.java b/src/jalview/schemabinding/version2/descriptors/SettingDescriptor.java
deleted file mode 100644 (file)
index c816e43..0000000
+++ /dev/null
@@ -1,905 +0,0 @@
-/*
- * 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.Setting;
-
-/**
- * Class SettingDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class SettingDescriptor
-        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 SettingDescriptor()
-  {
-    super();
-    _nsURI = "www.jalview.org";
-    _xmlName = "setting";
-    _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
-
-    // -- _type
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_type", "type",
-            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
-      {
-        Setting target = (Setting) object;
-        return target.getType();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Setting target = (Setting) object;
-          target.setType((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: _type
-    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);
-    // -- _colour
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_colour", "colour",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Setting target = (Setting) object;
-        if (!target.hasColour())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getColour());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Setting target = (Setting) object;
-          // ignore null values for non optional primitives
-          if (value == null)
-          {
-            return;
-          }
-
-          target.setColour(((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.setRequired(true);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _colour
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(1);
-    { // -- 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);
-    // -- _display
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_display", "display",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Setting target = (Setting) object;
-        if (!target.hasDisplay())
-        {
-          return null;
-        }
-        return (target.getDisplay() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Setting target = (Setting) object;
-          // ignore null values for non optional primitives
-          if (value == null)
-          {
-            return;
-          }
-
-          target.setDisplay(((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.setRequired(true);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _display
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(1);
-    { // -- local scope
-      org.exolab.castor.xml.validators.BooleanValidator typeValidator;
-      typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
-      fieldValidator.setValidator(typeValidator);
-    }
-    desc.setValidator(fieldValidator);
-    // -- _order
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Float.TYPE, "_order", "order",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Setting target = (Setting) object;
-        if (!target.hasOrder())
-        {
-          return null;
-        }
-        return new java.lang.Float(target.getOrder());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Setting target = (Setting) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteOrder();
-            return;
-          }
-          target.setOrder(((java.lang.Float) value).floatValue());
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return null;
-      }
-    };
-    desc.setHandler(handler);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _order
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- local scope
-      org.exolab.castor.xml.validators.FloatValidator typeValidator;
-      typeValidator = new org.exolab.castor.xml.validators.FloatValidator();
-      fieldValidator.setValidator(typeValidator);
-      typeValidator.setMinInclusive((float) -3.4028235E38);
-      typeValidator.setMaxInclusive((float) 3.4028235E38);
-    }
-    desc.setValidator(fieldValidator);
-    // -- _mincolour
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_mincolour", "mincolour",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Setting target = (Setting) object;
-        if (!target.hasMincolour())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getMincolour());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Setting target = (Setting) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteMincolour();
-            return;
-          }
-          target.setMincolour(((java.lang.Integer) value).intValue());
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return null;
-      }
-    };
-    desc.setHandler(handler);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _mincolour
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- local scope
-      org.exolab.castor.xml.validators.IntValidator typeValidator;
-      typeValidator = new org.exolab.castor.xml.validators.IntValidator();
-      fieldValidator.setValidator(typeValidator);
-      typeValidator.setMinInclusive(-2147483648);
-      typeValidator.setMaxInclusive(2147483647);
-    }
-    desc.setValidator(fieldValidator);
-    // -- _noValueColour
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.types.NoValueColour.class,
-            "_noValueColour", "noValueColour",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Setting target = (Setting) object;
-        return target.getNoValueColour();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Setting target = (Setting) object;
-          target.setNoValueColour(
-                  (jalview.schemabinding.version2.types.NoValueColour) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return null;
-      }
-    };
-    handler = new org.exolab.castor.xml.handlers.EnumFieldHandler(
-            jalview.schemabinding.version2.types.NoValueColour.class,
-            handler);
-    desc.setImmutable(true);
-    desc.setHandler(handler);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _noValueColour
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- local scope
-    }
-    desc.setValidator(fieldValidator);
-    // -- _threshold
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Float.TYPE, "_threshold", "threshold",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Setting target = (Setting) object;
-        if (!target.hasThreshold())
-        {
-          return null;
-        }
-        return new java.lang.Float(target.getThreshold());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Setting target = (Setting) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteThreshold();
-            return;
-          }
-          target.setThreshold(((java.lang.Float) value).floatValue());
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return null;
-      }
-    };
-    desc.setHandler(handler);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _threshold
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- local scope
-      org.exolab.castor.xml.validators.FloatValidator typeValidator;
-      typeValidator = new org.exolab.castor.xml.validators.FloatValidator();
-      fieldValidator.setValidator(typeValidator);
-      typeValidator.setMinInclusive((float) -3.4028235E38);
-      typeValidator.setMaxInclusive((float) 3.4028235E38);
-    }
-    desc.setValidator(fieldValidator);
-    // -- _threshstate
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_threshstate", "threshstate",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Setting target = (Setting) object;
-        if (!target.hasThreshstate())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getThreshstate());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Setting target = (Setting) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteThreshstate();
-            return;
-          }
-          target.setThreshstate(((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: _threshstate
-    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);
-    // -- _max
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Float.TYPE, "_max", "max",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Setting target = (Setting) object;
-        if (!target.hasMax())
-        {
-          return null;
-        }
-        return new java.lang.Float(target.getMax());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Setting target = (Setting) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteMax();
-            return;
-          }
-          target.setMax(((java.lang.Float) value).floatValue());
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return null;
-      }
-    };
-    desc.setHandler(handler);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _max
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- local scope
-      org.exolab.castor.xml.validators.FloatValidator typeValidator;
-      typeValidator = new org.exolab.castor.xml.validators.FloatValidator();
-      fieldValidator.setValidator(typeValidator);
-      typeValidator.setMinInclusive((float) -3.4028235E38);
-      typeValidator.setMaxInclusive((float) 3.4028235E38);
-    }
-    desc.setValidator(fieldValidator);
-    // -- _min
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Float.TYPE, "_min", "min",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Setting target = (Setting) object;
-        if (!target.hasMin())
-        {
-          return null;
-        }
-        return new java.lang.Float(target.getMin());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Setting target = (Setting) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteMin();
-            return;
-          }
-          target.setMin(((java.lang.Float) value).floatValue());
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return null;
-      }
-    };
-    desc.setHandler(handler);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _min
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- local scope
-      org.exolab.castor.xml.validators.FloatValidator typeValidator;
-      typeValidator = new org.exolab.castor.xml.validators.FloatValidator();
-      fieldValidator.setValidator(typeValidator);
-      typeValidator.setMinInclusive((float) -3.4028235E38);
-      typeValidator.setMaxInclusive((float) 3.4028235E38);
-    }
-    desc.setValidator(fieldValidator);
-    // -- _colourByLabel
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_colourByLabel", "colourByLabel",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Setting target = (Setting) object;
-        if (!target.hasColourByLabel())
-        {
-          return null;
-        }
-        return (target.getColourByLabel() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Setting target = (Setting) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteColourByLabel();
-            return;
-          }
-          target.setColourByLabel(
-                  ((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: _colourByLabel
-    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);
-    // -- _autoScale
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_autoScale", "autoScale",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Setting target = (Setting) object;
-        if (!target.hasAutoScale())
-        {
-          return null;
-        }
-        return (target.getAutoScale() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Setting target = (Setting) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteAutoScale();
-            return;
-          }
-          target.setAutoScale(((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: _autoScale
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- local scope
-      org.exolab.castor.xml.validators.BooleanValidator typeValidator;
-      typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
-      fieldValidator.setValidator(typeValidator);
-    }
-    desc.setValidator(fieldValidator);
-    // -- initialize element descriptors
-
-    // -- _attributeNameList
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_attributeNameList", "attributeName",
-            org.exolab.castor.xml.NodeType.Element);
-    desc.setImmutable(true);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Setting target = (Setting) object;
-        return target.getAttributeName();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Setting target = (Setting) object;
-          target.addAttributeName((java.lang.String) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public void resetValue(Object object)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Setting target = (Setting) object;
-          target.removeAllAttributeName();
-        } 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.setNameSpaceURI("www.jalview.org");
-    desc.setMultivalued(true);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _attributeNameList
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(0);
-    fieldValidator.setMaxOccurs(2);
-    { // -- 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);
-    // -- _matcherSet
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.MatcherSet.class, "_matcherSet",
-            "matcherSet", org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Setting target = (Setting) object;
-        return target.getMatcherSet();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Setting target = (Setting) object;
-          target.setMatcherSet(
-                  (jalview.schemabinding.version2.MatcherSet) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.MatcherSet();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.jalview.org");
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _matcherSet
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- 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.Setting.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/StructureStateDescriptor.java b/src/jalview/schemabinding/version2/descriptors/StructureStateDescriptor.java
deleted file mode 100644 (file)
index 16d091b..0000000
+++ /dev/null
@@ -1,727 +0,0 @@
-/*
- * 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.StructureState;
-
-/**
- * Class StructureStateDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class StructureStateDescriptor 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 StructureStateDescriptor()
-  {
-    super();
-    _nsURI = "www.jalview.org";
-    _xmlName = "structureState";
-    _elementDefinition = true;
-    org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
-    org.exolab.castor.mapping.FieldHandler handler = null;
-    org.exolab.castor.xml.FieldValidator fieldValidator = null;
-    // -- _content
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_content", "PCDATA",
-            org.exolab.castor.xml.NodeType.Text);
-    desc.setImmutable(true);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        StructureState target = (StructureState) object;
-        return target.getContent();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          StructureState target = (StructureState) object;
-          target.setContent((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);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _content
-    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 attribute descriptors
-
-    // -- _visible
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_visible", "visible",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        StructureState target = (StructureState) object;
-        if (!target.hasVisible())
-        {
-          return null;
-        }
-        return (target.getVisible() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          StructureState target = (StructureState) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteVisible();
-            return;
-          }
-          target.setVisible(((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: _visible
-    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);
-    // -- _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
-      {
-        StructureState target = (StructureState) object;
-        return target.getViewId();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          StructureState target = (StructureState) 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);
-    // -- _alignwithAlignPanel
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_alignwithAlignPanel",
-            "alignwithAlignPanel", org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        StructureState target = (StructureState) object;
-        if (!target.hasAlignwithAlignPanel())
-        {
-          return null;
-        }
-        return (target.getAlignwithAlignPanel() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          StructureState target = (StructureState) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteAlignwithAlignPanel();
-            return;
-          }
-          target.setAlignwithAlignPanel(((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: _alignwithAlignPanel
-    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);
-    // -- _colourwithAlignPanel
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_colourwithAlignPanel",
-            "colourwithAlignPanel",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        StructureState target = (StructureState) object;
-        if (!target.hasColourwithAlignPanel())
-        {
-          return null;
-        }
-        return (target.getColourwithAlignPanel() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          StructureState target = (StructureState) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteColourwithAlignPanel();
-            return;
-          }
-          target.setColourwithAlignPanel(((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: _colourwithAlignPanel
-    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);
-    // -- _colourByJmol
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_colourByJmol", "colourByJmol",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        StructureState target = (StructureState) object;
-        if (!target.hasColourByJmol())
-        {
-          return null;
-        }
-        return (target.getColourByJmol() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          StructureState target = (StructureState) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteColourByJmol();
-            return;
-          }
-          target.setColourByJmol(((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: _colourByJmol
-    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);
-    // -- _type
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_type", "type",
-            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
-      {
-        StructureState target = (StructureState) object;
-        return target.getType();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          StructureState target = (StructureState) object;
-          target.setType((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: _type
-    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);
-    // -- _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
-      {
-        StructureState target = (StructureState) 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
-        {
-          StructureState target = (StructureState) 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
-      {
-        StructureState target = (StructureState) 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
-        {
-          StructureState target = (StructureState) 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
-      {
-        StructureState target = (StructureState) 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
-        {
-          StructureState target = (StructureState) 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
-      {
-        StructureState target = (StructureState) 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
-        {
-          StructureState target = (StructureState) 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
-
-  }
-
-  // -----------/
-  // - 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.StructureState.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/ThresholdLineDescriptor.java b/src/jalview/schemabinding/version2/descriptors/ThresholdLineDescriptor.java
deleted file mode 100644 (file)
index 8a863d8..0000000
+++ /dev/null
@@ -1,309 +0,0 @@
-/*
- * 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.ThresholdLine;
-
-/**
- * Class ThresholdLineDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class ThresholdLineDescriptor 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 ThresholdLineDescriptor()
-  {
-    super();
-    _nsURI = "www.vamsas.ac.uk/jalview/version2";
-    _xmlName = "thresholdLine";
-    _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
-
-    // -- _label
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_label", "label",
-            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
-      {
-        ThresholdLine target = (ThresholdLine) object;
-        return target.getLabel();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          ThresholdLine target = (ThresholdLine) object;
-          target.setLabel((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: _label
-    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);
-    // -- _value
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Float.TYPE, "_value", "value",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        ThresholdLine target = (ThresholdLine) object;
-        if (!target.hasValue())
-        {
-          return null;
-        }
-        return new java.lang.Float(target.getValue());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          ThresholdLine target = (ThresholdLine) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteValue();
-            return;
-          }
-          target.setValue(((java.lang.Float) value).floatValue());
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return null;
-      }
-    };
-    desc.setHandler(handler);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _value
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- local scope
-      org.exolab.castor.xml.validators.FloatValidator typeValidator;
-      typeValidator = new org.exolab.castor.xml.validators.FloatValidator();
-      fieldValidator.setValidator(typeValidator);
-      typeValidator.setMinInclusive((float) -3.4028235E38);
-      typeValidator.setMaxInclusive((float) 3.4028235E38);
-    }
-    desc.setValidator(fieldValidator);
-    // -- _colour
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_colour", "colour",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        ThresholdLine target = (ThresholdLine) object;
-        if (!target.hasColour())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getColour());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          ThresholdLine target = (ThresholdLine) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteColour();
-            return;
-          }
-          target.setColour(((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: _colour
-    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
-
-  }
-
-  // -----------/
-  // - 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.ThresholdLine.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/TreeDescriptor.java b/src/jalview/schemabinding/version2/descriptors/TreeDescriptor.java
deleted file mode 100644 (file)
index 8e675f3..0000000
+++ /dev/null
@@ -1,995 +0,0 @@
-/*
- * 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.Tree;
-
-/**
- * Class TreeDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class TreeDescriptor 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 TreeDescriptor()
-  {
-    super();
-    _nsURI = "www.jalview.org";
-    _xmlName = "tree";
-    _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
-
-    // -- _fontName
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_fontName", "fontName",
-            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
-      {
-        Tree target = (Tree) object;
-        return target.getFontName();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Tree target = (Tree) object;
-          target.setFontName((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: _fontName
-    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);
-    // -- _fontSize
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_fontSize", "fontSize",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Tree target = (Tree) object;
-        if (!target.hasFontSize())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getFontSize());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Tree target = (Tree) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteFontSize();
-            return;
-          }
-          target.setFontSize(((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: _fontSize
-    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);
-    // -- _fontStyle
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_fontStyle", "fontStyle",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Tree target = (Tree) object;
-        if (!target.hasFontStyle())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getFontStyle());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Tree target = (Tree) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteFontStyle();
-            return;
-          }
-          target.setFontStyle(((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: _fontStyle
-    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);
-    // -- _threshold
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Float.TYPE, "_threshold", "threshold",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Tree target = (Tree) object;
-        if (!target.hasThreshold())
-        {
-          return null;
-        }
-        return new java.lang.Float(target.getThreshold());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Tree target = (Tree) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteThreshold();
-            return;
-          }
-          target.setThreshold(((java.lang.Float) value).floatValue());
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return null;
-      }
-    };
-    desc.setHandler(handler);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _threshold
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- local scope
-      org.exolab.castor.xml.validators.FloatValidator typeValidator;
-      typeValidator = new org.exolab.castor.xml.validators.FloatValidator();
-      fieldValidator.setValidator(typeValidator);
-      typeValidator.setMinInclusive((float) -3.4028235E38);
-      typeValidator.setMaxInclusive((float) 3.4028235E38);
-    }
-    desc.setValidator(fieldValidator);
-    // -- _showBootstrap
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_showBootstrap", "showBootstrap",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Tree target = (Tree) object;
-        if (!target.hasShowBootstrap())
-        {
-          return null;
-        }
-        return (target.getShowBootstrap() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Tree target = (Tree) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteShowBootstrap();
-            return;
-          }
-          target.setShowBootstrap(((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: _showBootstrap
-    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);
-    // -- _showDistances
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_showDistances", "showDistances",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Tree target = (Tree) object;
-        if (!target.hasShowDistances())
-        {
-          return null;
-        }
-        return (target.getShowDistances() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Tree target = (Tree) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteShowDistances();
-            return;
-          }
-          target.setShowDistances(((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: _showDistances
-    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);
-    // -- _markUnlinked
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_markUnlinked", "markUnlinked",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Tree target = (Tree) object;
-        if (!target.hasMarkUnlinked())
-        {
-          return null;
-        }
-        return (target.getMarkUnlinked() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Tree target = (Tree) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteMarkUnlinked();
-            return;
-          }
-          target.setMarkUnlinked(((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: _markUnlinked
-    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);
-    // -- _fitToWindow
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_fitToWindow", "fitToWindow",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Tree target = (Tree) object;
-        if (!target.hasFitToWindow())
-        {
-          return null;
-        }
-        return (target.getFitToWindow() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Tree target = (Tree) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteFitToWindow();
-            return;
-          }
-          target.setFitToWindow(((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: _fitToWindow
-    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);
-    // -- _currentTree
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_currentTree", "currentTree",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Tree target = (Tree) object;
-        if (!target.hasCurrentTree())
-        {
-          return null;
-        }
-        return (target.getCurrentTree() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Tree target = (Tree) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteCurrentTree();
-            return;
-          }
-          target.setCurrentTree(((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: _currentTree
-    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);
-    // -- _id
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_id", "id",
-            org.exolab.castor.xml.NodeType.Attribute);
-    super.setIdentity(desc);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Tree target = (Tree) object;
-        return target.getId();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Tree target = (Tree) object;
-          target.setId((java.lang.String) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new java.lang.String();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _id
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- local scope
-      org.exolab.castor.xml.validators.IdValidator typeValidator;
-      typeValidator = new org.exolab.castor.xml.validators.IdValidator();
-      fieldValidator.setValidator(typeValidator);
-    }
-    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
-      {
-        Tree target = (Tree) 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
-        {
-          Tree target = (Tree) 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
-      {
-        Tree target = (Tree) 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
-        {
-          Tree target = (Tree) 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
-      {
-        Tree target = (Tree) 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
-        {
-          Tree target = (Tree) 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
-      {
-        Tree target = (Tree) 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
-        {
-          Tree target = (Tree) 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
-
-    // -- _title
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_title", "title",
-            org.exolab.castor.xml.NodeType.Element);
-    desc.setImmutable(true);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Tree target = (Tree) object;
-        return target.getTitle();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Tree target = (Tree) 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.setNameSpaceURI("www.jalview.org");
-    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);
-    // -- _newick
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_newick", "newick",
-            org.exolab.castor.xml.NodeType.Element);
-    desc.setImmutable(true);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Tree target = (Tree) object;
-        return target.getNewick();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Tree target = (Tree) object;
-          target.setNewick((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.setNameSpaceURI("www.jalview.org");
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _newick
-    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);
-  }
-
-  // -----------/
-  // - 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.Tree.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/UserColourSchemeDescriptor.java b/src/jalview/schemabinding/version2/descriptors/UserColourSchemeDescriptor.java
deleted file mode 100644 (file)
index df9ab07..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * 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.UserColourScheme;
-
-/**
- * Class UserColourSchemeDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class UserColourSchemeDescriptor
-        extends
-        jalview.schemabinding.version2.descriptors.JalviewUserColoursDescriptor
-{
-
-  // --------------------------/
-  // - 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 UserColourSchemeDescriptor()
-  {
-    super();
-    setExtendsWithoutFlatten(new jalview.schemabinding.version2.descriptors.JalviewUserColoursDescriptor());
-    _nsURI = "www.jalview.org";
-    _xmlName = "UserColourScheme";
-    _elementDefinition = true;
-  }
-
-  // -----------/
-  // - 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.UserColourScheme.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/UserColoursDescriptor.java b/src/jalview/schemabinding/version2/descriptors/UserColoursDescriptor.java
deleted file mode 100644 (file)
index 53dfde4..0000000
+++ /dev/null
@@ -1,246 +0,0 @@
-/*
- * 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.UserColours;
-
-/**
- * Class UserColoursDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class UserColoursDescriptor 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 UserColoursDescriptor()
-  {
-    super();
-    _nsURI = "www.jalview.org";
-    _xmlName = "UserColours";
-    _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
-
-    // -- _id
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_id", "id",
-            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
-      {
-        UserColours target = (UserColours) object;
-        return target.getId();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          UserColours target = (UserColours) object;
-          target.setId((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: _id
-    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
-
-    // -- _userColourScheme
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.UserColourScheme.class,
-            "_userColourScheme", "UserColourScheme",
-            org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        UserColours target = (UserColours) object;
-        return target.getUserColourScheme();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          UserColours target = (UserColours) object;
-          target.setUserColourScheme((jalview.schemabinding.version2.UserColourScheme) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.UserColourScheme();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.jalview.org");
-    desc.setRequired(true);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _userColourScheme
-    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.UserColours.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/VAMSASDescriptor.java b/src/jalview/schemabinding/version2/descriptors/VAMSASDescriptor.java
deleted file mode 100644 (file)
index e3470ee..0000000
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
- * 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.VAMSAS;
-
-/**
- * Class VAMSASDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class VAMSASDescriptor 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 VAMSASDescriptor()
-  {
-    super();
-    _nsURI = "www.vamsas.ac.uk/jalview/version2";
-    _xmlName = "VAMSAS";
-    _elementDefinition = false;
-
-    // -- 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
-
-    // -- initialize element descriptors
-
-    // -- _treeList
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_treeList", "Tree",
-            org.exolab.castor.xml.NodeType.Element);
-    desc.setImmutable(true);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        VAMSAS target = (VAMSAS) object;
-        return target.getTree();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          VAMSAS target = (VAMSAS) object;
-          target.addTree((java.lang.String) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public void resetValue(Object object) throws IllegalStateException,
-              IllegalArgumentException
-      {
-        try
-        {
-          VAMSAS target = (VAMSAS) object;
-          target.removeAllTree();
-        } 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.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
-    desc.setMultivalued(true);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _treeList
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(0);
-    { // -- 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);
-    // -- _sequenceSetList
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.SequenceSet.class,
-            "_sequenceSetList", "SequenceSet",
-            org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        VAMSAS target = (VAMSAS) object;
-        return target.getSequenceSet();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          VAMSAS target = (VAMSAS) object;
-          target.addSequenceSet((jalview.schemabinding.version2.SequenceSet) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public void resetValue(Object object) throws IllegalStateException,
-              IllegalArgumentException
-      {
-        try
-        {
-          VAMSAS target = (VAMSAS) object;
-          target.removeAllSequenceSet();
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.SequenceSet();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
-    desc.setMultivalued(true);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _sequenceSetList
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(0);
-    { // -- 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.VAMSAS.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/VamsasModelDescriptor.java b/src/jalview/schemabinding/version2/descriptors/VamsasModelDescriptor.java
deleted file mode 100644 (file)
index 3e26611..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * 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.VamsasModel;
-
-/**
- * Class VamsasModelDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class VamsasModelDescriptor extends
-        jalview.schemabinding.version2.descriptors.VAMSASDescriptor
-{
-
-  // --------------------------/
-  // - 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 VamsasModelDescriptor()
-  {
-    super();
-    setExtendsWithoutFlatten(new jalview.schemabinding.version2.descriptors.VAMSASDescriptor());
-    _nsURI = "www.jalview.org";
-    _xmlName = "vamsasModel";
-    _elementDefinition = true;
-  }
-
-  // -----------/
-  // - 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.VamsasModel.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/ViewportDescriptor.java b/src/jalview/schemabinding/version2/descriptors/ViewportDescriptor.java
deleted file mode 100644 (file)
index 1df3988..0000000
+++ /dev/null
@@ -1,2717 +0,0 @@
-/*
- * 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.Viewport;
-
-/**
- * Class ViewportDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class ViewportDescriptor 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 ViewportDescriptor()
-  {
-    super();
-    _nsURI = "www.jalview.org";
-    _xmlName = "Viewport";
-    _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
-
-    // -- _conservationSelected
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_conservationSelected",
-            "conservationSelected",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        if (!target.hasConservationSelected())
-        {
-          return null;
-        }
-        return (target.getConservationSelected() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteConservationSelected();
-            return;
-          }
-          target.setConservationSelected(((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: _conservationSelected
-    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);
-    // -- _pidSelected
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_pidSelected", "pidSelected",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        if (!target.hasPidSelected())
-        {
-          return null;
-        }
-        return (target.getPidSelected() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deletePidSelected();
-            return;
-          }
-          target.setPidSelected(((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: _pidSelected
-    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);
-    // -- _bgColour
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_bgColour", "bgColour",
-            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
-      {
-        Viewport target = (Viewport) object;
-        return target.getBgColour();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          target.setBgColour((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: _bgColour
-    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);
-    // -- _consThreshold
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_consThreshold", "consThreshold",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        if (!target.hasConsThreshold())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getConsThreshold());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteConsThreshold();
-            return;
-          }
-          target.setConsThreshold(((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: _consThreshold
-    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);
-    // -- _pidThreshold
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_pidThreshold", "pidThreshold",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        if (!target.hasPidThreshold())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getPidThreshold());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deletePidThreshold();
-            return;
-          }
-          target.setPidThreshold(((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: _pidThreshold
-    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);
-    // -- _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
-      {
-        Viewport target = (Viewport) object;
-        return target.getTitle();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) 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);
-    // -- _showFullId
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_showFullId", "showFullId",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        if (!target.hasShowFullId())
-        {
-          return null;
-        }
-        return (target.getShowFullId() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteShowFullId();
-            return;
-          }
-          target.setShowFullId(((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: _showFullId
-    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);
-    // -- _rightAlignIds
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_rightAlignIds", "rightAlignIds",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        if (!target.hasRightAlignIds())
-        {
-          return null;
-        }
-        return (target.getRightAlignIds() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteRightAlignIds();
-            return;
-          }
-          target.setRightAlignIds(((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: _rightAlignIds
-    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);
-    // -- _showText
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_showText", "showText",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        if (!target.hasShowText())
-        {
-          return null;
-        }
-        return (target.getShowText() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteShowText();
-            return;
-          }
-          target.setShowText(((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: _showText
-    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);
-    // -- _showColourText
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_showColourText", "showColourText",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        if (!target.hasShowColourText())
-        {
-          return null;
-        }
-        return (target.getShowColourText() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteShowColourText();
-            return;
-          }
-          target.setShowColourText(((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: _showColourText
-    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);
-    // -- _showUnconserved
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_showUnconserved", "showUnconserved",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        if (!target.hasShowUnconserved())
-        {
-          return null;
-        }
-        return (target.getShowUnconserved() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteShowUnconserved();
-            return;
-          }
-          target.setShowUnconserved(((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: _showUnconserved
-    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);
-    // -- _showBoxes
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_showBoxes", "showBoxes",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        if (!target.hasShowBoxes())
-        {
-          return null;
-        }
-        return (target.getShowBoxes() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteShowBoxes();
-            return;
-          }
-          target.setShowBoxes(((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: _showBoxes
-    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);
-    // -- _wrapAlignment
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_wrapAlignment", "wrapAlignment",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        if (!target.hasWrapAlignment())
-        {
-          return null;
-        }
-        return (target.getWrapAlignment() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteWrapAlignment();
-            return;
-          }
-          target.setWrapAlignment(((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: _wrapAlignment
-    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);
-    // -- _renderGaps
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_renderGaps", "renderGaps",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        if (!target.hasRenderGaps())
-        {
-          return null;
-        }
-        return (target.getRenderGaps() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteRenderGaps();
-            return;
-          }
-          target.setRenderGaps(((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: _renderGaps
-    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);
-    // -- _showSequenceFeatures
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_showSequenceFeatures",
-            "showSequenceFeatures",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        if (!target.hasShowSequenceFeatures())
-        {
-          return null;
-        }
-        return (target.getShowSequenceFeatures() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteShowSequenceFeatures();
-            return;
-          }
-          target.setShowSequenceFeatures(((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: _showSequenceFeatures
-    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);
-    // -- _showNPfeatureTooltip
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_showNPfeatureTooltip",
-            "showNPfeatureTooltip",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        if (!target.hasShowNPfeatureTooltip())
-        {
-          return null;
-        }
-        return (target.getShowNPfeatureTooltip() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteShowNPfeatureTooltip();
-            return;
-          }
-          target.setShowNPfeatureTooltip(((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: _showNPfeatureTooltip
-    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);
-    // -- _showDbRefTooltip
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_showDbRefTooltip",
-            "showDbRefTooltip", org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        if (!target.hasShowDbRefTooltip())
-        {
-          return null;
-        }
-        return (target.getShowDbRefTooltip() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteShowDbRefTooltip();
-            return;
-          }
-          target.setShowDbRefTooltip(((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: _showDbRefTooltip
-    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);
-    // -- _followHighlight
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_followHighlight", "followHighlight",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        if (!target.hasFollowHighlight())
-        {
-          return null;
-        }
-        return (target.getFollowHighlight() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteFollowHighlight();
-            return;
-          }
-          target.setFollowHighlight(((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: _followHighlight
-    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);
-    // -- _followSelection
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_followSelection", "followSelection",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        if (!target.hasFollowSelection())
-        {
-          return null;
-        }
-        return (target.getFollowSelection() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteFollowSelection();
-            return;
-          }
-          target.setFollowSelection(((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: _followSelection
-    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);
-    // -- _showAnnotation
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_showAnnotation", "showAnnotation",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        if (!target.hasShowAnnotation())
-        {
-          return null;
-        }
-        return (target.getShowAnnotation() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteShowAnnotation();
-            return;
-          }
-          target.setShowAnnotation(((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: _showAnnotation
-    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);
-    // -- _centreColumnLabels
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_centreColumnLabels",
-            "centreColumnLabels", org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        if (!target.hasCentreColumnLabels())
-        {
-          return null;
-        }
-        return (target.getCentreColumnLabels() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteCentreColumnLabels();
-            return;
-          }
-          target.setCentreColumnLabels(((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: _centreColumnLabels
-    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);
-    // -- _showGroupConservation
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_showGroupConservation",
-            "showGroupConservation",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        if (!target.hasShowGroupConservation())
-        {
-          return null;
-        }
-        return (target.getShowGroupConservation() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteShowGroupConservation();
-            return;
-          }
-          target.setShowGroupConservation(((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: _showGroupConservation
-    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);
-    // -- _showGroupConsensus
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_showGroupConsensus",
-            "showGroupConsensus", org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        if (!target.hasShowGroupConsensus())
-        {
-          return null;
-        }
-        return (target.getShowGroupConsensus() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteShowGroupConsensus();
-            return;
-          }
-          target.setShowGroupConsensus(((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: _showGroupConsensus
-    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);
-    // -- _showConsensusHistogram
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_showConsensusHistogram",
-            "showConsensusHistogram",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        if (!target.hasShowConsensusHistogram())
-        {
-          return null;
-        }
-        return (target.getShowConsensusHistogram() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteShowConsensusHistogram();
-            return;
-          }
-          target.setShowConsensusHistogram(((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: _showConsensusHistogram
-    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);
-    // -- _showSequenceLogo
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_showSequenceLogo",
-            "showSequenceLogo", org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        if (!target.hasShowSequenceLogo())
-        {
-          return null;
-        }
-        return (target.getShowSequenceLogo() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteShowSequenceLogo();
-            return;
-          }
-          target.setShowSequenceLogo(((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: _showSequenceLogo
-    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);
-    // -- _normaliseSequenceLogo
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_normaliseSequenceLogo",
-            "normaliseSequenceLogo",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        if (!target.hasNormaliseSequenceLogo())
-        {
-          return null;
-        }
-        return (target.getNormaliseSequenceLogo() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteNormaliseSequenceLogo();
-            return;
-          }
-          target.setNormaliseSequenceLogo(((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: _normaliseSequenceLogo
-    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);
-    // -- _ignoreGapsinConsensus
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_ignoreGapsinConsensus",
-            "ignoreGapsinConsensus",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        if (!target.hasIgnoreGapsinConsensus())
-        {
-          return null;
-        }
-        return (target.getIgnoreGapsinConsensus() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteIgnoreGapsinConsensus();
-            return;
-          }
-          target.setIgnoreGapsinConsensus(((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: _ignoreGapsinConsensus
-    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);
-    // -- _startRes
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_startRes", "startRes",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        if (!target.hasStartRes())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getStartRes());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteStartRes();
-            return;
-          }
-          target.setStartRes(((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: _startRes
-    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);
-    // -- _startSeq
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_startSeq", "startSeq",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        if (!target.hasStartSeq())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getStartSeq());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteStartSeq();
-            return;
-          }
-          target.setStartSeq(((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: _startSeq
-    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);
-    // -- _fontName
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_fontName", "fontName",
-            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
-      {
-        Viewport target = (Viewport) object;
-        return target.getFontName();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          target.setFontName((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: _fontName
-    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);
-    // -- _fontSize
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_fontSize", "fontSize",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        if (!target.hasFontSize())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getFontSize());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteFontSize();
-            return;
-          }
-          target.setFontSize(((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: _fontSize
-    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);
-    // -- _fontStyle
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_fontStyle", "fontStyle",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        if (!target.hasFontStyle())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getFontStyle());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteFontStyle();
-            return;
-          }
-          target.setFontStyle(((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: _fontStyle
-    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);
-    // -- _scaleProteinAsCdna
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_scaleProteinAsCdna",
-            "scaleProteinAsCdna", org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        if (!target.hasScaleProteinAsCdna())
-        {
-          return null;
-        }
-        return (target.getScaleProteinAsCdna() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteScaleProteinAsCdna();
-            return;
-          }
-          target.setScaleProteinAsCdna(((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: _scaleProteinAsCdna
-    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);
-    // -- _viewName
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_viewName", "viewName",
-            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
-      {
-        Viewport target = (Viewport) object;
-        return target.getViewName();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          target.setViewName((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: _viewName
-    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);
-    // -- _sequenceSetId
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_sequenceSetId", "sequenceSetId",
-            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
-      {
-        Viewport target = (Viewport) object;
-        return target.getSequenceSetId();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          target.setSequenceSetId((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: _sequenceSetId
-    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);
-    // -- _gatheredViews
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Boolean.TYPE, "_gatheredViews", "gatheredViews",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        if (!target.hasGatheredViews())
-        {
-          return null;
-        }
-        return (target.getGatheredViews() ? java.lang.Boolean.TRUE
-                : java.lang.Boolean.FALSE);
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteGatheredViews();
-            return;
-          }
-          target.setGatheredViews(((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: _gatheredViews
-    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);
-    // -- _textCol1
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_textCol1", "textCol1",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        if (!target.hasTextCol1())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getTextCol1());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteTextCol1();
-            return;
-          }
-          target.setTextCol1(((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: _textCol1
-    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);
-    // -- _textCol2
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_textCol2", "textCol2",
-            org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        if (!target.hasTextCol2())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getTextCol2());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteTextCol2();
-            return;
-          }
-          target.setTextCol2(((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: _textCol2
-    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);
-    // -- _textColThreshold
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.Integer.TYPE, "_textColThreshold",
-            "textColThreshold", org.exolab.castor.xml.NodeType.Attribute);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        if (!target.hasTextColThreshold())
-        {
-          return null;
-        }
-        return new java.lang.Integer(target.getTextColThreshold());
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          // if null, use delete method for optional primitives
-          if (value == null)
-          {
-            target.deleteTextColThreshold();
-            return;
-          }
-          target.setTextColThreshold(((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: _textColThreshold
-    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);
-    // -- _id
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_id", "id",
-            org.exolab.castor.xml.NodeType.Attribute);
-    super.setIdentity(desc);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        return target.getId();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          target.setId((java.lang.String) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new java.lang.String();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _id
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- local scope
-      org.exolab.castor.xml.validators.IdValidator typeValidator;
-      typeValidator = new org.exolab.castor.xml.validators.IdValidator();
-      fieldValidator.setValidator(typeValidator);
-    }
-    desc.setValidator(fieldValidator);
-    // -- _complementId
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_complementId", "complementId",
-            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
-      {
-        Viewport target = (Viewport) object;
-        return target.getComplementId();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          target.setComplementId((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: _complementId
-    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);
-    // -- _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
-      {
-        Viewport target = (Viewport) 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
-        {
-          Viewport target = (Viewport) 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
-      {
-        Viewport target = (Viewport) 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
-        {
-          Viewport target = (Viewport) 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
-      {
-        Viewport target = (Viewport) 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
-        {
-          Viewport target = (Viewport) 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
-      {
-        Viewport target = (Viewport) 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
-        {
-          Viewport target = (Viewport) 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
-
-    // -- _annotationColours
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.AnnotationColours.class,
-            "_annotationColours", "AnnotationColours",
-            org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        return target.getAnnotationColours();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          target.setAnnotationColours((jalview.schemabinding.version2.AnnotationColours) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.AnnotationColours();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.jalview.org");
-    desc.setMultivalued(false);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _annotationColours
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    { // -- local scope
-    }
-    desc.setValidator(fieldValidator);
-    // -- _hiddenColumnsList
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.HiddenColumns.class,
-            "_hiddenColumnsList", "hiddenColumns",
-            org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        return target.getHiddenColumns();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          target.addHiddenColumns((jalview.schemabinding.version2.HiddenColumns) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public void resetValue(Object object) throws IllegalStateException,
-              IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          target.removeAllHiddenColumns();
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.HiddenColumns();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.jalview.org");
-    desc.setMultivalued(true);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _hiddenColumnsList
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(0);
-    { // -- local scope
-    }
-    desc.setValidator(fieldValidator);
-    // -- _calcIdParamList
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            jalview.schemabinding.version2.CalcIdParam.class,
-            "_calcIdParamList", "calcIdParam",
-            org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        Viewport target = (Viewport) object;
-        return target.getCalcIdParam();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          target.addCalcIdParam((jalview.schemabinding.version2.CalcIdParam) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public void resetValue(Object object) throws IllegalStateException,
-              IllegalArgumentException
-      {
-        try
-        {
-          Viewport target = (Viewport) object;
-          target.removeAllCalcIdParam();
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new jalview.schemabinding.version2.CalcIdParam();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setNameSpaceURI("www.jalview.org");
-    desc.setMultivalued(true);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _calcIdParamList
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(0);
-    { // -- 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.Viewport.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/descriptors/WebServiceParameterSetDescriptor.java b/src/jalview/schemabinding/version2/descriptors/WebServiceParameterSetDescriptor.java
deleted file mode 100644 (file)
index beb5b50..0000000
+++ /dev/null
@@ -1,396 +0,0 @@
-/*
- * 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.WebServiceParameterSet;
-
-/**
- * Class WebServiceParameterSetDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class WebServiceParameterSetDescriptor 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 WebServiceParameterSetDescriptor()
-  {
-    super();
-    _nsURI = "www.jalview.org/xml/wsparamset";
-    _xmlName = "WebServiceParameterSet";
-    _elementDefinition = false;
-
-    // -- 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
-
-    // -- _name
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_name", "name",
-            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
-      {
-        WebServiceParameterSet target = (WebServiceParameterSet) object;
-        return target.getName();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          WebServiceParameterSet target = (WebServiceParameterSet) object;
-          target.setName((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: _name
-    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);
-    // -- initialize element descriptors
-
-    // -- _version
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_version", "Version",
-            org.exolab.castor.xml.NodeType.Element);
-    desc.setImmutable(true);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        WebServiceParameterSet target = (WebServiceParameterSet) object;
-        return target.getVersion();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          WebServiceParameterSet target = (WebServiceParameterSet) object;
-          target.setVersion((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: _version
-    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);
-    // -- _description
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_description", "description",
-            org.exolab.castor.xml.NodeType.Element);
-    desc.setImmutable(true);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        WebServiceParameterSet target = (WebServiceParameterSet) object;
-        return target.getDescription();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          WebServiceParameterSet target = (WebServiceParameterSet) object;
-          target.setDescription((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: _description
-    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);
-    // -- _serviceURLList
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_serviceURLList", "serviceURL",
-            org.exolab.castor.xml.NodeType.Element);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        WebServiceParameterSet target = (WebServiceParameterSet) object;
-        return target.getServiceURL();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          WebServiceParameterSet target = (WebServiceParameterSet) object;
-          target.addServiceURL((java.lang.String) value);
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public void resetValue(Object object) throws IllegalStateException,
-              IllegalArgumentException
-      {
-        try
-        {
-          WebServiceParameterSet target = (WebServiceParameterSet) object;
-          target.removeAllServiceURL();
-        } catch (java.lang.Exception ex)
-        {
-          throw new IllegalStateException(ex.toString());
-        }
-      }
-
-      public java.lang.Object newInstance(java.lang.Object parent)
-      {
-        return new java.lang.String();
-      }
-    };
-    desc.setHandler(handler);
-    desc.setRequired(true);
-    desc.setMultivalued(true);
-    addFieldDescriptor(desc);
-
-    // -- validation code for: _serviceURLList
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();
-    fieldValidator.setMinOccurs(1);
-    { // -- local scope
-    }
-    desc.setValidator(fieldValidator);
-    // -- _parameters
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
-            java.lang.String.class, "_parameters", "parameters",
-            org.exolab.castor.xml.NodeType.Element);
-    desc.setImmutable(true);
-    handler = new org.exolab.castor.xml.XMLFieldHandler()
-    {
-      public java.lang.Object getValue(java.lang.Object object)
-              throws IllegalStateException
-      {
-        WebServiceParameterSet target = (WebServiceParameterSet) object;
-        return target.getParameters();
-      }
-
-      public void setValue(java.lang.Object object, java.lang.Object value)
-              throws IllegalStateException, IllegalArgumentException
-      {
-        try
-        {
-          WebServiceParameterSet target = (WebServiceParameterSet) object;
-          target.setParameters((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: _parameters
-    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);
-  }
-
-  // -----------/
-  // - 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.WebServiceParameterSet.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;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/types/.castor.cdr b/src/jalview/schemabinding/version2/types/.castor.cdr
deleted file mode 100644 (file)
index d9874b6..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#Thu Dec 14 15:28:22 GMT 2017
-jalview.schemabinding.version2.types.ColourNoValueColourType=jalview.schemabinding.version2.types.descriptors.ColourNoValueColourTypeDescriptor
-jalview.schemabinding.version2.types.FeatureMatcherByType=jalview.schemabinding.version2.types.descriptors.FeatureMatcherByTypeDescriptor
-jalview.schemabinding.version2.types.NoValueColour=jalview.schemabinding.version2.types.descriptors.NoValueColourDescriptor
-jalview.schemabinding.version2.types.ColourThreshTypeType=jalview.schemabinding.version2.types.descriptors.ColourThreshTypeTypeDescriptor
diff --git a/src/jalview/schemabinding/version2/types/ColourThreshTypeType.java b/src/jalview/schemabinding/version2/types/ColourThreshTypeType.java
deleted file mode 100644 (file)
index 0330411..0000000
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * 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.types;
-
-  //---------------------------------/
- //- Imported classes and packages -/
-//---------------------------------/
-
-import java.util.Hashtable;
-
-/**
- * Class ColourThreshTypeType.
- * 
- * @version $Revision$ $Date$
- */
-public class ColourThreshTypeType implements java.io.Serializable {
-
-
-      //--------------------------/
-     //- Class/Member Variables -/
-    //--------------------------/
-
-    /**
-     * The NONE type
-     */
-    public static final int NONE_TYPE = 0;
-
-    /**
-     * The instance of the NONE type
-     */
-    public static final ColourThreshTypeType NONE = new ColourThreshTypeType(NONE_TYPE, "NONE");
-
-    /**
-     * The ABOVE type
-     */
-    public static final int ABOVE_TYPE = 1;
-
-    /**
-     * The instance of the ABOVE type
-     */
-    public static final ColourThreshTypeType ABOVE = new ColourThreshTypeType(ABOVE_TYPE, "ABOVE");
-
-    /**
-     * The BELOW type
-     */
-    public static final int BELOW_TYPE = 2;
-
-    /**
-     * The instance of the BELOW type
-     */
-    public static final ColourThreshTypeType BELOW = new ColourThreshTypeType(BELOW_TYPE, "BELOW");
-
-    /**
-     * Field _memberTable.
-     */
-    private static java.util.Hashtable _memberTable = init();
-
-    /**
-     * Field type.
-     */
-    private int type = -1;
-
-    /**
-     * Field stringValue.
-     */
-    private java.lang.String stringValue = null;
-
-
-      //----------------/
-     //- Constructors -/
-    //----------------/
-
-    private ColourThreshTypeType(final int type, final java.lang.String value) {
-        super();
-        this.type = type;
-        this.stringValue = value;
-    }
-
-
-      //-----------/
-     //- Methods -/
-    //-----------/
-
-    /**
-     * Method enumerate.Returns an enumeration of all possible
-     * instances of ColourThreshTypeType
-     * 
-     * @return an Enumeration over all possible instances of
-     * ColourThreshTypeType
-     */
-    public static java.util.Enumeration enumerate(
-    ) {
-        return _memberTable.elements();
-    }
-
-    /**
-     * Method getType.Returns the type of this ColourThreshTypeType
-     * 
-     * @return the type of this ColourThreshTypeType
-     */
-    public int getType(
-    ) {
-        return this.type;
-    }
-
-    /**
-     * Method init.
-     * 
-     * @return the initialized Hashtable for the member table
-     */
-    private static java.util.Hashtable init(
-    ) {
-        Hashtable members = new Hashtable();
-        members.put("NONE", NONE);
-        members.put("ABOVE", ABOVE);
-        members.put("BELOW", BELOW);
-        return members;
-    }
-
-    /**
-     * Method readResolve. will be called during deserialization to
-     * replace the deserialized object with the correct constant
-     * instance.
-     * 
-     * @return this deserialized object
-     */
-    private java.lang.Object readResolve(
-    ) {
-        return valueOf(this.stringValue);
-    }
-
-    /**
-     * Method toString.Returns the String representation of this
-     * ColourThreshTypeType
-     * 
-     * @return the String representation of this ColourThreshTypeTyp
-     */
-    public java.lang.String toString(
-    ) {
-        return this.stringValue;
-    }
-
-    /**
-     * Method valueOf.Returns a new ColourThreshTypeType based on
-     * the given String value.
-     * 
-     * @param string
-     * @return the ColourThreshTypeType value of parameter 'string'
-     */
-    public static jalview.schemabinding.version2.types.ColourThreshTypeType valueOf(
-            final java.lang.String string) {
-        java.lang.Object obj = null;
-        if (string != null) {
-            obj = _memberTable.get(string);
-        }
-        if (obj == null) {
-            String err = "" + string + " is not a valid ColourThreshTypeType";
-            throw new IllegalArgumentException(err);
-        }
-        return (ColourThreshTypeType) obj;
-    }
-
-}
diff --git a/src/jalview/schemabinding/version2/types/FeatureMatcherByType.java b/src/jalview/schemabinding/version2/types/FeatureMatcherByType.java
deleted file mode 100644 (file)
index 6e97332..0000000
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * 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.types;
-
-  //---------------------------------/
- //- Imported classes and packages -/
-//---------------------------------/
-
-import java.util.Hashtable;
-
-/**
- * Class FeatureMatcherByType.
- * 
- * @version $Revision$ $Date$
- */
-public class FeatureMatcherByType implements java.io.Serializable {
-
-
-      //--------------------------/
-     //- Class/Member Variables -/
-    //--------------------------/
-
-    /**
-     * The byLabel type
-     */
-    public static final int BYLABEL_TYPE = 0;
-
-    /**
-     * The instance of the byLabel type
-     */
-    public static final FeatureMatcherByType BYLABEL = new FeatureMatcherByType(BYLABEL_TYPE, "byLabel");
-
-    /**
-     * The byScore type
-     */
-    public static final int BYSCORE_TYPE = 1;
-
-    /**
-     * The instance of the byScore type
-     */
-    public static final FeatureMatcherByType BYSCORE = new FeatureMatcherByType(BYSCORE_TYPE, "byScore");
-
-    /**
-     * The byAttribute type
-     */
-    public static final int BYATTRIBUTE_TYPE = 2;
-
-    /**
-     * The instance of the byAttribute type
-     */
-    public static final FeatureMatcherByType BYATTRIBUTE = new FeatureMatcherByType(BYATTRIBUTE_TYPE, "byAttribute");
-
-    /**
-     * Field _memberTable.
-     */
-    private static java.util.Hashtable _memberTable = init();
-
-    /**
-     * Field type.
-     */
-    private int type = -1;
-
-    /**
-     * Field stringValue.
-     */
-    private java.lang.String stringValue = null;
-
-
-      //----------------/
-     //- Constructors -/
-    //----------------/
-
-    private FeatureMatcherByType(final int type, final java.lang.String value) {
-        super();
-        this.type = type;
-        this.stringValue = value;
-    }
-
-
-      //-----------/
-     //- Methods -/
-    //-----------/
-
-    /**
-     * Method enumerate.Returns an enumeration of all possible
-     * instances of FeatureMatcherByType
-     * 
-     * @return an Enumeration over all possible instances of
-     * FeatureMatcherByType
-     */
-    public static java.util.Enumeration enumerate(
-    ) {
-        return _memberTable.elements();
-    }
-
-    /**
-     * Method getType.Returns the type of this FeatureMatcherByType
-     * 
-     * @return the type of this FeatureMatcherByType
-     */
-    public int getType(
-    ) {
-        return this.type;
-    }
-
-    /**
-     * Method init.
-     * 
-     * @return the initialized Hashtable for the member table
-     */
-    private static java.util.Hashtable init(
-    ) {
-        Hashtable members = new Hashtable();
-        members.put("byLabel", BYLABEL);
-        members.put("byScore", BYSCORE);
-        members.put("byAttribute", BYATTRIBUTE);
-        return members;
-    }
-
-    /**
-     * Method readResolve. will be called during deserialization to
-     * replace the deserialized object with the correct constant
-     * instance.
-     * 
-     * @return this deserialized object
-     */
-    private java.lang.Object readResolve(
-    ) {
-        return valueOf(this.stringValue);
-    }
-
-    /**
-     * Method toString.Returns the String representation of this
-     * FeatureMatcherByType
-     * 
-     * @return the String representation of this FeatureMatcherByTyp
-     */
-    public java.lang.String toString(
-    ) {
-        return this.stringValue;
-    }
-
-    /**
-     * Method valueOf.Returns a new FeatureMatcherByType based on
-     * the given String value.
-     * 
-     * @param string
-     * @return the FeatureMatcherByType value of parameter 'string'
-     */
-    public static jalview.schemabinding.version2.types.FeatureMatcherByType valueOf(
-            final java.lang.String string) {
-        java.lang.Object obj = null;
-        if (string != null) {
-            obj = _memberTable.get(string);
-        }
-        if (obj == null) {
-            String err = "" + string + " is not a valid FeatureMatcherByType";
-            throw new IllegalArgumentException(err);
-        }
-        return (FeatureMatcherByType) obj;
-    }
-
-}
diff --git a/src/jalview/schemabinding/version2/types/NoValueColour.java b/src/jalview/schemabinding/version2/types/NoValueColour.java
deleted file mode 100644 (file)
index bbef3d7..0000000
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * 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.types;
-
-//---------------------------------/
-//- Imported classes and packages -/
-//---------------------------------/
-
-import java.util.Hashtable;
-
-/**
- * Graduated feature colour if no score (or attribute) value
- * 
- * @version $Revision$ $Date$
- */
-public class NoValueColour implements java.io.Serializable
-{
-
-  // --------------------------/
-  // - Class/Member Variables -/
-  // --------------------------/
-
-  /**
-   * The None type
-   */
-  public static final int NONE_TYPE = 0;
-
-  /**
-   * The instance of the None type
-   */
-  public static final NoValueColour NONE = new NoValueColour(NONE_TYPE,
-          "None");
-
-  /**
-   * The Min type
-   */
-  public static final int MIN_TYPE = 1;
-
-  /**
-   * The instance of the Min type
-   */
-  public static final NoValueColour MIN = new NoValueColour(MIN_TYPE,
-          "Min");
-
-  /**
-   * The Max type
-   */
-  public static final int MAX_TYPE = 2;
-
-  /**
-   * The instance of the Max type
-   */
-  public static final NoValueColour MAX = new NoValueColour(MAX_TYPE,
-          "Max");
-
-  /**
-   * Field _memberTable.
-   */
-  private static java.util.Hashtable _memberTable = init();
-
-  /**
-   * Field type.
-   */
-  private int type = -1;
-
-  /**
-   * Field stringValue.
-   */
-  private java.lang.String stringValue = null;
-
-  // ----------------/
-  // - Constructors -/
-  // ----------------/
-
-  private NoValueColour(final int type, final java.lang.String value)
-  {
-    super();
-    this.type = type;
-    this.stringValue = value;
-  }
-
-  // -----------/
-  // - Methods -/
-  // -----------/
-
-  /**
-   * Method enumerate.Returns an enumeration of all possible instances of
-   * NoValueColour
-   * 
-   * @return an Enumeration over all possible instances of NoValueColour
-   */
-  public static java.util.Enumeration enumerate()
-  {
-    return _memberTable.elements();
-  }
-
-  /**
-   * Method getType.Returns the type of this NoValueColour
-   * 
-   * @return the type of this NoValueColour
-   */
-  public int getType()
-  {
-    return this.type;
-  }
-
-  /**
-   * Method init.
-   * 
-   * @return the initialized Hashtable for the member table
-   */
-  private static java.util.Hashtable init()
-  {
-    Hashtable members = new Hashtable();
-    members.put("None", NONE);
-    members.put("Min", MIN);
-    members.put("Max", MAX);
-    return members;
-  }
-
-  /**
-   * Method readResolve. will be called during deserialization to replace the
-   * deserialized object with the correct constant instance.
-   * 
-   * @return this deserialized object
-   */
-  private java.lang.Object readResolve()
-  {
-    return valueOf(this.stringValue);
-  }
-
-  /**
-   * Method toString.Returns the String representation of this NoValueColour
-   * 
-   * @return the String representation of this NoValueColour
-   */
-  public java.lang.String toString()
-  {
-    return this.stringValue;
-  }
-
-  /**
-   * Method valueOf.Returns a new NoValueColour based on the given String value.
-   * 
-   * @param string
-   * @return the NoValueColour value of parameter 'string'
-   */
-  public static jalview.schemabinding.version2.types.NoValueColour valueOf(
-          final java.lang.String string)
-  {
-    java.lang.Object obj = null;
-    if (string != null)
-    {
-      obj = _memberTable.get(string);
-    }
-    if (obj == null)
-    {
-      String err = "" + string + " is not a valid NoValueColour";
-      throw new IllegalArgumentException(err);
-    }
-    return (NoValueColour) obj;
-  }
-
-}
diff --git a/src/jalview/schemabinding/version2/types/descriptors/ColourThreshTypeTypeDescriptor.java b/src/jalview/schemabinding/version2/types/descriptors/ColourThreshTypeTypeDescriptor.java
deleted file mode 100644 (file)
index f978363..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * 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.types.descriptors;
-
-  //---------------------------------/
- //- Imported classes and packages -/
-//---------------------------------/
-
-import jalview.schemabinding.version2.types.ColourThreshTypeType;
-
-/**
- * Class ColourThreshTypeTypeDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class ColourThreshTypeTypeDescriptor 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 ColourThreshTypeTypeDescriptor() {
-        super();
-        _nsURI = "www.jalview.org/colours";
-        _xmlName = "ColourThreshTypeType";
-        _elementDefinition = false;
-    }
-
-
-      //-----------/
-     //- 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.types.ColourThreshTypeType.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;
-    }
-
-}
diff --git a/src/jalview/schemabinding/version2/types/descriptors/FeatureMatcherByTypeDescriptor.java b/src/jalview/schemabinding/version2/types/descriptors/FeatureMatcherByTypeDescriptor.java
deleted file mode 100644 (file)
index e392e76..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * 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.types.descriptors;
-
-  //---------------------------------/
- //- Imported classes and packages -/
-//---------------------------------/
-
-import jalview.schemabinding.version2.types.FeatureMatcherByType;
-
-/**
- * Class FeatureMatcherByTypeDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class FeatureMatcherByTypeDescriptor 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 FeatureMatcherByTypeDescriptor() {
-        super();
-        _nsURI = "www.jalview.org/colours";
-        _xmlName = "FeatureMatcherByType";
-        _elementDefinition = false;
-    }
-
-
-      //-----------/
-     //- 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.types.FeatureMatcherByType.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;
-    }
-
-}
diff --git a/src/jalview/schemabinding/version2/types/descriptors/NoValueColourDescriptor.java b/src/jalview/schemabinding/version2/types/descriptors/NoValueColourDescriptor.java
deleted file mode 100644 (file)
index 14c58ed..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * 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.types.descriptors;
-
-//---------------------------------/
-//- Imported classes and packages -/
-//---------------------------------/
-
-import jalview.schemabinding.version2.types.NoValueColour;
-
-/**
- * Class NoValueColourDescriptor.
- * 
- * @version $Revision$ $Date$
- */
-public class NoValueColourDescriptor
-        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 NoValueColourDescriptor()
-  {
-    super();
-    _nsURI = "www.jalview.org/colours";
-    _xmlName = "NoValueColour";
-    _elementDefinition = false;
-  }
-
-  // -----------/
-  // - 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.types.NoValueColour.class;
-  }
-
-  /**
-   * Method getNameSpacePrefix.
-   * 
-   * @return the namespace prefix to use when marshaling as XML.
-   */
-  public java.lang.String getNameSpacePrefix()
-  {
-    return _nsPrefix;
-  }
-
-  /**
-   * Method getNameSpaceURI.
-   * 
-   * @return the namespace URI used when marshaling and unmarshaling as XML.
-   */
-  public java.lang.String getNameSpaceURI()
-  {
-    return _nsURI;
-  }
-
-  /**
-   * Method getValidator.
-   * 
-   * @return a specific validator for the class described by this
-   *         ClassDescriptor.
-   */
-  public org.exolab.castor.xml.TypeValidator getValidator()
-  {
-    return this;
-  }
-
-  /**
-   * Method getXMLName.
-   * 
-   * @return the XML Name for the Class being described.
-   */
-  public java.lang.String getXMLName()
-  {
-    return _xmlName;
-  }
-
-  /**
-   * Method isElementDefinition.
-   * 
-   * @return true if XML schema definition of this Class is that of a global
-   *         element or element with anonymous type definition.
-   */
-  public boolean isElementDefinition()
-  {
-    return _elementDefinition;
-  }
-
-}
index c28ea5f..75a07b9 100755 (executable)
@@ -20,6 +20,7 @@
  */
 package jalview.schemes;
 
+import jalview.api.AlignViewportI;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.AnnotatedCollectionI;
@@ -76,8 +77,8 @@ public class AnnotationColourGradient extends FollowerColourScheme
   private IdentityHashMap<SequenceI, AlignmentAnnotation> seqannot = null;
 
   @Override
-  public ColourSchemeI getInstance(AnnotatedCollectionI sg,
-          Map<SequenceI, SequenceCollectionI> hiddenRepSequences)
+  public ColourSchemeI getInstance(AlignViewportI view,
+          AnnotatedCollectionI sg)
   {
     AnnotationColourGradient acg = new AnnotationColourGradient(annotation,
             getColourScheme(), aboveAnnotationThreshold);
@@ -185,7 +186,7 @@ public class AnnotationColourGradient extends FollowerColourScheme
       }
       else
       {
-        seqannot = new IdentityHashMap<SequenceI, AlignmentAnnotation>();
+        seqannot = new IdentityHashMap<>();
       }
       // resolve the context containing all the annotation for the sequence
       AnnotatedCollectionI alcontext = alignment instanceof AlignmentI
@@ -319,9 +320,9 @@ public class AnnotationColourGradient extends FollowerColourScheme
     if (annotationThreshold != null)
     {
       if ((aboveAnnotationThreshold == ABOVE_THRESHOLD
-              && aj.value < annotationThreshold.value)
+              && aj.value <= annotationThreshold.value)
               || (aboveAnnotationThreshold == BELOW_THRESHOLD
-                      && aj.value > annotationThreshold.value))
+                      && aj.value >= annotationThreshold.value))
       {
         return Color.white;
       }
@@ -414,14 +415,17 @@ public class AnnotationColourGradient extends FollowerColourScheme
             && aboveAnnotationThreshold == ABOVE_THRESHOLD
             && value >= ann.threshold.value)
     {
-      range = (value - ann.threshold.value)
+      range = ann.graphMax == ann.threshold.value ? 1f
+              : (value - ann.threshold.value)
               / (ann.graphMax - ann.threshold.value);
     }
     else if (thresholdIsMinMax && ann.threshold != null
             && aboveAnnotationThreshold == BELOW_THRESHOLD
             && value <= ann.threshold.value)
     {
-      range = (value - ann.graphMin) / (ann.threshold.value - ann.graphMin);
+      range = ann.graphMin == ann.threshold.value ? 0f
+              : (value - ann.graphMin)
+                      / (ann.threshold.value - ann.graphMin);
     }
     else
     {
@@ -475,7 +479,7 @@ public class AnnotationColourGradient extends FollowerColourScheme
   @Override
   public String getSchemeName()
   {
-    return "Annotation";
+    return ANNOTATION_COLOUR;
   }
 
   @Override
index 02f9b3e..8188f4d 100755 (executable)
 package jalview.schemes;
 
 import jalview.analysis.scoremodels.ScoreModels;
+import jalview.api.AlignViewportI;
 import jalview.api.analysis.PairwiseScoreModelI;
 import jalview.datamodel.AnnotatedCollectionI;
-import jalview.datamodel.SequenceCollectionI;
 import jalview.datamodel.SequenceI;
 import jalview.util.Comparison;
 
 import java.awt.Color;
-import java.util.Map;
 
 public class Blosum62ColourScheme extends ResidueColourScheme
 {
@@ -46,8 +45,8 @@ public class Blosum62ColourScheme extends ResidueColourScheme
    * be coloured
    */
   @Override
-  public ColourSchemeI getInstance(AnnotatedCollectionI coll,
-          Map<SequenceI, SequenceCollectionI> hrs)
+  public ColourSchemeI getInstance(AlignViewportI view,
+          AnnotatedCollectionI coll)
   {
     return new Blosum62ColourScheme();
   }
index a3b85b9..e6672fc 100755 (executable)
  */
 package jalview.schemes;
 
+import jalview.api.AlignViewportI;
 import jalview.datamodel.AnnotatedCollectionI;
-import jalview.datamodel.SequenceCollectionI;
-import jalview.datamodel.SequenceI;
 
 import java.awt.Color;
-import java.util.Map;
 
 /**
  * DOCUMENT ME!
@@ -75,8 +73,8 @@ public class BuriedColourScheme extends ScoreColourScheme
    * be coloured
    */
   @Override
-  public ColourSchemeI getInstance(AnnotatedCollectionI coll,
-          Map<SequenceI, SequenceCollectionI> hrs)
+  public ColourSchemeI getInstance(AlignViewportI view,
+          AnnotatedCollectionI coll)
   {
     return new BuriedColourScheme();
   }
index ec13343..19723ca 100755 (executable)
@@ -20,6 +20,7 @@
  */
 package jalview.schemes;
 
+import jalview.api.AlignViewportI;
 import jalview.datamodel.AnnotatedCollectionI;
 import jalview.datamodel.SequenceCollectionI;
 import jalview.datamodel.SequenceI;
@@ -335,11 +336,11 @@ public class ClustalxColourScheme extends ResidueColourScheme
   }
 
   @Override
-  public ColourSchemeI getInstance(AnnotatedCollectionI sg,
-          Map<SequenceI, SequenceCollectionI> hiddenRepSequences)
+  public ColourSchemeI getInstance(AlignViewportI view,
+          AnnotatedCollectionI sg)
   {
     ClustalxColourScheme css = new ClustalxColourScheme(sg,
-            hiddenRepSequences);
+            view == null ? null : view.getHiddenRepSequences());
     css.includeGaps = includeGaps;
     return css;
   }
index d70b4e2..7b79d88 100755 (executable)
@@ -20,6 +20,7 @@
  */
 package jalview.schemes;
 
+import jalview.api.AlignViewportI;
 import jalview.datamodel.AnnotatedCollectionI;
 import jalview.datamodel.SequenceCollectionI;
 import jalview.datamodel.SequenceI;
@@ -62,12 +63,14 @@ public interface ColourSchemeI
    * new instance for each call to this method, as different instances may have
    * differing shading by consensus or percentage identity applied.
    * 
+   * @param viewport
+   *          - the parent viewport
    * @param sg
-   * @param hiddenRepSequences
+   *          - the collection of sequences to be coloured
    * @return copy of current scheme with any inherited settings transferred
    */
-  ColourSchemeI getInstance(AnnotatedCollectionI sg,
-          Map<SequenceI, SequenceCollectionI> hiddenRepSequences);
+  ColourSchemeI getInstance(AlignViewportI viewport,
+          AnnotatedCollectionI sg);
 
   /**
    * Answers true if the colour scheme is suitable for the given data, else
index 9f08688..141ef10 100644 (file)
  */
 package jalview.schemes;
 
-import jalview.binding.JalviewUserColours;
+import jalview.xml.binding.jalview.JalviewUserColours;
 
 import java.awt.Color;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.InputStreamReader;
 
-import org.exolab.castor.xml.Unmarshaller;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamReader;
 
 public class ColourSchemeLoader
 {
@@ -51,12 +54,14 @@ public class ColourSchemeLoader
       InputStreamReader in = new InputStreamReader(
               new FileInputStream(file), "UTF-8");
 
-      jalview.schemabinding.version2.JalviewUserColours jucs = new jalview.schemabinding.version2.JalviewUserColours();
-
-      org.exolab.castor.xml.Unmarshaller unmar = new org.exolab.castor.xml.Unmarshaller(
-              jucs);
-      jucs = (jalview.schemabinding.version2.JalviewUserColours) unmar
-              .unmarshal(in);
+      JAXBContext jc = JAXBContext
+              .newInstance("jalview.xml.binding.jalview");
+      javax.xml.bind.Unmarshaller um = jc.createUnmarshaller();
+      XMLStreamReader streamReader = XMLInputFactory.newInstance()
+              .createXMLStreamReader(in);
+      JAXBElement<JalviewUserColours> jbe = um.unmarshal(streamReader,
+              JalviewUserColours.class);
+      JalviewUserColours jucs = jbe.getValue();
 
       /*
        * non-case-sensitive colours are for 20 amino acid codes,
@@ -69,9 +74,9 @@ public class ColourSchemeLoader
 
       String name;
       int index;
-      for (int i = 0; i < jucs.getColourCount(); i++)
+      for (int i = 0; i < jucs.getColour().size(); i++)
       {
-        name = jucs.getColour(i).getName();
+        name = jucs.getColour().get(i).getName();
         if (ResidueProperties.aa3Hash.containsKey(name))
         {
           index = ResidueProperties.aa3Hash.get(name).intValue();
@@ -86,7 +91,7 @@ public class ColourSchemeLoader
         }
 
         Color color = new Color(
-                Integer.parseInt(jucs.getColour(i).getRGB(), 16));
+                Integer.parseInt(jucs.getColour().get(i).getRGB(), 16));
         if (name.toLowerCase().equals(name))
         {
           caseSensitive = true;
@@ -109,34 +114,9 @@ public class ColourSchemeLoader
       }
     } catch (Exception ex)
     {
-      // Could be old Jalview Archive format
-      try
-      {
-        InputStreamReader in = new InputStreamReader(
-                new FileInputStream(file), "UTF-8");
-
-        jalview.binding.JalviewUserColours jucs = new jalview.binding.JalviewUserColours();
-
-        jucs = JalviewUserColours.unmarshal(in);
-
-        newColours = new Color[jucs.getColourCount()];
-
-        for (int i = 0; i < 24; i++)
-        {
-          newColours[i] = new Color(
-                  Integer.parseInt(jucs.getColour(i).getRGB(), 16));
-        }
-        ucs = new UserColourScheme(newColours);
-        ucs.setName(jucs.getSchemeName());
-      } catch (Exception ex2)
-      {
-        ex2.printStackTrace();
-      }
-
-      if (newColours == null)
-      {
-        System.out.println("Error loading User ColourFile\n" + ex);
-      }
+      // used to try to parse a V1 Castor generated colours file
+      System.err.println("Failed to read colour scheme from " + filePath
+              + " : " + ex.toString());
     }
 
     return ucs;
index fc92cd9..2d5b23d 100755 (executable)
@@ -20,6 +20,7 @@
  */
 package jalview.schemes;
 
+import jalview.api.AlignViewportI;
 import jalview.datamodel.AnnotatedCollectionI;
 import jalview.util.ColorUtils;
 
@@ -75,7 +76,8 @@ public class ColourSchemeProperty
    * @param name
    * @return
    */
-  public static ColourSchemeI getColourScheme(AnnotatedCollectionI forData,
+  public static ColourSchemeI getColourScheme(AlignViewportI view,
+          AnnotatedCollectionI forData,
           String name)
   {
     if (ResidueColourScheme.NONE.equalsIgnoreCase(name))
@@ -89,6 +91,7 @@ public class ColourSchemeProperty
      * create a new instance of it
      */
     ColourSchemeI scheme = ColourSchemes.getInstance().getColourScheme(name,
+            view,
             forData, null);
     if (scheme != null)
     {
index 99e9759..42465f2 100644 (file)
@@ -20,6 +20,7 @@
  */
 package jalview.schemes;
 
+import jalview.api.AlignViewportI;
 import jalview.datamodel.AnnotatedCollectionI;
 import jalview.datamodel.SequenceCollectionI;
 import jalview.datamodel.SequenceI;
@@ -65,7 +66,7 @@ public class ColourSchemes
      * store in an order-preserving map, so items can be added to menus 
      * in the order in which they are 'discovered'
      */
-    schemes = new LinkedHashMap<String, ColourSchemeI>();
+    schemes = new LinkedHashMap<>();
 
     for (JalviewColourScheme cs : JalviewColourScheme.values())
     {
@@ -76,6 +77,7 @@ public class ColourSchemes
       {
         System.err.println("Error instantiating colour scheme for "
                 + cs.toString() + " " + e.getMessage());
+        e.printStackTrace();
       }
     }
   }
@@ -126,6 +128,7 @@ public class ColourSchemes
    * 
    * @param name
    *          name of the colour scheme
+   * @param viewport
    * @param forData
    *          the data to be coloured
    * @param optional
@@ -134,7 +137,7 @@ public class ColourSchemes
    * @return
    */
   public ColourSchemeI getColourScheme(String name,
-          AnnotatedCollectionI forData,
+          AlignViewportI viewport, AnnotatedCollectionI forData,
           Map<SequenceI, SequenceCollectionI> hiddenRepSequences)
   {
     if (name == null)
@@ -142,7 +145,8 @@ public class ColourSchemes
       return null;
     }
     ColourSchemeI cs = schemes.get(name.toLowerCase());
-    return cs == null ? null : cs.getInstance(forData, hiddenRepSequences);
+    return cs == null ? null
+            : cs.getInstance(viewport, forData);
   }
 
   /**
@@ -158,7 +162,7 @@ public class ColourSchemes
   public ColourSchemeI getColourScheme(String name,
           AnnotatedCollectionI forData)
   {
-    return getColourScheme(name, forData, null);
+    return getColourScheme(name, null, forData, null);
   }
 
   /**
index 923bd85..dc7971b 100644 (file)
  */
 package jalview.schemes;
 
+import jalview.api.AlignViewportI;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AnnotatedCollectionI;
-import jalview.datamodel.SequenceCollectionI;
-import jalview.datamodel.SequenceI;
 import jalview.util.ColorUtils;
 
 import java.awt.Color;
@@ -38,9 +37,9 @@ import java.util.Map;
  */
 public class CovariationColourScheme extends ResidueColourScheme
 {
-  public Map<String, Color> helixcolorhash = new Hashtable<String, Color>();
+  public Map<String, Color> helixcolorhash = new Hashtable<>();
 
-  public Map<Integer, String> positionsToHelix = new Hashtable<Integer, String>();
+  public Map<Integer, String> positionsToHelix = new Hashtable<>();
 
   int numHelix = 0;
 
@@ -51,8 +50,8 @@ public class CovariationColourScheme extends ResidueColourScheme
    * be coloured
    */
   @Override
-  public ColourSchemeI getInstance(AnnotatedCollectionI coll,
-          Map<SequenceI, SequenceCollectionI> hrs)
+  public ColourSchemeI getInstance(AlignViewportI view,
+          AnnotatedCollectionI coll)
   {
     return new CovariationColourScheme(coll.getAlignmentAnnotation()[0]);
   }
index 51e7645..6483b85 100644 (file)
@@ -25,6 +25,7 @@ import jalview.datamodel.SequenceFeature;
 import jalview.datamodel.features.FeatureMatcher;
 import jalview.util.ColorUtils;
 import jalview.util.Format;
+import jalview.util.MessageManager;
 
 import java.awt.Color;
 import java.util.StringTokenizer;
@@ -50,6 +51,12 @@ import java.util.StringTokenizer;
  */
 public class FeatureColour implements FeatureColourI
 {
+  private static final String I18N_LABEL = MessageManager
+          .getString("label.label");
+
+  private static final String I18N_SCORE = MessageManager
+          .getString("label.score");
+
   private static final String ABSOLUTE = "abso";
 
   private static final String ABOVE = "above";
@@ -358,8 +365,8 @@ public class FeatureColour implements FeatureColourI
       Color maxColour = ColorUtils.parseColourString(maxcol);
       Color noColour = noValueColour.equals(NO_VALUE_MAX) ? maxColour
               : (noValueColour.equals(NO_VALUE_NONE) ? null : minColour);
-      featureColour = new FeatureColour(minColour, maxColour, noColour, min,
-              max);
+      featureColour = new FeatureColour(maxColour, minColour, maxColour,
+              noColour, min, max);
       featureColour.setColourByLabel(minColour == null);
       featureColour.setAutoScaled(autoScaled);
       if (byAttribute)
@@ -429,36 +436,25 @@ public class FeatureColour implements FeatureColourI
   }
 
   /**
-   * Constructor given a simple colour
+   * Constructor given a simple colour. This also 'primes' a graduated colour
+   * range, where the maximum colour is the given simple colour, and the minimum
+   * colour a paler shade of it. This is for convenience when switching from a
+   * simple colour to a graduated colour scheme.
    * 
    * @param c
    */
   public FeatureColour(Color c)
   {
-    minColour = Color.WHITE;
-    maxColour = Color.BLACK;
-    noColour = DEFAULT_NO_COLOUR;
-    minRed = 0f;
-    minGreen = 0f;
-    minBlue = 0f;
-    deltaRed = 0f;
-    deltaGreen = 0f;
-    deltaBlue = 0f;
-    colour = c;
-  }
+    /*
+     * set max colour to the simple colour, min colour to a paler shade of it
+     */
+    this(c, c == null ? Color.white : ColorUtils.bleachColour(c, 0.9f),
+            c == null ? Color.black : c, DEFAULT_NO_COLOUR, 0, 0);
 
-  /**
-   * Constructor given a colour range and a score range, defaulting 'no value
-   * colour' to be the same as minimum colour
-   * 
-   * @param low
-   * @param high
-   * @param min
-   * @param max
-   */
-  public FeatureColour(Color low, Color high, float min, float max)
-  {
-    this(low, high, low, min, max);
+    /*
+     * but enforce simple colour for now!
+     */
+    setGraduatedColour(false);
   }
 
   /**
@@ -491,29 +487,23 @@ public class FeatureColour implements FeatureColourI
   }
 
   /**
-   * Copy constructor with new min/max ranges
-   * 
-   * @param fc
-   * @param min
-   * @param max
-   */
-  public FeatureColour(FeatureColour fc, float min, float max)
-  {
-    this(fc);
-    updateBounds(min, max);
-  }
-
-  /**
-   * Constructor for a graduated colour
+   * Constructor that sets both simple and graduated colour values. This allows
+   * alternative colour schemes to be 'preserved' while switching between them
+   * to explore their effects on the visualisation.
+   * <p>
+   * This sets the colour scheme to 'graduated' by default. Override this if
+   * wanted by calling <code>setGraduatedColour(false)</code> for a simple
+   * colour, or <code>setColourByLabel(true)</code> for colour by label.
    * 
+   * @param myColour
    * @param low
    * @param high
    * @param noValueColour
    * @param min
    * @param max
    */
-  public FeatureColour(Color low, Color high, Color noValueColour,
-          float min, float max)
+  public FeatureColour(Color myColour, Color low, Color high,
+          Color noValueColour, float min, float max)
   {
     if (low == null)
     {
@@ -523,10 +513,10 @@ public class FeatureColour implements FeatureColourI
     {
       high = Color.black;
     }
-    graduatedColour = true;
-    colour = null;
+    colour = myColour;
     minColour = low;
     maxColour = high;
+    setGraduatedColour(true);
     noColour = noValueColour;
     threshold = Float.NaN;
     isHighToLow = min >= max;
@@ -558,7 +548,7 @@ public class FeatureColour implements FeatureColourI
    * Sets the 'graduated colour' flag. If true, also sets 'colour by label' to
    * false.
    */
-  void setGraduatedColour(boolean b)
+  public void setGraduatedColour(boolean b)
   {
     graduatedColour = b;
     if (b)
@@ -689,9 +679,12 @@ public class FeatureColour implements FeatureColourI
 
   /**
    * Returns the colour for the given instance of the feature. This may be a
-   * simple colour, a colour generated from the feature description (if
-   * isColourByLabel()), or a colour derived from the feature score (if
-   * isGraduatedColour()).
+   * simple colour, a colour generated from the feature description or other
+   * attribute (if isColourByLabel()), or a colour derived from the feature
+   * score or other attribute (if isGraduatedColour()).
+   * <p>
+   * Answers null if feature score (or attribute) value lies outside a
+   * configured threshold.
    * 
    * @param feature
    * @return
@@ -830,9 +823,20 @@ public class FeatureColour implements FeatureColourI
         sb.append(BAR).append(Format.getHexString(getMinColour()))
                 .append(BAR);
         sb.append(Format.getHexString(getMaxColour())).append(BAR);
-        String noValue = minColour.equals(noColour) ? NO_VALUE_MIN
-                : (maxColour.equals(noColour) ? NO_VALUE_MAX
-                        : NO_VALUE_NONE);
+        
+        /*
+         * 'no value' colour should be null, min or max colour;
+         * if none of these, coerce to minColour
+         */
+        String noValue = NO_VALUE_MIN;
+        if (maxColour.equals(noColour))
+        {
+          noValue = NO_VALUE_MAX;
+        }
+        if (noColour == null)
+        {
+          noValue = NO_VALUE_NONE;
+        }
         sb.append(noValue).append(BAR);
         if (!isAutoScaled())
         {
@@ -890,4 +894,78 @@ public class FeatureColour implements FeatureColourI
     attributeName = name;
   }
 
+  @Override
+  public boolean isOutwithThreshold(SequenceFeature feature)
+  {
+    if (!isGraduatedColour())
+    {
+      return false;
+    }
+    float scr = feature.getScore();
+    if (attributeName != null)
+    {
+      try
+      {
+        String attVal = feature.getValueAsString(attributeName);
+        scr = Float.valueOf(attVal);
+      } catch (Throwable e)
+      {
+        scr = Float.NaN;
+      }
+    }
+    if (Float.isNaN(scr))
+    {
+      return false;
+    }
+
+    return ((isAboveThreshold() && scr <= threshold)
+            || (isBelowThreshold() && scr >= threshold));
+  }
+
+  @Override
+  public String getDescription()
+  {
+    if (isSimpleColour())
+    {
+      return "r=" + colour.getRed() + ",g=" + colour.getGreen() + ",b="
+              + colour.getBlue();
+    }
+    StringBuilder tt = new StringBuilder();
+    String by = null;
+
+    if (getAttributeName() != null)
+    {
+      by = FeatureMatcher.toAttributeDisplayName(getAttributeName());
+    }
+    else if (isColourByLabel())
+    {
+      by = I18N_LABEL;
+    }
+    else
+    {
+      by = I18N_SCORE;
+    }
+    tt.append(MessageManager.formatMessage("action.by_title_param", by));
+
+    /*
+     * add threshold if any
+     */
+    if (isAboveThreshold() || isBelowThreshold())
+    {
+      tt.append(" (");
+      if (isColourByLabel())
+      {
+        /*
+         * Jalview features file supports the combination of 
+         * colour by label or attribute text with score threshold
+         */
+        tt.append(I18N_SCORE).append(" ");
+      }
+      tt.append(isAboveThreshold() ? "> " : "< ");
+      tt.append(getThreshold()).append(")");
+    }
+
+    return tt.toString();
+  }
+
 }
index 57c19e5..24b7713 100644 (file)
  */
 package jalview.schemes;
 
+import jalview.api.AlignViewportI;
 import jalview.datamodel.AnnotatedCollectionI;
-import jalview.datamodel.SequenceCollectionI;
-import jalview.datamodel.SequenceI;
-
-import java.util.Map;
 
 /**
  * Colourscheme that takes its colours from some other colourscheme
@@ -53,8 +50,8 @@ public class FollowerColourScheme extends ResidueColourScheme
    * be coloured
    */
   @Override
-  public ColourSchemeI getInstance(AnnotatedCollectionI coll,
-          Map<SequenceI, SequenceCollectionI> hrs)
+  public ColourSchemeI getInstance(AlignViewportI view,
+          AnnotatedCollectionI coll)
   {
     return new FollowerColourScheme();
   }
index 7123d93..2724f77 100755 (executable)
  */
 package jalview.schemes;
 
+import jalview.api.AlignViewportI;
 import jalview.datamodel.AnnotatedCollectionI;
-import jalview.datamodel.SequenceCollectionI;
-import jalview.datamodel.SequenceI;
 
 import java.awt.Color;
-import java.util.Map;
 
 public class HelixColourScheme extends ScoreColourScheme
 {
@@ -58,8 +56,8 @@ public class HelixColourScheme extends ScoreColourScheme
    * be coloured
    */
   @Override
-  public ColourSchemeI getInstance(AnnotatedCollectionI coll,
-          Map<SequenceI, SequenceCollectionI> hrs)
+  public ColourSchemeI getInstance(AlignViewportI view,
+          AnnotatedCollectionI coll)
   {
     return new HelixColourScheme();
   }
index 69af3c9..d886bdf 100755 (executable)
  */
 package jalview.schemes;
 
+import jalview.api.AlignViewportI;
 import jalview.datamodel.AnnotatedCollectionI;
-import jalview.datamodel.SequenceCollectionI;
-import jalview.datamodel.SequenceI;
 
 import java.awt.Color;
-import java.util.Map;
 
 /**
  * DOCUMENT ME!
@@ -75,8 +73,8 @@ public class HydrophobicColourScheme extends ScoreColourScheme
    * be coloured
    */
   @Override
-  public ColourSchemeI getInstance(AnnotatedCollectionI coll,
-          Map<SequenceI, SequenceCollectionI> hrs)
+  public ColourSchemeI getInstance(AlignViewportI view,
+          AnnotatedCollectionI coll)
   {
     return new HydrophobicColourScheme();
   }
diff --git a/src/jalview/schemes/IdColourScheme.java b/src/jalview/schemes/IdColourScheme.java
new file mode 100644 (file)
index 0000000..5add470
--- /dev/null
@@ -0,0 +1,108 @@
+/*
+ * 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.schemes;
+
+import jalview.api.AlignViewportI;
+import jalview.datamodel.AnnotatedCollectionI;
+import jalview.datamodel.SequenceCollectionI;
+import jalview.datamodel.SequenceI;
+
+import java.awt.Color;
+import java.util.Map;
+
+/**
+ * shade sequences using the colour shown in the ID panel. Useful to map
+ * sequence groupings onto residue data (eg tree subgroups visualised on
+ * structures or overview window)
+ * 
+ * @author jprocter
+ */
+public class IdColourScheme implements ColourSchemeI
+{
+  AlignViewportI view = null;
+
+  public IdColourScheme()
+  {
+
+  }
+  public IdColourScheme(AlignViewportI view, AnnotatedCollectionI coll)
+  {
+    this.view = view;
+  }
+
+
+  @Override
+  public String getSchemeName()
+  {
+    return JalviewColourScheme.IdColour.toString();
+  }
+
+  /**
+   * Returns a new instance of this colour scheme with which the given data may
+   * be coloured
+   */
+  @Override
+  public ColourSchemeI getInstance(AlignViewportI view,
+          AnnotatedCollectionI coll)
+  {
+    return new IdColourScheme(view, coll);
+  }
+
+  @Override
+  public void alignmentChanged(AnnotatedCollectionI alignment,
+          Map<SequenceI, SequenceCollectionI> hiddenReps)
+  {
+  }
+
+  @Override
+  public Color findColour(char symbol, int position, SequenceI seq,
+          String consensusResidue, float pid)
+  {
+    // rather than testing if coll is a sequence group, and if so looking at
+    // ((SequenceGroup)coll).idColour
+    // we always return the sequence ID colour, in case the user has customised
+    // the displayed Id colour by right-clicking an internal node in the tree.
+    if (view == null)
+    {
+      return Color.WHITE;
+    }
+    Color col = view.getSequenceColour(seq);
+    return Color.WHITE.equals(col) ? Color.WHITE : col.darker();
+  }
+
+  @Override
+  public boolean hasGapColour()
+  {
+    return false;
+  }
+
+  @Override
+  public boolean isApplicableTo(AnnotatedCollectionI ac)
+  {
+    return true;
+  }
+
+  @Override
+  public boolean isSimple()
+  {
+    return false;
+  }
+}
index e1fc02d..456397e 100644 (file)
@@ -42,7 +42,8 @@ public enum JalviewColourScheme
   Nucleotide("Nucleotide", NucleotideColourScheme.class),
   PurinePyrimidine("Purine/Pyrimidine", PurinePyrimidineColourScheme.class),
   RNAHelices("RNA Helices", RNAHelicesColour.class),
-  TCoffee("T-Coffee Scores", TCoffeeColourScheme.class);
+  TCoffee("T-Coffee Scores", TCoffeeColourScheme.class),
+  IdColour("Sequence ID", IdColourScheme.class);
   // RNAInteraction("RNA Interaction type", RNAInteractionColourScheme.class)
 
   private String name;
index abae733..4977107 100755 (executable)
  */
 package jalview.schemes;
 
+import jalview.api.AlignViewportI;
 import jalview.datamodel.AnnotatedCollectionI;
-import jalview.datamodel.SequenceCollectionI;
-import jalview.datamodel.SequenceI;
-
-import java.util.Map;
 
 /**
  * DOCUMENT ME!
@@ -59,8 +56,8 @@ public class NucleotideColourScheme extends ResidueColourScheme
    * be coloured
    */
   @Override
-  public ColourSchemeI getInstance(AnnotatedCollectionI coll,
-          Map<SequenceI, SequenceCollectionI> hrs)
+  public ColourSchemeI getInstance(AlignViewportI view,
+          AnnotatedCollectionI coll)
   {
     return new NucleotideColourScheme();
   }
index fc922b9..3a5c066 100755 (executable)
  */
 package jalview.schemes;
 
+import jalview.api.AlignViewportI;
 import jalview.datamodel.AnnotatedCollectionI;
-import jalview.datamodel.SequenceCollectionI;
 import jalview.datamodel.SequenceGroup;
 import jalview.datamodel.SequenceI;
 import jalview.util.Comparison;
 
 import java.awt.Color;
-import java.util.Map;
 
 public class PIDColourScheme extends ResidueColourScheme
 {
@@ -92,8 +91,8 @@ public class PIDColourScheme extends ResidueColourScheme
    * be coloured
    */
   @Override
-  public ColourSchemeI getInstance(AnnotatedCollectionI coll,
-          Map<SequenceI, SequenceCollectionI> hrs)
+  public ColourSchemeI getInstance(AlignViewportI view,
+          AnnotatedCollectionI coll)
   {
     return new PIDColourScheme();
   }
index 1b36f30..a8270cc 100644 (file)
  */
 package jalview.schemes;
 
+import jalview.api.AlignViewportI;
 import jalview.datamodel.AnnotatedCollectionI;
-import jalview.datamodel.SequenceCollectionI;
-import jalview.datamodel.SequenceI;
-
-import java.util.Map;
 
 /**
  * Class is based off of NucleotideColourScheme
@@ -59,8 +56,8 @@ public class PurinePyrimidineColourScheme extends ResidueColourScheme
    * be coloured
    */
   @Override
-  public ColourSchemeI getInstance(AnnotatedCollectionI coll,
-          Map<SequenceI, SequenceCollectionI> hrs)
+  public ColourSchemeI getInstance(AlignViewportI view,
+          AnnotatedCollectionI coll)
   {
     return new PurinePyrimidineColourScheme();
   }
index dbc9c03..33b275d 100644 (file)
@@ -20,6 +20,7 @@
  */
 package jalview.schemes;
 
+import jalview.api.AlignViewportI;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.AnnotatedCollectionI;
@@ -45,7 +46,7 @@ public class RNAHelicesColour extends ResidueColourScheme
    * Maps sequence positions to the RNA helix they belong to. Key: position,
    * Value: helix TODO: Revise or drop in favour of annotation position numbers
    */
-  public Hashtable<Integer, String> positionsToHelix = new Hashtable<Integer, String>();
+  public Hashtable<Integer, String> positionsToHelix = new Hashtable<>();
 
   /**
    * Number of helices in the RNA secondary structure
@@ -132,7 +133,7 @@ public class RNAHelicesColour extends ResidueColourScheme
       annotation.getRNAStruc();
       lastrefresh = annotation._rnasecstr.hashCode();
       numHelix = 0;
-      positionsToHelix = new Hashtable<Integer, String>();
+      positionsToHelix = new Hashtable<>();
 
       // Figure out number of helices
       // Length of rnasecstr is the number of pairs of positions that base pair
@@ -206,8 +207,8 @@ public class RNAHelicesColour extends ResidueColourScheme
   }
 
   @Override
-  public ColourSchemeI getInstance(AnnotatedCollectionI sg,
-          Map<SequenceI, SequenceCollectionI> hiddenRepSequences)
+  public ColourSchemeI getInstance(AlignViewportI view,
+          AnnotatedCollectionI sg)
   {
     return new RNAHelicesColour(sg);
   }
index d236803..8610417 100644 (file)
  */
 package jalview.schemes;
 
+import jalview.api.AlignViewportI;
 import jalview.datamodel.AnnotatedCollectionI;
-import jalview.datamodel.SequenceCollectionI;
 import jalview.datamodel.SequenceI;
 
 import java.awt.Color;
-import java.util.Map;
 
 public class RNAInteractionColourScheme extends ResidueColourScheme
 {
@@ -73,8 +72,8 @@ public class RNAInteractionColourScheme extends ResidueColourScheme
    * be coloured
    */
   @Override
-  public ColourSchemeI getInstance(AnnotatedCollectionI coll,
-          Map<SequenceI, SequenceCollectionI> hrs)
+  public ColourSchemeI getInstance(AlignViewportI view,
+          AnnotatedCollectionI coll)
   {
     return new RNAInteractionColourScheme();
   }
index 2f7a5e0..03ab536 100755 (executable)
@@ -46,6 +46,12 @@ public abstract class ResidueColourScheme implements ColourSchemeI
   public static final String USER_DEFINED_MENU = "*User Defined*";
 
   /*
+   * the canonical name of the annotation colour scheme 
+   * (may be used to identify it in menu items)
+   */
+  public static final String ANNOTATION_COLOUR = "Annotation";
+
+  /*
    * lookup up by character value e.g. 'G' to the colors array index
    * e.g. if symbolIndex['K'] = 11 then colors[11] is the colour for K
    */
index a4e6480..d435065 100755 (executable)
@@ -20,6 +20,8 @@
  */
 package jalview.schemes;
 
+import jalview.analysis.GeneticCodes;
+
 import java.awt.Color;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -502,260 +504,6 @@ public class ResidueProperties
 
   public static String START = "ATG";
 
-  /**
-   * Nucleotide Ambiguity Codes
-   */
-  public static final Map<String, String[]> ambiguityCodes = new Hashtable<>();
-
-  /**
-   * Codon triplets with additional symbols for unambiguous codons that include
-   * ambiguity codes
-   */
-  public static final Hashtable<String, String> codonHash2 = new Hashtable<>();
-
-  /**
-   * all ambiguity codes for a given base
-   */
-  public final static Hashtable<String, List<String>> _ambiguityCodes = new Hashtable<>();
-
-  static
-  {
-    /*
-     * Ambiguity codes as per http://www.chem.qmul.ac.uk/iubmb/misc/naseq.html
-     */
-    ambiguityCodes.put("R", new String[] { "A", "G" });
-    ambiguityCodes.put("Y", new String[] { "T", "C" });
-    ambiguityCodes.put("W", new String[] { "A", "T" });
-    ambiguityCodes.put("S", new String[] { "G", "C" });
-    ambiguityCodes.put("M", new String[] { "A", "C" });
-    ambiguityCodes.put("K", new String[] { "G", "T" });
-    ambiguityCodes.put("H", new String[] { "A", "T", "C" });
-    ambiguityCodes.put("B", new String[] { "G", "T", "C" });
-    ambiguityCodes.put("V", new String[] { "G", "A", "C" });
-    ambiguityCodes.put("D", new String[] { "G", "A", "T" });
-    ambiguityCodes.put("N", new String[] { "G", "A", "T", "C" });
-
-    // Now build codon translation table
-    codonHash2.put("AAA", "K");
-    codonHash2.put("AAG", "K");
-    codonHash2.put("AAC", "N");
-    codonHash2.put("AAT", "N");
-
-    codonHash2.put("CAA", "Q");
-    codonHash2.put("CAG", "Q");
-    codonHash2.put("CAC", "H");
-    codonHash2.put("CAT", "H");
-
-    codonHash2.put("GAA", "E");
-    codonHash2.put("GAG", "E");
-    codonHash2.put("GAC", "D");
-    codonHash2.put("GAT", "D");
-
-    codonHash2.put("TAC", "Y");
-    codonHash2.put("TAT", "Y");
-
-    codonHash2.put("ACA", "T");
-    codonHash2.put("ACC", "T");
-    codonHash2.put("ACT", "T");
-    codonHash2.put("ACG", "T");
-
-    codonHash2.put("CCA", "P");
-    codonHash2.put("CCG", "P");
-    codonHash2.put("CCC", "P");
-    codonHash2.put("CCT", "P");
-
-    codonHash2.put("GCA", "A");
-    codonHash2.put("GCG", "A");
-    codonHash2.put("GCC", "A");
-    codonHash2.put("GCT", "A");
-
-    codonHash2.put("TCA", "S");
-    codonHash2.put("TCG", "S");
-    codonHash2.put("TCC", "S");
-    codonHash2.put("TCT", "S");
-    codonHash2.put("AGC", "S");
-    codonHash2.put("AGT", "S");
-
-    codonHash2.put("AGA", "R");
-    codonHash2.put("AGG", "R");
-    codonHash2.put("CGA", "R");
-    codonHash2.put("CGG", "R");
-    codonHash2.put("CGC", "R");
-    codonHash2.put("CGT", "R");
-
-    codonHash2.put("GGA", "G");
-    codonHash2.put("GGG", "G");
-    codonHash2.put("GGC", "G");
-    codonHash2.put("GGT", "G");
-
-    codonHash2.put("TGA", "*");
-    codonHash2.put("TAA", "*");
-    codonHash2.put("TAG", "*");
-
-    codonHash2.put("TGG", "W");
-
-    codonHash2.put("TGC", "C");
-    codonHash2.put("TGT", "C");
-
-    codonHash2.put("ATA", "I");
-    codonHash2.put("ATC", "I");
-    codonHash2.put("ATT", "I");
-
-    codonHash2.put("ATG", "M");
-
-    codonHash2.put("CTA", "L");
-    codonHash2.put("CTG", "L");
-    codonHash2.put("CTC", "L");
-    codonHash2.put("CTT", "L");
-    codonHash2.put("TTA", "L");
-    codonHash2.put("TTG", "L");
-
-    codonHash2.put("GTA", "V");
-    codonHash2.put("GTG", "V");
-    codonHash2.put("GTC", "V");
-    codonHash2.put("GTT", "V");
-
-    codonHash2.put("TTC", "F");
-    codonHash2.put("TTT", "F");
-
-    buildAmbiguityCodonSet();
-  }
-
-  /**
-   * programmatic generation of codons including ambiguity codes
-   */
-  public static void buildAmbiguityCodonSet()
-  {
-    if (_ambiguityCodes.size() > 0)
-    {
-      System.err
-              .println("Ignoring multiple calls to buildAmbiguityCodonSet");
-      return;
-    }
-    // Invert the ambiguity code set
-    for (Map.Entry<String, String[]> acode : ambiguityCodes.entrySet())
-    {
-      for (String r : acode.getValue())
-      {
-        List<String> codesfor = _ambiguityCodes.get(r);
-        if (codesfor == null)
-        {
-          _ambiguityCodes.put(r, codesfor = new ArrayList<>());
-        }
-        if (!codesfor.contains(acode.getKey()))
-        {
-          codesfor.add(acode.getKey());
-        }
-        else
-        {
-          System.err.println(
-                  "Inconsistency in the IUBMB ambiguity code nomenclature table: collision for "
-                          + acode.getKey() + " in residue " + r);
-        }
-      }
-    }
-    // and programmatically add in the ambiguity codes that yield the same amino
-    // acid
-    String[] unambcodons = codonHash2.keySet()
-            .toArray(new String[codonHash2.size()]);
-    for (String codon : unambcodons)
-    {
-      String residue = codonHash2.get(codon);
-      String acodon[][] = new String[codon.length()][];
-      for (int i = 0, iSize = codon.length(); i < iSize; i++)
-      {
-        String _ac = "" + codon.charAt(i);
-        List<String> acodes = _ambiguityCodes.get(_ac);
-        if (acodes != null)
-        {
-          acodon[i] = acodes.toArray(new String[acodes.size()]);
-        }
-        else
-        {
-          acodon[i] = new String[] {};
-        }
-      }
-      // enumerate all combinations and test for veracity of translation
-      int tpos[] = new int[codon.length()],
-              cpos[] = new int[codon.length()];
-      for (int i = 0; i < tpos.length; i++)
-      {
-        tpos[i] = -1;
-      }
-      tpos[acodon.length - 1] = 0;
-      int ipos, j;
-      while (tpos[0] < acodon[0].length)
-      {
-        // make all codons for this combination
-        char allres[][] = new char[tpos.length][];
-        String _acodon = "";
-        for (ipos = 0; ipos < tpos.length; ipos++)
-        {
-          if (acodon[ipos].length == 0 || tpos[ipos] < 0)
-          {
-            _acodon += codon.charAt(ipos);
-            allres[ipos] = new char[] { codon.charAt(ipos) };
-          }
-          else
-          {
-            _acodon += acodon[ipos][tpos[ipos]];
-            String[] altbase = ambiguityCodes.get(acodon[ipos][tpos[ipos]]);
-            allres[ipos] = new char[altbase.length];
-            j = 0;
-            for (String ab : altbase)
-            {
-              allres[ipos][j++] = ab.charAt(0);
-            }
-          }
-        }
-        // test all codons for this combination
-        for (ipos = 0; ipos < cpos.length; ipos++)
-        {
-          cpos[ipos] = 0;
-        }
-        boolean valid = true;
-        do
-        {
-          String _codon = "";
-          for (j = 0; j < cpos.length; j++)
-          {
-            _codon += allres[j][cpos[j]];
-          }
-          String tr = codonHash2.get(_codon);
-          if (valid = (tr != null && tr.equals(residue)))
-          {
-            // advance to next combination
-            ipos = acodon.length - 1;
-            while (++cpos[ipos] >= allres[ipos].length && ipos > 0)
-            {
-              cpos[ipos] = 0;
-              ipos--;
-            }
-          }
-        } while (valid && cpos[0] < allres[0].length);
-        if (valid)
-        {
-          // Add this to the set of codons we will translate
-          // System.out.println("Adding ambiguity codon: " + _acodon + " for "
-          // + residue);
-          codonHash2.put(_acodon, residue);
-        }
-        else
-        {
-          // System.err.println("Rejecting ambiguity codon: " + _acodon
-          // + " for " + residue);
-        }
-        // next combination
-        ipos = acodon.length - 1;
-        while (++tpos[ipos] >= acodon[ipos].length && ipos > 0)
-        {
-          tpos[ipos] = -1;
-          ipos--;
-        }
-      }
-    }
-  }
-
   // Stores residue codes/names and colours and other things
   public static Map<String, Map<String, Integer>> propHash = new Hashtable<>();
 
@@ -1148,55 +896,60 @@ public class ResidueProperties
 
   public static String codonTranslate(String lccodon)
   {
-    String cdn = codonHash2.get(lccodon.toUpperCase());
-    if ("*".equals(cdn))
+    String peptide = GeneticCodes.getInstance().getStandardCodeTable()
+            .translate(lccodon);
+    if ("*".equals(peptide))
     {
-      return STOP;
+      return "STOP";
     }
-    return cdn;
+    return peptide;
   }
 
-  public static Hashtable<String, String> toDssp3State;
+  /*
+   * lookup of (A-Z) alternative secondary structure symbols'
+   * equivalents in DSSP3 notation
+   */
+  private static char[] toDssp3State;
   static
   {
-    toDssp3State = new Hashtable<>();
-    toDssp3State.put("H", "H");
-    toDssp3State.put("E", "E");
-    toDssp3State.put("C", " ");
-    toDssp3State.put(" ", " ");
-    toDssp3State.put("T", " ");
-    toDssp3State.put("B", "E");
-    toDssp3State.put("G", "H");
-    toDssp3State.put("I", "H");
-    toDssp3State.put("X", " ");
+    toDssp3State = new char[9]; // for 'A'-'I'; extend if needed
+    Arrays.fill(toDssp3State, ' ');
+    toDssp3State['B' - 'A'] = 'E';
+    toDssp3State['E' - 'A'] = 'E';
+    toDssp3State['G' - 'A'] = 'H';
+    toDssp3State['H' - 'A'] = 'H';
+    toDssp3State['I' - 'A'] = 'H';
   }
 
   /**
    * translate from other dssp secondary structure alphabets to 3-state
    * 
-   * @param ssstring
-   * @return ssstring as a three-state secondary structure assignment.
+   * @param ssString
+   * @return ssstring
    */
-  public static String getDssp3state(String ssstring)
+  public static String getDssp3state(String ssString)
   {
-    if (ssstring == null)
+    if (ssString == null)
     {
       return null;
     }
-    StringBuffer ss = new StringBuffer();
-    for (int i = 0; i < ssstring.length(); i++)
+    int lookupSize = toDssp3State.length;
+    int len = ssString.length();
+    char[] trans = new char[len];
+    for (int i = 0; i < len; i++)
     {
-      String ssc = ssstring.substring(i, i + 1);
-      if (toDssp3State.containsKey(ssc))
+      char c = ssString.charAt(i);
+      int index = c - 'A';
+      if (index < 0 || index >= lookupSize)
       {
-        ss.append(toDssp3State.get(ssc));
+        trans[i] = ' ';
       }
       else
       {
-        ss.append(" ");
+        trans[i] = toDssp3State[index];
       }
     }
-    return ss.toString();
+    return new String(trans);
   }
 
   static
index e1b60ca..eae76e1 100755 (executable)
  */
 package jalview.schemes;
 
+import jalview.api.AlignViewportI;
 import jalview.datamodel.AnnotatedCollectionI;
-import jalview.datamodel.SequenceCollectionI;
 import jalview.datamodel.SequenceI;
 import jalview.util.Comparison;
 
 import java.awt.Color;
-import java.util.Map;
 
 /**
  * DOCUMENT ME!
@@ -119,8 +118,8 @@ public class ScoreColourScheme extends ResidueColourScheme
    * be coloured
    */
   @Override
-  public ColourSchemeI getInstance(AnnotatedCollectionI coll,
-          Map<SequenceI, SequenceCollectionI> hrs)
+  public ColourSchemeI getInstance(AlignViewportI view,
+          AnnotatedCollectionI coll)
   {
     return new ScoreColourScheme(symbolIndex, scores, min, max);
   }
index 5f11c29..ef55d69 100755 (executable)
  */
 package jalview.schemes;
 
+import jalview.api.AlignViewportI;
 import jalview.datamodel.AnnotatedCollectionI;
-import jalview.datamodel.SequenceCollectionI;
-import jalview.datamodel.SequenceI;
 
 import java.awt.Color;
-import java.util.Map;
 
 /**
  * DOCUMENT ME!
@@ -75,8 +73,8 @@ public class StrandColourScheme extends ScoreColourScheme
    * be coloured
    */
   @Override
-  public ColourSchemeI getInstance(AnnotatedCollectionI coll,
-          Map<SequenceI, SequenceCollectionI> hrs)
+  public ColourSchemeI getInstance(AlignViewportI view,
+          AnnotatedCollectionI coll)
   {
     return new StrandColourScheme();
   }
index 812dca7..db85cc8 100644 (file)
@@ -20,6 +20,7 @@
  */
 package jalview.schemes;
 
+import jalview.api.AlignViewportI;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.AnnotatedCollectionI;
@@ -83,10 +84,10 @@ public class TCoffeeColourScheme extends ResidueColourScheme
 
     // assume only one set of TCOFFEE scores - but could have more than one
     // potentially.
-    List<AlignmentAnnotation> annots = new ArrayList<AlignmentAnnotation>();
+    List<AlignmentAnnotation> annots = new ArrayList<>();
     // Search alignment to get all tcoffee annotation and pick one set of
     // annotation to use to colour seqs.
-    seqMap = new IdentityHashMap<SequenceI, Color[]>();
+    seqMap = new IdentityHashMap<>();
     AnnotatedCollectionI alcontext = alignment instanceof AlignmentI
             ? alignment
             : alignment.getContext();
@@ -143,8 +144,8 @@ public class TCoffeeColourScheme extends ResidueColourScheme
   }
 
   @Override
-  public ColourSchemeI getInstance(AnnotatedCollectionI sg,
-          Map<SequenceI, SequenceCollectionI> hiddenRepSequences)
+  public ColourSchemeI getInstance(AlignViewportI view,
+          AnnotatedCollectionI sg)
   {
     return new TCoffeeColourScheme(sg);
   }
index ac8abbc..e2a4516 100755 (executable)
  */
 package jalview.schemes;
 
+import jalview.api.AlignViewportI;
 import jalview.datamodel.AnnotatedCollectionI;
-import jalview.datamodel.SequenceCollectionI;
-import jalview.datamodel.SequenceI;
-
-import java.util.Map;
 
 public class TaylorColourScheme extends ResidueColourScheme
 {
@@ -50,8 +47,8 @@ public class TaylorColourScheme extends ResidueColourScheme
    * be coloured
    */
   @Override
-  public ColourSchemeI getInstance(AnnotatedCollectionI coll,
-          Map<SequenceI, SequenceCollectionI> hrs)
+  public ColourSchemeI getInstance(AlignViewportI view,
+          AnnotatedCollectionI coll)
   {
     return new TaylorColourScheme();
   }
index 67116b8..7d8035a 100755 (executable)
  */
 package jalview.schemes;
 
+import jalview.api.AlignViewportI;
 import jalview.datamodel.AnnotatedCollectionI;
-import jalview.datamodel.SequenceCollectionI;
-import jalview.datamodel.SequenceI;
 
 import java.awt.Color;
-import java.util.Map;
 
 /**
  * DOCUMENT ME!
@@ -75,8 +73,8 @@ public class TurnColourScheme extends ScoreColourScheme
    * be coloured
    */
   @Override
-  public ColourSchemeI getInstance(AnnotatedCollectionI coll,
-          Map<SequenceI, SequenceCollectionI> hrs)
+  public ColourSchemeI getInstance(AlignViewportI view,
+          AnnotatedCollectionI coll)
   {
     return new TurnColourScheme();
   }
index bf62e45..d77f2f5 100755 (executable)
@@ -20,9 +20,8 @@
  */
 package jalview.schemes;
 
+import jalview.api.AlignViewportI;
 import jalview.datamodel.AnnotatedCollectionI;
-import jalview.datamodel.SequenceCollectionI;
-import jalview.datamodel.SequenceI;
 import jalview.util.ColorUtils;
 import jalview.util.StringUtils;
 
@@ -56,8 +55,8 @@ public class UserColourScheme extends ResidueColourScheme
   }
 
   @Override
-  public ColourSchemeI getInstance(AnnotatedCollectionI sg,
-          Map<SequenceI, SequenceCollectionI> hiddenRepSequences)
+  public ColourSchemeI getInstance(AlignViewportI view,
+          AnnotatedCollectionI sg)
   {
     return new UserColourScheme(this);
   }
index c32a39c..d69695f 100755 (executable)
  */
 package jalview.schemes;
 
+import jalview.api.AlignViewportI;
 import jalview.datamodel.AnnotatedCollectionI;
-import jalview.datamodel.SequenceCollectionI;
-import jalview.datamodel.SequenceI;
-
-import java.util.Map;
 
 /**
  * DOCUMENT ME!
@@ -59,8 +56,8 @@ public class ZappoColourScheme extends ResidueColourScheme
    * be coloured
    */
   @Override
-  public ColourSchemeI getInstance(AnnotatedCollectionI coll,
-          Map<SequenceI, SequenceCollectionI> hrs)
+  public ColourSchemeI getInstance(AlignViewportI view,
+          AnnotatedCollectionI coll)
   {
     return new ZappoColourScheme();
   }
index 50a34fc..5afbca5 100755 (executable)
@@ -43,9 +43,8 @@ public class DBRefUtils
   /*
    * lookup from lower-case form of a name to its canonical (standardised) form
    */
-  private static Map<String, String> canonicalSourceNameLookup = new HashMap<String, String>();
+  private static Map<String, String> canonicalSourceNameLookup = new HashMap<>();
 
-  private static Map<String, String> dasCoordinateSystemsLookup = new HashMap<String, String>();
 
   static
   {
@@ -73,10 +72,6 @@ public class DBRefUtils
               canonicalSourceNameLookup.get(k));
     }
 
-    dasCoordinateSystemsLookup.put("pdbresnum", DBRefSource.PDB);
-    dasCoordinateSystemsLookup.put("uniprot", DBRefSource.UNIPROT);
-    dasCoordinateSystemsLookup.put("embl", DBRefSource.EMBL);
-    // dasCoordinateSystemsLookup.put("embl", DBRefSource.EMBLCDS);
   }
 
   /**
@@ -97,13 +92,13 @@ public class DBRefUtils
     {
       return dbrefs;
     }
-    HashSet<String> srcs = new HashSet<String>();
+    HashSet<String> srcs = new HashSet<>();
     for (String src : sources)
     {
       srcs.add(src.toUpperCase());
     }
 
-    List<DBRefEntry> res = new ArrayList<DBRefEntry>();
+    List<DBRefEntry> res = new ArrayList<>();
     for (DBRefEntry dbr : dbrefs)
     {
       String source = getCanonicalName(dbr.getSource());
@@ -122,29 +117,6 @@ public class DBRefUtils
   }
 
   /**
-   * isDasCoordinateSystem
-   * 
-   * @param string
-   *          String
-   * @param dBRefEntry
-   *          DBRefEntry
-   * @return boolean true if Source DBRefEntry is compatible with DAS
-   *         CoordinateSystem name
-   */
-
-  public static boolean isDasCoordinateSystem(String string,
-          DBRefEntry dBRefEntry)
-  {
-    if (string == null || dBRefEntry == null)
-    {
-      return false;
-    }
-    String coordsys = dasCoordinateSystemsLookup.get(string.toLowerCase());
-    return coordsys == null ? false
-            : coordsys.equals(dBRefEntry.getSource());
-  }
-
-  /**
    * look up source in an internal list of database reference sources and return
    * the canonical jalview name for the source, or the original string if it has
    * no canonical form.
@@ -218,7 +190,7 @@ public class DBRefUtils
   static List<DBRefEntry> searchRefs(DBRefEntry[] refs, DBRefEntry entry,
           DbRefComp comparator)
   {
-    List<DBRefEntry> rfs = new ArrayList<DBRefEntry>();
+    List<DBRefEntry> rfs = new ArrayList<>();
     if (refs == null || entry == null)
     {
       return rfs;
@@ -594,7 +566,7 @@ public class DBRefUtils
   public static List<DBRefEntry> searchRefsForSource(DBRefEntry[] dbRefs,
           String source)
   {
-    List<DBRefEntry> matches = new ArrayList<DBRefEntry>();
+    List<DBRefEntry> matches = new ArrayList<>();
     if (dbRefs != null && source != null)
     {
       for (DBRefEntry dbref : dbRefs)
@@ -644,7 +616,7 @@ public class DBRefUtils
       // nothing to do
       return;
     }
-    List<DBRefEntry> selfs = new ArrayList<DBRefEntry>();
+    List<DBRefEntry> selfs = new ArrayList<>();
     {
       DBRefEntry[] selfArray = selectDbRefs(!sequence.isProtein(),
               sequence.getDBRefs());
@@ -664,11 +636,11 @@ public class DBRefUtils
         selfs.remove(p);
       }
     }
-    List<DBRefEntry> toPromote = new ArrayList<DBRefEntry>();
+    List<DBRefEntry> toPromote = new ArrayList<>();
 
     for (DBRefEntry p : pr)
     {
-      List<String> promType = new ArrayList<String>();
+      List<String> promType = new ArrayList<>();
       if (sequence.isProtein())
       {
         switch (getCanonicalName(p.getSource()))
diff --git a/src/jalview/util/JSONUtils.java b/src/jalview/util/JSONUtils.java
new file mode 100644 (file)
index 0000000..cdfc88e
--- /dev/null
@@ -0,0 +1,34 @@
+package jalview.util;
+
+import org.json.simple.JSONArray;
+
+public class JSONUtils
+{
+
+  /**
+   * Converts a JSONArray of values to a string as a comma-separated list.
+   * Answers null if the array is null or empty.
+   * 
+   * @param jsonArray
+   * @return
+   */
+  public static String arrayToList(JSONArray jsonArray)
+  {
+    if (jsonArray == null)
+    {
+      return null;
+    }
+
+    StringBuilder sb = new StringBuilder();
+    for (int i = 0; i < jsonArray.size(); i++)
+    {
+      if (i > 0)
+      {
+        sb.append(",");
+      }
+      sb.append(jsonArray.get(i).toString());
+    }
+    return sb.length() == 0 ? null : sb.toString();
+  }
+
+}
index 1366ada..148ea16 100644 (file)
@@ -662,7 +662,8 @@ public abstract class AlignmentViewport
          * retain any colour thresholds per group while
          * changing choice of colour scheme (JAL-2386)
          */
-        sg.setColourScheme(cs);
+        sg.setColourScheme(
+                cs == null ? null : cs.getInstance(this, sg));
         if (cs != null)
         {
           sg.getGroupColourScheme().alignmentChanged(sg,
@@ -1636,6 +1637,7 @@ public abstract class AlignmentViewport
   public void invertColumnSelection()
   {
     colSel.invertColumnSelection(0, alignment.getWidth(), alignment);
+    isColSelChanged(true);
   }
 
   @Override
@@ -2954,4 +2956,68 @@ public abstract class AlignmentViewport
   {
     return currentTree;
   }
+
+  /**
+   * flag set to indicate if structure views might be out of sync with sequences
+   * in the alignment
+   */
+
+  private boolean needToUpdateStructureViews = false;
+
+  @Override
+  public boolean isUpdateStructures()
+  {
+    return needToUpdateStructureViews;
+  }
+
+  @Override
+  public void setUpdateStructures(boolean update)
+  {
+    needToUpdateStructureViews = update;
+  }
+
+  @Override
+  public boolean needToUpdateStructureViews()
+  {
+    boolean update = needToUpdateStructureViews;
+    needToUpdateStructureViews = false;
+    return update;
+  }
+
+  @Override
+  public void addSequenceGroup(SequenceGroup sequenceGroup)
+  {
+    alignment.addGroup(sequenceGroup);
+
+    Color col = sequenceGroup.idColour;
+    if (col != null)
+    {
+      col = col.brighter();
+
+      for (SequenceI sq : sequenceGroup.getSequences())
+      {
+        setSequenceColour(sq, col);
+      }
+    }
+
+    if (codingComplement != null)
+    {
+      SequenceGroup mappedGroup = MappingUtils
+              .mapSequenceGroup(sequenceGroup, this, codingComplement);
+      if (mappedGroup.getSequences().size() > 0)
+      {
+        codingComplement.getAlignment().addGroup(mappedGroup);
+
+        if (col != null)
+        {
+          for (SequenceI seq : mappedGroup.getSequences())
+          {
+            codingComplement.setSequenceColour(seq, col);
+          }
+        }
+      }
+      // propagate the structure view update flag according to our own setting
+      codingComplement.setUpdateStructures(needToUpdateStructureViews);
+    }
+  }
 }
index 5e7fca2..1693294 100644 (file)
@@ -25,31 +25,39 @@ import jalview.api.RotatableCanvasI;
 import jalview.api.analysis.ScoreModelI;
 import jalview.api.analysis.SimilarityParamsI;
 import jalview.datamodel.AlignmentView;
+import jalview.datamodel.Point;
 import jalview.datamodel.SequenceI;
 import jalview.datamodel.SequencePoint;
 
+import java.util.List;
 import java.util.Vector;
 
 public class PCAModel
 {
-  private volatile PCA pca;
-
-  int top;
+  /*
+   * inputs
+   */
+  private AlignmentView inputData;
 
-  AlignmentView seqstrings;
+  private final SequenceI[] seqs;
 
-  SequenceI[] seqs;
+  private final SimilarityParamsI similarityParams;
 
   /*
-   * Name of score model used to calculate PCA
+   * options - score model, nucleotide / protein
    */
-  ScoreModelI scoreModel;
+  private ScoreModelI scoreModel;
 
   private boolean nucleotide = false;
 
-  private Vector<SequencePoint> points;
+  /*
+   * outputs
+   */
+  private PCA pca;
 
-  private SimilarityParamsI similarityParams;
+  int top;
+
+  private List<SequencePoint> points;
 
   /**
    * Constructor given sequence data, score model and score calculation
@@ -64,17 +72,21 @@ public class PCAModel
   public PCAModel(AlignmentView seqData, SequenceI[] sqs, boolean nuc,
           ScoreModelI modelName, SimilarityParamsI params)
   {
-    seqstrings = seqData;
+    inputData = seqData;
     seqs = sqs;
     nucleotide = nuc;
     scoreModel = modelName;
     similarityParams = params;
   }
 
-  public void run()
+  /**
+   * Performs the PCA calculation (in the same thread) and extracts result data
+   * needed for visualisation by PCAPanel
+   */
+  public void calculate()
   {
-    pca = new PCA(seqstrings, scoreModel, similarityParams);
-    pca.run();
+    pca = new PCA(inputData, scoreModel, similarityParams);
+    pca.run(); // executes in same thread, wait for completion
 
     // Now find the component coordinates
     int ii = 0;
@@ -88,13 +100,13 @@ public class PCAModel
     // top = pca.getM().height() - 1;
     top = height - 1;
 
-    points = new Vector<SequencePoint>();
-    float[][] scores = pca.getComponents(top - 1, top - 2, top - 3, 100);
+    points = new Vector<>();
+    Point[] scores = pca.getComponents(top - 1, top - 2, top - 3, 100);
 
     for (int i = 0; i < height; i++)
     {
       SequencePoint sp = new SequencePoint(seqs[i], scores[i]);
-      points.addElement(sp);
+      points.add(sp);
     }
   }
 
@@ -114,17 +126,22 @@ public class PCAModel
   }
 
   /**
+   * Answers the index of the principal dimension of the PCA
    * 
-   * 
-   * @return index of principle dimension of PCA
+   * @return
    */
   public int getTop()
   {
     return top;
   }
 
+  public void setTop(int t)
+  {
+    top = t;
+  }
+
   /**
-   * update the 2d coordinates for the list of points to the given dimensions
+   * Updates the 3D coordinates for the list of points to the given dimensions.
    * Principal dimension is getTop(). Next greatest eigenvector is getTop()-1.
    * Note - pca.getComponents starts counting the spectrum from rank-2 to zero,
    * rather than rank-1, so getComponents(dimN ...) == updateRcView(dimN+1 ..)
@@ -136,11 +153,11 @@ public class PCAModel
   public void updateRcView(int dim1, int dim2, int dim3)
   {
     // note: actual indices for components are dim1-1, etc (patch for JAL-1123)
-    float[][] scores = pca.getComponents(dim1 - 1, dim2 - 1, dim3 - 1, 100);
+    Point[] scores = pca.getComponents(dim1 - 1, dim2 - 1, dim3 - 1, 100);
 
     for (int i = 0; i < pca.getHeight(); i++)
     {
-      points.elementAt(i).coord = scores[i];
+      points.get(i).coord = scores[i];
     }
   }
 
@@ -149,9 +166,14 @@ public class PCAModel
     return pca.getDetails();
   }
 
-  public AlignmentView getSeqtrings()
+  public AlignmentView getInputData()
+  {
+    return inputData;
+  }
+
+  public void setInputData(AlignmentView data)
   {
-    return seqstrings;
+    inputData = data;
   }
 
   public String getPointsasCsv(boolean transformed, int xdim, int ydim,
@@ -192,42 +214,58 @@ public class PCAModel
       }
       else
       {
-        // output current x,y,z coords for points
-        fl = getPointPosition(s);
-        for (int d = 0; d < fl.length; d++)
-        {
-          csv.append(",");
-          csv.append(fl[d]);
-        }
+        Point p = points.get(s).coord;
+        csv.append(",").append(p.x);
+        csv.append(",").append(p.y);
+        csv.append(",").append(p.z);
       }
       csv.append("\n");
     }
     return csv.toString();
   }
 
+  public String getScoreModelName()
+  {
+    return scoreModel == null ? "" : scoreModel.getName();
+  }
+
+  public void setScoreModel(ScoreModelI sm)
+  {
+    this.scoreModel = sm;
+  }
+
   /**
+   * Answers the parameters configured for pairwise similarity calculations
    * 
-   * @return x,y,z positions of point s (index into points) under current
-   *         transform.
+   * @return
    */
-  public double[] getPointPosition(int s)
+  public SimilarityParamsI getSimilarityParameters()
   {
-    double pts[] = new double[3];
-    float[] p = points.elementAt(s).coord;
-    pts[0] = p[0];
-    pts[1] = p[1];
-    pts[2] = p[2];
-    return pts;
+    return similarityParams;
   }
 
-  public String getScoreModelName()
+  public List<SequencePoint> getSequencePoints()
   {
-    return scoreModel == null ? "" : scoreModel.getName();
+    return points;
   }
 
-  public void setScoreModel(ScoreModelI sm)
+  public void setSequencePoints(List<SequencePoint> sp)
   {
-    this.scoreModel = sm;
+    points = sp;
+  }
+
+  /**
+   * Answers the object holding the values of the computed PCA
+   * 
+   * @return
+   */
+  public PCA getPcaData()
+  {
+    return pca;
   }
 
+  public void setPCA(PCA data)
+  {
+    pca = data;
+  }
 }
index 691e492..6f817bb 100644 (file)
@@ -97,7 +97,7 @@ public class ViewportRanges extends ViewportProperties
    */
   public int getVisibleAlignmentWidth()
   {
-    return al.getWidth() - al.getHiddenColumns().getSize();
+    return al.getVisibleWidth();
   }
 
   /**
index 553f813..4af6fde 100644 (file)
@@ -1029,11 +1029,11 @@ public abstract class FeatureRendererModel
   }
 
   /**
-   * Removes from the list of features any that duplicate the location of a
-   * feature of the same type. Should be used only for features of the same,
-   * simple, feature colour (which normally implies the same feature type). Does
-   * not check visibility settings for feature type or feature group. No
-   * filtering is done if transparency, or any feature filters, are in force.
+   * Removes from the list of features any whose group is not shown, or that are
+   * visible and duplicate the location of a visible feature of the same type.
+   * Should be used only for features of the same, simple, feature colour (which
+   * normally implies the same feature type). No filtering is done if
+   * transparency, or any feature filters, are in force.
    * 
    * @param features
    */
@@ -1057,6 +1057,11 @@ public abstract class FeatureRendererModel
     while (it.hasNext())
     {
       SequenceFeature sf = it.next();
+      if (featureGroupNotShown(sf))
+      {
+        it.remove();
+        continue;
+      }
 
       /*
        * a feature is redundant for rendering purposes if it has the
@@ -1064,7 +1069,8 @@ public abstract class FeatureRendererModel
        * (checking type and isContactFeature as a fail-safe here, although
        * currently they are guaranteed to match in this context)
        */
-      if (lastFeature != null && sf.getBegin() == lastFeature.getBegin()
+      if (lastFeature != null
+              && sf.getBegin() == lastFeature.getBegin()
               && sf.getEnd() == lastFeature.getEnd()
               && sf.isContactFeature() == lastFeature.isContactFeature()
               && sf.getType().equals(lastFeature.getType()))
@@ -1150,4 +1156,32 @@ public abstract class FeatureRendererModel
     return filter == null ? true : filter.matches(sf);
   }
 
+  @Override
+  public boolean isVisible(SequenceFeature feature)
+  {
+    if (feature == null)
+    {
+      return false;
+    }
+    if (getFeaturesDisplayed() == null
+            || !getFeaturesDisplayed().isVisible(feature.getType()))
+    {
+      return false;
+    }
+    if (featureGroupNotShown(feature))
+    {
+      return false;
+    }
+    FeatureColourI fc = featureColours.get(feature.getType());
+    if (fc != null && fc.isOutwithThreshold(feature))
+    {
+      return false;
+    }
+    if (!featureMatchesFilters(feature))
+    {
+      return false;
+    }
+    return true;
+  }
+
 }
index 335529c..78c6da2 100644 (file)
@@ -118,7 +118,10 @@ public class ConsensusThread extends AlignCalcWorker
   protected void eraseConsensus(int aWidth)
   {
     AlignmentAnnotation consensus = getConsensusAnnotation();
-    consensus.annotations = new Annotation[aWidth];
+    if (consensus != null)
+    {
+      consensus.annotations = new Annotation[aWidth];
+    }
     AlignmentAnnotation gap = getGapAnnotation();
     if (gap != null)
     {
index 41e4d0d..ae4207b 100644 (file)
@@ -755,8 +755,6 @@ public class DBRefFetcher implements Runnable
         // and remove it from the rest
         // TODO: decide if we should remove annotated sequence from set
         sdataset.remove(sequence);
-        // TODO: should we make a note of sequences that have received new DB
-        // ids, so we can query all enabled DAS servers for them ?
       }
     }
     return modified;
index ca90d60..e114ea9 100644 (file)
  */
 package jalview.ws.dbsources;
 
+import jalview.analysis.SequenceIdMatcher;
+import jalview.bin.Cache;
 import jalview.datamodel.Alignment;
 import jalview.datamodel.AlignmentI;
+import jalview.datamodel.DBRefEntry;
+import jalview.datamodel.DBRefSource;
+import jalview.datamodel.FeatureProperties;
+import jalview.datamodel.Mapping;
+import jalview.datamodel.Sequence;
+import jalview.datamodel.SequenceFeature;
 import jalview.datamodel.SequenceI;
-import jalview.datamodel.xdb.embl.EmblEntry;
-import jalview.datamodel.xdb.embl.EmblFile;
+import jalview.util.DBRefUtils;
+import jalview.util.DnaUtils;
+import jalview.util.MapList;
+import jalview.util.MappingUtils;
 import jalview.util.MessageManager;
 import jalview.ws.ebi.EBIFetchClient;
+import jalview.xml.binding.embl.EntryType;
+import jalview.xml.binding.embl.EntryType.Feature;
+import jalview.xml.binding.embl.EntryType.Feature.Qualifier;
+import jalview.xml.binding.embl.XrefType;
 
 import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.text.ParseException;
 import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Hashtable;
 import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.regex.Pattern;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.stream.FactoryConfigurationError;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
 
 public abstract class EmblXmlSource extends EbiFileRetrievedProxy
 {
@@ -39,22 +68,24 @@ public abstract class EmblXmlSource extends EbiFileRetrievedProxy
    */
   private static final String EMBL_NOT_FOUND_REPLY = "ERROR 12 No entries found.";
 
+  private static final Pattern SPACE_PATTERN = Pattern.compile(" ");
+
   public EmblXmlSource()
   {
     super();
   }
 
   /**
-   * retrieve and parse an emblxml file
+   * Retrieves and parses an emblxml file, and returns an alignment containing
+   * the parsed sequences, or null if none were found
    * 
    * @param emprefx
-   *          either EMBL or EMBLCDS strings are allowed - anything else will
-   *          not retrieve emblxml
+   *          "EMBL" or "EMBLCDS" - anything else will not retrieve emblxml
    * @param query
    * @return
    * @throws Exception
    */
-  public AlignmentI getEmblSequenceRecords(String emprefx, String query)
+  protected AlignmentI getEmblSequenceRecords(String emprefx, String query)
           throws Exception
   {
     startQuery();
@@ -87,18 +118,17 @@ public abstract class EmblXmlSource extends EbiFileRetrievedProxy
    * @return
    * @throws Exception
    */
-  public AlignmentI getEmblSequenceRecords(String emprefx, String query,
+  protected AlignmentI getEmblSequenceRecords(String emprefx, String query,
           File reply) throws Exception
   {
-    EmblFile efile = null;
-    List<SequenceI> seqs = new ArrayList<>();
-
+    List<EntryType> entries = null;
     if (reply != null && reply.exists())
     {
       file = reply.getAbsolutePath();
       if (reply.length() > EMBL_NOT_FOUND_REPLY.length())
       {
-        efile = EmblFile.getEmblFile(reply);
+        InputStream is = new FileInputStream(reply);
+        entries = getEmblEntries(is);
       }
     }
 
@@ -107,33 +137,664 @@ public abstract class EmblXmlSource extends EbiFileRetrievedProxy
      * EmbFile reads something like (e.g.) this ungrammatical phrase
      * Entry: <acc> display type is either not supported or entry is not found.
      */
+    AlignmentI al = null;
+    List<SequenceI> seqs = new ArrayList<>();
     List<SequenceI> peptides = new ArrayList<>();
-    if (efile != null && efile.getEntries() != null)
+    if (entries != null)
     {
-      for (EmblEntry entry : efile.getEntries())
+      for (EntryType entry : entries)
       {
-        SequenceI seq = entry.getSequence(emprefx, peptides);
+        SequenceI seq = getSequence(emprefx, entry, peptides);
         if (seq != null)
         {
           seqs.add(seq.deriveSequence());
           // place DBReferences on dataset and refer
         }
       }
+      if (!seqs.isEmpty())
+      {
+        al = new Alignment(seqs.toArray(new SequenceI[seqs.size()]));
+      }
+      else
+      {
+        System.out.println(
+                "No record found for '" + emprefx + ":" + query + "'");
+      }
     }
 
-    AlignmentI al = null;
-    if (!seqs.isEmpty())
-    {
-      al = new Alignment(seqs.toArray(new SequenceI[seqs.size()]));
-    }
     stopQuery();
     return al;
   }
 
+  /**
+   * Reads the XML reply from file and unmarshals it to Java objects. Answers a
+   * (possibly empty) list of <code>EntryType</code> objects.
+   * 
+   * is
+   * 
+   * @return
+   */
+  List<EntryType> getEmblEntries(InputStream is)
+  {
+    List<EntryType> entries = new ArrayList<>();
+    try
+    {
+      JAXBContext jc = JAXBContext.newInstance("jalview.xml.binding.embl");
+      XMLStreamReader streamReader = XMLInputFactory.newInstance()
+              .createXMLStreamReader(is);
+      javax.xml.bind.Unmarshaller um = jc.createUnmarshaller();
+      jalview.xml.binding.embl.ROOT root = (jalview.xml.binding.embl.ROOT) um
+              .unmarshal(streamReader);
+
+      /*
+       * document root contains either "entry" or "entrySet"
+       */
+      if (root == null)
+      {
+        return entries;
+      }
+      if (root.getEntrySet() != null)
+      {
+        entries = root.getEntrySet().getEntry();
+      }
+      else if (root.getEntry() != null)
+      {
+        entries.add(root.getEntry());
+      }
+    } catch (JAXBException | XMLStreamException
+            | FactoryConfigurationError e)
+    {
+      e.printStackTrace();
+    }
+    return entries;
+  }
+
+  /**
+   * A helper method to parse XML data and construct a sequence, with any
+   * available database references and features
+   * 
+   * @param emprefx
+   * @param entry
+   * @param peptides
+   * @return
+   */
+  SequenceI getSequence(String sourceDb, EntryType entry,
+          List<SequenceI> peptides)
+  {
+    String seqString = entry.getSequence();
+    if (seqString == null)
+    {
+      return null;
+    }
+    seqString = seqString.replace(" ", "").replace("\n", "").replace("\t",
+            "");
+    String accession = entry.getAccession();
+    SequenceI dna = new Sequence(sourceDb + "|" + accession, seqString);
+
+    dna.setDescription(entry.getDescription());
+    String sequenceVersion = String.valueOf(entry.getVersion().intValue());
+    DBRefEntry selfRref = new DBRefEntry(sourceDb, sequenceVersion,
+            accession);
+    dna.addDBRef(selfRref);
+    selfRref.setMap(
+            new Mapping(null, new int[]
+            { 1, dna.getLength() }, new int[] { 1, dna.getLength() }, 1,
+                    1));
+
+    /*
+     * add db references
+     */
+    List<XrefType> xrefs = entry.getXref();
+    if (xrefs != null)
+    {
+      for (XrefType xref : xrefs)
+      {
+        String acc = xref.getId();
+        String source = DBRefUtils.getCanonicalName(xref.getDb());
+        String version = xref.getSecondaryId();
+        if (version == null || "".equals(version))
+        {
+          version = "0";
+        }
+        dna.addDBRef(new DBRefEntry(source, version, acc));
+      }
+    }
+
+    SequenceIdMatcher matcher = new SequenceIdMatcher(peptides);
+    try
+    {
+      List<Feature> features = entry.getFeature();
+      if (features != null)
+      {
+        for (Feature feature : features)
+        {
+          if (FeatureProperties.isCodingFeature(sourceDb,
+                  feature.getName()))
+          {
+            parseCodingFeature(entry, feature, sourceDb, dna, peptides,
+                    matcher);
+          }
+        }
+      }
+    } catch (Exception e)
+    {
+      System.err.println("EMBL Record Features parsing error!");
+      System.err
+              .println("Please report the following to help@jalview.org :");
+      System.err.println("EMBL Record " + accession);
+      System.err.println("Resulted in exception: " + e.getMessage());
+      e.printStackTrace(System.err);
+    }
+
+    return dna;
+  }
+
+  /**
+   * Extracts coding region and product from a CDS feature and decorates it with
+   * annotations
+   * 
+   * @param entry
+   * @param feature
+   * @param sourceDb
+   * @param dna
+   * @param peptides
+   * @param matcher
+   */
+  void parseCodingFeature(EntryType entry, Feature feature, String sourceDb,
+          SequenceI dna, List<SequenceI> peptides,
+          SequenceIdMatcher matcher)
+  {
+    final boolean isEmblCdna = sourceDb.equals(DBRefSource.EMBLCDS);
+    final String accession = entry.getAccession();
+    final String sequenceVersion = entry.getVersion().toString();
+
+    int[] exons = getCdsRanges(entry.getAccession(), feature);
+
+    String translation = null;
+    String proteinName = "";
+    String proteinId = null;
+    Map<String, String> vals = new Hashtable<>();
+
+    /*
+     * codon_start 1/2/3 in EMBL corresponds to phase 0/1/2 in CDS
+     * (phase is required for CDS features in GFF3 format)
+     */
+    int codonStart = 1;
+
+    /*
+     * parse qualifiers, saving protein translation, protein id,
+     * codon start position, product (name), and 'other values'
+     */
+    if (feature.getQualifier() != null)
+    {
+      for (Qualifier q : feature.getQualifier())
+      {
+        String qname = q.getName();
+        String value = q.getValue();
+        value = value == null ? ""
+                : value.trim().replace(" ", "").replace("\n", "")
+                        .replace("\t", "");
+        if (qname.equals("translation"))
+        {
+          translation = value;
+        }
+        else if (qname.equals("protein_id"))
+        {
+          proteinId = value;
+        }
+        else if (qname.equals("codon_start"))
+        {
+          try
+          {
+            codonStart = Integer.parseInt(value.trim());
+          } catch (NumberFormatException e)
+          {
+            System.err.println("Invalid codon_start in XML for "
+                    + entry.getAccession() + ": " + e.getMessage());
+          }
+        }
+        else if (qname.equals("product"))
+        {
+          // sometimes name is returned e.g. for V00488
+          proteinName = value;
+        }
+        else
+        {
+          // throw anything else into the additional properties hash
+          if (!"".equals(value))
+          {
+            vals.put(qname, value);
+          }
+        }
+      }
+    }
+
+    DBRefEntry proteinToEmblProteinRef = null;
+    exons = MappingUtils.removeStartPositions(codonStart - 1, exons);
+
+    SequenceI product = null;
+    Mapping dnaToProteinMapping = null;
+    if (translation != null && proteinName != null && proteinId != null)
+    {
+      int translationLength = translation.length();
+
+      /*
+       * look for product in peptides list, if not found, add it
+       */
+      product = matcher.findIdMatch(proteinId);
+      if (product == null)
+      {
+        product = new Sequence(proteinId, translation, 1,
+                translationLength);
+        product.setDescription(((proteinName.length() == 0)
+                ? "Protein Product from " + sourceDb
+                : proteinName));
+        peptides.add(product);
+        matcher.add(product);
+      }
+
+      // we have everything - create the mapping and perhaps the protein
+      // sequence
+      if (exons == null || exons.length == 0)
+      {
+        /*
+         * workaround until we handle dna location for CDS sequence
+         * e.g. location="X53828.1:60..1058" correctly
+         */
+        System.err.println(
+                "Implementation Notice: EMBLCDS records not properly supported yet - Making up the CDNA region of this sequence... may be incorrect ("
+                        + sourceDb + ":" + entry.getAccession() + ")");
+        int dnaLength = dna.getLength();
+        if (translationLength * 3 == (1 - codonStart + dnaLength))
+        {
+          System.err.println(
+                  "Not allowing for additional stop codon at end of cDNA fragment... !");
+          // this might occur for CDS sequences where no features are marked
+          exons = new int[] { dna.getStart() + (codonStart - 1),
+              dna.getEnd() };
+          dnaToProteinMapping = new Mapping(product, exons,
+                  new int[]
+                  { 1, translationLength }, 3, 1);
+        }
+        if ((translationLength + 1) * 3 == (1 - codonStart + dnaLength))
+        {
+          System.err.println(
+                  "Allowing for additional stop codon at end of cDNA fragment... will probably cause an error in VAMSAs!");
+          exons = new int[] { dna.getStart() + (codonStart - 1),
+              dna.getEnd() - 3 };
+          dnaToProteinMapping = new Mapping(product, exons,
+                  new int[]
+                  { 1, translationLength }, 3, 1);
+        }
+      }
+      else
+      {
+        // Trim the exon mapping if necessary - the given product may only be a
+        // fragment of a larger protein. (EMBL:AY043181 is an example)
+
+        if (isEmblCdna)
+        {
+          // TODO: Add a DbRef back to the parent EMBL sequence with the exon
+          // map
+          // if given a dataset reference, search dataset for parent EMBL
+          // sequence if it exists and set its map
+          // make a new feature annotating the coding contig
+        }
+        else
+        {
+          // final product length truncation check
+          int[] cdsRanges = adjustForProteinLength(translationLength,
+                  exons);
+          dnaToProteinMapping = new Mapping(product, cdsRanges,
+                  new int[]
+                  { 1, translationLength }, 3, 1);
+          if (product != null)
+          {
+            /*
+             * make xref with mapping from protein to EMBL dna
+             */
+            DBRefEntry proteinToEmblRef = new DBRefEntry(DBRefSource.EMBL,
+                    sequenceVersion, proteinId,
+                    new Mapping(dnaToProteinMapping.getMap().getInverse()));
+            product.addDBRef(proteinToEmblRef);
+
+            /*
+             * make xref from protein to EMBLCDS; we assume here that the 
+             * CDS sequence version is same as dna sequence (?!)
+             */
+            MapList proteinToCdsMapList = new MapList(
+                    new int[]
+                    { 1, translationLength },
+                    new int[]
+                    { 1 + (codonStart - 1),
+                        (codonStart - 1) + 3 * translationLength },
+                    1, 3);
+            DBRefEntry proteinToEmblCdsRef = new DBRefEntry(
+                    DBRefSource.EMBLCDS, sequenceVersion, proteinId,
+                    new Mapping(proteinToCdsMapList));
+            product.addDBRef(proteinToEmblCdsRef);
+
+            /*
+             * make 'direct' xref from protein to EMBLCDSPROTEIN
+             */
+            proteinToEmblProteinRef = new DBRefEntry(proteinToEmblCdsRef);
+            proteinToEmblProteinRef.setSource(DBRefSource.EMBLCDSProduct);
+            proteinToEmblProteinRef.setMap(null);
+            product.addDBRef(proteinToEmblProteinRef);
+          }
+        }
+      }
+
+      /*
+       * add cds features to dna sequence
+       */
+      String cds = feature.getName(); // "CDS"
+      for (int xint = 0; exons != null
+              && xint < exons.length - 1; xint += 2)
+      {
+        int exonStart = exons[xint];
+        int exonEnd = exons[xint + 1];
+        int begin = Math.min(exonStart, exonEnd);
+        int end = Math.max(exonStart, exonEnd);
+        int exonNumber = xint / 2 + 1;
+        String desc = String.format("Exon %d for protein '%s' EMBLCDS:%s",
+                exonNumber, proteinName, proteinId);
+
+        SequenceFeature sf = makeCdsFeature(cds, desc, begin, end, sourceDb,
+                vals);
+
+        sf.setEnaLocation(feature.getLocation());
+        boolean forwardStrand = exonStart <= exonEnd;
+        sf.setStrand(forwardStrand ? "+" : "-");
+        sf.setPhase(String.valueOf(codonStart - 1));
+        sf.setValue(FeatureProperties.EXONPOS, exonNumber);
+        sf.setValue(FeatureProperties.EXONPRODUCT, proteinName);
+
+        dna.addSequenceFeature(sf);
+      }
+    }
+
+    /*
+     * add feature dbRefs to sequence, and mappings for Uniprot xrefs
+     */
+    boolean hasUniprotDbref = false;
+    List<XrefType> xrefs = feature.getXref();
+    if (xrefs != null)
+    {
+      boolean mappingUsed = false;
+      for (XrefType xref : xrefs)
+      {
+        /*
+         * ensure UniProtKB/Swiss-Prot converted to UNIPROT
+         */
+        String source = DBRefUtils.getCanonicalName(xref.getDb());
+        String version = xref.getSecondaryId();
+        if (version == null || "".equals(version))
+        {
+          version = "0";
+        }
+        DBRefEntry dbref = new DBRefEntry(source, version, xref.getId());
+        DBRefEntry proteinDbRef = new DBRefEntry(source, version,
+                dbref.getAccessionId());
+        if (source.equals(DBRefSource.UNIPROT))
+        {
+          String proteinSeqName = DBRefSource.UNIPROT + "|"
+                  + dbref.getAccessionId();
+          if (dnaToProteinMapping != null
+                  && dnaToProteinMapping.getTo() != null)
+          {
+            if (mappingUsed)
+            {
+              /*
+               * two or more Uniprot xrefs for the same CDS - 
+               * each needs a distinct Mapping (as to a different sequence)
+               */
+              dnaToProteinMapping = new Mapping(dnaToProteinMapping);
+            }
+            mappingUsed = true;
+
+            /*
+             * try to locate the protein mapped to (possibly by a 
+             * previous CDS feature); if not found, construct it from
+             * the EMBL translation
+             */
+            SequenceI proteinSeq = matcher.findIdMatch(proteinSeqName);
+            if (proteinSeq == null)
+            {
+              proteinSeq = new Sequence(proteinSeqName,
+                      product.getSequenceAsString());
+              matcher.add(proteinSeq);
+              peptides.add(proteinSeq);
+            }
+            dnaToProteinMapping.setTo(proteinSeq);
+            dnaToProteinMapping.setMappedFromId(proteinId);
+            proteinSeq.addDBRef(proteinDbRef);
+            dbref.setMap(dnaToProteinMapping);
+          }
+          hasUniprotDbref = true;
+        }
+        if (product != null)
+        {
+          /*
+           * copy feature dbref to our protein product
+           */
+          DBRefEntry pref = proteinDbRef;
+          pref.setMap(null); // reference is direct
+          product.addDBRef(pref);
+          // Add converse mapping reference
+          if (dnaToProteinMapping != null)
+          {
+            Mapping pmap = new Mapping(dna,
+                    dnaToProteinMapping.getMap().getInverse());
+            pref = new DBRefEntry(sourceDb, sequenceVersion, accession);
+            pref.setMap(pmap);
+            if (dnaToProteinMapping.getTo() != null)
+            {
+              dnaToProteinMapping.getTo().addDBRef(pref);
+            }
+          }
+        }
+        dna.addDBRef(dbref);
+      }
+    }
+
+    /*
+     * if we have a product (translation) but no explicit Uniprot dbref
+     * (example: EMBL AAFI02000057 protein_id EAL65544.1)
+     * then construct mappings to an assumed EMBLCDSPROTEIN accession
+     */
+    if (!hasUniprotDbref && product != null)
+    {
+      if (proteinToEmblProteinRef == null)
+      {
+        // assuming CDSPROTEIN sequence version = dna version (?!)
+        proteinToEmblProteinRef = new DBRefEntry(DBRefSource.EMBLCDSProduct,
+                sequenceVersion, proteinId);
+      }
+      product.addDBRef(proteinToEmblProteinRef);
+
+      if (dnaToProteinMapping != null
+              && dnaToProteinMapping.getTo() != null)
+      {
+        DBRefEntry dnaToEmblProteinRef = new DBRefEntry(
+                DBRefSource.EMBLCDSProduct, sequenceVersion,
+                proteinId);
+        dnaToEmblProteinRef.setMap(dnaToProteinMapping);
+        dnaToProteinMapping.setMappedFromId(proteinId);
+        dna.addDBRef(dnaToEmblProteinRef);
+      }
+    }
+  }
+
   @Override
   public boolean isDnaCoding()
   {
     return true;
   }
 
+  /**
+   * Returns the CDS positions as a single array of [start, end, start, end...]
+   * positions. If on the reverse strand, these will be in descending order.
+   * 
+   * @param accession
+   * @param feature
+   * @return
+   */
+  protected int[] getCdsRanges(String accession, Feature feature)
+  {
+    String location = feature.getLocation();
+    if (location == null)
+    {
+      return new int[] {};
+    }
+  
+    try
+    {
+      List<int[]> ranges = DnaUtils.parseLocation(location);
+      return listToArray(ranges);
+    } catch (ParseException e)
+    {
+      Cache.log.warn(
+              String.format("Not parsing inexact CDS location %s in ENA %s",
+                      location, accession));
+      return new int[] {};
+    }
+  }
+
+  /**
+   * Converts a list of [start, end] ranges to a single array of [start, end,
+   * start, end ...]
+   * 
+   * @param ranges
+   * @return
+   */
+  int[] listToArray(List<int[]> ranges)
+  {
+    int[] result = new int[ranges.size() * 2];
+    int i = 0;
+    for (int[] range : ranges)
+    {
+      result[i++] = range[0];
+      result[i++] = range[1];
+    }
+    return result;
+  }
+
+  /**
+   * Helper method to construct a SequenceFeature for one cds range
+   * 
+   * @param type
+   *          feature type ("CDS")
+   * @param desc
+   *          description
+   * @param begin
+   *          start position
+   * @param end
+   *          end position
+   * @param group
+   *          feature group
+   * @param vals
+   *          map of 'miscellaneous values' for feature
+   * @return
+   */
+  protected SequenceFeature makeCdsFeature(String type, String desc,
+          int begin, int end, String group, Map<String, String> vals)
+  {
+    SequenceFeature sf = new SequenceFeature(type, desc, begin, end, group);
+    if (!vals.isEmpty())
+    {
+      StringBuilder sb = new StringBuilder();
+      boolean first = true;
+      for (Entry<String, String> val : vals.entrySet())
+      {
+        if (!first)
+        {
+          sb.append(";");
+        }
+        sb.append(val.getKey()).append("=").append(val.getValue());
+        first = false;
+        sf.setValue(val.getKey(), val.getValue());
+      }
+      sf.setAttributes(sb.toString());
+    }
+    return sf;
+  }
+
+  /**
+   * Truncates (if necessary) the exon intervals to match 3 times the length of
+   * the protein; also accepts 3 bases longer (for stop codon not included in
+   * protein)
+   * 
+   * @param proteinLength
+   * @param exon
+   *          an array of [start, end, start, end...] intervals
+   * @return the same array (if unchanged) or a truncated copy
+   */
+  static int[] adjustForProteinLength(int proteinLength, int[] exon)
+  {
+    if (proteinLength <= 0 || exon == null)
+    {
+      return exon;
+    }
+    int expectedCdsLength = proteinLength * 3;
+    int exonLength = MappingUtils.getLength(Arrays.asList(exon));
+  
+    /*
+     * if exon length matches protein, or is shorter, or longer by the 
+     * length of a stop codon (3 bases), then leave it unchanged
+     */
+    if (expectedCdsLength >= exonLength
+            || expectedCdsLength == exonLength - 3)
+    {
+      return exon;
+    }
+  
+    int origxon[];
+    int sxpos = -1;
+    int endxon = 0;
+    origxon = new int[exon.length];
+    System.arraycopy(exon, 0, origxon, 0, exon.length);
+    int cdspos = 0;
+    for (int x = 0; x < exon.length; x += 2)
+    {
+      cdspos += Math.abs(exon[x + 1] - exon[x]) + 1;
+      if (expectedCdsLength <= cdspos)
+      {
+        // advanced beyond last codon.
+        sxpos = x;
+        if (expectedCdsLength != cdspos)
+        {
+          // System.err
+          // .println("Truncating final exon interval on region by "
+          // + (cdspos - cdslength));
+        }
+  
+        /*
+         * shrink the final exon - reduce end position if forward
+         * strand, increase it if reverse
+         */
+        if (exon[x + 1] >= exon[x])
+        {
+          endxon = exon[x + 1] - cdspos + expectedCdsLength;
+        }
+        else
+        {
+          endxon = exon[x + 1] + cdspos - expectedCdsLength;
+        }
+        break;
+      }
+    }
+  
+    if (sxpos != -1)
+    {
+      // and trim the exon interval set if necessary
+      int[] nxon = new int[sxpos + 2];
+      System.arraycopy(exon, 0, nxon, 0, sxpos + 2);
+      nxon[sxpos + 1] = endxon; // update the end boundary for the new exon
+                                // set
+      exon = nxon;
+    }
+    return exon;
+  }
+
 }
index 167cd97..d97bf69 100644 (file)
@@ -29,28 +29,37 @@ import jalview.datamodel.PDBEntry;
 import jalview.datamodel.Sequence;
 import jalview.datamodel.SequenceFeature;
 import jalview.datamodel.SequenceI;
-import jalview.datamodel.xdb.uniprot.UniprotEntry;
-import jalview.datamodel.xdb.uniprot.UniprotFeature;
-import jalview.datamodel.xdb.uniprot.UniprotFile;
 import jalview.schemes.ResidueProperties;
 import jalview.util.StringUtils;
 import jalview.ws.seqfetcher.DbSourceProxyImpl;
+import jalview.xml.binding.uniprot.DbReferenceType;
+import jalview.xml.binding.uniprot.Entry;
+import jalview.xml.binding.uniprot.FeatureType;
+import jalview.xml.binding.uniprot.LocationType;
+import jalview.xml.binding.uniprot.PositionType;
+import jalview.xml.binding.uniprot.PropertyType;
 
 import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
 import java.net.URL;
 import java.net.URLConnection;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Vector;
 
-import org.exolab.castor.mapping.Mapping;
-import org.exolab.castor.xml.Unmarshaller;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.stream.FactoryConfigurationError;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
 
 import com.stevesoft.pat.Regex;
 
 /**
+ * This class queries the Uniprot database for sequence data, unmarshals the
+ * returned XML, and converts it to Jalview Sequence records (including attached
+ * database references and sequence features)
+ * 
  * @author JimP
  * 
  */
@@ -60,11 +69,6 @@ public class Uniprot extends DbSourceProxyImpl
 
   private static final String BAR_DELIMITER = "|";
 
-  /*
-   * Castor mapping loaded from uniprot_mapping.xml
-   */
-  private static Mapping map;
-
   /**
    * Constructor
    */
@@ -122,43 +126,6 @@ public class Uniprot extends DbSourceProxyImpl
     return "0"; // we really don't know what version we're on.
   }
 
-  /**
-   * Reads a file containing the reply to the EBI Fetch Uniprot data query,
-   * unmarshals it to a UniprotFile object, and returns the list of UniprotEntry
-   * data models (mapped from &lt;entry&gt; elements)
-   * 
-   * @param fileReader
-   * @return
-   */
-  public Vector<UniprotEntry> getUniprotEntries(Reader fileReader)
-  {
-    UniprotFile uni = new UniprotFile();
-    try
-    {
-      if (map == null)
-      {
-        // 1. Load the mapping information from the file
-        map = new Mapping(uni.getClass().getClassLoader());
-        URL url = getClass().getResource("/uniprot_mapping.xml");
-        map.loadMapping(url);
-      }
-
-      // 2. Unmarshal the data
-      Unmarshaller unmar = new Unmarshaller(uni);
-      unmar.setIgnoreExtraElements(true);
-      unmar.setMapping(map);
-      if (fileReader != null)
-      {
-        uni = (UniprotFile) unmar.unmarshal(fileReader);
-      }
-    } catch (Exception e)
-    {
-      System.out.println("Error getUniprotEntries() " + e);
-    }
-
-    return uni.getUniprotEntries();
-  }
-
   /*
    * (non-Javadoc)
    * 
@@ -176,25 +143,21 @@ public class Uniprot extends DbSourceProxyImpl
 
       String downloadstring = getDomain() + "/uniprot/" + queries
               + ".xml";
-      URL url = null;
-      URLConnection urlconn = null;
 
-      url = new URL(downloadstring);
-      urlconn = url.openConnection();
+      URL url = new URL(downloadstring);
+      URLConnection urlconn = url.openConnection();
       InputStream istr = urlconn.getInputStream();
-      Vector<UniprotEntry> entries = getUniprotEntries(
-              new InputStreamReader(istr, "UTF-8"));
-
+      List<Entry> entries = getUniprotEntries(istr);
       if (entries != null)
       {
-        ArrayList<SequenceI> seqs = new ArrayList<>();
-        for (UniprotEntry entry : entries)
+        List<SequenceI> seqs = new ArrayList<>();
+        for (Entry entry : entries)
         {
-          seqs.add(uniprotEntryToSequenceI(entry));
+          seqs.add(uniprotEntryToSequence(entry));
         }
-        al = new Alignment(seqs.toArray(new SequenceI[0]));
-
+        al = new Alignment(seqs.toArray(new SequenceI[seqs.size()]));
       }
+
       stopQuery();
       return al;
     } catch (Exception e)
@@ -207,83 +170,120 @@ public class Uniprot extends DbSourceProxyImpl
   }
 
   /**
+   * Converts an Entry object (bound from Uniprot XML) to a Jalview Sequence
    * 
    * @param entry
-   *          UniprotEntry
-   * @return SequenceI instance created from the UniprotEntry instance
+   * @return
    */
-  public SequenceI uniprotEntryToSequenceI(UniprotEntry entry)
+  SequenceI uniprotEntryToSequence(Entry entry)
   {
     String id = getUniprotEntryId(entry);
+    /*
+     * Sequence should not include any whitespace, but JAXB leaves these in
+     */
+    String seqString = entry.getSequence().getValue().replaceAll("\\s*",
+            "");
+
     SequenceI sequence = new Sequence(id,
-            entry.getUniprotSequence().getContent());
+            seqString);
     sequence.setDescription(getUniprotEntryDescription(entry));
 
+    /*
+     * add a 'self' DBRefEntry for each accession
+     */
     final String dbVersion = getDbVersion();
-    ArrayList<DBRefEntry> dbRefs = new ArrayList<>();
+    List<DBRefEntry> dbRefs = new ArrayList<>();
     for (String accessionId : entry.getAccession())
     {
       DBRefEntry dbRef = new DBRefEntry(DBRefSource.UNIPROT, dbVersion,
               accessionId);
-
-      // mark dbRef as a primary reference for this sequence
       dbRefs.add(dbRef);
     }
 
-    Vector<PDBEntry> onlyPdbEntries = new Vector<>();
-    for (PDBEntry pdb : entry.getDbReference())
+    /*
+     * add a DBRefEntry for each dbReference element in the XML;
+     * also add a PDBEntry if type="PDB";
+     * also add an EMBLCDS dbref if protein sequence id is given
+     * also add an Ensembl dbref " " " " " "
+     */
+    Vector<PDBEntry> pdbRefs = new Vector<>();
+    for (DbReferenceType dbref : entry.getDbReference())
     {
-      DBRefEntry dbr = new DBRefEntry();
-      dbr.setSource(pdb.getType());
-      dbr.setAccessionId(pdb.getId());
-      dbr.setVersion(DBRefSource.UNIPROT + ":" + dbVersion);
+      String type = dbref.getType();
+      DBRefEntry dbr = new DBRefEntry(type,
+              DBRefSource.UNIPROT + ":" + dbVersion, dbref.getId());
       dbRefs.add(dbr);
-      if ("PDB".equals(pdb.getType()))
+      if ("PDB".equals(type))
       {
-        onlyPdbEntries.addElement(pdb);
+        pdbRefs.add(new PDBEntry(dbr));
       }
-      if ("EMBL".equals(pdb.getType()))
+      if ("EMBL".equals(type))
       {
-        // look for a CDS reference and add it, too.
-        String cdsId = (String) pdb.getProperty("protein sequence ID");
+        /*
+         * e.g. Uniprot accession Q9BXM7 has
+         * <dbReference type="EMBL" id="M19359">
+         *   <property type="protein sequence ID" value="AAA40981.1"/>
+         *   <property type="molecule type" value="Genomic_DNA"/>
+         * </dbReference> 
+         */
+        String cdsId = getProperty(dbref.getProperty(),
+                "protein sequence ID");
         if (cdsId != null && cdsId.trim().length() > 0)
         {
           // remove version
           String[] vrs = cdsId.split("\\.");
-          dbr = new DBRefEntry(DBRefSource.EMBLCDS, vrs.length > 1 ? vrs[1]
-                  : DBRefSource.UNIPROT + ":" + dbVersion, vrs[0]);
+          String version = vrs.length > 1 ? vrs[1]
+                  : DBRefSource.UNIPROT + ":" + dbVersion;
+          dbr = new DBRefEntry(DBRefSource.EMBLCDS, version, vrs[0]);
           dbRefs.add(dbr);
         }
       }
-      if ("Ensembl".equals(pdb.getType()))
+      if ("Ensembl".equals(type))
       {
-        /*UniprotXML
+        /*
+         * e.g. Uniprot accession Q9BXM7 has
          * <dbReference type="Ensembl" id="ENST00000321556">
-        * <molecule id="Q9BXM7-1"/>
-        * <property type="protein sequence ID" value="ENSP00000364204"/>
-        * <property type="gene ID" value="ENSG00000158828"/>
-        * </dbReference> 
+         *   <molecule id="Q9BXM7-1"/>
+         *   <property type="protein sequence ID" value="ENSP00000364204"/>
+         *   <property type="gene ID" value="ENSG00000158828"/>
+         * </dbReference> 
          */
-        String cdsId = (String) pdb.getProperty("protein sequence ID");
+        String cdsId = getProperty(dbref.getProperty(),
+                "protein sequence ID");
         if (cdsId != null && cdsId.trim().length() > 0)
         {
           dbr = new DBRefEntry(DBRefSource.ENSEMBL,
                   DBRefSource.UNIPROT + ":" + dbVersion, cdsId.trim());
           dbRefs.add(dbr);
-
         }
       }
     }
 
-    sequence.setPDBId(onlyPdbEntries);
+    /*
+     * create features; they have either begin and end, or position, in XML
+     */
+    sequence.setPDBId(pdbRefs);
     if (entry.getFeature() != null)
     {
-      for (UniprotFeature uf : entry.getFeature())
+      for (FeatureType uf : entry.getFeature())
       {
-        SequenceFeature copy = new SequenceFeature(uf.getType(),
-                getDescription(uf), uf.getBegin(), uf.getEnd(), "Uniprot");
-        copy.setStatus(uf.getStatus());
-        sequence.addSequenceFeature(copy);
+        LocationType location = uf.getLocation();
+        int start = 0;
+        int end = 0;
+        if (location.getPosition() != null)
+        {
+          start = location.getPosition().getPosition().intValue();
+          end = start;
+        }
+        else
+        {
+          start = location.getBegin().getPosition().intValue();
+          end = location.getEnd().getPosition().intValue();
+        }
+        SequenceFeature sf = new SequenceFeature(uf.getType(),
+                getDescription(uf), start, end, "Uniprot");
+        sf.setStatus(uf.getStatus());
+        sequence.addSequenceFeature(sf);
       }
     }
     for (DBRefEntry dbr : dbRefs)
@@ -294,16 +294,15 @@ public class Uniprot extends DbSourceProxyImpl
   }
 
   /**
-   * Constructs a feature description from the description and (optionally)
-   * original and variant fields of the Uniprot XML feature
+   * A helper method that builds a sequence feature description
    * 
-   * @param uf
+   * @param feature
    * @return
    */
-  protected static String getDescription(UniprotFeature uf)
+  static String getDescription(FeatureType feature)
   {
-    String orig = uf.getOriginal();
-    List<String> variants = uf.getVariation();
+    String orig = feature.getOriginal();
+    List<String> variants = feature.getVariation();
     StringBuilder sb = new StringBuilder();
 
     /*
@@ -339,7 +338,11 @@ public class Uniprot extends DbSourceProxyImpl
           sb.append(orig);
         }
 
-        sb.append(Integer.toString(uf.getPosition()));
+        LocationType location = feature.getLocation();
+        PositionType start = location.getPosition() == null
+                ? location.getBegin()
+                : location.getPosition();
+        sb.append(Integer.toString(start.getPosition().intValue()));
 
         if (var.length() < 4)
         {
@@ -367,7 +370,7 @@ public class Uniprot extends DbSourceProxyImpl
         }
       }
     }
-    String description = uf.getDescription();
+    String description = feature.getDescription();
     if (description != null)
     {
       sb.append(description);
@@ -382,37 +385,57 @@ public class Uniprot extends DbSourceProxyImpl
   }
 
   /**
+   * A helper method that searches the list of properties for one with the given
+   * key, and if found returns the property value, else returns null
    * 
-   * @param entry
-   *          UniportEntry
-   * @return protein name(s) delimited by a white space character
+   * @param properties
+   * @param key
+   * @return
    */
-  public static String getUniprotEntryDescription(UniprotEntry entry)
+  static String getProperty(List<PropertyType> properties, String key)
   {
-    StringBuilder desc = new StringBuilder(32);
-    if (entry.getProtein() != null && entry.getProtein().getName() != null)
+    String value = null;
+    if (properties != null)
     {
-      boolean first = true;
-      for (String nm : entry.getProtein().getName())
+      for (PropertyType prop : properties)
       {
-        if (!first)
+        if (key.equals(prop.getType()))
         {
-          desc.append(" ");
+          value = prop.getValue();
+          break;
         }
-        first = false;
-        desc.append(nm);
       }
     }
-    return desc.toString();
+    return value;
   }
 
   /**
-   *
+   * Extracts xml element entry/protein/recommendedName/fullName
+   * 
    * @param entry
-   *          UniprotEntry
-   * @return The accession id(s) and name(s) delimited by '|'.
+   * @return
    */
-  public static String getUniprotEntryId(UniprotEntry entry)
+  static String getUniprotEntryDescription(Entry entry)
+  {
+    String desc = "";
+    if (entry.getProtein() != null
+            && entry.getProtein().getRecommendedName() != null)
+    {
+      // fullName is mandatory if recommendedName is present
+      desc = entry.getProtein().getRecommendedName().getFullName()
+              .getValue();
+    }
+    return desc;
+  }
+
+  /**
+   * Constructs a sequence id by concatenating all entry/name elements with '|'
+   * separator
+   * 
+   * @param entry
+   * @return
+   */
+  static String getUniprotEntryId(Entry entry)
   {
     StringBuilder name = new StringBuilder(32);
     for (String n : entry.getName())
@@ -459,4 +482,35 @@ public class Uniprot extends DbSourceProxyImpl
   {
     return 0;
   }
+
+  /**
+   * Reads the reply to the EBI Fetch Uniprot data query, unmarshals it to an
+   * Uniprot object, and returns the enclosed Entry objects, or null on any
+   * failure
+   * 
+   * @param is
+   * @return
+   */
+  public List<Entry> getUniprotEntries(InputStream is)
+  {
+    List<Entry> entries = null;
+    try
+    {
+      JAXBContext jc = JAXBContext
+              .newInstance("jalview.xml.binding.uniprot");
+      XMLStreamReader streamReader = XMLInputFactory.newInstance()
+              .createXMLStreamReader(is);
+      javax.xml.bind.Unmarshaller um = jc.createUnmarshaller();
+      jalview.xml.binding.uniprot.Uniprot uniprot = (jalview.xml.binding.uniprot.Uniprot) um.unmarshal(streamReader);
+      if (uniprot != null && !uniprot.getEntry().isEmpty())
+      {
+        entries = uniprot.getEntry();
+      }
+    } catch (JAXBException | XMLStreamException
+            | FactoryConfigurationError e)
+    {
+      e.printStackTrace();
+    }
+    return entries;
+  }
 }
index 9a2316c..a1b8e7a 100644 (file)
@@ -344,8 +344,9 @@ public class AADisorderClient extends JabawsCalcWorker
             {
               // set graduated color as fading to white for minimum, and
               // autoscaling to values on alignment
-              FeatureColourI ggc = new FeatureColour(Color.white,
-                      gc.getColour(), Float.MIN_VALUE, Float.MAX_VALUE);
+              FeatureColourI ggc = new FeatureColour(gc.getColour(),
+                      Color.white, gc.getColour(), Color.white,
+                      Float.MIN_VALUE, Float.MAX_VALUE);
               ggc.setAutoScaled(true);
               fr.setColour(ft, ggc);
             }
diff --git a/src/jalview/xml/binding/embl/EntrySetType.java b/src/jalview/xml/binding/embl/EntrySetType.java
new file mode 100644 (file)
index 0000000..09947ec
--- /dev/null
@@ -0,0 +1,76 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.14 at 02:46:00 PM BST 
+//
+
+
+package jalview.xml.binding.embl;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for EntrySetType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="EntrySetType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence maxOccurs="unbounded">
+ *         &lt;element name="entry" type="{}EntryType"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "EntrySetType", propOrder = {
+    "entry"
+})
+public class EntrySetType {
+
+    @XmlElement(required = true)
+    protected List<EntryType> entry;
+
+    /**
+     * Gets the value of the entry property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the entry property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getEntry().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link EntryType }
+     * 
+     * 
+     */
+    public List<EntryType> getEntry() {
+        if (entry == null) {
+            entry = new ArrayList<EntryType>();
+        }
+        return this.entry;
+    }
+
+}
diff --git a/src/jalview/xml/binding/embl/EntryType.java b/src/jalview/xml/binding/embl/EntryType.java
new file mode 100644 (file)
index 0000000..8964a3f
--- /dev/null
@@ -0,0 +1,2680 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.14 at 02:46:00 PM BST 
+//
+
+
+package jalview.xml.binding.embl;
+
+import java.math.BigInteger;
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElements;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.datatype.XMLGregorianCalendar;
+
+
+/**
+ * <p>Java class for EntryType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="EntryType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="secondaryAccession" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="projectAccession" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="description" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="comment" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="keyword" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="reference" maxOccurs="unbounded" minOccurs="0">
+ *           &lt;complexType>
+ *             &lt;complexContent>
+ *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 &lt;sequence>
+ *                   &lt;element name="title" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *                   &lt;element name="author" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
+ *                   &lt;element name="applicant" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
+ *                   &lt;element name="consortium" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *                   &lt;element name="submissionDate" type="{http://www.w3.org/2001/XMLSchema}date" minOccurs="0"/>
+ *                   &lt;element name="journal" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *                   &lt;element name="year" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *                   &lt;element name="volume" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *                   &lt;element name="issue" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *                   &lt;element name="firstPage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *                   &lt;element name="lastPage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *                   &lt;element name="comment" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *                   &lt;element name="referenceLocation" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *                   &lt;element name="xref" type="{}XrefType" maxOccurs="unbounded" minOccurs="0"/>
+ *                 &lt;/sequence>
+ *                 &lt;attribute name="type" use="required">
+ *                   &lt;simpleType>
+ *                     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *                       &lt;enumeration value="submission"/>
+ *                       &lt;enumeration value="book"/>
+ *                       &lt;enumeration value="article"/>
+ *                       &lt;enumeration value="patent"/>
+ *                       &lt;enumeration value="thesis"/>
+ *                       &lt;enumeration value="unpublished"/>
+ *                     &lt;/restriction>
+ *                   &lt;/simpleType>
+ *                 &lt;/attribute>
+ *                 &lt;attribute name="number" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *                 &lt;attribute name="location" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *               &lt;/restriction>
+ *             &lt;/complexContent>
+ *           &lt;/complexType>
+ *         &lt;/element>
+ *         &lt;element name="xref" type="{}XrefType" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="feature" maxOccurs="unbounded" minOccurs="0">
+ *           &lt;complexType>
+ *             &lt;complexContent>
+ *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 &lt;sequence>
+ *                   &lt;element name="taxon" minOccurs="0">
+ *                     &lt;complexType>
+ *                       &lt;complexContent>
+ *                         &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                           &lt;sequence>
+ *                             &lt;element name="lineage" minOccurs="0">
+ *                               &lt;complexType>
+ *                                 &lt;complexContent>
+ *                                   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                                     &lt;sequence>
+ *                                       &lt;element name="taxon" maxOccurs="unbounded">
+ *                                         &lt;complexType>
+ *                                           &lt;complexContent>
+ *                                             &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                                               &lt;attribute name="scientificName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                                             &lt;/restriction>
+ *                                           &lt;/complexContent>
+ *                                         &lt;/complexType>
+ *                                       &lt;/element>
+ *                                     &lt;/sequence>
+ *                                   &lt;/restriction>
+ *                                 &lt;/complexContent>
+ *                               &lt;/complexType>
+ *                             &lt;/element>
+ *                           &lt;/sequence>
+ *                           &lt;attribute name="scientificName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                           &lt;attribute name="commonName" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                           &lt;attribute name="taxId" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *                         &lt;/restriction>
+ *                       &lt;/complexContent>
+ *                     &lt;/complexType>
+ *                   &lt;/element>
+ *                   &lt;element name="xref" type="{}XrefType" maxOccurs="unbounded" minOccurs="0"/>
+ *                   &lt;element name="qualifier" maxOccurs="unbounded" minOccurs="0">
+ *                     &lt;complexType>
+ *                       &lt;complexContent>
+ *                         &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                           &lt;sequence>
+ *                             &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *                           &lt;/sequence>
+ *                           &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                         &lt;/restriction>
+ *                       &lt;/complexContent>
+ *                     &lt;/complexType>
+ *                   &lt;/element>
+ *                 &lt;/sequence>
+ *                 &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                 &lt;attribute name="location" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *               &lt;/restriction>
+ *             &lt;/complexContent>
+ *           &lt;/complexType>
+ *         &lt;/element>
+ *         &lt;element name="assembly" minOccurs="0">
+ *           &lt;complexType>
+ *             &lt;complexContent>
+ *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 &lt;sequence>
+ *                   &lt;element name="range" maxOccurs="unbounded">
+ *                     &lt;complexType>
+ *                       &lt;complexContent>
+ *                         &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                           &lt;attribute name="begin" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *                           &lt;attribute name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *                           &lt;attribute name="primaryBegin" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *                           &lt;attribute name="primaryEnd" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *                           &lt;attribute name="accession" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                           &lt;attribute name="version" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *                           &lt;attribute name="complement" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+ *                         &lt;/restriction>
+ *                       &lt;/complexContent>
+ *                     &lt;/complexType>
+ *                   &lt;/element>
+ *                 &lt;/sequence>
+ *               &lt;/restriction>
+ *             &lt;/complexContent>
+ *           &lt;/complexType>
+ *         &lt;/element>
+ *         &lt;element name="contig" minOccurs="0">
+ *           &lt;complexType>
+ *             &lt;complexContent>
+ *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 &lt;sequence>
+ *                   &lt;choice maxOccurs="unbounded" minOccurs="0">
+ *                     &lt;element name="range">
+ *                       &lt;complexType>
+ *                         &lt;complexContent>
+ *                           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                             &lt;attribute name="begin" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *                             &lt;attribute name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *                             &lt;attribute name="primaryBegin" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *                             &lt;attribute name="primaryEnd" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *                             &lt;attribute name="accession" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                             &lt;attribute name="version" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *                             &lt;attribute name="complement" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+ *                           &lt;/restriction>
+ *                         &lt;/complexContent>
+ *                       &lt;/complexType>
+ *                     &lt;/element>
+ *                     &lt;element name="gap">
+ *                       &lt;complexType>
+ *                         &lt;complexContent>
+ *                           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                             &lt;attribute name="begin" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *                             &lt;attribute name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *                             &lt;attribute name="length" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *                             &lt;attribute name="unknownLength" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+ *                           &lt;/restriction>
+ *                         &lt;/complexContent>
+ *                       &lt;/complexType>
+ *                     &lt;/element>
+ *                   &lt;/choice>
+ *                 &lt;/sequence>
+ *               &lt;/restriction>
+ *             &lt;/complexContent>
+ *           &lt;/complexType>
+ *         &lt;/element>
+ *         &lt;element name="sequence" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="accession" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="version" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *       &lt;attribute name="entryVersion" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *       &lt;attribute name="dataClass" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="taxonomicDivision" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="moleculeType" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="sequenceLength" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *       &lt;attribute name="topology" use="required">
+ *         &lt;simpleType>
+ *           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             &lt;enumeration value="circular"/>
+ *             &lt;enumeration value="linear"/>
+ *           &lt;/restriction>
+ *         &lt;/simpleType>
+ *       &lt;/attribute>
+ *       &lt;attribute name="firstPublic" type="{http://www.w3.org/2001/XMLSchema}date" />
+ *       &lt;attribute name="firstPublicRelease" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *       &lt;attribute name="lastUpdated" type="{http://www.w3.org/2001/XMLSchema}date" />
+ *       &lt;attribute name="lastUpdatedRelease" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "EntryType", propOrder = {
+    "secondaryAccession",
+    "projectAccession",
+    "description",
+    "comment",
+    "keyword",
+    "reference",
+    "xref",
+    "feature",
+    "assembly",
+    "contig",
+    "sequence"
+})
+public class EntryType {
+
+    protected List<String> secondaryAccession;
+    protected List<String> projectAccession;
+    @XmlElement(required = true)
+    protected String description;
+    protected String comment;
+    protected List<String> keyword;
+    protected List<EntryType.Reference> reference;
+    protected List<XrefType> xref;
+    protected List<EntryType.Feature> feature;
+    protected EntryType.Assembly assembly;
+    protected EntryType.Contig contig;
+    protected String sequence;
+    @XmlAttribute(name = "accession", required = true)
+    protected String accession;
+    @XmlAttribute(name = "version", required = true)
+    protected BigInteger version;
+    @XmlAttribute(name = "entryVersion")
+    protected BigInteger entryVersion;
+    @XmlAttribute(name = "dataClass", required = true)
+    protected String dataClass;
+    @XmlAttribute(name = "taxonomicDivision", required = true)
+    protected String taxonomicDivision;
+    @XmlAttribute(name = "moleculeType", required = true)
+    protected String moleculeType;
+    @XmlAttribute(name = "sequenceLength", required = true)
+    protected BigInteger sequenceLength;
+    @XmlAttribute(name = "topology", required = true)
+    protected String topology;
+    @XmlAttribute(name = "firstPublic")
+    @XmlSchemaType(name = "date")
+    protected XMLGregorianCalendar firstPublic;
+    @XmlAttribute(name = "firstPublicRelease")
+    protected BigInteger firstPublicRelease;
+    @XmlAttribute(name = "lastUpdated")
+    @XmlSchemaType(name = "date")
+    protected XMLGregorianCalendar lastUpdated;
+    @XmlAttribute(name = "lastUpdatedRelease")
+    protected BigInteger lastUpdatedRelease;
+
+    /**
+     * Gets the value of the secondaryAccession property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the secondaryAccession property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getSecondaryAccession().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link String }
+     * 
+     * 
+     */
+    public List<String> getSecondaryAccession() {
+        if (secondaryAccession == null) {
+            secondaryAccession = new ArrayList<String>();
+        }
+        return this.secondaryAccession;
+    }
+
+    /**
+     * Gets the value of the projectAccession property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the projectAccession property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getProjectAccession().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link String }
+     * 
+     * 
+     */
+    public List<String> getProjectAccession() {
+        if (projectAccession == null) {
+            projectAccession = new ArrayList<String>();
+        }
+        return this.projectAccession;
+    }
+
+    /**
+     * Gets the value of the description property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * Sets the value of the description property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setDescription(String value) {
+        this.description = value;
+    }
+
+    /**
+     * Gets the value of the comment property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getComment() {
+        return comment;
+    }
+
+    /**
+     * Sets the value of the comment property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setComment(String value) {
+        this.comment = value;
+    }
+
+    /**
+     * Gets the value of the keyword property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the keyword property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getKeyword().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link String }
+     * 
+     * 
+     */
+    public List<String> getKeyword() {
+        if (keyword == null) {
+            keyword = new ArrayList<String>();
+        }
+        return this.keyword;
+    }
+
+    /**
+     * Gets the value of the reference property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the reference property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getReference().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link EntryType.Reference }
+     * 
+     * 
+     */
+    public List<EntryType.Reference> getReference() {
+        if (reference == null) {
+            reference = new ArrayList<EntryType.Reference>();
+        }
+        return this.reference;
+    }
+
+    /**
+     * Gets the value of the xref property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the xref property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getXref().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link XrefType }
+     * 
+     * 
+     */
+    public List<XrefType> getXref() {
+        if (xref == null) {
+            xref = new ArrayList<XrefType>();
+        }
+        return this.xref;
+    }
+
+    /**
+     * Gets the value of the feature property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the feature property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getFeature().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link EntryType.Feature }
+     * 
+     * 
+     */
+    public List<EntryType.Feature> getFeature() {
+        if (feature == null) {
+            feature = new ArrayList<EntryType.Feature>();
+        }
+        return this.feature;
+    }
+
+    /**
+     * Gets the value of the assembly property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link EntryType.Assembly }
+     *     
+     */
+    public EntryType.Assembly getAssembly() {
+        return assembly;
+    }
+
+    /**
+     * Sets the value of the assembly property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link EntryType.Assembly }
+     *     
+     */
+    public void setAssembly(EntryType.Assembly value) {
+        this.assembly = value;
+    }
+
+    /**
+     * Gets the value of the contig property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link EntryType.Contig }
+     *     
+     */
+    public EntryType.Contig getContig() {
+        return contig;
+    }
+
+    /**
+     * Sets the value of the contig property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link EntryType.Contig }
+     *     
+     */
+    public void setContig(EntryType.Contig value) {
+        this.contig = value;
+    }
+
+    /**
+     * Gets the value of the sequence property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getSequence() {
+        return sequence;
+    }
+
+    /**
+     * Sets the value of the sequence property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setSequence(String value) {
+        this.sequence = value;
+    }
+
+    /**
+     * Gets the value of the accession property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getAccession() {
+        return accession;
+    }
+
+    /**
+     * Sets the value of the accession property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setAccession(String value) {
+        this.accession = value;
+    }
+
+    /**
+     * Gets the value of the version property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link BigInteger }
+     *     
+     */
+    public BigInteger getVersion() {
+        return version;
+    }
+
+    /**
+     * Sets the value of the version property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link BigInteger }
+     *     
+     */
+    public void setVersion(BigInteger value) {
+        this.version = value;
+    }
+
+    /**
+     * Gets the value of the entryVersion property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link BigInteger }
+     *     
+     */
+    public BigInteger getEntryVersion() {
+        return entryVersion;
+    }
+
+    /**
+     * Sets the value of the entryVersion property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link BigInteger }
+     *     
+     */
+    public void setEntryVersion(BigInteger value) {
+        this.entryVersion = value;
+    }
+
+    /**
+     * Gets the value of the dataClass property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getDataClass() {
+        return dataClass;
+    }
+
+    /**
+     * Sets the value of the dataClass property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setDataClass(String value) {
+        this.dataClass = value;
+    }
+
+    /**
+     * Gets the value of the taxonomicDivision property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getTaxonomicDivision() {
+        return taxonomicDivision;
+    }
+
+    /**
+     * Sets the value of the taxonomicDivision property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setTaxonomicDivision(String value) {
+        this.taxonomicDivision = value;
+    }
+
+    /**
+     * Gets the value of the moleculeType property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getMoleculeType() {
+        return moleculeType;
+    }
+
+    /**
+     * Sets the value of the moleculeType property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setMoleculeType(String value) {
+        this.moleculeType = value;
+    }
+
+    /**
+     * Gets the value of the sequenceLength property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link BigInteger }
+     *     
+     */
+    public BigInteger getSequenceLength() {
+        return sequenceLength;
+    }
+
+    /**
+     * Sets the value of the sequenceLength property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link BigInteger }
+     *     
+     */
+    public void setSequenceLength(BigInteger value) {
+        this.sequenceLength = value;
+    }
+
+    /**
+     * Gets the value of the topology property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getTopology() {
+        return topology;
+    }
+
+    /**
+     * Sets the value of the topology property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setTopology(String value) {
+        this.topology = value;
+    }
+
+    /**
+     * Gets the value of the firstPublic property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link XMLGregorianCalendar }
+     *     
+     */
+    public XMLGregorianCalendar getFirstPublic() {
+        return firstPublic;
+    }
+
+    /**
+     * Sets the value of the firstPublic property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link XMLGregorianCalendar }
+     *     
+     */
+    public void setFirstPublic(XMLGregorianCalendar value) {
+        this.firstPublic = value;
+    }
+
+    /**
+     * Gets the value of the firstPublicRelease property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link BigInteger }
+     *     
+     */
+    public BigInteger getFirstPublicRelease() {
+        return firstPublicRelease;
+    }
+
+    /**
+     * Sets the value of the firstPublicRelease property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link BigInteger }
+     *     
+     */
+    public void setFirstPublicRelease(BigInteger value) {
+        this.firstPublicRelease = value;
+    }
+
+    /**
+     * Gets the value of the lastUpdated property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link XMLGregorianCalendar }
+     *     
+     */
+    public XMLGregorianCalendar getLastUpdated() {
+        return lastUpdated;
+    }
+
+    /**
+     * Sets the value of the lastUpdated property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link XMLGregorianCalendar }
+     *     
+     */
+    public void setLastUpdated(XMLGregorianCalendar value) {
+        this.lastUpdated = value;
+    }
+
+    /**
+     * Gets the value of the lastUpdatedRelease property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link BigInteger }
+     *     
+     */
+    public BigInteger getLastUpdatedRelease() {
+        return lastUpdatedRelease;
+    }
+
+    /**
+     * Sets the value of the lastUpdatedRelease property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link BigInteger }
+     *     
+     */
+    public void setLastUpdatedRelease(BigInteger value) {
+        this.lastUpdatedRelease = value;
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;sequence>
+     *         &lt;element name="range" maxOccurs="unbounded">
+     *           &lt;complexType>
+     *             &lt;complexContent>
+     *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                 &lt;attribute name="begin" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
+     *                 &lt;attribute name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
+     *                 &lt;attribute name="primaryBegin" type="{http://www.w3.org/2001/XMLSchema}integer" />
+     *                 &lt;attribute name="primaryEnd" type="{http://www.w3.org/2001/XMLSchema}integer" />
+     *                 &lt;attribute name="accession" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *                 &lt;attribute name="version" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
+     *                 &lt;attribute name="complement" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+     *               &lt;/restriction>
+     *             &lt;/complexContent>
+     *           &lt;/complexType>
+     *         &lt;/element>
+     *       &lt;/sequence>
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "range"
+    })
+    public static class Assembly {
+
+        @XmlElement(required = true)
+        protected List<EntryType.Assembly.Range> range;
+
+        /**
+         * Gets the value of the range property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the range property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getRange().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link EntryType.Assembly.Range }
+         * 
+         * 
+         */
+        public List<EntryType.Assembly.Range> getRange() {
+            if (range == null) {
+                range = new ArrayList<EntryType.Assembly.Range>();
+            }
+            return this.range;
+        }
+
+
+        /**
+         * <p>Java class for anonymous complex type.
+         * 
+         * <p>The following schema fragment specifies the expected content contained within this class.
+         * 
+         * <pre>
+         * &lt;complexType>
+         *   &lt;complexContent>
+         *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *       &lt;attribute name="begin" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
+         *       &lt;attribute name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
+         *       &lt;attribute name="primaryBegin" type="{http://www.w3.org/2001/XMLSchema}integer" />
+         *       &lt;attribute name="primaryEnd" type="{http://www.w3.org/2001/XMLSchema}integer" />
+         *       &lt;attribute name="accession" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+         *       &lt;attribute name="version" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
+         *       &lt;attribute name="complement" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+         *     &lt;/restriction>
+         *   &lt;/complexContent>
+         * &lt;/complexType>
+         * </pre>
+         * 
+         * 
+         */
+        @XmlAccessorType(XmlAccessType.FIELD)
+        @XmlType(name = "")
+        public static class Range {
+
+            @XmlAttribute(name = "begin", required = true)
+            protected BigInteger begin;
+            @XmlAttribute(name = "end", required = true)
+            protected BigInteger end;
+            @XmlAttribute(name = "primaryBegin")
+            protected BigInteger primaryBegin;
+            @XmlAttribute(name = "primaryEnd")
+            protected BigInteger primaryEnd;
+            @XmlAttribute(name = "accession", required = true)
+            protected String accession;
+            @XmlAttribute(name = "version", required = true)
+            protected BigInteger version;
+            @XmlAttribute(name = "complement")
+            protected Boolean complement;
+
+            /**
+             * Gets the value of the begin property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link BigInteger }
+             *     
+             */
+            public BigInteger getBegin() {
+                return begin;
+            }
+
+            /**
+             * Sets the value of the begin property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link BigInteger }
+             *     
+             */
+            public void setBegin(BigInteger value) {
+                this.begin = value;
+            }
+
+            /**
+             * Gets the value of the end property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link BigInteger }
+             *     
+             */
+            public BigInteger getEnd() {
+                return end;
+            }
+
+            /**
+             * Sets the value of the end property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link BigInteger }
+             *     
+             */
+            public void setEnd(BigInteger value) {
+                this.end = value;
+            }
+
+            /**
+             * Gets the value of the primaryBegin property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link BigInteger }
+             *     
+             */
+            public BigInteger getPrimaryBegin() {
+                return primaryBegin;
+            }
+
+            /**
+             * Sets the value of the primaryBegin property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link BigInteger }
+             *     
+             */
+            public void setPrimaryBegin(BigInteger value) {
+                this.primaryBegin = value;
+            }
+
+            /**
+             * Gets the value of the primaryEnd property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link BigInteger }
+             *     
+             */
+            public BigInteger getPrimaryEnd() {
+                return primaryEnd;
+            }
+
+            /**
+             * Sets the value of the primaryEnd property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link BigInteger }
+             *     
+             */
+            public void setPrimaryEnd(BigInteger value) {
+                this.primaryEnd = value;
+            }
+
+            /**
+             * Gets the value of the accession property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link String }
+             *     
+             */
+            public String getAccession() {
+                return accession;
+            }
+
+            /**
+             * Sets the value of the accession property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link String }
+             *     
+             */
+            public void setAccession(String value) {
+                this.accession = value;
+            }
+
+            /**
+             * Gets the value of the version property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link BigInteger }
+             *     
+             */
+            public BigInteger getVersion() {
+                return version;
+            }
+
+            /**
+             * Sets the value of the version property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link BigInteger }
+             *     
+             */
+            public void setVersion(BigInteger value) {
+                this.version = value;
+            }
+
+            /**
+             * Gets the value of the complement property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link Boolean }
+             *     
+             */
+            public boolean isComplement() {
+                if (complement == null) {
+                    return false;
+                } else {
+                    return complement;
+                }
+            }
+
+            /**
+             * Sets the value of the complement property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link Boolean }
+             *     
+             */
+            public void setComplement(Boolean value) {
+                this.complement = value;
+            }
+
+        }
+
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;sequence>
+     *         &lt;choice maxOccurs="unbounded" minOccurs="0">
+     *           &lt;element name="range">
+     *             &lt;complexType>
+     *               &lt;complexContent>
+     *                 &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                   &lt;attribute name="begin" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
+     *                   &lt;attribute name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
+     *                   &lt;attribute name="primaryBegin" type="{http://www.w3.org/2001/XMLSchema}integer" />
+     *                   &lt;attribute name="primaryEnd" type="{http://www.w3.org/2001/XMLSchema}integer" />
+     *                   &lt;attribute name="accession" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *                   &lt;attribute name="version" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
+     *                   &lt;attribute name="complement" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+     *                 &lt;/restriction>
+     *               &lt;/complexContent>
+     *             &lt;/complexType>
+     *           &lt;/element>
+     *           &lt;element name="gap">
+     *             &lt;complexType>
+     *               &lt;complexContent>
+     *                 &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                   &lt;attribute name="begin" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
+     *                   &lt;attribute name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
+     *                   &lt;attribute name="length" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
+     *                   &lt;attribute name="unknownLength" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+     *                 &lt;/restriction>
+     *               &lt;/complexContent>
+     *             &lt;/complexType>
+     *           &lt;/element>
+     *         &lt;/choice>
+     *       &lt;/sequence>
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "rangeOrGap"
+    })
+    public static class Contig {
+
+        @XmlElements({
+            @XmlElement(name = "range", type = EntryType.Contig.Range.class),
+            @XmlElement(name = "gap", type = EntryType.Contig.Gap.class)
+        })
+        protected List<Object> rangeOrGap;
+
+        /**
+         * Gets the value of the rangeOrGap property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the rangeOrGap property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getRangeOrGap().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link EntryType.Contig.Range }
+         * {@link EntryType.Contig.Gap }
+         * 
+         * 
+         */
+        public List<Object> getRangeOrGap() {
+            if (rangeOrGap == null) {
+                rangeOrGap = new ArrayList<Object>();
+            }
+            return this.rangeOrGap;
+        }
+
+
+        /**
+         * <p>Java class for anonymous complex type.
+         * 
+         * <p>The following schema fragment specifies the expected content contained within this class.
+         * 
+         * <pre>
+         * &lt;complexType>
+         *   &lt;complexContent>
+         *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *       &lt;attribute name="begin" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
+         *       &lt;attribute name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
+         *       &lt;attribute name="length" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
+         *       &lt;attribute name="unknownLength" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+         *     &lt;/restriction>
+         *   &lt;/complexContent>
+         * &lt;/complexType>
+         * </pre>
+         * 
+         * 
+         */
+        @XmlAccessorType(XmlAccessType.FIELD)
+        @XmlType(name = "")
+        public static class Gap {
+
+            @XmlAttribute(name = "begin", required = true)
+            protected BigInteger begin;
+            @XmlAttribute(name = "end", required = true)
+            protected BigInteger end;
+            @XmlAttribute(name = "length", required = true)
+            protected BigInteger length;
+            @XmlAttribute(name = "unknownLength")
+            protected Boolean unknownLength;
+
+            /**
+             * Gets the value of the begin property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link BigInteger }
+             *     
+             */
+            public BigInteger getBegin() {
+                return begin;
+            }
+
+            /**
+             * Sets the value of the begin property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link BigInteger }
+             *     
+             */
+            public void setBegin(BigInteger value) {
+                this.begin = value;
+            }
+
+            /**
+             * Gets the value of the end property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link BigInteger }
+             *     
+             */
+            public BigInteger getEnd() {
+                return end;
+            }
+
+            /**
+             * Sets the value of the end property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link BigInteger }
+             *     
+             */
+            public void setEnd(BigInteger value) {
+                this.end = value;
+            }
+
+            /**
+             * Gets the value of the length property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link BigInteger }
+             *     
+             */
+            public BigInteger getLength() {
+                return length;
+            }
+
+            /**
+             * Sets the value of the length property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link BigInteger }
+             *     
+             */
+            public void setLength(BigInteger value) {
+                this.length = value;
+            }
+
+            /**
+             * Gets the value of the unknownLength property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link Boolean }
+             *     
+             */
+            public boolean isUnknownLength() {
+                if (unknownLength == null) {
+                    return false;
+                } else {
+                    return unknownLength;
+                }
+            }
+
+            /**
+             * Sets the value of the unknownLength property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link Boolean }
+             *     
+             */
+            public void setUnknownLength(Boolean value) {
+                this.unknownLength = value;
+            }
+
+        }
+
+
+        /**
+         * <p>Java class for anonymous complex type.
+         * 
+         * <p>The following schema fragment specifies the expected content contained within this class.
+         * 
+         * <pre>
+         * &lt;complexType>
+         *   &lt;complexContent>
+         *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *       &lt;attribute name="begin" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
+         *       &lt;attribute name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
+         *       &lt;attribute name="primaryBegin" type="{http://www.w3.org/2001/XMLSchema}integer" />
+         *       &lt;attribute name="primaryEnd" type="{http://www.w3.org/2001/XMLSchema}integer" />
+         *       &lt;attribute name="accession" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+         *       &lt;attribute name="version" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
+         *       &lt;attribute name="complement" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+         *     &lt;/restriction>
+         *   &lt;/complexContent>
+         * &lt;/complexType>
+         * </pre>
+         * 
+         * 
+         */
+        @XmlAccessorType(XmlAccessType.FIELD)
+        @XmlType(name = "")
+        public static class Range {
+
+            @XmlAttribute(name = "begin", required = true)
+            protected BigInteger begin;
+            @XmlAttribute(name = "end", required = true)
+            protected BigInteger end;
+            @XmlAttribute(name = "primaryBegin")
+            protected BigInteger primaryBegin;
+            @XmlAttribute(name = "primaryEnd")
+            protected BigInteger primaryEnd;
+            @XmlAttribute(name = "accession", required = true)
+            protected String accession;
+            @XmlAttribute(name = "version", required = true)
+            protected BigInteger version;
+            @XmlAttribute(name = "complement")
+            protected Boolean complement;
+
+            /**
+             * Gets the value of the begin property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link BigInteger }
+             *     
+             */
+            public BigInteger getBegin() {
+                return begin;
+            }
+
+            /**
+             * Sets the value of the begin property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link BigInteger }
+             *     
+             */
+            public void setBegin(BigInteger value) {
+                this.begin = value;
+            }
+
+            /**
+             * Gets the value of the end property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link BigInteger }
+             *     
+             */
+            public BigInteger getEnd() {
+                return end;
+            }
+
+            /**
+             * Sets the value of the end property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link BigInteger }
+             *     
+             */
+            public void setEnd(BigInteger value) {
+                this.end = value;
+            }
+
+            /**
+             * Gets the value of the primaryBegin property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link BigInteger }
+             *     
+             */
+            public BigInteger getPrimaryBegin() {
+                return primaryBegin;
+            }
+
+            /**
+             * Sets the value of the primaryBegin property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link BigInteger }
+             *     
+             */
+            public void setPrimaryBegin(BigInteger value) {
+                this.primaryBegin = value;
+            }
+
+            /**
+             * Gets the value of the primaryEnd property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link BigInteger }
+             *     
+             */
+            public BigInteger getPrimaryEnd() {
+                return primaryEnd;
+            }
+
+            /**
+             * Sets the value of the primaryEnd property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link BigInteger }
+             *     
+             */
+            public void setPrimaryEnd(BigInteger value) {
+                this.primaryEnd = value;
+            }
+
+            /**
+             * Gets the value of the accession property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link String }
+             *     
+             */
+            public String getAccession() {
+                return accession;
+            }
+
+            /**
+             * Sets the value of the accession property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link String }
+             *     
+             */
+            public void setAccession(String value) {
+                this.accession = value;
+            }
+
+            /**
+             * Gets the value of the version property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link BigInteger }
+             *     
+             */
+            public BigInteger getVersion() {
+                return version;
+            }
+
+            /**
+             * Sets the value of the version property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link BigInteger }
+             *     
+             */
+            public void setVersion(BigInteger value) {
+                this.version = value;
+            }
+
+            /**
+             * Gets the value of the complement property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link Boolean }
+             *     
+             */
+            public boolean isComplement() {
+                if (complement == null) {
+                    return false;
+                } else {
+                    return complement;
+                }
+            }
+
+            /**
+             * Sets the value of the complement property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link Boolean }
+             *     
+             */
+            public void setComplement(Boolean value) {
+                this.complement = value;
+            }
+
+        }
+
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;sequence>
+     *         &lt;element name="taxon" minOccurs="0">
+     *           &lt;complexType>
+     *             &lt;complexContent>
+     *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                 &lt;sequence>
+     *                   &lt;element name="lineage" minOccurs="0">
+     *                     &lt;complexType>
+     *                       &lt;complexContent>
+     *                         &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                           &lt;sequence>
+     *                             &lt;element name="taxon" maxOccurs="unbounded">
+     *                               &lt;complexType>
+     *                                 &lt;complexContent>
+     *                                   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                                     &lt;attribute name="scientificName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *                                   &lt;/restriction>
+     *                                 &lt;/complexContent>
+     *                               &lt;/complexType>
+     *                             &lt;/element>
+     *                           &lt;/sequence>
+     *                         &lt;/restriction>
+     *                       &lt;/complexContent>
+     *                     &lt;/complexType>
+     *                   &lt;/element>
+     *                 &lt;/sequence>
+     *                 &lt;attribute name="scientificName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *                 &lt;attribute name="commonName" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *                 &lt;attribute name="taxId" type="{http://www.w3.org/2001/XMLSchema}integer" />
+     *               &lt;/restriction>
+     *             &lt;/complexContent>
+     *           &lt;/complexType>
+     *         &lt;/element>
+     *         &lt;element name="xref" type="{}XrefType" maxOccurs="unbounded" minOccurs="0"/>
+     *         &lt;element name="qualifier" maxOccurs="unbounded" minOccurs="0">
+     *           &lt;complexType>
+     *             &lt;complexContent>
+     *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                 &lt;sequence>
+     *                   &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+     *                 &lt;/sequence>
+     *                 &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *               &lt;/restriction>
+     *             &lt;/complexContent>
+     *           &lt;/complexType>
+     *         &lt;/element>
+     *       &lt;/sequence>
+     *       &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *       &lt;attribute name="location" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "taxon",
+        "xref",
+        "qualifier"
+    })
+    public static class Feature {
+
+        protected EntryType.Feature.FeatureTaxon taxon;
+        protected List<XrefType> xref;
+        protected List<EntryType.Feature.Qualifier> qualifier;
+        @XmlAttribute(name = "name", required = true)
+        protected String name;
+        @XmlAttribute(name = "location", required = true)
+        protected String location;
+
+        /**
+         * Gets the value of the taxon property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link EntryType.Feature.FeatureTaxon }
+         *     
+         */
+        public EntryType.Feature.FeatureTaxon getTaxon() {
+            return taxon;
+        }
+
+        /**
+         * Sets the value of the taxon property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link EntryType.Feature.FeatureTaxon }
+         *     
+         */
+        public void setTaxon(EntryType.Feature.FeatureTaxon value) {
+            this.taxon = value;
+        }
+
+        /**
+         * Gets the value of the xref property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the xref property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getXref().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link XrefType }
+         * 
+         * 
+         */
+        public List<XrefType> getXref() {
+            if (xref == null) {
+                xref = new ArrayList<XrefType>();
+            }
+            return this.xref;
+        }
+
+        /**
+         * Gets the value of the qualifier property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the qualifier property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getQualifier().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link EntryType.Feature.Qualifier }
+         * 
+         * 
+         */
+        public List<EntryType.Feature.Qualifier> getQualifier() {
+            if (qualifier == null) {
+                qualifier = new ArrayList<EntryType.Feature.Qualifier>();
+            }
+            return this.qualifier;
+        }
+
+        /**
+         * Gets the value of the name property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getName() {
+            return name;
+        }
+
+        /**
+         * Sets the value of the name property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setName(String value) {
+            this.name = value;
+        }
+
+        /**
+         * Gets the value of the location property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getLocation() {
+            return location;
+        }
+
+        /**
+         * Sets the value of the location property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setLocation(String value) {
+            this.location = value;
+        }
+
+
+        /**
+         * <p>Java class for anonymous complex type.
+         * 
+         * <p>The following schema fragment specifies the expected content contained within this class.
+         * 
+         * <pre>
+         * &lt;complexType>
+         *   &lt;complexContent>
+         *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *       &lt;sequence>
+         *         &lt;element name="lineage" minOccurs="0">
+         *           &lt;complexType>
+         *             &lt;complexContent>
+         *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *                 &lt;sequence>
+         *                   &lt;element name="taxon" maxOccurs="unbounded">
+         *                     &lt;complexType>
+         *                       &lt;complexContent>
+         *                         &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *                           &lt;attribute name="scientificName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+         *                         &lt;/restriction>
+         *                       &lt;/complexContent>
+         *                     &lt;/complexType>
+         *                   &lt;/element>
+         *                 &lt;/sequence>
+         *               &lt;/restriction>
+         *             &lt;/complexContent>
+         *           &lt;/complexType>
+         *         &lt;/element>
+         *       &lt;/sequence>
+         *       &lt;attribute name="scientificName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+         *       &lt;attribute name="commonName" type="{http://www.w3.org/2001/XMLSchema}string" />
+         *       &lt;attribute name="taxId" type="{http://www.w3.org/2001/XMLSchema}integer" />
+         *     &lt;/restriction>
+         *   &lt;/complexContent>
+         * &lt;/complexType>
+         * </pre>
+         * 
+         * 
+         */
+        @XmlAccessorType(XmlAccessType.FIELD)
+        @XmlType(name = "", propOrder = {
+            "lineage"
+        })
+        public static class FeatureTaxon {
+
+            protected EntryType.Feature.FeatureTaxon.Lineage lineage;
+            @XmlAttribute(name = "scientificName", required = true)
+            protected String scientificName;
+            @XmlAttribute(name = "commonName")
+            protected String commonName;
+            @XmlAttribute(name = "taxId")
+            protected BigInteger taxId;
+
+            /**
+             * Gets the value of the lineage property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link EntryType.Feature.FeatureTaxon.Lineage }
+             *     
+             */
+            public EntryType.Feature.FeatureTaxon.Lineage getLineage() {
+                return lineage;
+            }
+
+            /**
+             * Sets the value of the lineage property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link EntryType.Feature.FeatureTaxon.Lineage }
+             *     
+             */
+            public void setLineage(EntryType.Feature.FeatureTaxon.Lineage value) {
+                this.lineage = value;
+            }
+
+            /**
+             * Gets the value of the scientificName property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link String }
+             *     
+             */
+            public String getScientificName() {
+                return scientificName;
+            }
+
+            /**
+             * Sets the value of the scientificName property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link String }
+             *     
+             */
+            public void setScientificName(String value) {
+                this.scientificName = value;
+            }
+
+            /**
+             * Gets the value of the commonName property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link String }
+             *     
+             */
+            public String getCommonName() {
+                return commonName;
+            }
+
+            /**
+             * Sets the value of the commonName property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link String }
+             *     
+             */
+            public void setCommonName(String value) {
+                this.commonName = value;
+            }
+
+            /**
+             * Gets the value of the taxId property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link BigInteger }
+             *     
+             */
+            public BigInteger getTaxId() {
+                return taxId;
+            }
+
+            /**
+             * Sets the value of the taxId property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link BigInteger }
+             *     
+             */
+            public void setTaxId(BigInteger value) {
+                this.taxId = value;
+            }
+
+
+            /**
+             * <p>Java class for anonymous complex type.
+             * 
+             * <p>The following schema fragment specifies the expected content contained within this class.
+             * 
+             * <pre>
+             * &lt;complexType>
+             *   &lt;complexContent>
+             *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+             *       &lt;sequence>
+             *         &lt;element name="taxon" maxOccurs="unbounded">
+             *           &lt;complexType>
+             *             &lt;complexContent>
+             *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+             *                 &lt;attribute name="scientificName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+             *               &lt;/restriction>
+             *             &lt;/complexContent>
+             *           &lt;/complexType>
+             *         &lt;/element>
+             *       &lt;/sequence>
+             *     &lt;/restriction>
+             *   &lt;/complexContent>
+             * &lt;/complexType>
+             * </pre>
+             * 
+             * 
+             */
+            @XmlAccessorType(XmlAccessType.FIELD)
+            @XmlType(name = "", propOrder = {
+                "taxon"
+            })
+            public static class Lineage {
+
+                @XmlElement(required = true)
+                protected List<EntryType.Feature.FeatureTaxon.Lineage.Taxon> taxon;
+
+                /**
+                 * Gets the value of the taxon property.
+                 * 
+                 * <p>
+                 * This accessor method returns a reference to the live list,
+                 * not a snapshot. Therefore any modification you make to the
+                 * returned list will be present inside the JAXB object.
+                 * This is why there is not a <CODE>set</CODE> method for the taxon property.
+                 * 
+                 * <p>
+                 * For example, to add a new item, do as follows:
+                 * <pre>
+                 *    getTaxon().add(newItem);
+                 * </pre>
+                 * 
+                 * 
+                 * <p>
+                 * Objects of the following type(s) are allowed in the list
+                 * {@link EntryType.Feature.FeatureTaxon.Lineage.Taxon }
+                 * 
+                 * 
+                 */
+                public List<EntryType.Feature.FeatureTaxon.Lineage.Taxon> getTaxon() {
+                    if (taxon == null) {
+                        taxon = new ArrayList<EntryType.Feature.FeatureTaxon.Lineage.Taxon>();
+                    }
+                    return this.taxon;
+                }
+
+
+                /**
+                 * <p>Java class for anonymous complex type.
+                 * 
+                 * <p>The following schema fragment specifies the expected content contained within this class.
+                 * 
+                 * <pre>
+                 * &lt;complexType>
+                 *   &lt;complexContent>
+                 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+                 *       &lt;attribute name="scientificName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+                 *     &lt;/restriction>
+                 *   &lt;/complexContent>
+                 * &lt;/complexType>
+                 * </pre>
+                 * 
+                 * 
+                 */
+                @XmlAccessorType(XmlAccessType.FIELD)
+                @XmlType(name = "")
+                public static class Taxon {
+
+                    @XmlAttribute(name = "scientificName", required = true)
+                    protected String scientificName;
+
+                    /**
+                     * Gets the value of the scientificName property.
+                     * 
+                     * @return
+                     *     possible object is
+                     *     {@link String }
+                     *     
+                     */
+                    public String getScientificName() {
+                        return scientificName;
+                    }
+
+                    /**
+                     * Sets the value of the scientificName property.
+                     * 
+                     * @param value
+                     *     allowed object is
+                     *     {@link String }
+                     *     
+                     */
+                    public void setScientificName(String value) {
+                        this.scientificName = value;
+                    }
+
+                }
+
+            }
+
+        }
+
+
+        /**
+         * <p>Java class for anonymous complex type.
+         * 
+         * <p>The following schema fragment specifies the expected content contained within this class.
+         * 
+         * <pre>
+         * &lt;complexType>
+         *   &lt;complexContent>
+         *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *       &lt;sequence>
+         *         &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+         *       &lt;/sequence>
+         *       &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+         *     &lt;/restriction>
+         *   &lt;/complexContent>
+         * &lt;/complexType>
+         * </pre>
+         * 
+         * 
+         */
+        @XmlAccessorType(XmlAccessType.FIELD)
+        @XmlType(name = "", propOrder = {
+            "value"
+        })
+        public static class Qualifier {
+
+            protected String value;
+            @XmlAttribute(name = "name", required = true)
+            protected String name;
+
+            /**
+             * Gets the value of the value property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link String }
+             *     
+             */
+            public String getValue() {
+                return value;
+            }
+
+            /**
+             * Sets the value of the value property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link String }
+             *     
+             */
+            public void setValue(String value) {
+                this.value = value;
+            }
+
+            /**
+             * Gets the value of the name property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link String }
+             *     
+             */
+            public String getName() {
+                return name;
+            }
+
+            /**
+             * Sets the value of the name property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link String }
+             *     
+             */
+            public void setName(String value) {
+                this.name = value;
+            }
+
+        }
+
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;sequence>
+     *         &lt;element name="title" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+     *         &lt;element name="author" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
+     *         &lt;element name="applicant" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
+     *         &lt;element name="consortium" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+     *         &lt;element name="submissionDate" type="{http://www.w3.org/2001/XMLSchema}date" minOccurs="0"/>
+     *         &lt;element name="journal" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+     *         &lt;element name="year" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+     *         &lt;element name="volume" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+     *         &lt;element name="issue" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+     *         &lt;element name="firstPage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+     *         &lt;element name="lastPage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+     *         &lt;element name="comment" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+     *         &lt;element name="referenceLocation" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+     *         &lt;element name="xref" type="{}XrefType" maxOccurs="unbounded" minOccurs="0"/>
+     *       &lt;/sequence>
+     *       &lt;attribute name="type" use="required">
+     *         &lt;simpleType>
+     *           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+     *             &lt;enumeration value="submission"/>
+     *             &lt;enumeration value="book"/>
+     *             &lt;enumeration value="article"/>
+     *             &lt;enumeration value="patent"/>
+     *             &lt;enumeration value="thesis"/>
+     *             &lt;enumeration value="unpublished"/>
+     *           &lt;/restriction>
+     *         &lt;/simpleType>
+     *       &lt;/attribute>
+     *       &lt;attribute name="number" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
+     *       &lt;attribute name="location" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "title",
+        "author",
+        "applicant",
+        "consortium",
+        "submissionDate",
+        "journal",
+        "year",
+        "volume",
+        "issue",
+        "firstPage",
+        "lastPage",
+        "comment",
+        "referenceLocation",
+        "xref"
+    })
+    public static class Reference {
+
+        protected String title;
+        protected List<String> author;
+        protected List<String> applicant;
+        protected String consortium;
+        @XmlSchemaType(name = "date")
+        protected XMLGregorianCalendar submissionDate;
+        protected String journal;
+        protected String year;
+        protected String volume;
+        protected String issue;
+        protected String firstPage;
+        protected String lastPage;
+        protected String comment;
+        protected String referenceLocation;
+        protected List<XrefType> xref;
+        @XmlAttribute(name = "type", required = true)
+        protected String type;
+        @XmlAttribute(name = "number", required = true)
+        protected BigInteger number;
+        @XmlAttribute(name = "location")
+        protected String location;
+
+        /**
+         * Gets the value of the title property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getTitle() {
+            return title;
+        }
+
+        /**
+         * Sets the value of the title property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setTitle(String value) {
+            this.title = value;
+        }
+
+        /**
+         * Gets the value of the author property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the author property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getAuthor().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link String }
+         * 
+         * 
+         */
+        public List<String> getAuthor() {
+            if (author == null) {
+                author = new ArrayList<String>();
+            }
+            return this.author;
+        }
+
+        /**
+         * Gets the value of the applicant property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the applicant property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getApplicant().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link String }
+         * 
+         * 
+         */
+        public List<String> getApplicant() {
+            if (applicant == null) {
+                applicant = new ArrayList<String>();
+            }
+            return this.applicant;
+        }
+
+        /**
+         * Gets the value of the consortium property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getConsortium() {
+            return consortium;
+        }
+
+        /**
+         * Sets the value of the consortium property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setConsortium(String value) {
+            this.consortium = value;
+        }
+
+        /**
+         * Gets the value of the submissionDate property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link XMLGregorianCalendar }
+         *     
+         */
+        public XMLGregorianCalendar getSubmissionDate() {
+            return submissionDate;
+        }
+
+        /**
+         * Sets the value of the submissionDate property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link XMLGregorianCalendar }
+         *     
+         */
+        public void setSubmissionDate(XMLGregorianCalendar value) {
+            this.submissionDate = value;
+        }
+
+        /**
+         * Gets the value of the journal property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getJournal() {
+            return journal;
+        }
+
+        /**
+         * Sets the value of the journal property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setJournal(String value) {
+            this.journal = value;
+        }
+
+        /**
+         * Gets the value of the year property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getYear() {
+            return year;
+        }
+
+        /**
+         * Sets the value of the year property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setYear(String value) {
+            this.year = value;
+        }
+
+        /**
+         * Gets the value of the volume property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getVolume() {
+            return volume;
+        }
+
+        /**
+         * Sets the value of the volume property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setVolume(String value) {
+            this.volume = value;
+        }
+
+        /**
+         * Gets the value of the issue property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getIssue() {
+            return issue;
+        }
+
+        /**
+         * Sets the value of the issue property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setIssue(String value) {
+            this.issue = value;
+        }
+
+        /**
+         * Gets the value of the firstPage property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getFirstPage() {
+            return firstPage;
+        }
+
+        /**
+         * Sets the value of the firstPage property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setFirstPage(String value) {
+            this.firstPage = value;
+        }
+
+        /**
+         * Gets the value of the lastPage property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getLastPage() {
+            return lastPage;
+        }
+
+        /**
+         * Sets the value of the lastPage property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setLastPage(String value) {
+            this.lastPage = value;
+        }
+
+        /**
+         * Gets the value of the comment property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getComment() {
+            return comment;
+        }
+
+        /**
+         * Sets the value of the comment property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setComment(String value) {
+            this.comment = value;
+        }
+
+        /**
+         * Gets the value of the referenceLocation property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getReferenceLocation() {
+            return referenceLocation;
+        }
+
+        /**
+         * Sets the value of the referenceLocation property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setReferenceLocation(String value) {
+            this.referenceLocation = value;
+        }
+
+        /**
+         * Gets the value of the xref property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the xref property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getXref().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link XrefType }
+         * 
+         * 
+         */
+        public List<XrefType> getXref() {
+            if (xref == null) {
+                xref = new ArrayList<XrefType>();
+            }
+            return this.xref;
+        }
+
+        /**
+         * Gets the value of the type property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getType() {
+            return type;
+        }
+
+        /**
+         * Sets the value of the type property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setType(String value) {
+            this.type = value;
+        }
+
+        /**
+         * Gets the value of the number property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link BigInteger }
+         *     
+         */
+        public BigInteger getNumber() {
+            return number;
+        }
+
+        /**
+         * Sets the value of the number property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link BigInteger }
+         *     
+         */
+        public void setNumber(BigInteger value) {
+            this.number = value;
+        }
+
+        /**
+         * Gets the value of the location property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getLocation() {
+            return location;
+        }
+
+        /**
+         * Sets the value of the location property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setLocation(String value) {
+            this.location = value;
+        }
+
+    }
+
+}
diff --git a/src/jalview/xml/binding/embl/ObjectFactory.java b/src/jalview/xml/binding/embl/ObjectFactory.java
new file mode 100644 (file)
index 0000000..d5629ca
--- /dev/null
@@ -0,0 +1,159 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.14 at 02:46:00 PM BST 
+//
+
+
+package jalview.xml.binding.embl;
+
+import javax.xml.bind.annotation.XmlRegistry;
+
+
+/**
+ * This object contains factory methods for each 
+ * Java content interface and Java element interface 
+ * generated in the jalview.xml.binding.embl package. 
+ * <p>An ObjectFactory allows you to programatically 
+ * construct new instances of the Java representation 
+ * for XML content. The Java representation of XML 
+ * content can consist of schema derived interfaces 
+ * and classes representing the binding of schema 
+ * type definitions, element declarations and model 
+ * groups.  Factory methods for each of these are 
+ * provided in this class.
+ * 
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+
+    /**
+     * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: jalview.xml.binding.embl
+     * 
+     */
+    public ObjectFactory() {
+    }
+
+    /**
+     * Create an instance of {@link EntryType }
+     * 
+     */
+    public EntryType createEntryType() {
+        return new EntryType();
+    }
+
+    /**
+     * Create an instance of {@link EntryType.Contig }
+     * 
+     */
+    public EntryType.Contig createEntryTypeContig() {
+        return new EntryType.Contig();
+    }
+
+    /**
+     * Create an instance of {@link EntryType.Assembly }
+     * 
+     */
+    public EntryType.Assembly createEntryTypeAssembly() {
+        return new EntryType.Assembly();
+    }
+
+    /**
+     * Create an instance of {@link EntryType.Feature }
+     * 
+     */
+    public EntryType.Feature createEntryTypeFeature() {
+        return new EntryType.Feature();
+    }
+
+    /**
+     * Create an instance of {@link EntryType.Feature.FeatureTaxon }
+     * 
+     */
+    public EntryType.Feature.FeatureTaxon createEntryTypeFeatureFeatureTaxon() {
+        return new EntryType.Feature.FeatureTaxon();
+    }
+
+    /**
+     * Create an instance of {@link EntryType.Feature.FeatureTaxon.Lineage }
+     * 
+     */
+    public EntryType.Feature.FeatureTaxon.Lineage createEntryTypeFeatureFeatureTaxonLineage() {
+        return new EntryType.Feature.FeatureTaxon.Lineage();
+    }
+
+    /**
+     * Create an instance of {@link ROOT }
+     * 
+     */
+    public ROOT createROOT() {
+        return new ROOT();
+    }
+
+    /**
+     * Create an instance of {@link EntrySetType }
+     * 
+     */
+    public EntrySetType createEntrySetType() {
+        return new EntrySetType();
+    }
+
+    /**
+     * Create an instance of {@link XrefType }
+     * 
+     */
+    public XrefType createXrefType() {
+        return new XrefType();
+    }
+
+    /**
+     * Create an instance of {@link EntryType.Reference }
+     * 
+     */
+    public EntryType.Reference createEntryTypeReference() {
+        return new EntryType.Reference();
+    }
+
+    /**
+     * Create an instance of {@link EntryType.Contig.Range }
+     * 
+     */
+    public EntryType.Contig.Range createEntryTypeContigRange() {
+        return new EntryType.Contig.Range();
+    }
+
+    /**
+     * Create an instance of {@link EntryType.Contig.Gap }
+     * 
+     */
+    public EntryType.Contig.Gap createEntryTypeContigGap() {
+        return new EntryType.Contig.Gap();
+    }
+
+    /**
+     * Create an instance of {@link EntryType.Assembly.Range }
+     * 
+     */
+    public EntryType.Assembly.Range createEntryTypeAssemblyRange() {
+        return new EntryType.Assembly.Range();
+    }
+
+    /**
+     * Create an instance of {@link EntryType.Feature.Qualifier }
+     * 
+     */
+    public EntryType.Feature.Qualifier createEntryTypeFeatureQualifier() {
+        return new EntryType.Feature.Qualifier();
+    }
+
+    /**
+     * Create an instance of {@link EntryType.Feature.FeatureTaxon.Lineage.Taxon }
+     * 
+     */
+    public EntryType.Feature.FeatureTaxon.Lineage.Taxon createEntryTypeFeatureFeatureTaxonLineageTaxon() {
+        return new EntryType.Feature.FeatureTaxon.Lineage.Taxon();
+    }
+
+}
diff --git a/src/jalview/xml/binding/embl/ROOT.java b/src/jalview/xml/binding/embl/ROOT.java
new file mode 100644 (file)
index 0000000..f7f522d
--- /dev/null
@@ -0,0 +1,96 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.14 at 02:46:00 PM BST 
+//
+
+
+package jalview.xml.binding.embl;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;choice>
+ *         &lt;element name="entrySet" type="{}EntrySetType"/>
+ *         &lt;element name="entry" type="{}EntryType"/>
+ *       &lt;/choice>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "entrySet",
+    "entry"
+})
+@XmlRootElement(name = "ROOT")
+public class ROOT {
+
+    protected EntrySetType entrySet;
+    protected EntryType entry;
+
+    /**
+     * Gets the value of the entrySet property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link EntrySetType }
+     *     
+     */
+    public EntrySetType getEntrySet() {
+        return entrySet;
+    }
+
+    /**
+     * Sets the value of the entrySet property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link EntrySetType }
+     *     
+     */
+    public void setEntrySet(EntrySetType value) {
+        this.entrySet = value;
+    }
+
+    /**
+     * Gets the value of the entry property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link EntryType }
+     *     
+     */
+    public EntryType getEntry() {
+        return entry;
+    }
+
+    /**
+     * Sets the value of the entry property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link EntryType }
+     *     
+     */
+    public void setEntry(EntryType value) {
+        this.entry = value;
+    }
+
+}
diff --git a/src/jalview/xml/binding/embl/XrefType.java b/src/jalview/xml/binding/embl/XrefType.java
new file mode 100644 (file)
index 0000000..9608b79
--- /dev/null
@@ -0,0 +1,121 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.14 at 02:46:00 PM BST 
+//
+
+
+package jalview.xml.binding.embl;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Database cross-reference.
+ * 
+ * <p>Java class for XrefType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="XrefType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;attribute name="db" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="secondaryId" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "XrefType")
+public class XrefType {
+
+    @XmlAttribute(name = "db", required = true)
+    protected String db;
+    @XmlAttribute(name = "id", required = true)
+    protected String id;
+    @XmlAttribute(name = "secondaryId")
+    protected String secondaryId;
+
+    /**
+     * Gets the value of the db property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getDb() {
+        return db;
+    }
+
+    /**
+     * Sets the value of the db property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setDb(String value) {
+        this.db = value;
+    }
+
+    /**
+     * Gets the value of the id property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * Sets the value of the id property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setId(String value) {
+        this.id = value;
+    }
+
+    /**
+     * Gets the value of the secondaryId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getSecondaryId() {
+        return secondaryId;
+    }
+
+    /**
+     * Sets the value of the secondaryId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setSecondaryId(String value) {
+        this.secondaryId = value;
+    }
+
+}
diff --git a/src/jalview/xml/binding/jalview/AlcodonFrame.java b/src/jalview/xml/binding/jalview/AlcodonFrame.java
new file mode 100644 (file)
index 0000000..83f1ee2
--- /dev/null
@@ -0,0 +1,326 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.12.20 at 11:47:26 AM GMT 
+//
+
+
+package jalview.xml.binding.jalview;
+
+import java.math.BigInteger;
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="alcodon" maxOccurs="unbounded" minOccurs="0">
+ *           &lt;complexType>
+ *             &lt;complexContent>
+ *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 &lt;attribute name="pos1" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *                 &lt;attribute name="pos2" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *                 &lt;attribute name="pos3" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *               &lt;/restriction>
+ *             &lt;/complexContent>
+ *           &lt;/complexType>
+ *         &lt;/element>
+ *         &lt;element name="alcodMap" maxOccurs="unbounded" minOccurs="0">
+ *           &lt;complexType>
+ *             &lt;complexContent>
+ *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 &lt;sequence>
+ *                   &lt;element ref="{www.vamsas.ac.uk/jalview/version2}Mapping"/>
+ *                 &lt;/sequence>
+ *                 &lt;attribute name="dnasq" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *               &lt;/restriction>
+ *             &lt;/complexContent>
+ *           &lt;/complexType>
+ *         &lt;/element>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "alcodon",
+    "alcodMap"
+})
+@XmlRootElement(name = "AlcodonFrame")
+public class AlcodonFrame {
+
+    protected List<AlcodonFrame.Alcodon> alcodon;
+    protected List<AlcodonFrame.AlcodMap> alcodMap;
+
+    /**
+     * Gets the value of the alcodon property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the alcodon property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getAlcodon().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link AlcodonFrame.Alcodon }
+     * 
+     * 
+     */
+    public List<AlcodonFrame.Alcodon> getAlcodon() {
+        if (alcodon == null) {
+            alcodon = new ArrayList<AlcodonFrame.Alcodon>();
+        }
+        return this.alcodon;
+    }
+
+    /**
+     * Gets the value of the alcodMap property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the alcodMap property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getAlcodMap().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link AlcodonFrame.AlcodMap }
+     * 
+     * 
+     */
+    public List<AlcodonFrame.AlcodMap> getAlcodMap() {
+        if (alcodMap == null) {
+            alcodMap = new ArrayList<AlcodonFrame.AlcodMap>();
+        }
+        return this.alcodMap;
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;sequence>
+     *         &lt;element ref="{www.vamsas.ac.uk/jalview/version2}Mapping"/>
+     *       &lt;/sequence>
+     *       &lt;attribute name="dnasq" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "mapping"
+    })
+    public static class AlcodMap {
+
+        @XmlElement(name = "Mapping", required = true)
+        protected Mapping mapping;
+        @XmlAttribute(name = "dnasq", required = true)
+        protected String dnasq;
+
+        /**
+         * 
+         *                                                                             a Mapping entry and an associated protein sequence
+         *                                                                     
+         * 
+         * @return
+         *     possible object is
+         *     {@link Mapping }
+         *     
+         */
+        public Mapping getMapping() {
+            return mapping;
+        }
+
+        /**
+         * Sets the value of the mapping property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Mapping }
+         *     
+         */
+        public void setMapping(Mapping value) {
+            this.mapping = value;
+        }
+
+        /**
+         * Gets the value of the dnasq property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getDnasq() {
+            return dnasq;
+        }
+
+        /**
+         * Sets the value of the dnasq property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setDnasq(String value) {
+            this.dnasq = value;
+        }
+
+    }
+
+
+    /**
+     * 
+     *                                                                 specifies a series of aligned codons from an associated DNA sequence alignment that when translated correspond to columns of a peptide alignment.
+     *                                                                 Element may have either all pos1,2,3 attributes specified, or none at all (indicating a gapped column with no translated peptide).
+     *                                                         
+     * 
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;attribute name="pos1" type="{http://www.w3.org/2001/XMLSchema}integer" />
+     *       &lt;attribute name="pos2" type="{http://www.w3.org/2001/XMLSchema}integer" />
+     *       &lt;attribute name="pos3" type="{http://www.w3.org/2001/XMLSchema}integer" />
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "")
+    public static class Alcodon {
+
+        @XmlAttribute(name = "pos1")
+        protected BigInteger pos1;
+        @XmlAttribute(name = "pos2")
+        protected BigInteger pos2;
+        @XmlAttribute(name = "pos3")
+        protected BigInteger pos3;
+
+        /**
+         * Gets the value of the pos1 property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link BigInteger }
+         *     
+         */
+        public BigInteger getPos1() {
+            return pos1;
+        }
+
+        /**
+         * Sets the value of the pos1 property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link BigInteger }
+         *     
+         */
+        public void setPos1(BigInteger value) {
+            this.pos1 = value;
+        }
+
+        /**
+         * Gets the value of the pos2 property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link BigInteger }
+         *     
+         */
+        public BigInteger getPos2() {
+            return pos2;
+        }
+
+        /**
+         * Sets the value of the pos2 property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link BigInteger }
+         *     
+         */
+        public void setPos2(BigInteger value) {
+            this.pos2 = value;
+        }
+
+        /**
+         * Gets the value of the pos3 property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link BigInteger }
+         *     
+         */
+        public BigInteger getPos3() {
+            return pos3;
+        }
+
+        /**
+         * Sets the value of the pos3 property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link BigInteger }
+         *     
+         */
+        public void setPos3(BigInteger value) {
+            this.pos3 = value;
+        }
+
+    }
+
+}
diff --git a/src/jalview/xml/binding/jalview/Annotation.java b/src/jalview/xml/binding/jalview/Annotation.java
new file mode 100644 (file)
index 0000000..0dbcad0
--- /dev/null
@@ -0,0 +1,857 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.12.20 at 11:47:26 AM GMT 
+//
+
+
+package jalview.xml.binding.jalview;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element ref="{www.vamsas.ac.uk/jalview/version2}annotationElement" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="label" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="thresholdLine" minOccurs="0">
+ *           &lt;complexType>
+ *             &lt;complexContent>
+ *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 &lt;attribute name="label" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                 &lt;attribute name="value" type="{http://www.w3.org/2001/XMLSchema}float" />
+ *                 &lt;attribute name="colour" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *               &lt;/restriction>
+ *             &lt;/complexContent>
+ *           &lt;/complexType>
+ *         &lt;/element>
+ *         &lt;element name="property" maxOccurs="unbounded" minOccurs="0">
+ *           &lt;complexType>
+ *             &lt;complexContent>
+ *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                 &lt;attribute name="value" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *               &lt;/restriction>
+ *             &lt;/complexContent>
+ *           &lt;/complexType>
+ *         &lt;/element>
+ *       &lt;/sequence>
+ *       &lt;attribute name="graph" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       &lt;attribute name="graphType" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *       &lt;attribute name="sequenceRef" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="groupRef" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="graphColour" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *       &lt;attribute name="graphGroup" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *       &lt;attribute name="graphHeight" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *       &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="scoreOnly" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+ *       &lt;attribute name="score" type="{http://www.w3.org/2001/XMLSchema}double" />
+ *       &lt;attribute name="visible" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       &lt;attribute name="centreColLabels" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       &lt;attribute name="scaleColLabels" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       &lt;attribute name="showAllColLabels" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       &lt;attribute name="autoCalculated" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+ *       &lt;attribute name="belowAlignment" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
+ *       &lt;attribute name="calcId" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "annotationElement",
+    "label",
+    "description",
+    "thresholdLine",
+    "property"
+})
+@XmlRootElement(name = "Annotation")
+public class Annotation {
+
+    protected List<AnnotationElement> annotationElement;
+    @XmlElement(required = true)
+    protected String label;
+    protected String description;
+    protected Annotation.ThresholdLine thresholdLine;
+    protected List<Annotation.Property> property;
+    @XmlAttribute(name = "graph", required = true)
+    protected boolean graph;
+    @XmlAttribute(name = "graphType")
+    protected Integer graphType;
+    @XmlAttribute(name = "sequenceRef")
+    protected String sequenceRef;
+    @XmlAttribute(name = "groupRef")
+    protected String groupRef;
+    @XmlAttribute(name = "graphColour")
+    protected Integer graphColour;
+    @XmlAttribute(name = "graphGroup")
+    protected Integer graphGroup;
+    @XmlAttribute(name = "graphHeight")
+    protected Integer graphHeight;
+    @XmlAttribute(name = "id")
+    protected String id;
+    @XmlAttribute(name = "scoreOnly")
+    protected Boolean scoreOnly;
+    @XmlAttribute(name = "score")
+    protected Double score;
+    @XmlAttribute(name = "visible")
+    protected Boolean visible;
+    @XmlAttribute(name = "centreColLabels")
+    protected Boolean centreColLabels;
+    @XmlAttribute(name = "scaleColLabels")
+    protected Boolean scaleColLabels;
+    @XmlAttribute(name = "showAllColLabels")
+    protected Boolean showAllColLabels;
+    @XmlAttribute(name = "autoCalculated")
+    protected Boolean autoCalculated;
+    @XmlAttribute(name = "belowAlignment")
+    protected Boolean belowAlignment;
+    @XmlAttribute(name = "calcId")
+    protected String calcId;
+
+    /**
+     * Gets the value of the annotationElement property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the annotationElement property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getAnnotationElement().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link AnnotationElement }
+     * 
+     * 
+     */
+    public List<AnnotationElement> getAnnotationElement() {
+        if (annotationElement == null) {
+            annotationElement = new ArrayList<AnnotationElement>();
+        }
+        return this.annotationElement;
+    }
+
+    /**
+     * Gets the value of the label property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getLabel() {
+        return label;
+    }
+
+    /**
+     * Sets the value of the label property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setLabel(String value) {
+        this.label = value;
+    }
+
+    /**
+     * Gets the value of the description property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * Sets the value of the description property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setDescription(String value) {
+        this.description = value;
+    }
+
+    /**
+     * Gets the value of the thresholdLine property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Annotation.ThresholdLine }
+     *     
+     */
+    public Annotation.ThresholdLine getThresholdLine() {
+        return thresholdLine;
+    }
+
+    /**
+     * Sets the value of the thresholdLine property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Annotation.ThresholdLine }
+     *     
+     */
+    public void setThresholdLine(Annotation.ThresholdLine value) {
+        this.thresholdLine = value;
+    }
+
+    /**
+     * Gets the value of the property property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the property property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getProperty().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Annotation.Property }
+     * 
+     * 
+     */
+    public List<Annotation.Property> getProperty() {
+        if (property == null) {
+            property = new ArrayList<Annotation.Property>();
+        }
+        return this.property;
+    }
+
+    /**
+     * Gets the value of the graph property.
+     * 
+     */
+    public boolean isGraph() {
+        return graph;
+    }
+
+    /**
+     * Sets the value of the graph property.
+     * 
+     */
+    public void setGraph(boolean value) {
+        this.graph = value;
+    }
+
+    /**
+     * Gets the value of the graphType property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Integer }
+     *     
+     */
+    public Integer getGraphType() {
+        return graphType;
+    }
+
+    /**
+     * Sets the value of the graphType property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Integer }
+     *     
+     */
+    public void setGraphType(Integer value) {
+        this.graphType = value;
+    }
+
+    /**
+     * Gets the value of the sequenceRef property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getSequenceRef() {
+        return sequenceRef;
+    }
+
+    /**
+     * Sets the value of the sequenceRef property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setSequenceRef(String value) {
+        this.sequenceRef = value;
+    }
+
+    /**
+     * Gets the value of the groupRef property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getGroupRef() {
+        return groupRef;
+    }
+
+    /**
+     * Sets the value of the groupRef property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setGroupRef(String value) {
+        this.groupRef = value;
+    }
+
+    /**
+     * Gets the value of the graphColour property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Integer }
+     *     
+     */
+    public Integer getGraphColour() {
+        return graphColour;
+    }
+
+    /**
+     * Sets the value of the graphColour property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Integer }
+     *     
+     */
+    public void setGraphColour(Integer value) {
+        this.graphColour = value;
+    }
+
+    /**
+     * Gets the value of the graphGroup property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Integer }
+     *     
+     */
+    public Integer getGraphGroup() {
+        return graphGroup;
+    }
+
+    /**
+     * Sets the value of the graphGroup property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Integer }
+     *     
+     */
+    public void setGraphGroup(Integer value) {
+        this.graphGroup = value;
+    }
+
+    /**
+     * Gets the value of the graphHeight property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Integer }
+     *     
+     */
+    public Integer getGraphHeight() {
+        return graphHeight;
+    }
+
+    /**
+     * Sets the value of the graphHeight property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Integer }
+     *     
+     */
+    public void setGraphHeight(Integer value) {
+        this.graphHeight = value;
+    }
+
+    /**
+     * Gets the value of the id property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * Sets the value of the id property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setId(String value) {
+        this.id = value;
+    }
+
+    /**
+     * Gets the value of the scoreOnly property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Boolean }
+     *     
+     */
+    public boolean isScoreOnly() {
+        if (scoreOnly == null) {
+            return false;
+        } else {
+            return scoreOnly;
+        }
+    }
+
+    /**
+     * Sets the value of the scoreOnly property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Boolean }
+     *     
+     */
+    public void setScoreOnly(Boolean value) {
+        this.scoreOnly = value;
+    }
+
+    /**
+     * Gets the value of the score property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Double }
+     *     
+     */
+    public Double getScore() {
+        return score;
+    }
+
+    /**
+     * Sets the value of the score property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Double }
+     *     
+     */
+    public void setScore(Double value) {
+        this.score = value;
+    }
+
+    /**
+     * Gets the value of the visible property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Boolean }
+     *     
+     */
+    public Boolean isVisible() {
+        return visible;
+    }
+
+    /**
+     * Sets the value of the visible property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Boolean }
+     *     
+     */
+    public void setVisible(Boolean value) {
+        this.visible = value;
+    }
+
+    /**
+     * Gets the value of the centreColLabels property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Boolean }
+     *     
+     */
+    public Boolean isCentreColLabels() {
+        return centreColLabels;
+    }
+
+    /**
+     * Sets the value of the centreColLabels property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Boolean }
+     *     
+     */
+    public void setCentreColLabels(Boolean value) {
+        this.centreColLabels = value;
+    }
+
+    /**
+     * Gets the value of the scaleColLabels property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Boolean }
+     *     
+     */
+    public Boolean isScaleColLabels() {
+        return scaleColLabels;
+    }
+
+    /**
+     * Sets the value of the scaleColLabels property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Boolean }
+     *     
+     */
+    public void setScaleColLabels(Boolean value) {
+        this.scaleColLabels = value;
+    }
+
+    /**
+     * Gets the value of the showAllColLabels property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Boolean }
+     *     
+     */
+    public Boolean isShowAllColLabels() {
+        return showAllColLabels;
+    }
+
+    /**
+     * Sets the value of the showAllColLabels property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Boolean }
+     *     
+     */
+    public void setShowAllColLabels(Boolean value) {
+        this.showAllColLabels = value;
+    }
+
+    /**
+     * Gets the value of the autoCalculated property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Boolean }
+     *     
+     */
+    public boolean isAutoCalculated() {
+        if (autoCalculated == null) {
+            return false;
+        } else {
+            return autoCalculated;
+        }
+    }
+
+    /**
+     * Sets the value of the autoCalculated property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Boolean }
+     *     
+     */
+    public void setAutoCalculated(Boolean value) {
+        this.autoCalculated = value;
+    }
+
+    /**
+     * Gets the value of the belowAlignment property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Boolean }
+     *     
+     */
+    public boolean isBelowAlignment() {
+        if (belowAlignment == null) {
+            return true;
+        } else {
+            return belowAlignment;
+        }
+    }
+
+    /**
+     * Sets the value of the belowAlignment property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Boolean }
+     *     
+     */
+    public void setBelowAlignment(Boolean value) {
+        this.belowAlignment = value;
+    }
+
+    /**
+     * Gets the value of the calcId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getCalcId() {
+        return calcId;
+    }
+
+    /**
+     * Sets the value of the calcId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setCalcId(String value) {
+        this.calcId = value;
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *       &lt;attribute name="value" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "")
+    public static class Property {
+
+        @XmlAttribute(name = "name")
+        protected String name;
+        @XmlAttribute(name = "value")
+        protected String value;
+
+        /**
+         * Gets the value of the name property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getName() {
+            return name;
+        }
+
+        /**
+         * Sets the value of the name property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setName(String value) {
+            this.name = value;
+        }
+
+        /**
+         * Gets the value of the value property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getValue() {
+            return value;
+        }
+
+        /**
+         * Sets the value of the value property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setValue(String value) {
+            this.value = value;
+        }
+
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;attribute name="label" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *       &lt;attribute name="value" type="{http://www.w3.org/2001/XMLSchema}float" />
+     *       &lt;attribute name="colour" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "")
+    public static class ThresholdLine {
+
+        @XmlAttribute(name = "label")
+        protected String label;
+        @XmlAttribute(name = "value")
+        protected Float value;
+        @XmlAttribute(name = "colour")
+        protected Integer colour;
+
+        /**
+         * Gets the value of the label property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getLabel() {
+            return label;
+        }
+
+        /**
+         * Sets the value of the label property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setLabel(String value) {
+            this.label = value;
+        }
+
+        /**
+         * Gets the value of the value property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Float }
+         *     
+         */
+        public Float getValue() {
+            return value;
+        }
+
+        /**
+         * Sets the value of the value property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Float }
+         *     
+         */
+        public void setValue(Float value) {
+            this.value = value;
+        }
+
+        /**
+         * Gets the value of the colour property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Integer }
+         *     
+         */
+        public Integer getColour() {
+            return colour;
+        }
+
+        /**
+         * Sets the value of the colour property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Integer }
+         *     
+         */
+        public void setColour(Integer value) {
+            this.colour = value;
+        }
+
+    }
+
+}
diff --git a/src/jalview/xml/binding/jalview/AnnotationColourScheme.java b/src/jalview/xml/binding/jalview/AnnotationColourScheme.java
new file mode 100644 (file)
index 0000000..44affa2
--- /dev/null
@@ -0,0 +1,254 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.12.20 at 11:47:26 AM GMT 
+//
+
+
+package jalview.xml.binding.jalview;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for AnnotationColourScheme complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="AnnotationColourScheme">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;attribute name="aboveThreshold" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *       &lt;attribute name="annotation" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="minColour" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *       &lt;attribute name="maxColour" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *       &lt;attribute name="colourScheme" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="threshold" type="{http://www.w3.org/2001/XMLSchema}float" />
+ *       &lt;attribute name="perSequence" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       &lt;attribute name="predefinedColours" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "AnnotationColourScheme", namespace = "www.jalview.org")
+public class AnnotationColourScheme {
+
+    @XmlAttribute(name = "aboveThreshold")
+    protected Integer aboveThreshold;
+    @XmlAttribute(name = "annotation")
+    protected String annotation;
+    @XmlAttribute(name = "minColour")
+    protected Integer minColour;
+    @XmlAttribute(name = "maxColour")
+    protected Integer maxColour;
+    @XmlAttribute(name = "colourScheme")
+    protected String colourScheme;
+    @XmlAttribute(name = "threshold")
+    protected Float threshold;
+    @XmlAttribute(name = "perSequence")
+    protected Boolean perSequence;
+    @XmlAttribute(name = "predefinedColours")
+    protected Boolean predefinedColours;
+
+    /**
+     * Gets the value of the aboveThreshold property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Integer }
+     *     
+     */
+    public Integer getAboveThreshold() {
+        return aboveThreshold;
+    }
+
+    /**
+     * Sets the value of the aboveThreshold property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Integer }
+     *     
+     */
+    public void setAboveThreshold(Integer value) {
+        this.aboveThreshold = value;
+    }
+
+    /**
+     * Gets the value of the annotation property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getAnnotation() {
+        return annotation;
+    }
+
+    /**
+     * Sets the value of the annotation property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setAnnotation(String value) {
+        this.annotation = value;
+    }
+
+    /**
+     * Gets the value of the minColour property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Integer }
+     *     
+     */
+    public Integer getMinColour() {
+        return minColour;
+    }
+
+    /**
+     * Sets the value of the minColour property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Integer }
+     *     
+     */
+    public void setMinColour(Integer value) {
+        this.minColour = value;
+    }
+
+    /**
+     * Gets the value of the maxColour property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Integer }
+     *     
+     */
+    public Integer getMaxColour() {
+        return maxColour;
+    }
+
+    /**
+     * Sets the value of the maxColour property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Integer }
+     *     
+     */
+    public void setMaxColour(Integer value) {
+        this.maxColour = value;
+    }
+
+    /**
+     * Gets the value of the colourScheme property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getColourScheme() {
+        return colourScheme;
+    }
+
+    /**
+     * Sets the value of the colourScheme property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setColourScheme(String value) {
+        this.colourScheme = value;
+    }
+
+    /**
+     * Gets the value of the threshold property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Float }
+     *     
+     */
+    public Float getThreshold() {
+        return threshold;
+    }
+
+    /**
+     * Sets the value of the threshold property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Float }
+     *     
+     */
+    public void setThreshold(Float value) {
+        this.threshold = value;
+    }
+
+    /**
+     * Gets the value of the perSequence property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Boolean }
+     *     
+     */
+    public Boolean isPerSequence() {
+        return perSequence;
+    }
+
+    /**
+     * Sets the value of the perSequence property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Boolean }
+     *     
+     */
+    public void setPerSequence(Boolean value) {
+        this.perSequence = value;
+    }
+
+    /**
+     * Gets the value of the predefinedColours property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Boolean }
+     *     
+     */
+    public Boolean isPredefinedColours() {
+        return predefinedColours;
+    }
+
+    /**
+     * Sets the value of the predefinedColours property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Boolean }
+     *     
+     */
+    public void setPredefinedColours(Boolean value) {
+        this.predefinedColours = value;
+    }
+
+}
diff --git a/src/jalview/xml/binding/jalview/AnnotationElement.java b/src/jalview/xml/binding/jalview/AnnotationElement.java
new file mode 100644 (file)
index 0000000..de408d2
--- /dev/null
@@ -0,0 +1,203 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.12.20 at 11:47:26 AM GMT 
+//
+
+
+package jalview.xml.binding.jalview;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="displayCharacter" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="secondaryStructure" minOccurs="0">
+ *           &lt;simpleType>
+ *             &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *               &lt;length value="1"/>
+ *             &lt;/restriction>
+ *           &lt;/simpleType>
+ *         &lt;/element>
+ *         &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}float" minOccurs="0"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="position" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *       &lt;attribute name="colour" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "displayCharacter",
+    "description",
+    "secondaryStructure",
+    "value"
+})
+@XmlRootElement(name = "annotationElement")
+public class AnnotationElement {
+
+    protected String displayCharacter;
+    protected String description;
+    protected String secondaryStructure;
+    protected Float value;
+    @XmlAttribute(name = "position", required = true)
+    protected int position;
+    @XmlAttribute(name = "colour")
+    protected Integer colour;
+
+    /**
+     * Gets the value of the displayCharacter property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getDisplayCharacter() {
+        return displayCharacter;
+    }
+
+    /**
+     * Sets the value of the displayCharacter property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setDisplayCharacter(String value) {
+        this.displayCharacter = value;
+    }
+
+    /**
+     * Gets the value of the description property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * Sets the value of the description property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setDescription(String value) {
+        this.description = value;
+    }
+
+    /**
+     * Gets the value of the secondaryStructure property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getSecondaryStructure() {
+        return secondaryStructure;
+    }
+
+    /**
+     * Sets the value of the secondaryStructure property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setSecondaryStructure(String value) {
+        this.secondaryStructure = value;
+    }
+
+    /**
+     * Gets the value of the value property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Float }
+     *     
+     */
+    public Float getValue() {
+        return value;
+    }
+
+    /**
+     * Sets the value of the value property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Float }
+     *     
+     */
+    public void setValue(Float value) {
+        this.value = value;
+    }
+
+    /**
+     * Gets the value of the position property.
+     * 
+     */
+    public int getPosition() {
+        return position;
+    }
+
+    /**
+     * Sets the value of the position property.
+     * 
+     */
+    public void setPosition(int value) {
+        this.position = value;
+    }
+
+    /**
+     * Gets the value of the colour property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Integer }
+     *     
+     */
+    public Integer getColour() {
+        return colour;
+    }
+
+    /**
+     * Sets the value of the colour property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Integer }
+     *     
+     */
+    public void setColour(Integer value) {
+        this.colour = value;
+    }
+
+}
diff --git a/src/jalview/xml/binding/jalview/DoubleMatrix.java b/src/jalview/xml/binding/jalview/DoubleMatrix.java
new file mode 100644 (file)
index 0000000..b4c07bc
--- /dev/null
@@ -0,0 +1,186 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.12.20 at 11:47:26 AM GMT 
+//
+
+
+package jalview.xml.binding.jalview;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for DoubleMatrix complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="DoubleMatrix">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="row" type="{www.jalview.org}DoubleVector" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="D" type="{www.jalview.org}DoubleVector" minOccurs="0"/>
+ *         &lt;element name="E" type="{www.jalview.org}DoubleVector" minOccurs="0"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="rows" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *       &lt;attribute name="columns" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "DoubleMatrix", namespace = "www.jalview.org", propOrder = {
+    "row",
+    "d",
+    "e"
+})
+public class DoubleMatrix {
+
+    protected List<DoubleVector> row;
+    @XmlElement(name = "D")
+    protected DoubleVector d;
+    @XmlElement(name = "E")
+    protected DoubleVector e;
+    @XmlAttribute(name = "rows")
+    protected Integer rows;
+    @XmlAttribute(name = "columns")
+    protected Integer columns;
+
+    /**
+     * Gets the value of the row property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the row property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getRow().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link DoubleVector }
+     * 
+     * 
+     */
+    public List<DoubleVector> getRow() {
+        if (row == null) {
+            row = new ArrayList<DoubleVector>();
+        }
+        return this.row;
+    }
+
+    /**
+     * Gets the value of the d property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link DoubleVector }
+     *     
+     */
+    public DoubleVector getD() {
+        return d;
+    }
+
+    /**
+     * Sets the value of the d property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link DoubleVector }
+     *     
+     */
+    public void setD(DoubleVector value) {
+        this.d = value;
+    }
+
+    /**
+     * Gets the value of the e property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link DoubleVector }
+     *     
+     */
+    public DoubleVector getE() {
+        return e;
+    }
+
+    /**
+     * Sets the value of the e property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link DoubleVector }
+     *     
+     */
+    public void setE(DoubleVector value) {
+        this.e = value;
+    }
+
+    /**
+     * Gets the value of the rows property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Integer }
+     *     
+     */
+    public Integer getRows() {
+        return rows;
+    }
+
+    /**
+     * Sets the value of the rows property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Integer }
+     *     
+     */
+    public void setRows(Integer value) {
+        this.rows = value;
+    }
+
+    /**
+     * Gets the value of the columns property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Integer }
+     *     
+     */
+    public Integer getColumns() {
+        return columns;
+    }
+
+    /**
+     * Sets the value of the columns property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Integer }
+     *     
+     */
+    public void setColumns(Integer value) {
+        this.columns = value;
+    }
+
+}
diff --git a/src/jalview/xml/binding/jalview/DoubleVector.java b/src/jalview/xml/binding/jalview/DoubleVector.java
new file mode 100644 (file)
index 0000000..e2592ab
--- /dev/null
@@ -0,0 +1,76 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.12.20 at 11:47:26 AM GMT 
+//
+
+
+package jalview.xml.binding.jalview;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for DoubleVector complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="DoubleVector">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="v" type="{http://www.w3.org/2001/XMLSchema}double" maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "DoubleVector", namespace = "www.jalview.org", propOrder = {
+    "v"
+})
+public class DoubleVector {
+
+    @XmlElement(type = Double.class)
+    protected List<Double> v;
+
+    /**
+     * Gets the value of the v property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the v property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getV().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Double }
+     * 
+     * 
+     */
+    public List<Double> getV() {
+        if (v == null) {
+            v = new ArrayList<Double>();
+        }
+        return this.v;
+    }
+
+}
diff --git a/src/jalview/xml/binding/jalview/Feature.java b/src/jalview/xml/binding/jalview/Feature.java
new file mode 100644 (file)
index 0000000..9001ee2
--- /dev/null
@@ -0,0 +1,363 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.12.20 at 11:47:26 AM GMT 
+//
+
+
+package jalview.xml.binding.jalview;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for feature complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="feature">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="otherData" maxOccurs="unbounded" minOccurs="0">
+ *           &lt;complexType>
+ *             &lt;complexContent>
+ *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 &lt;attribute name="key" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                 &lt;attribute name="key2" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                 &lt;attribute name="value" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *               &lt;/restriction>
+ *             &lt;/complexContent>
+ *           &lt;/complexType>
+ *         &lt;/element>
+ *       &lt;/sequence>
+ *       &lt;attribute name="begin" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *       &lt;attribute name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *       &lt;attribute name="type" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="description" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="status" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="featureGroup" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="score" type="{http://www.w3.org/2001/XMLSchema}float" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "feature", namespace = "www.jalview.org", propOrder = {
+    "otherData"
+})
+public class Feature {
+
+    protected List<Feature.OtherData> otherData;
+    @XmlAttribute(name = "begin", required = true)
+    protected int begin;
+    @XmlAttribute(name = "end", required = true)
+    protected int end;
+    @XmlAttribute(name = "type", required = true)
+    protected String type;
+    @XmlAttribute(name = "description")
+    protected String description;
+    @XmlAttribute(name = "status")
+    protected String status;
+    @XmlAttribute(name = "featureGroup")
+    protected String featureGroup;
+    @XmlAttribute(name = "score")
+    protected Float score;
+
+    /**
+     * Gets the value of the otherData property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the otherData property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getOtherData().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Feature.OtherData }
+     * 
+     * 
+     */
+    public List<Feature.OtherData> getOtherData() {
+        if (otherData == null) {
+            otherData = new ArrayList<Feature.OtherData>();
+        }
+        return this.otherData;
+    }
+
+    /**
+     * Gets the value of the begin property.
+     * 
+     */
+    public int getBegin() {
+        return begin;
+    }
+
+    /**
+     * Sets the value of the begin property.
+     * 
+     */
+    public void setBegin(int value) {
+        this.begin = value;
+    }
+
+    /**
+     * Gets the value of the end property.
+     * 
+     */
+    public int getEnd() {
+        return end;
+    }
+
+    /**
+     * Sets the value of the end property.
+     * 
+     */
+    public void setEnd(int value) {
+        this.end = value;
+    }
+
+    /**
+     * Gets the value of the type property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * Sets the value of the type property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setType(String value) {
+        this.type = value;
+    }
+
+    /**
+     * Gets the value of the description property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * Sets the value of the description property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setDescription(String value) {
+        this.description = value;
+    }
+
+    /**
+     * Gets the value of the status property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getStatus() {
+        return status;
+    }
+
+    /**
+     * Sets the value of the status property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setStatus(String value) {
+        this.status = value;
+    }
+
+    /**
+     * Gets the value of the featureGroup property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getFeatureGroup() {
+        return featureGroup;
+    }
+
+    /**
+     * Sets the value of the featureGroup property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setFeatureGroup(String value) {
+        this.featureGroup = value;
+    }
+
+    /**
+     * Gets the value of the score property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Float }
+     *     
+     */
+    public Float getScore() {
+        return score;
+    }
+
+    /**
+     * Sets the value of the score property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Float }
+     *     
+     */
+    public void setScore(Float value) {
+        this.score = value;
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;attribute name="key" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *       &lt;attribute name="key2" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *       &lt;attribute name="value" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "")
+    public static class OtherData {
+
+        @XmlAttribute(name = "key", required = true)
+        protected String key;
+        @XmlAttribute(name = "key2")
+        protected String key2;
+        @XmlAttribute(name = "value", required = true)
+        protected String value;
+
+        /**
+         * Gets the value of the key property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getKey() {
+            return key;
+        }
+
+        /**
+         * Sets the value of the key property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setKey(String value) {
+            this.key = value;
+        }
+
+        /**
+         * Gets the value of the key2 property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getKey2() {
+            return key2;
+        }
+
+        /**
+         * Sets the value of the key2 property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setKey2(String value) {
+            this.key2 = value;
+        }
+
+        /**
+         * Gets the value of the value property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getValue() {
+            return value;
+        }
+
+        /**
+         * Sets the value of the value property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setValue(String value) {
+            this.value = value;
+        }
+
+    }
+
+}
diff --git a/src/jalview/xml/binding/jalview/FeatureMatcher.java b/src/jalview/xml/binding/jalview/FeatureMatcher.java
new file mode 100644 (file)
index 0000000..0daf56a
--- /dev/null
@@ -0,0 +1,160 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.12.20 at 11:47:26 AM GMT 
+//
+
+
+package jalview.xml.binding.jalview;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for FeatureMatcher complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="FeatureMatcher">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="attributeName" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="2" minOccurs="0"/>
+ *         &lt;element name="condition" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="by" type="{www.jalview.org/colours}FilterBy" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "FeatureMatcher", namespace = "www.jalview.org/colours", propOrder = {
+    "attributeName",
+    "condition",
+    "value"
+})
+public class FeatureMatcher {
+
+    @XmlElement(namespace = "")
+    protected List<String> attributeName;
+    @XmlElement(namespace = "", required = true)
+    protected String condition;
+    @XmlElement(namespace = "", required = true)
+    protected String value;
+    @XmlAttribute(name = "by")
+    protected FilterBy by;
+
+    /**
+     * Gets the value of the attributeName property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the attributeName property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getAttributeName().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link String }
+     * 
+     * 
+     */
+    public List<String> getAttributeName() {
+        if (attributeName == null) {
+            attributeName = new ArrayList<String>();
+        }
+        return this.attributeName;
+    }
+
+    /**
+     * Gets the value of the condition property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getCondition() {
+        return condition;
+    }
+
+    /**
+     * Sets the value of the condition property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setCondition(String value) {
+        this.condition = value;
+    }
+
+    /**
+     * Gets the value of the value property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getValue() {
+        return value;
+    }
+
+    /**
+     * Sets the value of the value property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    /**
+     * Gets the value of the by property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link FilterBy }
+     *     
+     */
+    public FilterBy getBy() {
+        return by;
+    }
+
+    /**
+     * Sets the value of the by property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link FilterBy }
+     *     
+     */
+    public void setBy(FilterBy value) {
+        this.by = value;
+    }
+
+}
diff --git a/src/jalview/xml/binding/jalview/FeatureMatcherSet.java b/src/jalview/xml/binding/jalview/FeatureMatcherSet.java
new file mode 100644 (file)
index 0000000..bf69d5b
--- /dev/null
@@ -0,0 +1,192 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.12.20 at 11:47:26 AM GMT 
+//
+
+
+package jalview.xml.binding.jalview;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * A feature match condition, which may be simple or compound
+ * 
+ * <p>Java class for FeatureMatcherSet complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="FeatureMatcherSet">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;choice>
+ *         &lt;element name="matchCondition" type="{www.jalview.org/colours}FeatureMatcher"/>
+ *         &lt;element name="compoundMatcher">
+ *           &lt;complexType>
+ *             &lt;complexContent>
+ *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 &lt;sequence>
+ *                   &lt;element name="matcherSet" type="{www.jalview.org/colours}FeatureMatcherSet" maxOccurs="2" minOccurs="2"/>
+ *                 &lt;/sequence>
+ *                 &lt;attribute name="and" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *               &lt;/restriction>
+ *             &lt;/complexContent>
+ *           &lt;/complexType>
+ *         &lt;/element>
+ *       &lt;/choice>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "FeatureMatcherSet", namespace = "www.jalview.org/colours", propOrder = {
+    "matchCondition",
+    "compoundMatcher"
+})
+public class FeatureMatcherSet {
+
+    @XmlElement(namespace = "")
+    protected FeatureMatcher matchCondition;
+    @XmlElement(namespace = "")
+    protected FeatureMatcherSet.CompoundMatcher compoundMatcher;
+
+    /**
+     * Gets the value of the matchCondition property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link FeatureMatcher }
+     *     
+     */
+    public FeatureMatcher getMatchCondition() {
+        return matchCondition;
+    }
+
+    /**
+     * Sets the value of the matchCondition property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link FeatureMatcher }
+     *     
+     */
+    public void setMatchCondition(FeatureMatcher value) {
+        this.matchCondition = value;
+    }
+
+    /**
+     * Gets the value of the compoundMatcher property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link FeatureMatcherSet.CompoundMatcher }
+     *     
+     */
+    public FeatureMatcherSet.CompoundMatcher getCompoundMatcher() {
+        return compoundMatcher;
+    }
+
+    /**
+     * Sets the value of the compoundMatcher property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link FeatureMatcherSet.CompoundMatcher }
+     *     
+     */
+    public void setCompoundMatcher(FeatureMatcherSet.CompoundMatcher value) {
+        this.compoundMatcher = value;
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;sequence>
+     *         &lt;element name="matcherSet" type="{www.jalview.org/colours}FeatureMatcherSet" maxOccurs="2" minOccurs="2"/>
+     *       &lt;/sequence>
+     *       &lt;attribute name="and" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "matcherSet"
+    })
+    public static class CompoundMatcher {
+
+        @XmlElement(namespace = "", required = true)
+        protected List<FeatureMatcherSet> matcherSet;
+        @XmlAttribute(name = "and", required = true)
+        protected boolean and;
+
+        /**
+         * Gets the value of the matcherSet property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the matcherSet property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getMatcherSet().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link FeatureMatcherSet }
+         * 
+         * 
+         */
+        public List<FeatureMatcherSet> getMatcherSet() {
+            if (matcherSet == null) {
+                matcherSet = new ArrayList<FeatureMatcherSet>();
+            }
+            return this.matcherSet;
+        }
+
+        /**
+         * Gets the value of the and property.
+         * 
+         */
+        public boolean isAnd() {
+            return and;
+        }
+
+        /**
+         * Sets the value of the and property.
+         * 
+         */
+        public void setAnd(boolean value) {
+            this.and = value;
+        }
+
+    }
+
+}
diff --git a/src/jalview/xml/binding/jalview/FilterBy.java b/src/jalview/xml/binding/jalview/FilterBy.java
new file mode 100644 (file)
index 0000000..5684acf
--- /dev/null
@@ -0,0 +1,61 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.12.20 at 11:47:26 AM GMT 
+//
+
+
+package jalview.xml.binding.jalview;
+
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlEnumValue;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for FilterBy.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p>
+ * <pre>
+ * &lt;simpleType name="FilterBy">
+ *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     &lt;enumeration value="byLabel"/>
+ *     &lt;enumeration value="byScore"/>
+ *     &lt;enumeration value="byAttribute"/>
+ *   &lt;/restriction>
+ * &lt;/simpleType>
+ * </pre>
+ * 
+ */
+@XmlType(name = "FilterBy", namespace = "www.jalview.org/colours")
+@XmlEnum
+public enum FilterBy {
+
+    @XmlEnumValue("byLabel")
+    BY_LABEL("byLabel"),
+    @XmlEnumValue("byScore")
+    BY_SCORE("byScore"),
+    @XmlEnumValue("byAttribute")
+    BY_ATTRIBUTE("byAttribute");
+    private final String value;
+
+    FilterBy(String v) {
+        value = v;
+    }
+
+    public String value() {
+        return value;
+    }
+
+    public static FilterBy fromValue(String v) {
+        for (FilterBy c: FilterBy.values()) {
+            if (c.value.equals(v)) {
+                return c;
+            }
+        }
+        throw new IllegalArgumentException(v);
+    }
+
+}
diff --git a/src/jalview/xml/binding/jalview/JalviewModel.java b/src/jalview/xml/binding/jalview/JalviewModel.java
new file mode 100644 (file)
index 0000000..ed57edc
--- /dev/null
@@ -0,0 +1,6315 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.12.20 at 11:47:26 AM GMT 
+//
+
+
+package jalview.xml.binding.jalview;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlID;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import javax.xml.datatype.XMLGregorianCalendar;
+
+
+/**
+ * <p>Java class for JalviewModel complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="JalviewModel">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="creationDate" type="{http://www.w3.org/2001/XMLSchema}dateTime"/>
+ *         &lt;element name="version" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="vamsasModel" type="{www.vamsas.ac.uk/jalview/version2}VAMSAS"/>
+ *         &lt;sequence>
+ *           &lt;element name="JSeq" maxOccurs="unbounded" minOccurs="0">
+ *             &lt;complexType>
+ *               &lt;complexContent>
+ *                 &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                   &lt;sequence>
+ *                     &lt;element name="features" type="{www.jalview.org}feature" maxOccurs="unbounded" minOccurs="0"/>
+ *                     &lt;element name="pdbids" maxOccurs="unbounded" minOccurs="0">
+ *                       &lt;complexType>
+ *                         &lt;complexContent>
+ *                           &lt;extension base="{www.jalview.org}pdbentry">
+ *                             &lt;sequence>
+ *                               &lt;element name="structureState" maxOccurs="unbounded" minOccurs="0">
+ *                                 &lt;complexType>
+ *                                   &lt;simpleContent>
+ *                                     &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>string">
+ *                                       &lt;attGroup ref="{www.jalview.org}swingwindow"/>
+ *                                       &lt;attribute name="visible" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *                                       &lt;attribute name="viewId" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                                       &lt;attribute name="alignwithAlignPanel" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
+ *                                       &lt;attribute name="colourwithAlignPanel" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+ *                                       &lt;attribute name="colourByJmol" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
+ *                                       &lt;attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                                     &lt;/extension>
+ *                                   &lt;/simpleContent>
+ *                                 &lt;/complexType>
+ *                               &lt;/element>
+ *                             &lt;/sequence>
+ *                           &lt;/extension>
+ *                         &lt;/complexContent>
+ *                       &lt;/complexType>
+ *                     &lt;/element>
+ *                     &lt;element name="hiddenSequences" type="{http://www.w3.org/2001/XMLSchema}int" maxOccurs="unbounded" minOccurs="0"/>
+ *                     &lt;element name="rnaViewer" maxOccurs="unbounded" minOccurs="0">
+ *                       &lt;complexType>
+ *                         &lt;complexContent>
+ *                           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                             &lt;sequence>
+ *                               &lt;element name="secondaryStructure" maxOccurs="unbounded">
+ *                                 &lt;complexType>
+ *                                   &lt;complexContent>
+ *                                     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                                       &lt;attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                                       &lt;attribute name="annotationId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                                       &lt;attribute name="gapped" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *                                       &lt;attribute name="viewerState" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                                     &lt;/restriction>
+ *                                   &lt;/complexContent>
+ *                                 &lt;/complexType>
+ *                               &lt;/element>
+ *                             &lt;/sequence>
+ *                             &lt;attGroup ref="{www.jalview.org}swingwindow"/>
+ *                             &lt;attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                             &lt;attribute name="viewId" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                             &lt;attribute name="dividerLocation" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *                             &lt;attribute name="selectedRna" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *                           &lt;/restriction>
+ *                         &lt;/complexContent>
+ *                       &lt;/complexType>
+ *                     &lt;/element>
+ *                   &lt;/sequence>
+ *                   &lt;attribute name="colour" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *                   &lt;attribute name="start" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *                   &lt;attribute name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *                   &lt;attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                   &lt;attribute name="hidden" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *                   &lt;attribute name="viewreference" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *                 &lt;/restriction>
+ *               &lt;/complexContent>
+ *             &lt;/complexType>
+ *           &lt;/element>
+ *           &lt;element name="JGroup" maxOccurs="unbounded" minOccurs="0">
+ *             &lt;complexType>
+ *               &lt;complexContent>
+ *                 &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                   &lt;sequence>
+ *                     &lt;element name="seq" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
+ *                     &lt;element name="annotationColours" type="{www.jalview.org}AnnotationColourScheme" minOccurs="0"/>
+ *                   &lt;/sequence>
+ *                   &lt;attribute name="start" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *                   &lt;attribute name="end" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *                   &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                   &lt;attribute name="colour" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                   &lt;attribute name="consThreshold" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *                   &lt;attribute name="pidThreshold" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *                   &lt;attribute name="outlineColour" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *                   &lt;attribute name="displayBoxes" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *                   &lt;attribute name="displayText" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *                   &lt;attribute name="colourText" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *                   &lt;attribute name="textCol1" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *                   &lt;attribute name="textCol2" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *                   &lt;attribute name="textColThreshold" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *                   &lt;attribute name="showUnconserved" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *                   &lt;attribute name="ignoreGapsinConsensus" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
+ *                   &lt;attribute name="showConsensusHistogram" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
+ *                   &lt;attribute name="showSequenceLogo" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+ *                   &lt;attribute name="normaliseSequenceLogo" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+ *                   &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                 &lt;/restriction>
+ *               &lt;/complexContent>
+ *             &lt;/complexType>
+ *           &lt;/element>
+ *           &lt;element name="Viewport" maxOccurs="unbounded" minOccurs="0">
+ *             &lt;complexType>
+ *               &lt;complexContent>
+ *                 &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                   &lt;sequence>
+ *                     &lt;element name="AnnotationColours" type="{www.jalview.org}AnnotationColourScheme" minOccurs="0"/>
+ *                     &lt;element name="hiddenColumns" maxOccurs="unbounded" minOccurs="0">
+ *                       &lt;complexType>
+ *                         &lt;complexContent>
+ *                           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                             &lt;attribute name="start" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *                             &lt;attribute name="end" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *                           &lt;/restriction>
+ *                         &lt;/complexContent>
+ *                       &lt;/complexType>
+ *                     &lt;/element>
+ *                     &lt;element name="calcIdParam" maxOccurs="unbounded" minOccurs="0">
+ *                       &lt;complexType>
+ *                         &lt;complexContent>
+ *                           &lt;extension base="{www.jalview.org/xml/wsparamset}WebServiceParameterSet">
+ *                             &lt;attribute name="calcId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                             &lt;attribute name="needsUpdate" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+ *                             &lt;attribute name="autoUpdate" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *                           &lt;/extension>
+ *                         &lt;/complexContent>
+ *                       &lt;/complexType>
+ *                     &lt;/element>
+ *                   &lt;/sequence>
+ *                   &lt;attGroup ref="{www.jalview.org}swingwindow"/>
+ *                   &lt;attribute name="conservationSelected" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *                   &lt;attribute name="pidSelected" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *                   &lt;attribute name="bgColour" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                   &lt;attribute name="consThreshold" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *                   &lt;attribute name="pidThreshold" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *                   &lt;attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                   &lt;attribute name="showFullId" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *                   &lt;attribute name="rightAlignIds" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *                   &lt;attribute name="showText" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *                   &lt;attribute name="showColourText" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *                   &lt;attribute name="showUnconserved" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+ *                   &lt;attribute name="showBoxes" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *                   &lt;attribute name="wrapAlignment" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *                   &lt;attribute name="renderGaps" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *                   &lt;attribute name="showSequenceFeatures" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *                   &lt;attribute name="showNPfeatureTooltip" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *                   &lt;attribute name="showDbRefTooltip" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *                   &lt;attribute name="followHighlight" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
+ *                   &lt;attribute name="followSelection" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
+ *                   &lt;attribute name="showAnnotation" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *                   &lt;attribute name="centreColumnLabels" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+ *                   &lt;attribute name="showGroupConservation" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+ *                   &lt;attribute name="showGroupConsensus" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+ *                   &lt;attribute name="showConsensusHistogram" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
+ *                   &lt;attribute name="showSequenceLogo" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+ *                   &lt;attribute name="normaliseSequenceLogo" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+ *                   &lt;attribute name="ignoreGapsinConsensus" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
+ *                   &lt;attribute name="startRes" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *                   &lt;attribute name="startSeq" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *                   &lt;attribute name="fontName" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                   &lt;attribute name="fontSize" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *                   &lt;attribute name="fontStyle" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *                   &lt;attribute name="scaleProteinAsCdna" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
+ *                   &lt;attribute name="viewName" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                   &lt;attribute name="sequenceSetId" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                   &lt;attribute name="gatheredViews" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *                   &lt;attribute name="textCol1" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *                   &lt;attribute name="textCol2" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *                   &lt;attribute name="textColThreshold" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *                   &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *                   &lt;attribute name="complementId" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                 &lt;/restriction>
+ *               &lt;/complexContent>
+ *             &lt;/complexType>
+ *           &lt;/element>
+ *           &lt;element name="UserColours" maxOccurs="unbounded" minOccurs="0">
+ *             &lt;complexType>
+ *               &lt;complexContent>
+ *                 &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                   &lt;sequence>
+ *                     &lt;element name="UserColourScheme" type="{www.jalview.org/colours}JalviewUserColours"/>
+ *                   &lt;/sequence>
+ *                   &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                 &lt;/restriction>
+ *               &lt;/complexContent>
+ *             &lt;/complexType>
+ *           &lt;/element>
+ *           &lt;element name="tree" maxOccurs="unbounded" minOccurs="0">
+ *             &lt;complexType>
+ *               &lt;complexContent>
+ *                 &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                   &lt;sequence minOccurs="0">
+ *                     &lt;element name="title" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *                     &lt;element name="newick" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *                   &lt;/sequence>
+ *                   &lt;attGroup ref="{www.jalview.org}swingwindow"/>
+ *                   &lt;attribute name="fontName" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                   &lt;attribute name="fontSize" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *                   &lt;attribute name="fontStyle" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *                   &lt;attribute name="threshold" type="{http://www.w3.org/2001/XMLSchema}float" />
+ *                   &lt;attribute name="showBootstrap" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *                   &lt;attribute name="showDistances" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *                   &lt;attribute name="markUnlinked" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *                   &lt;attribute name="fitToWindow" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *                   &lt;attribute name="currentTree" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *                   &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *                   &lt;attribute name="linkToAllViews" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+ *                 &lt;/restriction>
+ *               &lt;/complexContent>
+ *             &lt;/complexType>
+ *           &lt;/element>
+ *           &lt;element name="PcaViewer" maxOccurs="unbounded" minOccurs="0">
+ *             &lt;complexType>
+ *               &lt;complexContent>
+ *                 &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                   &lt;sequence>
+ *                     &lt;element name="sequencePoint" maxOccurs="unbounded">
+ *                       &lt;complexType>
+ *                         &lt;complexContent>
+ *                           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                             &lt;attGroup ref="{www.jalview.org}position"/>
+ *                             &lt;attribute name="sequenceRef" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                           &lt;/restriction>
+ *                         &lt;/complexContent>
+ *                       &lt;/complexType>
+ *                     &lt;/element>
+ *                     &lt;element name="axis" maxOccurs="3" minOccurs="3">
+ *                       &lt;complexType>
+ *                         &lt;complexContent>
+ *                           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                             &lt;attGroup ref="{www.jalview.org}position"/>
+ *                           &lt;/restriction>
+ *                         &lt;/complexContent>
+ *                       &lt;/complexType>
+ *                     &lt;/element>
+ *                     &lt;element name="seqPointMin">
+ *                       &lt;complexType>
+ *                         &lt;complexContent>
+ *                           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                             &lt;attGroup ref="{www.jalview.org}position"/>
+ *                           &lt;/restriction>
+ *                         &lt;/complexContent>
+ *                       &lt;/complexType>
+ *                     &lt;/element>
+ *                     &lt;element name="seqPointMax">
+ *                       &lt;complexType>
+ *                         &lt;complexContent>
+ *                           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                             &lt;attGroup ref="{www.jalview.org}position"/>
+ *                           &lt;/restriction>
+ *                         &lt;/complexContent>
+ *                       &lt;/complexType>
+ *                     &lt;/element>
+ *                     &lt;element name="pcaData" type="{www.jalview.org}PcaDataType"/>
+ *                   &lt;/sequence>
+ *                   &lt;attGroup ref="{www.jalview.org}swingwindow"/>
+ *                   &lt;attGroup ref="{www.jalview.org}SimilarityParams"/>
+ *                   &lt;attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                   &lt;attribute name="scoreModelName" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                   &lt;attribute name="xDim" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *                   &lt;attribute name="yDim" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *                   &lt;attribute name="zDim" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *                   &lt;attribute name="bgColour" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *                   &lt;attribute name="scaleFactor" type="{http://www.w3.org/2001/XMLSchema}float" />
+ *                   &lt;attribute name="showLabels" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *                   &lt;attribute name="linkToAllViews" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *                 &lt;/restriction>
+ *               &lt;/complexContent>
+ *             &lt;/complexType>
+ *           &lt;/element>
+ *           &lt;element name="FeatureSettings" minOccurs="0">
+ *             &lt;complexType>
+ *               &lt;complexContent>
+ *                 &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                   &lt;sequence>
+ *                     &lt;element name="setting" maxOccurs="unbounded" minOccurs="0">
+ *                       &lt;complexType>
+ *                         &lt;complexContent>
+ *                           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                             &lt;sequence>
+ *                               &lt;element name="attributeName" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="2" minOccurs="0"/>
+ *                               &lt;element name="matcherSet" type="{www.jalview.org/colours}FeatureMatcherSet" minOccurs="0"/>
+ *                             &lt;/sequence>
+ *                             &lt;attribute name="type" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                             &lt;attribute name="colour" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *                             &lt;attribute name="display" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *                             &lt;attribute name="order" type="{http://www.w3.org/2001/XMLSchema}float" />
+ *                             &lt;attribute name="mincolour" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *                             &lt;attribute name="noValueColour" type="{www.jalview.org/colours}NoValueColour" default="Min" />
+ *                             &lt;attribute name="threshold" type="{http://www.w3.org/2001/XMLSchema}float" />
+ *                             &lt;attribute name="threshstate" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *                             &lt;attribute name="max" type="{http://www.w3.org/2001/XMLSchema}float" />
+ *                             &lt;attribute name="min" type="{http://www.w3.org/2001/XMLSchema}float" />
+ *                             &lt;attribute name="colourByLabel" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *                             &lt;attribute name="autoScale" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *                           &lt;/restriction>
+ *                         &lt;/complexContent>
+ *                       &lt;/complexType>
+ *                     &lt;/element>
+ *                     &lt;element name="group" maxOccurs="unbounded" minOccurs="0">
+ *                       &lt;complexType>
+ *                         &lt;complexContent>
+ *                           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                             &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                             &lt;attribute name="display" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *                           &lt;/restriction>
+ *                         &lt;/complexContent>
+ *                       &lt;/complexType>
+ *                     &lt;/element>
+ *                   &lt;/sequence>
+ *                 &lt;/restriction>
+ *               &lt;/complexContent>
+ *             &lt;/complexType>
+ *           &lt;/element>
+ *         &lt;/sequence>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "JalviewModel", namespace = "www.jalview.org", propOrder = {
+    "creationDate",
+    "version",
+    "vamsasModel",
+    "jSeq",
+    "jGroup",
+    "viewport",
+    "userColours",
+    "tree",
+    "pcaViewer",
+    "featureSettings"
+})
+public class JalviewModel {
+
+    @XmlElement(required = true)
+    @XmlSchemaType(name = "dateTime")
+    protected XMLGregorianCalendar creationDate;
+    @XmlElement(required = true)
+    protected String version;
+    @XmlElement(required = true)
+    protected VAMSAS vamsasModel;
+    @XmlElement(name = "JSeq")
+    protected List<JalviewModel.JSeq> jSeq;
+    @XmlElement(name = "JGroup")
+    protected List<JalviewModel.JGroup> jGroup;
+    @XmlElement(name = "Viewport")
+    protected List<JalviewModel.Viewport> viewport;
+    @XmlElement(name = "UserColours")
+    protected List<JalviewModel.UserColours> userColours;
+    protected List<JalviewModel.Tree> tree;
+    @XmlElement(name = "PcaViewer")
+    protected List<JalviewModel.PcaViewer> pcaViewer;
+    @XmlElement(name = "FeatureSettings")
+    protected JalviewModel.FeatureSettings featureSettings;
+
+    /**
+     * Gets the value of the creationDate property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link XMLGregorianCalendar }
+     *     
+     */
+    public XMLGregorianCalendar getCreationDate() {
+        return creationDate;
+    }
+
+    /**
+     * Sets the value of the creationDate property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link XMLGregorianCalendar }
+     *     
+     */
+    public void setCreationDate(XMLGregorianCalendar value) {
+        this.creationDate = value;
+    }
+
+    /**
+     * Gets the value of the version property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVersion() {
+        return version;
+    }
+
+    /**
+     * Sets the value of the version property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVersion(String value) {
+        this.version = value;
+    }
+
+    /**
+     * Gets the value of the vamsasModel property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link VAMSAS }
+     *     
+     */
+    public VAMSAS getVamsasModel() {
+        return vamsasModel;
+    }
+
+    /**
+     * Sets the value of the vamsasModel property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link VAMSAS }
+     *     
+     */
+    public void setVamsasModel(VAMSAS value) {
+        this.vamsasModel = value;
+    }
+
+    /**
+     * Gets the value of the jSeq property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the jSeq property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getJSeq().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link JalviewModel.JSeq }
+     * 
+     * 
+     */
+    public List<JalviewModel.JSeq> getJSeq() {
+        if (jSeq == null) {
+            jSeq = new ArrayList<JalviewModel.JSeq>();
+        }
+        return this.jSeq;
+    }
+
+    /**
+     * Gets the value of the jGroup property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the jGroup property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getJGroup().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link JalviewModel.JGroup }
+     * 
+     * 
+     */
+    public List<JalviewModel.JGroup> getJGroup() {
+        if (jGroup == null) {
+            jGroup = new ArrayList<JalviewModel.JGroup>();
+        }
+        return this.jGroup;
+    }
+
+    /**
+     * Gets the value of the viewport property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the viewport property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getViewport().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link JalviewModel.Viewport }
+     * 
+     * 
+     */
+    public List<JalviewModel.Viewport> getViewport() {
+        if (viewport == null) {
+            viewport = new ArrayList<JalviewModel.Viewport>();
+        }
+        return this.viewport;
+    }
+
+    /**
+     * Gets the value of the userColours property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the userColours property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getUserColours().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link JalviewModel.UserColours }
+     * 
+     * 
+     */
+    public List<JalviewModel.UserColours> getUserColours() {
+        if (userColours == null) {
+            userColours = new ArrayList<JalviewModel.UserColours>();
+        }
+        return this.userColours;
+    }
+
+    /**
+     * Gets the value of the tree property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the tree property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getTree().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link JalviewModel.Tree }
+     * 
+     * 
+     */
+    public List<JalviewModel.Tree> getTree() {
+        if (tree == null) {
+            tree = new ArrayList<JalviewModel.Tree>();
+        }
+        return this.tree;
+    }
+
+    /**
+     * Gets the value of the pcaViewer property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the pcaViewer property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getPcaViewer().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link JalviewModel.PcaViewer }
+     * 
+     * 
+     */
+    public List<JalviewModel.PcaViewer> getPcaViewer() {
+        if (pcaViewer == null) {
+            pcaViewer = new ArrayList<JalviewModel.PcaViewer>();
+        }
+        return this.pcaViewer;
+    }
+
+    /**
+     * Gets the value of the featureSettings property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link JalviewModel.FeatureSettings }
+     *     
+     */
+    public JalviewModel.FeatureSettings getFeatureSettings() {
+        return featureSettings;
+    }
+
+    /**
+     * Sets the value of the featureSettings property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link JalviewModel.FeatureSettings }
+     *     
+     */
+    public void setFeatureSettings(JalviewModel.FeatureSettings value) {
+        this.featureSettings = value;
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;sequence>
+     *         &lt;element name="setting" maxOccurs="unbounded" minOccurs="0">
+     *           &lt;complexType>
+     *             &lt;complexContent>
+     *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                 &lt;sequence>
+     *                   &lt;element name="attributeName" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="2" minOccurs="0"/>
+     *                   &lt;element name="matcherSet" type="{www.jalview.org/colours}FeatureMatcherSet" minOccurs="0"/>
+     *                 &lt;/sequence>
+     *                 &lt;attribute name="type" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *                 &lt;attribute name="colour" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *                 &lt;attribute name="display" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+     *                 &lt;attribute name="order" type="{http://www.w3.org/2001/XMLSchema}float" />
+     *                 &lt;attribute name="mincolour" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *                 &lt;attribute name="noValueColour" type="{www.jalview.org/colours}NoValueColour" default="Min" />
+     *                 &lt;attribute name="threshold" type="{http://www.w3.org/2001/XMLSchema}float" />
+     *                 &lt;attribute name="threshstate" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *                 &lt;attribute name="max" type="{http://www.w3.org/2001/XMLSchema}float" />
+     *                 &lt;attribute name="min" type="{http://www.w3.org/2001/XMLSchema}float" />
+     *                 &lt;attribute name="colourByLabel" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+     *                 &lt;attribute name="autoScale" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+     *               &lt;/restriction>
+     *             &lt;/complexContent>
+     *           &lt;/complexType>
+     *         &lt;/element>
+     *         &lt;element name="group" maxOccurs="unbounded" minOccurs="0">
+     *           &lt;complexType>
+     *             &lt;complexContent>
+     *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                 &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *                 &lt;attribute name="display" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+     *               &lt;/restriction>
+     *             &lt;/complexContent>
+     *           &lt;/complexType>
+     *         &lt;/element>
+     *       &lt;/sequence>
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "setting",
+        "group"
+    })
+    public static class FeatureSettings {
+
+        @XmlElement(namespace = "www.jalview.org")
+        protected List<JalviewModel.FeatureSettings.Setting> setting;
+        @XmlElement(namespace = "www.jalview.org")
+        protected List<JalviewModel.FeatureSettings.Group> group;
+
+        /**
+         * Gets the value of the setting property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the setting property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getSetting().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link JalviewModel.FeatureSettings.Setting }
+         * 
+         * 
+         */
+        public List<JalviewModel.FeatureSettings.Setting> getSetting() {
+            if (setting == null) {
+                setting = new ArrayList<JalviewModel.FeatureSettings.Setting>();
+            }
+            return this.setting;
+        }
+
+        /**
+         * Gets the value of the group property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the group property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getGroup().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link JalviewModel.FeatureSettings.Group }
+         * 
+         * 
+         */
+        public List<JalviewModel.FeatureSettings.Group> getGroup() {
+            if (group == null) {
+                group = new ArrayList<JalviewModel.FeatureSettings.Group>();
+            }
+            return this.group;
+        }
+
+
+        /**
+         * <p>Java class for anonymous complex type.
+         * 
+         * <p>The following schema fragment specifies the expected content contained within this class.
+         * 
+         * <pre>
+         * &lt;complexType>
+         *   &lt;complexContent>
+         *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *       &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+         *       &lt;attribute name="display" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+         *     &lt;/restriction>
+         *   &lt;/complexContent>
+         * &lt;/complexType>
+         * </pre>
+         * 
+         * 
+         */
+        @XmlAccessorType(XmlAccessType.FIELD)
+        @XmlType(name = "")
+        public static class Group {
+
+            @XmlAttribute(name = "name", required = true)
+            protected String name;
+            @XmlAttribute(name = "display", required = true)
+            protected boolean display;
+
+            /**
+             * Gets the value of the name property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link String }
+             *     
+             */
+            public String getName() {
+                return name;
+            }
+
+            /**
+             * Sets the value of the name property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link String }
+             *     
+             */
+            public void setName(String value) {
+                this.name = value;
+            }
+
+            /**
+             * Gets the value of the display property.
+             * 
+             */
+            public boolean isDisplay() {
+                return display;
+            }
+
+            /**
+             * Sets the value of the display property.
+             * 
+             */
+            public void setDisplay(boolean value) {
+                this.display = value;
+            }
+
+        }
+
+
+        /**
+         * <p>Java class for anonymous complex type.
+         * 
+         * <p>The following schema fragment specifies the expected content contained within this class.
+         * 
+         * <pre>
+         * &lt;complexType>
+         *   &lt;complexContent>
+         *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *       &lt;sequence>
+         *         &lt;element name="attributeName" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="2" minOccurs="0"/>
+         *         &lt;element name="matcherSet" type="{www.jalview.org/colours}FeatureMatcherSet" minOccurs="0"/>
+         *       &lt;/sequence>
+         *       &lt;attribute name="type" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+         *       &lt;attribute name="colour" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
+         *       &lt;attribute name="display" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+         *       &lt;attribute name="order" type="{http://www.w3.org/2001/XMLSchema}float" />
+         *       &lt;attribute name="mincolour" type="{http://www.w3.org/2001/XMLSchema}int" />
+         *       &lt;attribute name="noValueColour" type="{www.jalview.org/colours}NoValueColour" default="Min" />
+         *       &lt;attribute name="threshold" type="{http://www.w3.org/2001/XMLSchema}float" />
+         *       &lt;attribute name="threshstate" type="{http://www.w3.org/2001/XMLSchema}int" />
+         *       &lt;attribute name="max" type="{http://www.w3.org/2001/XMLSchema}float" />
+         *       &lt;attribute name="min" type="{http://www.w3.org/2001/XMLSchema}float" />
+         *       &lt;attribute name="colourByLabel" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+         *       &lt;attribute name="autoScale" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+         *     &lt;/restriction>
+         *   &lt;/complexContent>
+         * &lt;/complexType>
+         * </pre>
+         * 
+         * 
+         */
+        @XmlAccessorType(XmlAccessType.FIELD)
+        @XmlType(name = "", propOrder = {
+            "attributeName",
+            "matcherSet"
+        })
+        public static class Setting {
+
+            @XmlElement(namespace = "www.jalview.org")
+            protected List<String> attributeName;
+            @XmlElement(namespace = "www.jalview.org")
+            protected FeatureMatcherSet matcherSet;
+            @XmlAttribute(name = "type", required = true)
+            protected String type;
+            @XmlAttribute(name = "colour", required = true)
+            protected int colour;
+            @XmlAttribute(name = "display", required = true)
+            protected boolean display;
+            @XmlAttribute(name = "order")
+            protected Float order;
+            @XmlAttribute(name = "mincolour")
+            protected Integer mincolour;
+            @XmlAttribute(name = "noValueColour")
+            protected NoValueColour noValueColour;
+            @XmlAttribute(name = "threshold")
+            protected Float threshold;
+            @XmlAttribute(name = "threshstate")
+            protected Integer threshstate;
+            @XmlAttribute(name = "max")
+            protected Float max;
+            @XmlAttribute(name = "min")
+            protected Float min;
+            @XmlAttribute(name = "colourByLabel")
+            protected Boolean colourByLabel;
+            @XmlAttribute(name = "autoScale")
+            protected Boolean autoScale;
+
+            /**
+             * Gets the value of the attributeName property.
+             * 
+             * <p>
+             * This accessor method returns a reference to the live list,
+             * not a snapshot. Therefore any modification you make to the
+             * returned list will be present inside the JAXB object.
+             * This is why there is not a <CODE>set</CODE> method for the attributeName property.
+             * 
+             * <p>
+             * For example, to add a new item, do as follows:
+             * <pre>
+             *    getAttributeName().add(newItem);
+             * </pre>
+             * 
+             * 
+             * <p>
+             * Objects of the following type(s) are allowed in the list
+             * {@link String }
+             * 
+             * 
+             */
+            public List<String> getAttributeName() {
+                if (attributeName == null) {
+                    attributeName = new ArrayList<String>();
+                }
+                return this.attributeName;
+            }
+
+            /**
+             * Gets the value of the matcherSet property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link FeatureMatcherSet }
+             *     
+             */
+            public FeatureMatcherSet getMatcherSet() {
+                return matcherSet;
+            }
+
+            /**
+             * Sets the value of the matcherSet property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link FeatureMatcherSet }
+             *     
+             */
+            public void setMatcherSet(FeatureMatcherSet value) {
+                this.matcherSet = value;
+            }
+
+            /**
+             * Gets the value of the type property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link String }
+             *     
+             */
+            public String getType() {
+                return type;
+            }
+
+            /**
+             * Sets the value of the type property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link String }
+             *     
+             */
+            public void setType(String value) {
+                this.type = value;
+            }
+
+            /**
+             * Gets the value of the colour property.
+             * 
+             */
+            public int getColour() {
+                return colour;
+            }
+
+            /**
+             * Sets the value of the colour property.
+             * 
+             */
+            public void setColour(int value) {
+                this.colour = value;
+            }
+
+            /**
+             * Gets the value of the display property.
+             * 
+             */
+            public boolean isDisplay() {
+                return display;
+            }
+
+            /**
+             * Sets the value of the display property.
+             * 
+             */
+            public void setDisplay(boolean value) {
+                this.display = value;
+            }
+
+            /**
+             * Gets the value of the order property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link Float }
+             *     
+             */
+            public Float getOrder() {
+                return order;
+            }
+
+            /**
+             * Sets the value of the order property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link Float }
+             *     
+             */
+            public void setOrder(Float value) {
+                this.order = value;
+            }
+
+            /**
+             * Gets the value of the mincolour property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link Integer }
+             *     
+             */
+            public Integer getMincolour() {
+                return mincolour;
+            }
+
+            /**
+             * Sets the value of the mincolour property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link Integer }
+             *     
+             */
+            public void setMincolour(Integer value) {
+                this.mincolour = value;
+            }
+
+            /**
+             * Gets the value of the noValueColour property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link NoValueColour }
+             *     
+             */
+            public NoValueColour getNoValueColour() {
+                if (noValueColour == null) {
+                    return NoValueColour.MIN;
+                } else {
+                    return noValueColour;
+                }
+            }
+
+            /**
+             * Sets the value of the noValueColour property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link NoValueColour }
+             *     
+             */
+            public void setNoValueColour(NoValueColour value) {
+                this.noValueColour = value;
+            }
+
+            /**
+             * Gets the value of the threshold property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link Float }
+             *     
+             */
+            public Float getThreshold() {
+                return threshold;
+            }
+
+            /**
+             * Sets the value of the threshold property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link Float }
+             *     
+             */
+            public void setThreshold(Float value) {
+                this.threshold = value;
+            }
+
+            /**
+             * Gets the value of the threshstate property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link Integer }
+             *     
+             */
+            public Integer getThreshstate() {
+                return threshstate;
+            }
+
+            /**
+             * Sets the value of the threshstate property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link Integer }
+             *     
+             */
+            public void setThreshstate(Integer value) {
+                this.threshstate = value;
+            }
+
+            /**
+             * Gets the value of the max property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link Float }
+             *     
+             */
+            public Float getMax() {
+                return max;
+            }
+
+            /**
+             * Sets the value of the max property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link Float }
+             *     
+             */
+            public void setMax(Float value) {
+                this.max = value;
+            }
+
+            /**
+             * Gets the value of the min property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link Float }
+             *     
+             */
+            public Float getMin() {
+                return min;
+            }
+
+            /**
+             * Sets the value of the min property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link Float }
+             *     
+             */
+            public void setMin(Float value) {
+                this.min = value;
+            }
+
+            /**
+             * Gets the value of the colourByLabel property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link Boolean }
+             *     
+             */
+            public Boolean isColourByLabel() {
+                return colourByLabel;
+            }
+
+            /**
+             * Sets the value of the colourByLabel property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link Boolean }
+             *     
+             */
+            public void setColourByLabel(Boolean value) {
+                this.colourByLabel = value;
+            }
+
+            /**
+             * Gets the value of the autoScale property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link Boolean }
+             *     
+             */
+            public Boolean isAutoScale() {
+                return autoScale;
+            }
+
+            /**
+             * Sets the value of the autoScale property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link Boolean }
+             *     
+             */
+            public void setAutoScale(Boolean value) {
+                this.autoScale = value;
+            }
+
+        }
+
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;sequence>
+     *         &lt;element name="seq" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
+     *         &lt;element name="annotationColours" type="{www.jalview.org}AnnotationColourScheme" minOccurs="0"/>
+     *       &lt;/sequence>
+     *       &lt;attribute name="start" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *       &lt;attribute name="end" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *       &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *       &lt;attribute name="colour" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *       &lt;attribute name="consThreshold" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *       &lt;attribute name="pidThreshold" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *       &lt;attribute name="outlineColour" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *       &lt;attribute name="displayBoxes" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+     *       &lt;attribute name="displayText" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+     *       &lt;attribute name="colourText" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+     *       &lt;attribute name="textCol1" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *       &lt;attribute name="textCol2" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *       &lt;attribute name="textColThreshold" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *       &lt;attribute name="showUnconserved" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+     *       &lt;attribute name="ignoreGapsinConsensus" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
+     *       &lt;attribute name="showConsensusHistogram" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
+     *       &lt;attribute name="showSequenceLogo" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+     *       &lt;attribute name="normaliseSequenceLogo" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+     *       &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "seq",
+        "annotationColours"
+    })
+    public static class JGroup {
+
+        @XmlElement(namespace = "www.jalview.org", required = true)
+        protected List<String> seq;
+        @XmlElement(namespace = "www.jalview.org")
+        protected AnnotationColourScheme annotationColours;
+        @XmlAttribute(name = "start")
+        protected Integer start;
+        @XmlAttribute(name = "end")
+        protected Integer end;
+        @XmlAttribute(name = "name")
+        protected String name;
+        @XmlAttribute(name = "colour")
+        protected String colour;
+        @XmlAttribute(name = "consThreshold")
+        protected Integer consThreshold;
+        @XmlAttribute(name = "pidThreshold")
+        protected Integer pidThreshold;
+        @XmlAttribute(name = "outlineColour")
+        protected Integer outlineColour;
+        @XmlAttribute(name = "displayBoxes")
+        protected Boolean displayBoxes;
+        @XmlAttribute(name = "displayText")
+        protected Boolean displayText;
+        @XmlAttribute(name = "colourText")
+        protected Boolean colourText;
+        @XmlAttribute(name = "textCol1")
+        protected Integer textCol1;
+        @XmlAttribute(name = "textCol2")
+        protected Integer textCol2;
+        @XmlAttribute(name = "textColThreshold")
+        protected Integer textColThreshold;
+        @XmlAttribute(name = "showUnconserved")
+        protected Boolean showUnconserved;
+        @XmlAttribute(name = "ignoreGapsinConsensus")
+        protected Boolean ignoreGapsinConsensus;
+        @XmlAttribute(name = "showConsensusHistogram")
+        protected Boolean showConsensusHistogram;
+        @XmlAttribute(name = "showSequenceLogo")
+        protected Boolean showSequenceLogo;
+        @XmlAttribute(name = "normaliseSequenceLogo")
+        protected Boolean normaliseSequenceLogo;
+        @XmlAttribute(name = "id")
+        protected String id;
+
+        /**
+         * Gets the value of the seq property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the seq property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getSeq().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link String }
+         * 
+         * 
+         */
+        public List<String> getSeq() {
+            if (seq == null) {
+                seq = new ArrayList<String>();
+            }
+            return this.seq;
+        }
+
+        /**
+         * Gets the value of the annotationColours property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link AnnotationColourScheme }
+         *     
+         */
+        public AnnotationColourScheme getAnnotationColours() {
+            return annotationColours;
+        }
+
+        /**
+         * Sets the value of the annotationColours property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link AnnotationColourScheme }
+         *     
+         */
+        public void setAnnotationColours(AnnotationColourScheme value) {
+            this.annotationColours = value;
+        }
+
+        /**
+         * Gets the value of the start property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Integer }
+         *     
+         */
+        public Integer getStart() {
+            return start;
+        }
+
+        /**
+         * Sets the value of the start property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Integer }
+         *     
+         */
+        public void setStart(Integer value) {
+            this.start = value;
+        }
+
+        /**
+         * Gets the value of the end property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Integer }
+         *     
+         */
+        public Integer getEnd() {
+            return end;
+        }
+
+        /**
+         * Sets the value of the end property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Integer }
+         *     
+         */
+        public void setEnd(Integer value) {
+            this.end = value;
+        }
+
+        /**
+         * Gets the value of the name property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getName() {
+            return name;
+        }
+
+        /**
+         * Sets the value of the name property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setName(String value) {
+            this.name = value;
+        }
+
+        /**
+         * Gets the value of the colour property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getColour() {
+            return colour;
+        }
+
+        /**
+         * Sets the value of the colour property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setColour(String value) {
+            this.colour = value;
+        }
+
+        /**
+         * Gets the value of the consThreshold property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Integer }
+         *     
+         */
+        public Integer getConsThreshold() {
+            return consThreshold;
+        }
+
+        /**
+         * Sets the value of the consThreshold property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Integer }
+         *     
+         */
+        public void setConsThreshold(Integer value) {
+            this.consThreshold = value;
+        }
+
+        /**
+         * Gets the value of the pidThreshold property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Integer }
+         *     
+         */
+        public Integer getPidThreshold() {
+            return pidThreshold;
+        }
+
+        /**
+         * Sets the value of the pidThreshold property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Integer }
+         *     
+         */
+        public void setPidThreshold(Integer value) {
+            this.pidThreshold = value;
+        }
+
+        /**
+         * Gets the value of the outlineColour property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Integer }
+         *     
+         */
+        public Integer getOutlineColour() {
+            return outlineColour;
+        }
+
+        /**
+         * Sets the value of the outlineColour property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Integer }
+         *     
+         */
+        public void setOutlineColour(Integer value) {
+            this.outlineColour = value;
+        }
+
+        /**
+         * Gets the value of the displayBoxes property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public Boolean isDisplayBoxes() {
+            return displayBoxes;
+        }
+
+        /**
+         * Sets the value of the displayBoxes property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setDisplayBoxes(Boolean value) {
+            this.displayBoxes = value;
+        }
+
+        /**
+         * Gets the value of the displayText property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public Boolean isDisplayText() {
+            return displayText;
+        }
+
+        /**
+         * Sets the value of the displayText property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setDisplayText(Boolean value) {
+            this.displayText = value;
+        }
+
+        /**
+         * Gets the value of the colourText property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public Boolean isColourText() {
+            return colourText;
+        }
+
+        /**
+         * Sets the value of the colourText property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setColourText(Boolean value) {
+            this.colourText = value;
+        }
+
+        /**
+         * Gets the value of the textCol1 property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Integer }
+         *     
+         */
+        public Integer getTextCol1() {
+            return textCol1;
+        }
+
+        /**
+         * Sets the value of the textCol1 property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Integer }
+         *     
+         */
+        public void setTextCol1(Integer value) {
+            this.textCol1 = value;
+        }
+
+        /**
+         * Gets the value of the textCol2 property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Integer }
+         *     
+         */
+        public Integer getTextCol2() {
+            return textCol2;
+        }
+
+        /**
+         * Sets the value of the textCol2 property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Integer }
+         *     
+         */
+        public void setTextCol2(Integer value) {
+            this.textCol2 = value;
+        }
+
+        /**
+         * Gets the value of the textColThreshold property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Integer }
+         *     
+         */
+        public Integer getTextColThreshold() {
+            return textColThreshold;
+        }
+
+        /**
+         * Sets the value of the textColThreshold property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Integer }
+         *     
+         */
+        public void setTextColThreshold(Integer value) {
+            this.textColThreshold = value;
+        }
+
+        /**
+         * Gets the value of the showUnconserved property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public Boolean isShowUnconserved() {
+            return showUnconserved;
+        }
+
+        /**
+         * Sets the value of the showUnconserved property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setShowUnconserved(Boolean value) {
+            this.showUnconserved = value;
+        }
+
+        /**
+         * Gets the value of the ignoreGapsinConsensus property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public boolean isIgnoreGapsinConsensus() {
+            if (ignoreGapsinConsensus == null) {
+                return true;
+            } else {
+                return ignoreGapsinConsensus;
+            }
+        }
+
+        /**
+         * Sets the value of the ignoreGapsinConsensus property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setIgnoreGapsinConsensus(Boolean value) {
+            this.ignoreGapsinConsensus = value;
+        }
+
+        /**
+         * Gets the value of the showConsensusHistogram property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public boolean isShowConsensusHistogram() {
+            if (showConsensusHistogram == null) {
+                return true;
+            } else {
+                return showConsensusHistogram;
+            }
+        }
+
+        /**
+         * Sets the value of the showConsensusHistogram property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setShowConsensusHistogram(Boolean value) {
+            this.showConsensusHistogram = value;
+        }
+
+        /**
+         * Gets the value of the showSequenceLogo property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public boolean isShowSequenceLogo() {
+            if (showSequenceLogo == null) {
+                return false;
+            } else {
+                return showSequenceLogo;
+            }
+        }
+
+        /**
+         * Sets the value of the showSequenceLogo property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setShowSequenceLogo(Boolean value) {
+            this.showSequenceLogo = value;
+        }
+
+        /**
+         * Gets the value of the normaliseSequenceLogo property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public boolean isNormaliseSequenceLogo() {
+            if (normaliseSequenceLogo == null) {
+                return false;
+            } else {
+                return normaliseSequenceLogo;
+            }
+        }
+
+        /**
+         * Sets the value of the normaliseSequenceLogo property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setNormaliseSequenceLogo(Boolean value) {
+            this.normaliseSequenceLogo = value;
+        }
+
+        /**
+         * Gets the value of the id property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getId() {
+            return id;
+        }
+
+        /**
+         * Sets the value of the id property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setId(String value) {
+            this.id = value;
+        }
+
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;sequence>
+     *         &lt;element name="features" type="{www.jalview.org}feature" maxOccurs="unbounded" minOccurs="0"/>
+     *         &lt;element name="pdbids" maxOccurs="unbounded" minOccurs="0">
+     *           &lt;complexType>
+     *             &lt;complexContent>
+     *               &lt;extension base="{www.jalview.org}pdbentry">
+     *                 &lt;sequence>
+     *                   &lt;element name="structureState" maxOccurs="unbounded" minOccurs="0">
+     *                     &lt;complexType>
+     *                       &lt;simpleContent>
+     *                         &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>string">
+     *                           &lt;attGroup ref="{www.jalview.org}swingwindow"/>
+     *                           &lt;attribute name="visible" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+     *                           &lt;attribute name="viewId" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *                           &lt;attribute name="alignwithAlignPanel" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
+     *                           &lt;attribute name="colourwithAlignPanel" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+     *                           &lt;attribute name="colourByJmol" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
+     *                           &lt;attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *                         &lt;/extension>
+     *                       &lt;/simpleContent>
+     *                     &lt;/complexType>
+     *                   &lt;/element>
+     *                 &lt;/sequence>
+     *               &lt;/extension>
+     *             &lt;/complexContent>
+     *           &lt;/complexType>
+     *         &lt;/element>
+     *         &lt;element name="hiddenSequences" type="{http://www.w3.org/2001/XMLSchema}int" maxOccurs="unbounded" minOccurs="0"/>
+     *         &lt;element name="rnaViewer" maxOccurs="unbounded" minOccurs="0">
+     *           &lt;complexType>
+     *             &lt;complexContent>
+     *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                 &lt;sequence>
+     *                   &lt;element name="secondaryStructure" maxOccurs="unbounded">
+     *                     &lt;complexType>
+     *                       &lt;complexContent>
+     *                         &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                           &lt;attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *                           &lt;attribute name="annotationId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *                           &lt;attribute name="gapped" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+     *                           &lt;attribute name="viewerState" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *                         &lt;/restriction>
+     *                       &lt;/complexContent>
+     *                     &lt;/complexType>
+     *                   &lt;/element>
+     *                 &lt;/sequence>
+     *                 &lt;attGroup ref="{www.jalview.org}swingwindow"/>
+     *                 &lt;attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *                 &lt;attribute name="viewId" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *                 &lt;attribute name="dividerLocation" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *                 &lt;attribute name="selectedRna" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *               &lt;/restriction>
+     *             &lt;/complexContent>
+     *           &lt;/complexType>
+     *         &lt;/element>
+     *       &lt;/sequence>
+     *       &lt;attribute name="colour" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *       &lt;attribute name="start" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *       &lt;attribute name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *       &lt;attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *       &lt;attribute name="hidden" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+     *       &lt;attribute name="viewreference" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "features",
+        "pdbids",
+        "hiddenSequences",
+        "rnaViewer"
+    })
+    public static class JSeq {
+
+        @XmlElement(namespace = "www.jalview.org")
+        protected List<Feature> features;
+        @XmlElement(namespace = "www.jalview.org")
+        protected List<JalviewModel.JSeq.Pdbids> pdbids;
+        @XmlElement(namespace = "www.jalview.org", type = Integer.class)
+        protected List<Integer> hiddenSequences;
+        @XmlElement(namespace = "www.jalview.org")
+        protected List<JalviewModel.JSeq.RnaViewer> rnaViewer;
+        @XmlAttribute(name = "colour")
+        protected Integer colour;
+        @XmlAttribute(name = "start", required = true)
+        protected int start;
+        @XmlAttribute(name = "end", required = true)
+        protected int end;
+        @XmlAttribute(name = "id", required = true)
+        protected String id;
+        @XmlAttribute(name = "hidden")
+        protected Boolean hidden;
+        @XmlAttribute(name = "viewreference")
+        protected Boolean viewreference;
+
+        /**
+         * Gets the value of the features property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the features property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getFeatures().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link Feature }
+         * 
+         * 
+         */
+        public List<Feature> getFeatures() {
+            if (features == null) {
+                features = new ArrayList<Feature>();
+            }
+            return this.features;
+        }
+
+        /**
+         * Gets the value of the pdbids property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the pdbids property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getPdbids().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link JalviewModel.JSeq.Pdbids }
+         * 
+         * 
+         */
+        public List<JalviewModel.JSeq.Pdbids> getPdbids() {
+            if (pdbids == null) {
+                pdbids = new ArrayList<JalviewModel.JSeq.Pdbids>();
+            }
+            return this.pdbids;
+        }
+
+        /**
+         * Gets the value of the hiddenSequences property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the hiddenSequences property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getHiddenSequences().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link Integer }
+         * 
+         * 
+         */
+        public List<Integer> getHiddenSequences() {
+            if (hiddenSequences == null) {
+                hiddenSequences = new ArrayList<Integer>();
+            }
+            return this.hiddenSequences;
+        }
+
+        /**
+         * Gets the value of the rnaViewer property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the rnaViewer property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getRnaViewer().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link JalviewModel.JSeq.RnaViewer }
+         * 
+         * 
+         */
+        public List<JalviewModel.JSeq.RnaViewer> getRnaViewer() {
+            if (rnaViewer == null) {
+                rnaViewer = new ArrayList<JalviewModel.JSeq.RnaViewer>();
+            }
+            return this.rnaViewer;
+        }
+
+        /**
+         * Gets the value of the colour property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Integer }
+         *     
+         */
+        public Integer getColour() {
+            return colour;
+        }
+
+        /**
+         * Sets the value of the colour property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Integer }
+         *     
+         */
+        public void setColour(Integer value) {
+            this.colour = value;
+        }
+
+        /**
+         * Gets the value of the start property.
+         * 
+         */
+        public int getStart() {
+            return start;
+        }
+
+        /**
+         * Sets the value of the start property.
+         * 
+         */
+        public void setStart(int value) {
+            this.start = value;
+        }
+
+        /**
+         * Gets the value of the end property.
+         * 
+         */
+        public int getEnd() {
+            return end;
+        }
+
+        /**
+         * Sets the value of the end property.
+         * 
+         */
+        public void setEnd(int value) {
+            this.end = value;
+        }
+
+        /**
+         * Gets the value of the id property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getId() {
+            return id;
+        }
+
+        /**
+         * Sets the value of the id property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setId(String value) {
+            this.id = value;
+        }
+
+        /**
+         * Gets the value of the hidden property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public Boolean isHidden() {
+            return hidden;
+        }
+
+        /**
+         * Sets the value of the hidden property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setHidden(Boolean value) {
+            this.hidden = value;
+        }
+
+        /**
+         * Gets the value of the viewreference property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public Boolean isViewreference() {
+            return viewreference;
+        }
+
+        /**
+         * Sets the value of the viewreference property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setViewreference(Boolean value) {
+            this.viewreference = value;
+        }
+
+
+        /**
+         * <p>Java class for anonymous complex type.
+         * 
+         * <p>The following schema fragment specifies the expected content contained within this class.
+         * 
+         * <pre>
+         * &lt;complexType>
+         *   &lt;complexContent>
+         *     &lt;extension base="{www.jalview.org}pdbentry">
+         *       &lt;sequence>
+         *         &lt;element name="structureState" maxOccurs="unbounded" minOccurs="0">
+         *           &lt;complexType>
+         *             &lt;simpleContent>
+         *               &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>string">
+         *                 &lt;attGroup ref="{www.jalview.org}swingwindow"/>
+         *                 &lt;attribute name="visible" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+         *                 &lt;attribute name="viewId" type="{http://www.w3.org/2001/XMLSchema}string" />
+         *                 &lt;attribute name="alignwithAlignPanel" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
+         *                 &lt;attribute name="colourwithAlignPanel" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+         *                 &lt;attribute name="colourByJmol" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
+         *                 &lt;attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
+         *               &lt;/extension>
+         *             &lt;/simpleContent>
+         *           &lt;/complexType>
+         *         &lt;/element>
+         *       &lt;/sequence>
+         *     &lt;/extension>
+         *   &lt;/complexContent>
+         * &lt;/complexType>
+         * </pre>
+         * 
+         * 
+         */
+        @XmlAccessorType(XmlAccessType.FIELD)
+        @XmlType(name = "", propOrder = {
+            "structureState"
+        })
+        public static class Pdbids
+            extends Pdbentry
+        {
+
+            @XmlElement(namespace = "www.jalview.org")
+            protected List<JalviewModel.JSeq.Pdbids.StructureState> structureState;
+
+            /**
+             * Gets the value of the structureState property.
+             * 
+             * <p>
+             * This accessor method returns a reference to the live list,
+             * not a snapshot. Therefore any modification you make to the
+             * returned list will be present inside the JAXB object.
+             * This is why there is not a <CODE>set</CODE> method for the structureState property.
+             * 
+             * <p>
+             * For example, to add a new item, do as follows:
+             * <pre>
+             *    getStructureState().add(newItem);
+             * </pre>
+             * 
+             * 
+             * <p>
+             * Objects of the following type(s) are allowed in the list
+             * {@link JalviewModel.JSeq.Pdbids.StructureState }
+             * 
+             * 
+             */
+            public List<JalviewModel.JSeq.Pdbids.StructureState> getStructureState() {
+                if (structureState == null) {
+                    structureState = new ArrayList<JalviewModel.JSeq.Pdbids.StructureState>();
+                }
+                return this.structureState;
+            }
+
+
+            /**
+             * <p>Java class for anonymous complex type.
+             * 
+             * <p>The following schema fragment specifies the expected content contained within this class.
+             * 
+             * <pre>
+             * &lt;complexType>
+             *   &lt;simpleContent>
+             *     &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>string">
+             *       &lt;attGroup ref="{www.jalview.org}swingwindow"/>
+             *       &lt;attribute name="visible" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+             *       &lt;attribute name="viewId" type="{http://www.w3.org/2001/XMLSchema}string" />
+             *       &lt;attribute name="alignwithAlignPanel" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
+             *       &lt;attribute name="colourwithAlignPanel" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+             *       &lt;attribute name="colourByJmol" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
+             *       &lt;attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
+             *     &lt;/extension>
+             *   &lt;/simpleContent>
+             * &lt;/complexType>
+             * </pre>
+             * 
+             * 
+             */
+            @XmlAccessorType(XmlAccessType.FIELD)
+            @XmlType(name = "", propOrder = {
+                "value"
+            })
+            public static class StructureState {
+
+                @XmlValue
+                protected String value;
+                @XmlAttribute(name = "visible")
+                protected Boolean visible;
+                @XmlAttribute(name = "viewId")
+                protected String viewId;
+                @XmlAttribute(name = "alignwithAlignPanel")
+                protected Boolean alignwithAlignPanel;
+                @XmlAttribute(name = "colourwithAlignPanel")
+                protected Boolean colourwithAlignPanel;
+                @XmlAttribute(name = "colourByJmol")
+                protected Boolean colourByJmol;
+                @XmlAttribute(name = "type")
+                protected String type;
+                @XmlAttribute(name = "width")
+                protected Integer width;
+                @XmlAttribute(name = "height")
+                protected Integer height;
+                @XmlAttribute(name = "xpos")
+                protected Integer xpos;
+                @XmlAttribute(name = "ypos")
+                protected Integer ypos;
+
+                /**
+                 * Gets the value of the value property.
+                 * 
+                 * @return
+                 *     possible object is
+                 *     {@link String }
+                 *     
+                 */
+                public String getValue() {
+                    return value;
+                }
+
+                /**
+                 * Sets the value of the value property.
+                 * 
+                 * @param value
+                 *     allowed object is
+                 *     {@link String }
+                 *     
+                 */
+                public void setValue(String value) {
+                    this.value = value;
+                }
+
+                /**
+                 * Gets the value of the visible property.
+                 * 
+                 * @return
+                 *     possible object is
+                 *     {@link Boolean }
+                 *     
+                 */
+                public Boolean isVisible() {
+                    return visible;
+                }
+
+                /**
+                 * Sets the value of the visible property.
+                 * 
+                 * @param value
+                 *     allowed object is
+                 *     {@link Boolean }
+                 *     
+                 */
+                public void setVisible(Boolean value) {
+                    this.visible = value;
+                }
+
+                /**
+                 * Gets the value of the viewId property.
+                 * 
+                 * @return
+                 *     possible object is
+                 *     {@link String }
+                 *     
+                 */
+                public String getViewId() {
+                    return viewId;
+                }
+
+                /**
+                 * Sets the value of the viewId property.
+                 * 
+                 * @param value
+                 *     allowed object is
+                 *     {@link String }
+                 *     
+                 */
+                public void setViewId(String value) {
+                    this.viewId = value;
+                }
+
+                /**
+                 * Gets the value of the alignwithAlignPanel property.
+                 * 
+                 * @return
+                 *     possible object is
+                 *     {@link Boolean }
+                 *     
+                 */
+                public boolean isAlignwithAlignPanel() {
+                    if (alignwithAlignPanel == null) {
+                        return true;
+                    } else {
+                        return alignwithAlignPanel;
+                    }
+                }
+
+                /**
+                 * Sets the value of the alignwithAlignPanel property.
+                 * 
+                 * @param value
+                 *     allowed object is
+                 *     {@link Boolean }
+                 *     
+                 */
+                public void setAlignwithAlignPanel(Boolean value) {
+                    this.alignwithAlignPanel = value;
+                }
+
+                /**
+                 * Gets the value of the colourwithAlignPanel property.
+                 * 
+                 * @return
+                 *     possible object is
+                 *     {@link Boolean }
+                 *     
+                 */
+                public boolean isColourwithAlignPanel() {
+                    if (colourwithAlignPanel == null) {
+                        return false;
+                    } else {
+                        return colourwithAlignPanel;
+                    }
+                }
+
+                /**
+                 * Sets the value of the colourwithAlignPanel property.
+                 * 
+                 * @param value
+                 *     allowed object is
+                 *     {@link Boolean }
+                 *     
+                 */
+                public void setColourwithAlignPanel(Boolean value) {
+                    this.colourwithAlignPanel = value;
+                }
+
+                /**
+                 * Gets the value of the colourByJmol property.
+                 * 
+                 * @return
+                 *     possible object is
+                 *     {@link Boolean }
+                 *     
+                 */
+                public boolean isColourByJmol() {
+                    if (colourByJmol == null) {
+                        return true;
+                    } else {
+                        return colourByJmol;
+                    }
+                }
+
+                /**
+                 * Sets the value of the colourByJmol property.
+                 * 
+                 * @param value
+                 *     allowed object is
+                 *     {@link Boolean }
+                 *     
+                 */
+                public void setColourByJmol(Boolean value) {
+                    this.colourByJmol = value;
+                }
+
+                /**
+                 * Gets the value of the type property.
+                 * 
+                 * @return
+                 *     possible object is
+                 *     {@link String }
+                 *     
+                 */
+                public String getType() {
+                    return type;
+                }
+
+                /**
+                 * Sets the value of the type property.
+                 * 
+                 * @param value
+                 *     allowed object is
+                 *     {@link String }
+                 *     
+                 */
+                public void setType(String value) {
+                    this.type = value;
+                }
+
+                /**
+                 * Gets the value of the width property.
+                 * 
+                 * @return
+                 *     possible object is
+                 *     {@link Integer }
+                 *     
+                 */
+                public Integer getWidth() {
+                    return width;
+                }
+
+                /**
+                 * Sets the value of the width property.
+                 * 
+                 * @param value
+                 *     allowed object is
+                 *     {@link Integer }
+                 *     
+                 */
+                public void setWidth(Integer value) {
+                    this.width = value;
+                }
+
+                /**
+                 * Gets the value of the height property.
+                 * 
+                 * @return
+                 *     possible object is
+                 *     {@link Integer }
+                 *     
+                 */
+                public Integer getHeight() {
+                    return height;
+                }
+
+                /**
+                 * Sets the value of the height property.
+                 * 
+                 * @param value
+                 *     allowed object is
+                 *     {@link Integer }
+                 *     
+                 */
+                public void setHeight(Integer value) {
+                    this.height = value;
+                }
+
+                /**
+                 * Gets the value of the xpos property.
+                 * 
+                 * @return
+                 *     possible object is
+                 *     {@link Integer }
+                 *     
+                 */
+                public Integer getXpos() {
+                    return xpos;
+                }
+
+                /**
+                 * Sets the value of the xpos property.
+                 * 
+                 * @param value
+                 *     allowed object is
+                 *     {@link Integer }
+                 *     
+                 */
+                public void setXpos(Integer value) {
+                    this.xpos = value;
+                }
+
+                /**
+                 * Gets the value of the ypos property.
+                 * 
+                 * @return
+                 *     possible object is
+                 *     {@link Integer }
+                 *     
+                 */
+                public Integer getYpos() {
+                    return ypos;
+                }
+
+                /**
+                 * Sets the value of the ypos property.
+                 * 
+                 * @param value
+                 *     allowed object is
+                 *     {@link Integer }
+                 *     
+                 */
+                public void setYpos(Integer value) {
+                    this.ypos = value;
+                }
+
+            }
+
+        }
+
+
+        /**
+         * <p>Java class for anonymous complex type.
+         * 
+         * <p>The following schema fragment specifies the expected content contained within this class.
+         * 
+         * <pre>
+         * &lt;complexType>
+         *   &lt;complexContent>
+         *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *       &lt;sequence>
+         *         &lt;element name="secondaryStructure" maxOccurs="unbounded">
+         *           &lt;complexType>
+         *             &lt;complexContent>
+         *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *                 &lt;attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" />
+         *                 &lt;attribute name="annotationId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+         *                 &lt;attribute name="gapped" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+         *                 &lt;attribute name="viewerState" type="{http://www.w3.org/2001/XMLSchema}string" />
+         *               &lt;/restriction>
+         *             &lt;/complexContent>
+         *           &lt;/complexType>
+         *         &lt;/element>
+         *       &lt;/sequence>
+         *       &lt;attGroup ref="{www.jalview.org}swingwindow"/>
+         *       &lt;attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" />
+         *       &lt;attribute name="viewId" type="{http://www.w3.org/2001/XMLSchema}string" />
+         *       &lt;attribute name="dividerLocation" type="{http://www.w3.org/2001/XMLSchema}int" />
+         *       &lt;attribute name="selectedRna" type="{http://www.w3.org/2001/XMLSchema}int" />
+         *     &lt;/restriction>
+         *   &lt;/complexContent>
+         * &lt;/complexType>
+         * </pre>
+         * 
+         * 
+         */
+        @XmlAccessorType(XmlAccessType.FIELD)
+        @XmlType(name = "", propOrder = {
+            "secondaryStructure"
+        })
+        public static class RnaViewer {
+
+            @XmlElement(namespace = "www.jalview.org", required = true)
+            protected List<JalviewModel.JSeq.RnaViewer.SecondaryStructure> secondaryStructure;
+            @XmlAttribute(name = "title")
+            protected String title;
+            @XmlAttribute(name = "viewId")
+            protected String viewId;
+            @XmlAttribute(name = "dividerLocation")
+            protected Integer dividerLocation;
+            @XmlAttribute(name = "selectedRna")
+            protected Integer selectedRna;
+            @XmlAttribute(name = "width")
+            protected Integer width;
+            @XmlAttribute(name = "height")
+            protected Integer height;
+            @XmlAttribute(name = "xpos")
+            protected Integer xpos;
+            @XmlAttribute(name = "ypos")
+            protected Integer ypos;
+
+            /**
+             * Gets the value of the secondaryStructure property.
+             * 
+             * <p>
+             * This accessor method returns a reference to the live list,
+             * not a snapshot. Therefore any modification you make to the
+             * returned list will be present inside the JAXB object.
+             * This is why there is not a <CODE>set</CODE> method for the secondaryStructure property.
+             * 
+             * <p>
+             * For example, to add a new item, do as follows:
+             * <pre>
+             *    getSecondaryStructure().add(newItem);
+             * </pre>
+             * 
+             * 
+             * <p>
+             * Objects of the following type(s) are allowed in the list
+             * {@link JalviewModel.JSeq.RnaViewer.SecondaryStructure }
+             * 
+             * 
+             */
+            public List<JalviewModel.JSeq.RnaViewer.SecondaryStructure> getSecondaryStructure() {
+                if (secondaryStructure == null) {
+                    secondaryStructure = new ArrayList<JalviewModel.JSeq.RnaViewer.SecondaryStructure>();
+                }
+                return this.secondaryStructure;
+            }
+
+            /**
+             * Gets the value of the title property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link String }
+             *     
+             */
+            public String getTitle() {
+                return title;
+            }
+
+            /**
+             * Sets the value of the title property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link String }
+             *     
+             */
+            public void setTitle(String value) {
+                this.title = value;
+            }
+
+            /**
+             * Gets the value of the viewId property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link String }
+             *     
+             */
+            public String getViewId() {
+                return viewId;
+            }
+
+            /**
+             * Sets the value of the viewId property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link String }
+             *     
+             */
+            public void setViewId(String value) {
+                this.viewId = value;
+            }
+
+            /**
+             * Gets the value of the dividerLocation property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link Integer }
+             *     
+             */
+            public Integer getDividerLocation() {
+                return dividerLocation;
+            }
+
+            /**
+             * Sets the value of the dividerLocation property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link Integer }
+             *     
+             */
+            public void setDividerLocation(Integer value) {
+                this.dividerLocation = value;
+            }
+
+            /**
+             * Gets the value of the selectedRna property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link Integer }
+             *     
+             */
+            public Integer getSelectedRna() {
+                return selectedRna;
+            }
+
+            /**
+             * Sets the value of the selectedRna property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link Integer }
+             *     
+             */
+            public void setSelectedRna(Integer value) {
+                this.selectedRna = value;
+            }
+
+            /**
+             * Gets the value of the width property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link Integer }
+             *     
+             */
+            public Integer getWidth() {
+                return width;
+            }
+
+            /**
+             * Sets the value of the width property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link Integer }
+             *     
+             */
+            public void setWidth(Integer value) {
+                this.width = value;
+            }
+
+            /**
+             * Gets the value of the height property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link Integer }
+             *     
+             */
+            public Integer getHeight() {
+                return height;
+            }
+
+            /**
+             * Sets the value of the height property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link Integer }
+             *     
+             */
+            public void setHeight(Integer value) {
+                this.height = value;
+            }
+
+            /**
+             * Gets the value of the xpos property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link Integer }
+             *     
+             */
+            public Integer getXpos() {
+                return xpos;
+            }
+
+            /**
+             * Sets the value of the xpos property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link Integer }
+             *     
+             */
+            public void setXpos(Integer value) {
+                this.xpos = value;
+            }
+
+            /**
+             * Gets the value of the ypos property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link Integer }
+             *     
+             */
+            public Integer getYpos() {
+                return ypos;
+            }
+
+            /**
+             * Sets the value of the ypos property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link Integer }
+             *     
+             */
+            public void setYpos(Integer value) {
+                this.ypos = value;
+            }
+
+
+            /**
+             * <p>Java class for anonymous complex type.
+             * 
+             * <p>The following schema fragment specifies the expected content contained within this class.
+             * 
+             * <pre>
+             * &lt;complexType>
+             *   &lt;complexContent>
+             *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+             *       &lt;attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" />
+             *       &lt;attribute name="annotationId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+             *       &lt;attribute name="gapped" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+             *       &lt;attribute name="viewerState" type="{http://www.w3.org/2001/XMLSchema}string" />
+             *     &lt;/restriction>
+             *   &lt;/complexContent>
+             * &lt;/complexType>
+             * </pre>
+             * 
+             * 
+             */
+            @XmlAccessorType(XmlAccessType.FIELD)
+            @XmlType(name = "")
+            public static class SecondaryStructure {
+
+                @XmlAttribute(name = "title")
+                protected String title;
+                @XmlAttribute(name = "annotationId", required = true)
+                protected String annotationId;
+                @XmlAttribute(name = "gapped")
+                protected Boolean gapped;
+                @XmlAttribute(name = "viewerState")
+                protected String viewerState;
+
+                /**
+                 * Gets the value of the title property.
+                 * 
+                 * @return
+                 *     possible object is
+                 *     {@link String }
+                 *     
+                 */
+                public String getTitle() {
+                    return title;
+                }
+
+                /**
+                 * Sets the value of the title property.
+                 * 
+                 * @param value
+                 *     allowed object is
+                 *     {@link String }
+                 *     
+                 */
+                public void setTitle(String value) {
+                    this.title = value;
+                }
+
+                /**
+                 * Gets the value of the annotationId property.
+                 * 
+                 * @return
+                 *     possible object is
+                 *     {@link String }
+                 *     
+                 */
+                public String getAnnotationId() {
+                    return annotationId;
+                }
+
+                /**
+                 * Sets the value of the annotationId property.
+                 * 
+                 * @param value
+                 *     allowed object is
+                 *     {@link String }
+                 *     
+                 */
+                public void setAnnotationId(String value) {
+                    this.annotationId = value;
+                }
+
+                /**
+                 * Gets the value of the gapped property.
+                 * 
+                 * @return
+                 *     possible object is
+                 *     {@link Boolean }
+                 *     
+                 */
+                public Boolean isGapped() {
+                    return gapped;
+                }
+
+                /**
+                 * Sets the value of the gapped property.
+                 * 
+                 * @param value
+                 *     allowed object is
+                 *     {@link Boolean }
+                 *     
+                 */
+                public void setGapped(Boolean value) {
+                    this.gapped = value;
+                }
+
+                /**
+                 * Gets the value of the viewerState property.
+                 * 
+                 * @return
+                 *     possible object is
+                 *     {@link String }
+                 *     
+                 */
+                public String getViewerState() {
+                    return viewerState;
+                }
+
+                /**
+                 * Sets the value of the viewerState property.
+                 * 
+                 * @param value
+                 *     allowed object is
+                 *     {@link String }
+                 *     
+                 */
+                public void setViewerState(String value) {
+                    this.viewerState = value;
+                }
+
+            }
+
+        }
+
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;sequence>
+     *         &lt;element name="sequencePoint" maxOccurs="unbounded">
+     *           &lt;complexType>
+     *             &lt;complexContent>
+     *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                 &lt;attGroup ref="{www.jalview.org}position"/>
+     *                 &lt;attribute name="sequenceRef" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *               &lt;/restriction>
+     *             &lt;/complexContent>
+     *           &lt;/complexType>
+     *         &lt;/element>
+     *         &lt;element name="axis" maxOccurs="3" minOccurs="3">
+     *           &lt;complexType>
+     *             &lt;complexContent>
+     *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                 &lt;attGroup ref="{www.jalview.org}position"/>
+     *               &lt;/restriction>
+     *             &lt;/complexContent>
+     *           &lt;/complexType>
+     *         &lt;/element>
+     *         &lt;element name="seqPointMin">
+     *           &lt;complexType>
+     *             &lt;complexContent>
+     *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                 &lt;attGroup ref="{www.jalview.org}position"/>
+     *               &lt;/restriction>
+     *             &lt;/complexContent>
+     *           &lt;/complexType>
+     *         &lt;/element>
+     *         &lt;element name="seqPointMax">
+     *           &lt;complexType>
+     *             &lt;complexContent>
+     *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                 &lt;attGroup ref="{www.jalview.org}position"/>
+     *               &lt;/restriction>
+     *             &lt;/complexContent>
+     *           &lt;/complexType>
+     *         &lt;/element>
+     *         &lt;element name="pcaData" type="{www.jalview.org}PcaDataType"/>
+     *       &lt;/sequence>
+     *       &lt;attGroup ref="{www.jalview.org}swingwindow"/>
+     *       &lt;attGroup ref="{www.jalview.org}SimilarityParams"/>
+     *       &lt;attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *       &lt;attribute name="scoreModelName" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *       &lt;attribute name="xDim" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *       &lt;attribute name="yDim" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *       &lt;attribute name="zDim" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *       &lt;attribute name="bgColour" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *       &lt;attribute name="scaleFactor" type="{http://www.w3.org/2001/XMLSchema}float" />
+     *       &lt;attribute name="showLabels" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+     *       &lt;attribute name="linkToAllViews" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "sequencePoint",
+        "axis",
+        "seqPointMin",
+        "seqPointMax",
+        "pcaData"
+    })
+    public static class PcaViewer {
+
+        @XmlElement(namespace = "www.jalview.org", required = true)
+        protected List<JalviewModel.PcaViewer.SequencePoint> sequencePoint;
+        @XmlElement(namespace = "www.jalview.org", required = true)
+        protected List<JalviewModel.PcaViewer.Axis> axis;
+        @XmlElement(namespace = "www.jalview.org", required = true)
+        protected JalviewModel.PcaViewer.SeqPointMin seqPointMin;
+        @XmlElement(namespace = "www.jalview.org", required = true)
+        protected JalviewModel.PcaViewer.SeqPointMax seqPointMax;
+        @XmlElement(namespace = "www.jalview.org", required = true)
+        protected PcaDataType pcaData;
+        @XmlAttribute(name = "title")
+        protected String title;
+        @XmlAttribute(name = "scoreModelName")
+        protected String scoreModelName;
+        @XmlAttribute(name = "xDim")
+        protected Integer xDim;
+        @XmlAttribute(name = "yDim")
+        protected Integer yDim;
+        @XmlAttribute(name = "zDim")
+        protected Integer zDim;
+        @XmlAttribute(name = "bgColour")
+        protected Integer bgColour;
+        @XmlAttribute(name = "scaleFactor")
+        protected Float scaleFactor;
+        @XmlAttribute(name = "showLabels")
+        protected Boolean showLabels;
+        @XmlAttribute(name = "linkToAllViews")
+        protected Boolean linkToAllViews;
+        @XmlAttribute(name = "width")
+        protected Integer width;
+        @XmlAttribute(name = "height")
+        protected Integer height;
+        @XmlAttribute(name = "xpos")
+        protected Integer xpos;
+        @XmlAttribute(name = "ypos")
+        protected Integer ypos;
+        @XmlAttribute(name = "includeGaps")
+        protected Boolean includeGaps;
+        @XmlAttribute(name = "matchGaps")
+        protected Boolean matchGaps;
+        @XmlAttribute(name = "includeGappedColumns")
+        protected Boolean includeGappedColumns;
+        @XmlAttribute(name = "denominateByShortestLength")
+        protected Boolean denominateByShortestLength;
+
+        /**
+         * Gets the value of the sequencePoint property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the sequencePoint property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getSequencePoint().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link JalviewModel.PcaViewer.SequencePoint }
+         * 
+         * 
+         */
+        public List<JalviewModel.PcaViewer.SequencePoint> getSequencePoint() {
+            if (sequencePoint == null) {
+                sequencePoint = new ArrayList<JalviewModel.PcaViewer.SequencePoint>();
+            }
+            return this.sequencePoint;
+        }
+
+        /**
+         * Gets the value of the axis property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the axis property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getAxis().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link JalviewModel.PcaViewer.Axis }
+         * 
+         * 
+         */
+        public List<JalviewModel.PcaViewer.Axis> getAxis() {
+            if (axis == null) {
+                axis = new ArrayList<JalviewModel.PcaViewer.Axis>();
+            }
+            return this.axis;
+        }
+
+        /**
+         * Gets the value of the seqPointMin property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link JalviewModel.PcaViewer.SeqPointMin }
+         *     
+         */
+        public JalviewModel.PcaViewer.SeqPointMin getSeqPointMin() {
+            return seqPointMin;
+        }
+
+        /**
+         * Sets the value of the seqPointMin property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link JalviewModel.PcaViewer.SeqPointMin }
+         *     
+         */
+        public void setSeqPointMin(JalviewModel.PcaViewer.SeqPointMin value) {
+            this.seqPointMin = value;
+        }
+
+        /**
+         * Gets the value of the seqPointMax property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link JalviewModel.PcaViewer.SeqPointMax }
+         *     
+         */
+        public JalviewModel.PcaViewer.SeqPointMax getSeqPointMax() {
+            return seqPointMax;
+        }
+
+        /**
+         * Sets the value of the seqPointMax property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link JalviewModel.PcaViewer.SeqPointMax }
+         *     
+         */
+        public void setSeqPointMax(JalviewModel.PcaViewer.SeqPointMax value) {
+            this.seqPointMax = value;
+        }
+
+        /**
+         * Gets the value of the pcaData property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link PcaDataType }
+         *     
+         */
+        public PcaDataType getPcaData() {
+            return pcaData;
+        }
+
+        /**
+         * Sets the value of the pcaData property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link PcaDataType }
+         *     
+         */
+        public void setPcaData(PcaDataType value) {
+            this.pcaData = value;
+        }
+
+        /**
+         * Gets the value of the title property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getTitle() {
+            return title;
+        }
+
+        /**
+         * Sets the value of the title property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setTitle(String value) {
+            this.title = value;
+        }
+
+        /**
+         * Gets the value of the scoreModelName property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getScoreModelName() {
+            return scoreModelName;
+        }
+
+        /**
+         * Sets the value of the scoreModelName property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setScoreModelName(String value) {
+            this.scoreModelName = value;
+        }
+
+        /**
+         * Gets the value of the xDim property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Integer }
+         *     
+         */
+        public Integer getXDim() {
+            return xDim;
+        }
+
+        /**
+         * Sets the value of the xDim property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Integer }
+         *     
+         */
+        public void setXDim(Integer value) {
+            this.xDim = value;
+        }
+
+        /**
+         * Gets the value of the yDim property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Integer }
+         *     
+         */
+        public Integer getYDim() {
+            return yDim;
+        }
+
+        /**
+         * Sets the value of the yDim property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Integer }
+         *     
+         */
+        public void setYDim(Integer value) {
+            this.yDim = value;
+        }
+
+        /**
+         * Gets the value of the zDim property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Integer }
+         *     
+         */
+        public Integer getZDim() {
+            return zDim;
+        }
+
+        /**
+         * Sets the value of the zDim property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Integer }
+         *     
+         */
+        public void setZDim(Integer value) {
+            this.zDim = value;
+        }
+
+        /**
+         * Gets the value of the bgColour property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Integer }
+         *     
+         */
+        public Integer getBgColour() {
+            return bgColour;
+        }
+
+        /**
+         * Sets the value of the bgColour property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Integer }
+         *     
+         */
+        public void setBgColour(Integer value) {
+            this.bgColour = value;
+        }
+
+        /**
+         * Gets the value of the scaleFactor property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Float }
+         *     
+         */
+        public Float getScaleFactor() {
+            return scaleFactor;
+        }
+
+        /**
+         * Sets the value of the scaleFactor property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Float }
+         *     
+         */
+        public void setScaleFactor(Float value) {
+            this.scaleFactor = value;
+        }
+
+        /**
+         * Gets the value of the showLabels property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public Boolean isShowLabels() {
+            return showLabels;
+        }
+
+        /**
+         * Sets the value of the showLabels property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setShowLabels(Boolean value) {
+            this.showLabels = value;
+        }
+
+        /**
+         * Gets the value of the linkToAllViews property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public Boolean isLinkToAllViews() {
+            return linkToAllViews;
+        }
+
+        /**
+         * Sets the value of the linkToAllViews property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setLinkToAllViews(Boolean value) {
+            this.linkToAllViews = value;
+        }
+
+        /**
+         * Gets the value of the width property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Integer }
+         *     
+         */
+        public Integer getWidth() {
+            return width;
+        }
+
+        /**
+         * Sets the value of the width property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Integer }
+         *     
+         */
+        public void setWidth(Integer value) {
+            this.width = value;
+        }
+
+        /**
+         * Gets the value of the height property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Integer }
+         *     
+         */
+        public Integer getHeight() {
+            return height;
+        }
+
+        /**
+         * Sets the value of the height property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Integer }
+         *     
+         */
+        public void setHeight(Integer value) {
+            this.height = value;
+        }
+
+        /**
+         * Gets the value of the xpos property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Integer }
+         *     
+         */
+        public Integer getXpos() {
+            return xpos;
+        }
+
+        /**
+         * Sets the value of the xpos property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Integer }
+         *     
+         */
+        public void setXpos(Integer value) {
+            this.xpos = value;
+        }
+
+        /**
+         * Gets the value of the ypos property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Integer }
+         *     
+         */
+        public Integer getYpos() {
+            return ypos;
+        }
+
+        /**
+         * Sets the value of the ypos property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Integer }
+         *     
+         */
+        public void setYpos(Integer value) {
+            this.ypos = value;
+        }
+
+        /**
+         * Gets the value of the includeGaps property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public Boolean isIncludeGaps() {
+            return includeGaps;
+        }
+
+        /**
+         * Sets the value of the includeGaps property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setIncludeGaps(Boolean value) {
+            this.includeGaps = value;
+        }
+
+        /**
+         * Gets the value of the matchGaps property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public Boolean isMatchGaps() {
+            return matchGaps;
+        }
+
+        /**
+         * Sets the value of the matchGaps property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setMatchGaps(Boolean value) {
+            this.matchGaps = value;
+        }
+
+        /**
+         * Gets the value of the includeGappedColumns property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public Boolean isIncludeGappedColumns() {
+            return includeGappedColumns;
+        }
+
+        /**
+         * Sets the value of the includeGappedColumns property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setIncludeGappedColumns(Boolean value) {
+            this.includeGappedColumns = value;
+        }
+
+        /**
+         * Gets the value of the denominateByShortestLength property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public Boolean isDenominateByShortestLength() {
+            return denominateByShortestLength;
+        }
+
+        /**
+         * Sets the value of the denominateByShortestLength property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setDenominateByShortestLength(Boolean value) {
+            this.denominateByShortestLength = value;
+        }
+
+
+        /**
+         * <p>Java class for anonymous complex type.
+         * 
+         * <p>The following schema fragment specifies the expected content contained within this class.
+         * 
+         * <pre>
+         * &lt;complexType>
+         *   &lt;complexContent>
+         *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *       &lt;attGroup ref="{www.jalview.org}position"/>
+         *     &lt;/restriction>
+         *   &lt;/complexContent>
+         * &lt;/complexType>
+         * </pre>
+         * 
+         * 
+         */
+        @XmlAccessorType(XmlAccessType.FIELD)
+        @XmlType(name = "")
+        public static class Axis {
+
+            @XmlAttribute(name = "xPos")
+            protected Float xPos;
+            @XmlAttribute(name = "yPos")
+            protected Float yPos;
+            @XmlAttribute(name = "zPos")
+            protected Float zPos;
+
+            /**
+             * Gets the value of the xPos property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link Float }
+             *     
+             */
+            public Float getXPos() {
+                return xPos;
+            }
+
+            /**
+             * Sets the value of the xPos property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link Float }
+             *     
+             */
+            public void setXPos(Float value) {
+                this.xPos = value;
+            }
+
+            /**
+             * Gets the value of the yPos property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link Float }
+             *     
+             */
+            public Float getYPos() {
+                return yPos;
+            }
+
+            /**
+             * Sets the value of the yPos property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link Float }
+             *     
+             */
+            public void setYPos(Float value) {
+                this.yPos = value;
+            }
+
+            /**
+             * Gets the value of the zPos property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link Float }
+             *     
+             */
+            public Float getZPos() {
+                return zPos;
+            }
+
+            /**
+             * Sets the value of the zPos property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link Float }
+             *     
+             */
+            public void setZPos(Float value) {
+                this.zPos = value;
+            }
+
+        }
+
+
+        /**
+         * <p>Java class for anonymous complex type.
+         * 
+         * <p>The following schema fragment specifies the expected content contained within this class.
+         * 
+         * <pre>
+         * &lt;complexType>
+         *   &lt;complexContent>
+         *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *       &lt;attGroup ref="{www.jalview.org}position"/>
+         *     &lt;/restriction>
+         *   &lt;/complexContent>
+         * &lt;/complexType>
+         * </pre>
+         * 
+         * 
+         */
+        @XmlAccessorType(XmlAccessType.FIELD)
+        @XmlType(name = "")
+        public static class SeqPointMax {
+
+            @XmlAttribute(name = "xPos")
+            protected Float xPos;
+            @XmlAttribute(name = "yPos")
+            protected Float yPos;
+            @XmlAttribute(name = "zPos")
+            protected Float zPos;
+
+            /**
+             * Gets the value of the xPos property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link Float }
+             *     
+             */
+            public Float getXPos() {
+                return xPos;
+            }
+
+            /**
+             * Sets the value of the xPos property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link Float }
+             *     
+             */
+            public void setXPos(Float value) {
+                this.xPos = value;
+            }
+
+            /**
+             * Gets the value of the yPos property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link Float }
+             *     
+             */
+            public Float getYPos() {
+                return yPos;
+            }
+
+            /**
+             * Sets the value of the yPos property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link Float }
+             *     
+             */
+            public void setYPos(Float value) {
+                this.yPos = value;
+            }
+
+            /**
+             * Gets the value of the zPos property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link Float }
+             *     
+             */
+            public Float getZPos() {
+                return zPos;
+            }
+
+            /**
+             * Sets the value of the zPos property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link Float }
+             *     
+             */
+            public void setZPos(Float value) {
+                this.zPos = value;
+            }
+
+        }
+
+
+        /**
+         * <p>Java class for anonymous complex type.
+         * 
+         * <p>The following schema fragment specifies the expected content contained within this class.
+         * 
+         * <pre>
+         * &lt;complexType>
+         *   &lt;complexContent>
+         *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *       &lt;attGroup ref="{www.jalview.org}position"/>
+         *     &lt;/restriction>
+         *   &lt;/complexContent>
+         * &lt;/complexType>
+         * </pre>
+         * 
+         * 
+         */
+        @XmlAccessorType(XmlAccessType.FIELD)
+        @XmlType(name = "")
+        public static class SeqPointMin {
+
+            @XmlAttribute(name = "xPos")
+            protected Float xPos;
+            @XmlAttribute(name = "yPos")
+            protected Float yPos;
+            @XmlAttribute(name = "zPos")
+            protected Float zPos;
+
+            /**
+             * Gets the value of the xPos property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link Float }
+             *     
+             */
+            public Float getXPos() {
+                return xPos;
+            }
+
+            /**
+             * Sets the value of the xPos property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link Float }
+             *     
+             */
+            public void setXPos(Float value) {
+                this.xPos = value;
+            }
+
+            /**
+             * Gets the value of the yPos property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link Float }
+             *     
+             */
+            public Float getYPos() {
+                return yPos;
+            }
+
+            /**
+             * Sets the value of the yPos property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link Float }
+             *     
+             */
+            public void setYPos(Float value) {
+                this.yPos = value;
+            }
+
+            /**
+             * Gets the value of the zPos property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link Float }
+             *     
+             */
+            public Float getZPos() {
+                return zPos;
+            }
+
+            /**
+             * Sets the value of the zPos property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link Float }
+             *     
+             */
+            public void setZPos(Float value) {
+                this.zPos = value;
+            }
+
+        }
+
+
+        /**
+         * <p>Java class for anonymous complex type.
+         * 
+         * <p>The following schema fragment specifies the expected content contained within this class.
+         * 
+         * <pre>
+         * &lt;complexType>
+         *   &lt;complexContent>
+         *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *       &lt;attGroup ref="{www.jalview.org}position"/>
+         *       &lt;attribute name="sequenceRef" type="{http://www.w3.org/2001/XMLSchema}string" />
+         *     &lt;/restriction>
+         *   &lt;/complexContent>
+         * &lt;/complexType>
+         * </pre>
+         * 
+         * 
+         */
+        @XmlAccessorType(XmlAccessType.FIELD)
+        @XmlType(name = "")
+        public static class SequencePoint {
+
+            @XmlAttribute(name = "sequenceRef")
+            protected String sequenceRef;
+            @XmlAttribute(name = "xPos")
+            protected Float xPos;
+            @XmlAttribute(name = "yPos")
+            protected Float yPos;
+            @XmlAttribute(name = "zPos")
+            protected Float zPos;
+
+            /**
+             * Gets the value of the sequenceRef property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link String }
+             *     
+             */
+            public String getSequenceRef() {
+                return sequenceRef;
+            }
+
+            /**
+             * Sets the value of the sequenceRef property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link String }
+             *     
+             */
+            public void setSequenceRef(String value) {
+                this.sequenceRef = value;
+            }
+
+            /**
+             * Gets the value of the xPos property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link Float }
+             *     
+             */
+            public Float getXPos() {
+                return xPos;
+            }
+
+            /**
+             * Sets the value of the xPos property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link Float }
+             *     
+             */
+            public void setXPos(Float value) {
+                this.xPos = value;
+            }
+
+            /**
+             * Gets the value of the yPos property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link Float }
+             *     
+             */
+            public Float getYPos() {
+                return yPos;
+            }
+
+            /**
+             * Sets the value of the yPos property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link Float }
+             *     
+             */
+            public void setYPos(Float value) {
+                this.yPos = value;
+            }
+
+            /**
+             * Gets the value of the zPos property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link Float }
+             *     
+             */
+            public Float getZPos() {
+                return zPos;
+            }
+
+            /**
+             * Sets the value of the zPos property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link Float }
+             *     
+             */
+            public void setZPos(Float value) {
+                this.zPos = value;
+            }
+
+        }
+
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;sequence minOccurs="0">
+     *         &lt;element name="title" type="{http://www.w3.org/2001/XMLSchema}string"/>
+     *         &lt;element name="newick" type="{http://www.w3.org/2001/XMLSchema}string"/>
+     *       &lt;/sequence>
+     *       &lt;attGroup ref="{www.jalview.org}swingwindow"/>
+     *       &lt;attribute name="fontName" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *       &lt;attribute name="fontSize" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *       &lt;attribute name="fontStyle" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *       &lt;attribute name="threshold" type="{http://www.w3.org/2001/XMLSchema}float" />
+     *       &lt;attribute name="showBootstrap" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+     *       &lt;attribute name="showDistances" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+     *       &lt;attribute name="markUnlinked" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+     *       &lt;attribute name="fitToWindow" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+     *       &lt;attribute name="currentTree" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+     *       &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+     *       &lt;attribute name="linkToAllViews" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "title",
+        "newick"
+    })
+    public static class Tree {
+
+        @XmlElement(namespace = "www.jalview.org")
+        protected String title;
+        @XmlElement(namespace = "www.jalview.org")
+        protected String newick;
+        @XmlAttribute(name = "fontName")
+        protected String fontName;
+        @XmlAttribute(name = "fontSize")
+        protected Integer fontSize;
+        @XmlAttribute(name = "fontStyle")
+        protected Integer fontStyle;
+        @XmlAttribute(name = "threshold")
+        protected Float threshold;
+        @XmlAttribute(name = "showBootstrap")
+        protected Boolean showBootstrap;
+        @XmlAttribute(name = "showDistances")
+        protected Boolean showDistances;
+        @XmlAttribute(name = "markUnlinked")
+        protected Boolean markUnlinked;
+        @XmlAttribute(name = "fitToWindow")
+        protected Boolean fitToWindow;
+        @XmlAttribute(name = "currentTree")
+        protected Boolean currentTree;
+        @XmlAttribute(name = "id")
+        @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+        @XmlID
+        @XmlSchemaType(name = "ID")
+        protected String id;
+        @XmlAttribute(name = "linkToAllViews")
+        protected Boolean linkToAllViews;
+        @XmlAttribute(name = "width")
+        protected Integer width;
+        @XmlAttribute(name = "height")
+        protected Integer height;
+        @XmlAttribute(name = "xpos")
+        protected Integer xpos;
+        @XmlAttribute(name = "ypos")
+        protected Integer ypos;
+
+        /**
+         * Gets the value of the title property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getTitle() {
+            return title;
+        }
+
+        /**
+         * Sets the value of the title property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setTitle(String value) {
+            this.title = value;
+        }
+
+        /**
+         * Gets the value of the newick property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getNewick() {
+            return newick;
+        }
+
+        /**
+         * Sets the value of the newick property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setNewick(String value) {
+            this.newick = value;
+        }
+
+        /**
+         * Gets the value of the fontName property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getFontName() {
+            return fontName;
+        }
+
+        /**
+         * Sets the value of the fontName property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setFontName(String value) {
+            this.fontName = value;
+        }
+
+        /**
+         * Gets the value of the fontSize property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Integer }
+         *     
+         */
+        public Integer getFontSize() {
+            return fontSize;
+        }
+
+        /**
+         * Sets the value of the fontSize property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Integer }
+         *     
+         */
+        public void setFontSize(Integer value) {
+            this.fontSize = value;
+        }
+
+        /**
+         * Gets the value of the fontStyle property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Integer }
+         *     
+         */
+        public Integer getFontStyle() {
+            return fontStyle;
+        }
+
+        /**
+         * Sets the value of the fontStyle property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Integer }
+         *     
+         */
+        public void setFontStyle(Integer value) {
+            this.fontStyle = value;
+        }
+
+        /**
+         * Gets the value of the threshold property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Float }
+         *     
+         */
+        public Float getThreshold() {
+            return threshold;
+        }
+
+        /**
+         * Sets the value of the threshold property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Float }
+         *     
+         */
+        public void setThreshold(Float value) {
+            this.threshold = value;
+        }
+
+        /**
+         * Gets the value of the showBootstrap property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public Boolean isShowBootstrap() {
+            return showBootstrap;
+        }
+
+        /**
+         * Sets the value of the showBootstrap property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setShowBootstrap(Boolean value) {
+            this.showBootstrap = value;
+        }
+
+        /**
+         * Gets the value of the showDistances property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public Boolean isShowDistances() {
+            return showDistances;
+        }
+
+        /**
+         * Sets the value of the showDistances property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setShowDistances(Boolean value) {
+            this.showDistances = value;
+        }
+
+        /**
+         * Gets the value of the markUnlinked property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public Boolean isMarkUnlinked() {
+            return markUnlinked;
+        }
+
+        /**
+         * Sets the value of the markUnlinked property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setMarkUnlinked(Boolean value) {
+            this.markUnlinked = value;
+        }
+
+        /**
+         * Gets the value of the fitToWindow property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public Boolean isFitToWindow() {
+            return fitToWindow;
+        }
+
+        /**
+         * Sets the value of the fitToWindow property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setFitToWindow(Boolean value) {
+            this.fitToWindow = value;
+        }
+
+        /**
+         * Gets the value of the currentTree property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public Boolean isCurrentTree() {
+            return currentTree;
+        }
+
+        /**
+         * Sets the value of the currentTree property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setCurrentTree(Boolean value) {
+            this.currentTree = value;
+        }
+
+        /**
+         * Gets the value of the id property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getId() {
+            return id;
+        }
+
+        /**
+         * Sets the value of the id property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setId(String value) {
+            this.id = value;
+        }
+
+        /**
+         * Gets the value of the linkToAllViews property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public boolean isLinkToAllViews() {
+            if (linkToAllViews == null) {
+                return false;
+            } else {
+                return linkToAllViews;
+            }
+        }
+
+        /**
+         * Sets the value of the linkToAllViews property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setLinkToAllViews(Boolean value) {
+            this.linkToAllViews = value;
+        }
+
+        /**
+         * Gets the value of the width property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Integer }
+         *     
+         */
+        public Integer getWidth() {
+            return width;
+        }
+
+        /**
+         * Sets the value of the width property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Integer }
+         *     
+         */
+        public void setWidth(Integer value) {
+            this.width = value;
+        }
+
+        /**
+         * Gets the value of the height property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Integer }
+         *     
+         */
+        public Integer getHeight() {
+            return height;
+        }
+
+        /**
+         * Sets the value of the height property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Integer }
+         *     
+         */
+        public void setHeight(Integer value) {
+            this.height = value;
+        }
+
+        /**
+         * Gets the value of the xpos property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Integer }
+         *     
+         */
+        public Integer getXpos() {
+            return xpos;
+        }
+
+        /**
+         * Sets the value of the xpos property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Integer }
+         *     
+         */
+        public void setXpos(Integer value) {
+            this.xpos = value;
+        }
+
+        /**
+         * Gets the value of the ypos property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Integer }
+         *     
+         */
+        public Integer getYpos() {
+            return ypos;
+        }
+
+        /**
+         * Sets the value of the ypos property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Integer }
+         *     
+         */
+        public void setYpos(Integer value) {
+            this.ypos = value;
+        }
+
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;sequence>
+     *         &lt;element name="UserColourScheme" type="{www.jalview.org/colours}JalviewUserColours"/>
+     *       &lt;/sequence>
+     *       &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "userColourScheme"
+    })
+    public static class UserColours {
+
+        @XmlElement(name = "UserColourScheme", namespace = "www.jalview.org", required = true)
+        protected JalviewUserColours userColourScheme;
+        @XmlAttribute(name = "id")
+        protected String id;
+
+        /**
+         * Gets the value of the userColourScheme property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link JalviewUserColours }
+         *     
+         */
+        public JalviewUserColours getUserColourScheme() {
+            return userColourScheme;
+        }
+
+        /**
+         * Sets the value of the userColourScheme property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link JalviewUserColours }
+         *     
+         */
+        public void setUserColourScheme(JalviewUserColours value) {
+            this.userColourScheme = value;
+        }
+
+        /**
+         * Gets the value of the id property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getId() {
+            return id;
+        }
+
+        /**
+         * Sets the value of the id property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setId(String value) {
+            this.id = value;
+        }
+
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;sequence>
+     *         &lt;element name="AnnotationColours" type="{www.jalview.org}AnnotationColourScheme" minOccurs="0"/>
+     *         &lt;element name="hiddenColumns" maxOccurs="unbounded" minOccurs="0">
+     *           &lt;complexType>
+     *             &lt;complexContent>
+     *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                 &lt;attribute name="start" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *                 &lt;attribute name="end" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *               &lt;/restriction>
+     *             &lt;/complexContent>
+     *           &lt;/complexType>
+     *         &lt;/element>
+     *         &lt;element name="calcIdParam" maxOccurs="unbounded" minOccurs="0">
+     *           &lt;complexType>
+     *             &lt;complexContent>
+     *               &lt;extension base="{www.jalview.org/xml/wsparamset}WebServiceParameterSet">
+     *                 &lt;attribute name="calcId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *                 &lt;attribute name="needsUpdate" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+     *                 &lt;attribute name="autoUpdate" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+     *               &lt;/extension>
+     *             &lt;/complexContent>
+     *           &lt;/complexType>
+     *         &lt;/element>
+     *       &lt;/sequence>
+     *       &lt;attGroup ref="{www.jalview.org}swingwindow"/>
+     *       &lt;attribute name="conservationSelected" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+     *       &lt;attribute name="pidSelected" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+     *       &lt;attribute name="bgColour" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *       &lt;attribute name="consThreshold" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *       &lt;attribute name="pidThreshold" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *       &lt;attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *       &lt;attribute name="showFullId" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+     *       &lt;attribute name="rightAlignIds" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+     *       &lt;attribute name="showText" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+     *       &lt;attribute name="showColourText" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+     *       &lt;attribute name="showUnconserved" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+     *       &lt;attribute name="showBoxes" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+     *       &lt;attribute name="wrapAlignment" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+     *       &lt;attribute name="renderGaps" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+     *       &lt;attribute name="showSequenceFeatures" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+     *       &lt;attribute name="showNPfeatureTooltip" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+     *       &lt;attribute name="showDbRefTooltip" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+     *       &lt;attribute name="followHighlight" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
+     *       &lt;attribute name="followSelection" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
+     *       &lt;attribute name="showAnnotation" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+     *       &lt;attribute name="centreColumnLabels" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+     *       &lt;attribute name="showGroupConservation" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+     *       &lt;attribute name="showGroupConsensus" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+     *       &lt;attribute name="showConsensusHistogram" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
+     *       &lt;attribute name="showSequenceLogo" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+     *       &lt;attribute name="normaliseSequenceLogo" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+     *       &lt;attribute name="ignoreGapsinConsensus" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
+     *       &lt;attribute name="startRes" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *       &lt;attribute name="startSeq" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *       &lt;attribute name="fontName" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *       &lt;attribute name="fontSize" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *       &lt;attribute name="fontStyle" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *       &lt;attribute name="scaleProteinAsCdna" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
+     *       &lt;attribute name="viewName" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *       &lt;attribute name="sequenceSetId" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *       &lt;attribute name="gatheredViews" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+     *       &lt;attribute name="textCol1" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *       &lt;attribute name="textCol2" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *       &lt;attribute name="textColThreshold" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *       &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+     *       &lt;attribute name="complementId" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "annotationColours",
+        "hiddenColumns",
+        "calcIdParam"
+    })
+    public static class Viewport {
+
+        @XmlElement(name = "AnnotationColours", namespace = "www.jalview.org")
+        protected AnnotationColourScheme annotationColours;
+        @XmlElement(namespace = "www.jalview.org")
+        protected List<JalviewModel.Viewport.HiddenColumns> hiddenColumns;
+        @XmlElement(namespace = "www.jalview.org")
+        protected List<JalviewModel.Viewport.CalcIdParam> calcIdParam;
+        @XmlAttribute(name = "conservationSelected")
+        protected Boolean conservationSelected;
+        @XmlAttribute(name = "pidSelected")
+        protected Boolean pidSelected;
+        @XmlAttribute(name = "bgColour")
+        protected String bgColour;
+        @XmlAttribute(name = "consThreshold")
+        protected Integer consThreshold;
+        @XmlAttribute(name = "pidThreshold")
+        protected Integer pidThreshold;
+        @XmlAttribute(name = "title")
+        protected String title;
+        @XmlAttribute(name = "showFullId")
+        protected Boolean showFullId;
+        @XmlAttribute(name = "rightAlignIds")
+        protected Boolean rightAlignIds;
+        @XmlAttribute(name = "showText")
+        protected Boolean showText;
+        @XmlAttribute(name = "showColourText")
+        protected Boolean showColourText;
+        @XmlAttribute(name = "showUnconserved")
+        protected Boolean showUnconserved;
+        @XmlAttribute(name = "showBoxes")
+        protected Boolean showBoxes;
+        @XmlAttribute(name = "wrapAlignment")
+        protected Boolean wrapAlignment;
+        @XmlAttribute(name = "renderGaps")
+        protected Boolean renderGaps;
+        @XmlAttribute(name = "showSequenceFeatures")
+        protected Boolean showSequenceFeatures;
+        @XmlAttribute(name = "showNPfeatureTooltip")
+        protected Boolean showNPfeatureTooltip;
+        @XmlAttribute(name = "showDbRefTooltip")
+        protected Boolean showDbRefTooltip;
+        @XmlAttribute(name = "followHighlight")
+        protected Boolean followHighlight;
+        @XmlAttribute(name = "followSelection")
+        protected Boolean followSelection;
+        @XmlAttribute(name = "showAnnotation")
+        protected Boolean showAnnotation;
+        @XmlAttribute(name = "centreColumnLabels")
+        protected Boolean centreColumnLabels;
+        @XmlAttribute(name = "showGroupConservation")
+        protected Boolean showGroupConservation;
+        @XmlAttribute(name = "showGroupConsensus")
+        protected Boolean showGroupConsensus;
+        @XmlAttribute(name = "showConsensusHistogram")
+        protected Boolean showConsensusHistogram;
+        @XmlAttribute(name = "showSequenceLogo")
+        protected Boolean showSequenceLogo;
+        @XmlAttribute(name = "normaliseSequenceLogo")
+        protected Boolean normaliseSequenceLogo;
+        @XmlAttribute(name = "ignoreGapsinConsensus")
+        protected Boolean ignoreGapsinConsensus;
+        @XmlAttribute(name = "startRes")
+        protected Integer startRes;
+        @XmlAttribute(name = "startSeq")
+        protected Integer startSeq;
+        @XmlAttribute(name = "fontName")
+        protected String fontName;
+        @XmlAttribute(name = "fontSize")
+        protected Integer fontSize;
+        @XmlAttribute(name = "fontStyle")
+        protected Integer fontStyle;
+        @XmlAttribute(name = "scaleProteinAsCdna")
+        protected Boolean scaleProteinAsCdna;
+        @XmlAttribute(name = "viewName")
+        protected String viewName;
+        @XmlAttribute(name = "sequenceSetId")
+        protected String sequenceSetId;
+        @XmlAttribute(name = "gatheredViews")
+        protected Boolean gatheredViews;
+        @XmlAttribute(name = "textCol1")
+        protected Integer textCol1;
+        @XmlAttribute(name = "textCol2")
+        protected Integer textCol2;
+        @XmlAttribute(name = "textColThreshold")
+        protected Integer textColThreshold;
+        @XmlAttribute(name = "id")
+        @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+        @XmlID
+        @XmlSchemaType(name = "ID")
+        protected String id;
+        @XmlAttribute(name = "complementId")
+        protected String complementId;
+        @XmlAttribute(name = "width")
+        protected Integer width;
+        @XmlAttribute(name = "height")
+        protected Integer height;
+        @XmlAttribute(name = "xpos")
+        protected Integer xpos;
+        @XmlAttribute(name = "ypos")
+        protected Integer ypos;
+
+        /**
+         * Gets the value of the annotationColours property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link AnnotationColourScheme }
+         *     
+         */
+        public AnnotationColourScheme getAnnotationColours() {
+            return annotationColours;
+        }
+
+        /**
+         * Sets the value of the annotationColours property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link AnnotationColourScheme }
+         *     
+         */
+        public void setAnnotationColours(AnnotationColourScheme value) {
+            this.annotationColours = value;
+        }
+
+        /**
+         * Gets the value of the hiddenColumns property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the hiddenColumns property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getHiddenColumns().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link JalviewModel.Viewport.HiddenColumns }
+         * 
+         * 
+         */
+        public List<JalviewModel.Viewport.HiddenColumns> getHiddenColumns() {
+            if (hiddenColumns == null) {
+                hiddenColumns = new ArrayList<JalviewModel.Viewport.HiddenColumns>();
+            }
+            return this.hiddenColumns;
+        }
+
+        /**
+         * Gets the value of the calcIdParam property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the calcIdParam property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getCalcIdParam().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link JalviewModel.Viewport.CalcIdParam }
+         * 
+         * 
+         */
+        public List<JalviewModel.Viewport.CalcIdParam> getCalcIdParam() {
+            if (calcIdParam == null) {
+                calcIdParam = new ArrayList<JalviewModel.Viewport.CalcIdParam>();
+            }
+            return this.calcIdParam;
+        }
+
+        /**
+         * Gets the value of the conservationSelected property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public Boolean isConservationSelected() {
+            return conservationSelected;
+        }
+
+        /**
+         * Sets the value of the conservationSelected property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setConservationSelected(Boolean value) {
+            this.conservationSelected = value;
+        }
+
+        /**
+         * Gets the value of the pidSelected property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public Boolean isPidSelected() {
+            return pidSelected;
+        }
+
+        /**
+         * Sets the value of the pidSelected property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setPidSelected(Boolean value) {
+            this.pidSelected = value;
+        }
+
+        /**
+         * Gets the value of the bgColour property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getBgColour() {
+            return bgColour;
+        }
+
+        /**
+         * Sets the value of the bgColour property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setBgColour(String value) {
+            this.bgColour = value;
+        }
+
+        /**
+         * Gets the value of the consThreshold property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Integer }
+         *     
+         */
+        public Integer getConsThreshold() {
+            return consThreshold;
+        }
+
+        /**
+         * Sets the value of the consThreshold property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Integer }
+         *     
+         */
+        public void setConsThreshold(Integer value) {
+            this.consThreshold = value;
+        }
+
+        /**
+         * Gets the value of the pidThreshold property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Integer }
+         *     
+         */
+        public Integer getPidThreshold() {
+            return pidThreshold;
+        }
+
+        /**
+         * Sets the value of the pidThreshold property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Integer }
+         *     
+         */
+        public void setPidThreshold(Integer value) {
+            this.pidThreshold = value;
+        }
+
+        /**
+         * Gets the value of the title property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getTitle() {
+            return title;
+        }
+
+        /**
+         * Sets the value of the title property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setTitle(String value) {
+            this.title = value;
+        }
+
+        /**
+         * Gets the value of the showFullId property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public Boolean isShowFullId() {
+            return showFullId;
+        }
+
+        /**
+         * Sets the value of the showFullId property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setShowFullId(Boolean value) {
+            this.showFullId = value;
+        }
+
+        /**
+         * Gets the value of the rightAlignIds property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public Boolean isRightAlignIds() {
+            return rightAlignIds;
+        }
+
+        /**
+         * Sets the value of the rightAlignIds property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setRightAlignIds(Boolean value) {
+            this.rightAlignIds = value;
+        }
+
+        /**
+         * Gets the value of the showText property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public Boolean isShowText() {
+            return showText;
+        }
+
+        /**
+         * Sets the value of the showText property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setShowText(Boolean value) {
+            this.showText = value;
+        }
+
+        /**
+         * Gets the value of the showColourText property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public Boolean isShowColourText() {
+            return showColourText;
+        }
+
+        /**
+         * Sets the value of the showColourText property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setShowColourText(Boolean value) {
+            this.showColourText = value;
+        }
+
+        /**
+         * Gets the value of the showUnconserved property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public boolean isShowUnconserved() {
+            if (showUnconserved == null) {
+                return false;
+            } else {
+                return showUnconserved;
+            }
+        }
+
+        /**
+         * Sets the value of the showUnconserved property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setShowUnconserved(Boolean value) {
+            this.showUnconserved = value;
+        }
+
+        /**
+         * Gets the value of the showBoxes property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public Boolean isShowBoxes() {
+            return showBoxes;
+        }
+
+        /**
+         * Sets the value of the showBoxes property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setShowBoxes(Boolean value) {
+            this.showBoxes = value;
+        }
+
+        /**
+         * Gets the value of the wrapAlignment property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public Boolean isWrapAlignment() {
+            return wrapAlignment;
+        }
+
+        /**
+         * Sets the value of the wrapAlignment property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setWrapAlignment(Boolean value) {
+            this.wrapAlignment = value;
+        }
+
+        /**
+         * Gets the value of the renderGaps property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public Boolean isRenderGaps() {
+            return renderGaps;
+        }
+
+        /**
+         * Sets the value of the renderGaps property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setRenderGaps(Boolean value) {
+            this.renderGaps = value;
+        }
+
+        /**
+         * Gets the value of the showSequenceFeatures property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public Boolean isShowSequenceFeatures() {
+            return showSequenceFeatures;
+        }
+
+        /**
+         * Sets the value of the showSequenceFeatures property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setShowSequenceFeatures(Boolean value) {
+            this.showSequenceFeatures = value;
+        }
+
+        /**
+         * Gets the value of the showNPfeatureTooltip property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public Boolean isShowNPfeatureTooltip() {
+            return showNPfeatureTooltip;
+        }
+
+        /**
+         * Sets the value of the showNPfeatureTooltip property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setShowNPfeatureTooltip(Boolean value) {
+            this.showNPfeatureTooltip = value;
+        }
+
+        /**
+         * Gets the value of the showDbRefTooltip property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public Boolean isShowDbRefTooltip() {
+            return showDbRefTooltip;
+        }
+
+        /**
+         * Sets the value of the showDbRefTooltip property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setShowDbRefTooltip(Boolean value) {
+            this.showDbRefTooltip = value;
+        }
+
+        /**
+         * Gets the value of the followHighlight property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public boolean isFollowHighlight() {
+            if (followHighlight == null) {
+                return true;
+            } else {
+                return followHighlight;
+            }
+        }
+
+        /**
+         * Sets the value of the followHighlight property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setFollowHighlight(Boolean value) {
+            this.followHighlight = value;
+        }
+
+        /**
+         * Gets the value of the followSelection property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public boolean isFollowSelection() {
+            if (followSelection == null) {
+                return true;
+            } else {
+                return followSelection;
+            }
+        }
+
+        /**
+         * Sets the value of the followSelection property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setFollowSelection(Boolean value) {
+            this.followSelection = value;
+        }
+
+        /**
+         * Gets the value of the showAnnotation property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public Boolean isShowAnnotation() {
+            return showAnnotation;
+        }
+
+        /**
+         * Sets the value of the showAnnotation property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setShowAnnotation(Boolean value) {
+            this.showAnnotation = value;
+        }
+
+        /**
+         * Gets the value of the centreColumnLabels property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public boolean isCentreColumnLabels() {
+            if (centreColumnLabels == null) {
+                return false;
+            } else {
+                return centreColumnLabels;
+            }
+        }
+
+        /**
+         * Sets the value of the centreColumnLabels property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setCentreColumnLabels(Boolean value) {
+            this.centreColumnLabels = value;
+        }
+
+        /**
+         * Gets the value of the showGroupConservation property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public boolean isShowGroupConservation() {
+            if (showGroupConservation == null) {
+                return false;
+            } else {
+                return showGroupConservation;
+            }
+        }
+
+        /**
+         * Sets the value of the showGroupConservation property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setShowGroupConservation(Boolean value) {
+            this.showGroupConservation = value;
+        }
+
+        /**
+         * Gets the value of the showGroupConsensus property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public boolean isShowGroupConsensus() {
+            if (showGroupConsensus == null) {
+                return false;
+            } else {
+                return showGroupConsensus;
+            }
+        }
+
+        /**
+         * Sets the value of the showGroupConsensus property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setShowGroupConsensus(Boolean value) {
+            this.showGroupConsensus = value;
+        }
+
+        /**
+         * Gets the value of the showConsensusHistogram property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public boolean isShowConsensusHistogram() {
+            if (showConsensusHistogram == null) {
+                return true;
+            } else {
+                return showConsensusHistogram;
+            }
+        }
+
+        /**
+         * Sets the value of the showConsensusHistogram property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setShowConsensusHistogram(Boolean value) {
+            this.showConsensusHistogram = value;
+        }
+
+        /**
+         * Gets the value of the showSequenceLogo property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public boolean isShowSequenceLogo() {
+            if (showSequenceLogo == null) {
+                return false;
+            } else {
+                return showSequenceLogo;
+            }
+        }
+
+        /**
+         * Sets the value of the showSequenceLogo property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setShowSequenceLogo(Boolean value) {
+            this.showSequenceLogo = value;
+        }
+
+        /**
+         * Gets the value of the normaliseSequenceLogo property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public boolean isNormaliseSequenceLogo() {
+            if (normaliseSequenceLogo == null) {
+                return false;
+            } else {
+                return normaliseSequenceLogo;
+            }
+        }
+
+        /**
+         * Sets the value of the normaliseSequenceLogo property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setNormaliseSequenceLogo(Boolean value) {
+            this.normaliseSequenceLogo = value;
+        }
+
+        /**
+         * Gets the value of the ignoreGapsinConsensus property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public boolean isIgnoreGapsinConsensus() {
+            if (ignoreGapsinConsensus == null) {
+                return true;
+            } else {
+                return ignoreGapsinConsensus;
+            }
+        }
+
+        /**
+         * Sets the value of the ignoreGapsinConsensus property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setIgnoreGapsinConsensus(Boolean value) {
+            this.ignoreGapsinConsensus = value;
+        }
+
+        /**
+         * Gets the value of the startRes property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Integer }
+         *     
+         */
+        public Integer getStartRes() {
+            return startRes;
+        }
+
+        /**
+         * Sets the value of the startRes property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Integer }
+         *     
+         */
+        public void setStartRes(Integer value) {
+            this.startRes = value;
+        }
+
+        /**
+         * Gets the value of the startSeq property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Integer }
+         *     
+         */
+        public Integer getStartSeq() {
+            return startSeq;
+        }
+
+        /**
+         * Sets the value of the startSeq property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Integer }
+         *     
+         */
+        public void setStartSeq(Integer value) {
+            this.startSeq = value;
+        }
+
+        /**
+         * Gets the value of the fontName property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getFontName() {
+            return fontName;
+        }
+
+        /**
+         * Sets the value of the fontName property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setFontName(String value) {
+            this.fontName = value;
+        }
+
+        /**
+         * Gets the value of the fontSize property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Integer }
+         *     
+         */
+        public Integer getFontSize() {
+            return fontSize;
+        }
+
+        /**
+         * Sets the value of the fontSize property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Integer }
+         *     
+         */
+        public void setFontSize(Integer value) {
+            this.fontSize = value;
+        }
+
+        /**
+         * Gets the value of the fontStyle property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Integer }
+         *     
+         */
+        public Integer getFontStyle() {
+            return fontStyle;
+        }
+
+        /**
+         * Sets the value of the fontStyle property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Integer }
+         *     
+         */
+        public void setFontStyle(Integer value) {
+            this.fontStyle = value;
+        }
+
+        /**
+         * Gets the value of the scaleProteinAsCdna property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public boolean isScaleProteinAsCdna() {
+            if (scaleProteinAsCdna == null) {
+                return true;
+            } else {
+                return scaleProteinAsCdna;
+            }
+        }
+
+        /**
+         * Sets the value of the scaleProteinAsCdna property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setScaleProteinAsCdna(Boolean value) {
+            this.scaleProteinAsCdna = value;
+        }
+
+        /**
+         * Gets the value of the viewName property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getViewName() {
+            return viewName;
+        }
+
+        /**
+         * Sets the value of the viewName property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setViewName(String value) {
+            this.viewName = value;
+        }
+
+        /**
+         * Gets the value of the sequenceSetId property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getSequenceSetId() {
+            return sequenceSetId;
+        }
+
+        /**
+         * Sets the value of the sequenceSetId property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setSequenceSetId(String value) {
+            this.sequenceSetId = value;
+        }
+
+        /**
+         * Gets the value of the gatheredViews property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public Boolean isGatheredViews() {
+            return gatheredViews;
+        }
+
+        /**
+         * Sets the value of the gatheredViews property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setGatheredViews(Boolean value) {
+            this.gatheredViews = value;
+        }
+
+        /**
+         * Gets the value of the textCol1 property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Integer }
+         *     
+         */
+        public Integer getTextCol1() {
+            return textCol1;
+        }
+
+        /**
+         * Sets the value of the textCol1 property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Integer }
+         *     
+         */
+        public void setTextCol1(Integer value) {
+            this.textCol1 = value;
+        }
+
+        /**
+         * Gets the value of the textCol2 property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Integer }
+         *     
+         */
+        public Integer getTextCol2() {
+            return textCol2;
+        }
+
+        /**
+         * Sets the value of the textCol2 property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Integer }
+         *     
+         */
+        public void setTextCol2(Integer value) {
+            this.textCol2 = value;
+        }
+
+        /**
+         * Gets the value of the textColThreshold property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Integer }
+         *     
+         */
+        public Integer getTextColThreshold() {
+            return textColThreshold;
+        }
+
+        /**
+         * Sets the value of the textColThreshold property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Integer }
+         *     
+         */
+        public void setTextColThreshold(Integer value) {
+            this.textColThreshold = value;
+        }
+
+        /**
+         * Gets the value of the id property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getId() {
+            return id;
+        }
+
+        /**
+         * Sets the value of the id property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setId(String value) {
+            this.id = value;
+        }
+
+        /**
+         * Gets the value of the complementId property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getComplementId() {
+            return complementId;
+        }
+
+        /**
+         * Sets the value of the complementId property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setComplementId(String value) {
+            this.complementId = value;
+        }
+
+        /**
+         * Gets the value of the width property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Integer }
+         *     
+         */
+        public Integer getWidth() {
+            return width;
+        }
+
+        /**
+         * Sets the value of the width property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Integer }
+         *     
+         */
+        public void setWidth(Integer value) {
+            this.width = value;
+        }
+
+        /**
+         * Gets the value of the height property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Integer }
+         *     
+         */
+        public Integer getHeight() {
+            return height;
+        }
+
+        /**
+         * Sets the value of the height property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Integer }
+         *     
+         */
+        public void setHeight(Integer value) {
+            this.height = value;
+        }
+
+        /**
+         * Gets the value of the xpos property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Integer }
+         *     
+         */
+        public Integer getXpos() {
+            return xpos;
+        }
+
+        /**
+         * Sets the value of the xpos property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Integer }
+         *     
+         */
+        public void setXpos(Integer value) {
+            this.xpos = value;
+        }
+
+        /**
+         * Gets the value of the ypos property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Integer }
+         *     
+         */
+        public Integer getYpos() {
+            return ypos;
+        }
+
+        /**
+         * Sets the value of the ypos property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Integer }
+         *     
+         */
+        public void setYpos(Integer value) {
+            this.ypos = value;
+        }
+
+
+        /**
+         * <p>Java class for anonymous complex type.
+         * 
+         * <p>The following schema fragment specifies the expected content contained within this class.
+         * 
+         * <pre>
+         * &lt;complexType>
+         *   &lt;complexContent>
+         *     &lt;extension base="{www.jalview.org/xml/wsparamset}WebServiceParameterSet">
+         *       &lt;attribute name="calcId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+         *       &lt;attribute name="needsUpdate" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+         *       &lt;attribute name="autoUpdate" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+         *     &lt;/extension>
+         *   &lt;/complexContent>
+         * &lt;/complexType>
+         * </pre>
+         * 
+         * 
+         */
+        @XmlAccessorType(XmlAccessType.FIELD)
+        @XmlType(name = "")
+        public static class CalcIdParam
+            extends WebServiceParameterSet
+        {
+
+            @XmlAttribute(name = "calcId", required = true)
+            protected String calcId;
+            @XmlAttribute(name = "needsUpdate")
+            protected Boolean needsUpdate;
+            @XmlAttribute(name = "autoUpdate", required = true)
+            protected boolean autoUpdate;
+
+            /**
+             * Gets the value of the calcId property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link String }
+             *     
+             */
+            public String getCalcId() {
+                return calcId;
+            }
+
+            /**
+             * Sets the value of the calcId property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link String }
+             *     
+             */
+            public void setCalcId(String value) {
+                this.calcId = value;
+            }
+
+            /**
+             * Gets the value of the needsUpdate property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link Boolean }
+             *     
+             */
+            public boolean isNeedsUpdate() {
+                if (needsUpdate == null) {
+                    return false;
+                } else {
+                    return needsUpdate;
+                }
+            }
+
+            /**
+             * Sets the value of the needsUpdate property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link Boolean }
+             *     
+             */
+            public void setNeedsUpdate(Boolean value) {
+                this.needsUpdate = value;
+            }
+
+            /**
+             * Gets the value of the autoUpdate property.
+             * 
+             */
+            public boolean isAutoUpdate() {
+                return autoUpdate;
+            }
+
+            /**
+             * Sets the value of the autoUpdate property.
+             * 
+             */
+            public void setAutoUpdate(boolean value) {
+                this.autoUpdate = value;
+            }
+
+        }
+
+
+        /**
+         * <p>Java class for anonymous complex type.
+         * 
+         * <p>The following schema fragment specifies the expected content contained within this class.
+         * 
+         * <pre>
+         * &lt;complexType>
+         *   &lt;complexContent>
+         *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *       &lt;attribute name="start" type="{http://www.w3.org/2001/XMLSchema}int" />
+         *       &lt;attribute name="end" type="{http://www.w3.org/2001/XMLSchema}int" />
+         *     &lt;/restriction>
+         *   &lt;/complexContent>
+         * &lt;/complexType>
+         * </pre>
+         * 
+         * 
+         */
+        @XmlAccessorType(XmlAccessType.FIELD)
+        @XmlType(name = "")
+        public static class HiddenColumns {
+
+            @XmlAttribute(name = "start")
+            protected Integer start;
+            @XmlAttribute(name = "end")
+            protected Integer end;
+
+            /**
+             * Gets the value of the start property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link Integer }
+             *     
+             */
+            public Integer getStart() {
+                return start;
+            }
+
+            /**
+             * Sets the value of the start property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link Integer }
+             *     
+             */
+            public void setStart(Integer value) {
+                this.start = value;
+            }
+
+            /**
+             * Gets the value of the end property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link Integer }
+             *     
+             */
+            public Integer getEnd() {
+                return end;
+            }
+
+            /**
+             * Sets the value of the end property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link Integer }
+             *     
+             */
+            public void setEnd(Integer value) {
+                this.end = value;
+            }
+
+        }
+
+    }
+
+}
diff --git a/src/jalview/xml/binding/jalview/JalviewUserColours.java b/src/jalview/xml/binding/jalview/JalviewUserColours.java
new file mode 100644 (file)
index 0000000..701647c
--- /dev/null
@@ -0,0 +1,612 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.12.20 at 11:47:26 AM GMT 
+//
+
+
+package jalview.xml.binding.jalview;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for JalviewUserColours complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="JalviewUserColours">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="Version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="colour" maxOccurs="unbounded" minOccurs="0">
+ *           &lt;complexType>
+ *             &lt;complexContent>
+ *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 &lt;sequence>
+ *                   &lt;element name="attributeName" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="2" minOccurs="0"/>
+ *                 &lt;/sequence>
+ *                 &lt;attribute name="Name" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                 &lt;attribute name="RGB" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                 &lt;attribute name="minRGB" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                 &lt;attribute name="noValueColour" type="{www.jalview.org/colours}NoValueColour" default="Min" />
+ *                 &lt;attribute name="threshType" type="{www.jalview.org/colours}ThresholdType" />
+ *                 &lt;attribute name="threshold" type="{http://www.w3.org/2001/XMLSchema}float" />
+ *                 &lt;attribute name="max" type="{http://www.w3.org/2001/XMLSchema}float" />
+ *                 &lt;attribute name="min" type="{http://www.w3.org/2001/XMLSchema}float" />
+ *                 &lt;attribute name="colourByLabel" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *                 &lt;attribute name="autoScale" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *               &lt;/restriction>
+ *             &lt;/complexContent>
+ *           &lt;/complexType>
+ *         &lt;/element>
+ *         &lt;element name="filter" maxOccurs="unbounded" minOccurs="0">
+ *           &lt;complexType>
+ *             &lt;complexContent>
+ *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 &lt;sequence>
+ *                   &lt;element name="matcherSet" type="{www.jalview.org/colours}FeatureMatcherSet"/>
+ *                 &lt;/sequence>
+ *                 &lt;attribute name="featureType" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *               &lt;/restriction>
+ *             &lt;/complexContent>
+ *           &lt;/complexType>
+ *         &lt;/element>
+ *       &lt;/sequence>
+ *       &lt;attribute name="schemeName" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "JalviewUserColours", namespace = "www.jalview.org/colours", propOrder = {
+    "version",
+    "colour",
+    "filter"
+})
+public class JalviewUserColours {
+
+    @XmlElement(name = "Version", namespace = "")
+    protected String version;
+    @XmlElement(namespace = "")
+    protected List<JalviewUserColours.Colour> colour;
+    @XmlElement(namespace = "")
+    protected List<JalviewUserColours.Filter> filter;
+    @XmlAttribute(name = "schemeName")
+    protected String schemeName;
+
+    /**
+     * Gets the value of the version property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVersion() {
+        return version;
+    }
+
+    /**
+     * Sets the value of the version property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVersion(String value) {
+        this.version = value;
+    }
+
+    /**
+     * Gets the value of the colour property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the colour property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getColour().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link JalviewUserColours.Colour }
+     * 
+     * 
+     */
+    public List<JalviewUserColours.Colour> getColour() {
+        if (colour == null) {
+            colour = new ArrayList<JalviewUserColours.Colour>();
+        }
+        return this.colour;
+    }
+
+    /**
+     * Gets the value of the filter property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the filter property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getFilter().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link JalviewUserColours.Filter }
+     * 
+     * 
+     */
+    public List<JalviewUserColours.Filter> getFilter() {
+        if (filter == null) {
+            filter = new ArrayList<JalviewUserColours.Filter>();
+        }
+        return this.filter;
+    }
+
+    /**
+     * Gets the value of the schemeName property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getSchemeName() {
+        return schemeName;
+    }
+
+    /**
+     * Sets the value of the schemeName property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setSchemeName(String value) {
+        this.schemeName = value;
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;sequence>
+     *         &lt;element name="attributeName" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="2" minOccurs="0"/>
+     *       &lt;/sequence>
+     *       &lt;attribute name="Name" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *       &lt;attribute name="RGB" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *       &lt;attribute name="minRGB" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *       &lt;attribute name="noValueColour" type="{www.jalview.org/colours}NoValueColour" default="Min" />
+     *       &lt;attribute name="threshType" type="{www.jalview.org/colours}ThresholdType" />
+     *       &lt;attribute name="threshold" type="{http://www.w3.org/2001/XMLSchema}float" />
+     *       &lt;attribute name="max" type="{http://www.w3.org/2001/XMLSchema}float" />
+     *       &lt;attribute name="min" type="{http://www.w3.org/2001/XMLSchema}float" />
+     *       &lt;attribute name="colourByLabel" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+     *       &lt;attribute name="autoScale" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "attributeName"
+    })
+    public static class Colour {
+
+        @XmlElement(namespace = "")
+        protected List<String> attributeName;
+        @XmlAttribute(name = "Name")
+        protected String name;
+        @XmlAttribute(name = "RGB", required = true)
+        protected String rgb;
+        @XmlAttribute(name = "minRGB")
+        protected String minRGB;
+        @XmlAttribute(name = "noValueColour")
+        protected NoValueColour noValueColour;
+        @XmlAttribute(name = "threshType")
+        protected ThresholdType threshType;
+        @XmlAttribute(name = "threshold")
+        protected Float threshold;
+        @XmlAttribute(name = "max")
+        protected Float max;
+        @XmlAttribute(name = "min")
+        protected Float min;
+        @XmlAttribute(name = "colourByLabel")
+        protected Boolean colourByLabel;
+        @XmlAttribute(name = "autoScale")
+        protected Boolean autoScale;
+
+        /**
+         * Gets the value of the attributeName property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the attributeName property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getAttributeName().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link String }
+         * 
+         * 
+         */
+        public List<String> getAttributeName() {
+            if (attributeName == null) {
+                attributeName = new ArrayList<String>();
+            }
+            return this.attributeName;
+        }
+
+        /**
+         * Gets the value of the name property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getName() {
+            return name;
+        }
+
+        /**
+         * Sets the value of the name property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setName(String value) {
+            this.name = value;
+        }
+
+        /**
+         * Gets the value of the rgb property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getRGB() {
+            return rgb;
+        }
+
+        /**
+         * Sets the value of the rgb property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setRGB(String value) {
+            this.rgb = value;
+        }
+
+        /**
+         * Gets the value of the minRGB property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getMinRGB() {
+            return minRGB;
+        }
+
+        /**
+         * Sets the value of the minRGB property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setMinRGB(String value) {
+            this.minRGB = value;
+        }
+
+        /**
+         * Gets the value of the noValueColour property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link NoValueColour }
+         *     
+         */
+        public NoValueColour getNoValueColour() {
+            if (noValueColour == null) {
+                return NoValueColour.MIN;
+            } else {
+                return noValueColour;
+            }
+        }
+
+        /**
+         * Sets the value of the noValueColour property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link NoValueColour }
+         *     
+         */
+        public void setNoValueColour(NoValueColour value) {
+            this.noValueColour = value;
+        }
+
+        /**
+         * Gets the value of the threshType property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link ThresholdType }
+         *     
+         */
+        public ThresholdType getThreshType() {
+            return threshType;
+        }
+
+        /**
+         * Sets the value of the threshType property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link ThresholdType }
+         *     
+         */
+        public void setThreshType(ThresholdType value) {
+            this.threshType = value;
+        }
+
+        /**
+         * Gets the value of the threshold property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Float }
+         *     
+         */
+        public Float getThreshold() {
+            return threshold;
+        }
+
+        /**
+         * Sets the value of the threshold property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Float }
+         *     
+         */
+        public void setThreshold(Float value) {
+            this.threshold = value;
+        }
+
+        /**
+         * Gets the value of the max property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Float }
+         *     
+         */
+        public Float getMax() {
+            return max;
+        }
+
+        /**
+         * Sets the value of the max property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Float }
+         *     
+         */
+        public void setMax(Float value) {
+            this.max = value;
+        }
+
+        /**
+         * Gets the value of the min property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Float }
+         *     
+         */
+        public Float getMin() {
+            return min;
+        }
+
+        /**
+         * Sets the value of the min property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Float }
+         *     
+         */
+        public void setMin(Float value) {
+            this.min = value;
+        }
+
+        /**
+         * Gets the value of the colourByLabel property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public Boolean isColourByLabel() {
+            return colourByLabel;
+        }
+
+        /**
+         * Sets the value of the colourByLabel property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setColourByLabel(Boolean value) {
+            this.colourByLabel = value;
+        }
+
+        /**
+         * Gets the value of the autoScale property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Boolean }
+         *     
+         */
+        public Boolean isAutoScale() {
+            return autoScale;
+        }
+
+        /**
+         * Sets the value of the autoScale property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Boolean }
+         *     
+         */
+        public void setAutoScale(Boolean value) {
+            this.autoScale = value;
+        }
+
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;sequence>
+     *         &lt;element name="matcherSet" type="{www.jalview.org/colours}FeatureMatcherSet"/>
+     *       &lt;/sequence>
+     *       &lt;attribute name="featureType" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "matcherSet"
+    })
+    public static class Filter {
+
+        @XmlElement(namespace = "", required = true)
+        protected FeatureMatcherSet matcherSet;
+        @XmlAttribute(name = "featureType", required = true)
+        protected String featureType;
+
+        /**
+         * Gets the value of the matcherSet property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link FeatureMatcherSet }
+         *     
+         */
+        public FeatureMatcherSet getMatcherSet() {
+            return matcherSet;
+        }
+
+        /**
+         * Sets the value of the matcherSet property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link FeatureMatcherSet }
+         *     
+         */
+        public void setMatcherSet(FeatureMatcherSet value) {
+            this.matcherSet = value;
+        }
+
+        /**
+         * Gets the value of the featureType property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getFeatureType() {
+            return featureType;
+        }
+
+        /**
+         * Sets the value of the featureType property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setFeatureType(String value) {
+            this.featureType = value;
+        }
+
+    }
+
+}
diff --git a/src/jalview/xml/binding/jalview/MapListType.java b/src/jalview/xml/binding/jalview/MapListType.java
new file mode 100644 (file)
index 0000000..3d7b5eb
--- /dev/null
@@ -0,0 +1,315 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.12.20 at 11:47:26 AM GMT 
+//
+
+
+package jalview.xml.binding.jalview;
+
+import java.math.BigInteger;
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * 
+ *                             This effectively represents a java.util.MapList object
+ *                     
+ * 
+ * <p>Java class for mapListType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="mapListType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="mapListFrom" maxOccurs="unbounded" minOccurs="0">
+ *           &lt;complexType>
+ *             &lt;complexContent>
+ *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 &lt;attribute name="start" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *                 &lt;attribute name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *               &lt;/restriction>
+ *             &lt;/complexContent>
+ *           &lt;/complexType>
+ *         &lt;/element>
+ *         &lt;element name="mapListTo" maxOccurs="unbounded" minOccurs="0">
+ *           &lt;complexType>
+ *             &lt;complexContent>
+ *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 &lt;attribute name="start" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *                 &lt;attribute name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *               &lt;/restriction>
+ *             &lt;/complexContent>
+ *           &lt;/complexType>
+ *         &lt;/element>
+ *       &lt;/sequence>
+ *       &lt;attribute name="mapFromUnit" use="required" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />
+ *       &lt;attribute name="mapToUnit" use="required" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "mapListType", propOrder = {
+    "mapListFrom",
+    "mapListTo"
+})
+@XmlSeeAlso({
+    Mapping.class
+})
+public class MapListType {
+
+    protected List<MapListType.MapListFrom> mapListFrom;
+    protected List<MapListType.MapListTo> mapListTo;
+    @XmlAttribute(name = "mapFromUnit", required = true)
+    @XmlSchemaType(name = "positiveInteger")
+    protected BigInteger mapFromUnit;
+    @XmlAttribute(name = "mapToUnit", required = true)
+    @XmlSchemaType(name = "positiveInteger")
+    protected BigInteger mapToUnit;
+
+    /**
+     * Gets the value of the mapListFrom property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the mapListFrom property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getMapListFrom().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link MapListType.MapListFrom }
+     * 
+     * 
+     */
+    public List<MapListType.MapListFrom> getMapListFrom() {
+        if (mapListFrom == null) {
+            mapListFrom = new ArrayList<MapListType.MapListFrom>();
+        }
+        return this.mapListFrom;
+    }
+
+    /**
+     * Gets the value of the mapListTo property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the mapListTo property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getMapListTo().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link MapListType.MapListTo }
+     * 
+     * 
+     */
+    public List<MapListType.MapListTo> getMapListTo() {
+        if (mapListTo == null) {
+            mapListTo = new ArrayList<MapListType.MapListTo>();
+        }
+        return this.mapListTo;
+    }
+
+    /**
+     * Gets the value of the mapFromUnit property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link BigInteger }
+     *     
+     */
+    public BigInteger getMapFromUnit() {
+        return mapFromUnit;
+    }
+
+    /**
+     * Sets the value of the mapFromUnit property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link BigInteger }
+     *     
+     */
+    public void setMapFromUnit(BigInteger value) {
+        this.mapFromUnit = value;
+    }
+
+    /**
+     * Gets the value of the mapToUnit property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link BigInteger }
+     *     
+     */
+    public BigInteger getMapToUnit() {
+        return mapToUnit;
+    }
+
+    /**
+     * Sets the value of the mapToUnit property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link BigInteger }
+     *     
+     */
+    public void setMapToUnit(BigInteger value) {
+        this.mapToUnit = value;
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;attribute name="start" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *       &lt;attribute name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "")
+    public static class MapListFrom {
+
+        @XmlAttribute(name = "start", required = true)
+        protected int start;
+        @XmlAttribute(name = "end", required = true)
+        protected int end;
+
+        /**
+         * Gets the value of the start property.
+         * 
+         */
+        public int getStart() {
+            return start;
+        }
+
+        /**
+         * Sets the value of the start property.
+         * 
+         */
+        public void setStart(int value) {
+            this.start = value;
+        }
+
+        /**
+         * Gets the value of the end property.
+         * 
+         */
+        public int getEnd() {
+            return end;
+        }
+
+        /**
+         * Sets the value of the end property.
+         * 
+         */
+        public void setEnd(int value) {
+            this.end = value;
+        }
+
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;attribute name="start" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *       &lt;attribute name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "")
+    public static class MapListTo {
+
+        @XmlAttribute(name = "start", required = true)
+        protected int start;
+        @XmlAttribute(name = "end", required = true)
+        protected int end;
+
+        /**
+         * Gets the value of the start property.
+         * 
+         */
+        public int getStart() {
+            return start;
+        }
+
+        /**
+         * Sets the value of the start property.
+         * 
+         */
+        public void setStart(int value) {
+            this.start = value;
+        }
+
+        /**
+         * Gets the value of the end property.
+         * 
+         */
+        public int getEnd() {
+            return end;
+        }
+
+        /**
+         * Sets the value of the end property.
+         * 
+         */
+        public void setEnd(int value) {
+            this.end = value;
+        }
+
+    }
+
+}
diff --git a/src/jalview/xml/binding/jalview/Mapping.java b/src/jalview/xml/binding/jalview/Mapping.java
new file mode 100644 (file)
index 0000000..3cbebc0
--- /dev/null
@@ -0,0 +1,113 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.12.20 at 11:47:26 AM GMT 
+//
+
+
+package jalview.xml.binding.jalview;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * 
+ *                                     Represent the jalview.datamodel.Mapping object - it also provides
+ *                                     a way of storing sequences that are mapped 'to' without adding them
+ *                                     to the sequence set (which will mean they are then added to the alignment too).
+ *                             
+ * 
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;extension base="{www.vamsas.ac.uk/jalview/version2}mapListType">
+ *       &lt;sequence>
+ *         &lt;choice minOccurs="0">
+ *           &lt;element ref="{www.vamsas.ac.uk/jalview/version2}Sequence"/>
+ *           &lt;element name="dseqFor">
+ *             &lt;simpleType>
+ *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *               &lt;/restriction>
+ *             &lt;/simpleType>
+ *           &lt;/element>
+ *         &lt;/choice>
+ *       &lt;/sequence>
+ *     &lt;/extension>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "sequence",
+    "dseqFor"
+})
+@XmlRootElement(name = "Mapping")
+public class Mapping
+    extends MapListType
+{
+
+    @XmlElement(name = "Sequence")
+    protected Sequence sequence;
+    protected String dseqFor;
+
+    /**
+     * Gets the value of the sequence property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Sequence }
+     *     
+     */
+    public Sequence getSequence() {
+        return sequence;
+    }
+
+    /**
+     * Sets the value of the sequence property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Sequence }
+     *     
+     */
+    public void setSequence(Sequence value) {
+        this.sequence = value;
+    }
+
+    /**
+     * Gets the value of the dseqFor property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getDseqFor() {
+        return dseqFor;
+    }
+
+    /**
+     * Sets the value of the dseqFor property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setDseqFor(String value) {
+        this.dseqFor = value;
+    }
+
+}
diff --git a/src/jalview/xml/binding/jalview/NoValueColour.java b/src/jalview/xml/binding/jalview/NoValueColour.java
new file mode 100644 (file)
index 0000000..15fc45d
--- /dev/null
@@ -0,0 +1,61 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.12.20 at 11:47:26 AM GMT 
+//
+
+
+package jalview.xml.binding.jalview;
+
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlEnumValue;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for NoValueColour.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p>
+ * <pre>
+ * &lt;simpleType name="NoValueColour">
+ *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     &lt;enumeration value="None"/>
+ *     &lt;enumeration value="Min"/>
+ *     &lt;enumeration value="Max"/>
+ *   &lt;/restriction>
+ * &lt;/simpleType>
+ * </pre>
+ * 
+ */
+@XmlType(name = "NoValueColour", namespace = "www.jalview.org/colours")
+@XmlEnum
+public enum NoValueColour {
+
+    @XmlEnumValue("None")
+    NONE("None"),
+    @XmlEnumValue("Min")
+    MIN("Min"),
+    @XmlEnumValue("Max")
+    MAX("Max");
+    private final String value;
+
+    NoValueColour(String v) {
+        value = v;
+    }
+
+    public String value() {
+        return value;
+    }
+
+    public static NoValueColour fromValue(String v) {
+        for (NoValueColour c: NoValueColour.values()) {
+            if (c.value.equals(v)) {
+                return c;
+            }
+        }
+        throw new IllegalArgumentException(v);
+    }
+
+}
diff --git a/src/jalview/xml/binding/jalview/ObjectFactory.java b/src/jalview/xml/binding/jalview/ObjectFactory.java
new file mode 100644 (file)
index 0000000..6858f07
--- /dev/null
@@ -0,0 +1,488 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.12.20 at 11:47:26 AM GMT 
+//
+
+
+package jalview.xml.binding.jalview;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * This object contains factory methods for each 
+ * Java content interface and Java element interface 
+ * generated in the jalview.xml.binding.jalview package. 
+ * <p>An ObjectFactory allows you to programatically 
+ * construct new instances of the Java representation 
+ * for XML content. The Java representation of XML 
+ * content can consist of schema derived interfaces 
+ * and classes representing the binding of schema 
+ * type definitions, element declarations and model 
+ * groups.  Factory methods for each of these are 
+ * provided in this class.
+ * 
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+    private final static QName _WebServiceParameterSet_QNAME = new QName("www.jalview.org/xml/wsparamset", "WebServiceParameterSet");
+    private final static QName _JalviewModel_QNAME = new QName("www.jalview.org", "JalviewModel");
+    private final static QName _JalviewUserColours_QNAME = new QName("www.jalview.org/colours", "JalviewUserColours");
+
+    /**
+     * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: jalview.xml.binding.jalview
+     * 
+     */
+    public ObjectFactory() {
+    }
+
+    /**
+     * Create an instance of {@link AlcodonFrame }
+     * 
+     */
+    public AlcodonFrame createAlcodonFrame() {
+        return new AlcodonFrame();
+    }
+
+    /**
+     * Create an instance of {@link MapListType }
+     * 
+     */
+    public MapListType createMapListType() {
+        return new MapListType();
+    }
+
+    /**
+     * Create an instance of {@link Sequence }
+     * 
+     */
+    public Sequence createSequence() {
+        return new Sequence();
+    }
+
+    /**
+     * Create an instance of {@link Annotation }
+     * 
+     */
+    public Annotation createAnnotation() {
+        return new Annotation();
+    }
+
+    /**
+     * Create an instance of {@link SequenceSet }
+     * 
+     */
+    public SequenceSet createSequenceSet() {
+        return new SequenceSet();
+    }
+
+    /**
+     * Create an instance of {@link FeatureMatcherSet }
+     * 
+     */
+    public FeatureMatcherSet createFeatureMatcherSet() {
+        return new FeatureMatcherSet();
+    }
+
+    /**
+     * Create an instance of {@link JalviewUserColours }
+     * 
+     */
+    public JalviewUserColours createJalviewUserColours() {
+        return new JalviewUserColours();
+    }
+
+    /**
+     * Create an instance of {@link Pdbentry }
+     * 
+     */
+    public Pdbentry createPdbentry() {
+        return new Pdbentry();
+    }
+
+    /**
+     * Create an instance of {@link Feature }
+     * 
+     */
+    public Feature createFeature() {
+        return new Feature();
+    }
+
+    /**
+     * Create an instance of {@link JalviewModel }
+     * 
+     */
+    public JalviewModel createJalviewModel() {
+        return new JalviewModel();
+    }
+
+    /**
+     * Create an instance of {@link JalviewModel.FeatureSettings }
+     * 
+     */
+    public JalviewModel.FeatureSettings createJalviewModelFeatureSettings() {
+        return new JalviewModel.FeatureSettings();
+    }
+
+    /**
+     * Create an instance of {@link JalviewModel.PcaViewer }
+     * 
+     */
+    public JalviewModel.PcaViewer createJalviewModelPcaViewer() {
+        return new JalviewModel.PcaViewer();
+    }
+
+    /**
+     * Create an instance of {@link JalviewModel.Viewport }
+     * 
+     */
+    public JalviewModel.Viewport createJalviewModelViewport() {
+        return new JalviewModel.Viewport();
+    }
+
+    /**
+     * Create an instance of {@link JalviewModel.JSeq }
+     * 
+     */
+    public JalviewModel.JSeq createJalviewModelJSeq() {
+        return new JalviewModel.JSeq();
+    }
+
+    /**
+     * Create an instance of {@link JalviewModel.JSeq.RnaViewer }
+     * 
+     */
+    public JalviewModel.JSeq.RnaViewer createJalviewModelJSeqRnaViewer() {
+        return new JalviewModel.JSeq.RnaViewer();
+    }
+
+    /**
+     * Create an instance of {@link JalviewModel.JSeq.Pdbids }
+     * 
+     */
+    public JalviewModel.JSeq.Pdbids createJalviewModelJSeqPdbids() {
+        return new JalviewModel.JSeq.Pdbids();
+    }
+
+    /**
+     * Create an instance of {@link DoubleMatrix }
+     * 
+     */
+    public DoubleMatrix createDoubleMatrix() {
+        return new DoubleMatrix();
+    }
+
+    /**
+     * Create an instance of {@link AnnotationColourScheme }
+     * 
+     */
+    public AnnotationColourScheme createAnnotationColourScheme() {
+        return new AnnotationColourScheme();
+    }
+
+    /**
+     * Create an instance of {@link PcaDataType }
+     * 
+     */
+    public PcaDataType createPcaDataType() {
+        return new PcaDataType();
+    }
+
+    /**
+     * Create an instance of {@link DoubleVector }
+     * 
+     */
+    public DoubleVector createDoubleVector() {
+        return new DoubleVector();
+    }
+
+    /**
+     * Create an instance of {@link AlcodonFrame.Alcodon }
+     * 
+     */
+    public AlcodonFrame.Alcodon createAlcodonFrameAlcodon() {
+        return new AlcodonFrame.Alcodon();
+    }
+
+    /**
+     * Create an instance of {@link AlcodonFrame.AlcodMap }
+     * 
+     */
+    public AlcodonFrame.AlcodMap createAlcodonFrameAlcodMap() {
+        return new AlcodonFrame.AlcodMap();
+    }
+
+    /**
+     * Create an instance of {@link AnnotationElement }
+     * 
+     */
+    public AnnotationElement createAnnotationElement() {
+        return new AnnotationElement();
+    }
+
+    /**
+     * Create an instance of {@link Mapping }
+     * 
+     */
+    public Mapping createMapping() {
+        return new Mapping();
+    }
+
+    /**
+     * Create an instance of {@link MapListType.MapListFrom }
+     * 
+     */
+    public MapListType.MapListFrom createMapListTypeMapListFrom() {
+        return new MapListType.MapListFrom();
+    }
+
+    /**
+     * Create an instance of {@link MapListType.MapListTo }
+     * 
+     */
+    public MapListType.MapListTo createMapListTypeMapListTo() {
+        return new MapListType.MapListTo();
+    }
+
+    /**
+     * Create an instance of {@link SequenceType }
+     * 
+     */
+    public SequenceType createSequenceType() {
+        return new SequenceType();
+    }
+
+    /**
+     * Create an instance of {@link Sequence.DBRef }
+     * 
+     */
+    public Sequence.DBRef createSequenceDBRef() {
+        return new Sequence.DBRef();
+    }
+
+    /**
+     * Create an instance of {@link Annotation.ThresholdLine }
+     * 
+     */
+    public Annotation.ThresholdLine createAnnotationThresholdLine() {
+        return new Annotation.ThresholdLine();
+    }
+
+    /**
+     * Create an instance of {@link Annotation.Property }
+     * 
+     */
+    public Annotation.Property createAnnotationProperty() {
+        return new Annotation.Property();
+    }
+
+    /**
+     * Create an instance of {@link SequenceSet.SequenceSetProperties }
+     * 
+     */
+    public SequenceSet.SequenceSetProperties createSequenceSetSequenceSetProperties() {
+        return new SequenceSet.SequenceSetProperties();
+    }
+
+    /**
+     * Create an instance of {@link VAMSAS }
+     * 
+     */
+    public VAMSAS createVAMSAS() {
+        return new VAMSAS();
+    }
+
+    /**
+     * Create an instance of {@link FeatureMatcher }
+     * 
+     */
+    public FeatureMatcher createFeatureMatcher() {
+        return new FeatureMatcher();
+    }
+
+    /**
+     * Create an instance of {@link WebServiceParameterSet }
+     * 
+     */
+    public WebServiceParameterSet createWebServiceParameterSet() {
+        return new WebServiceParameterSet();
+    }
+
+    /**
+     * Create an instance of {@link FeatureMatcherSet.CompoundMatcher }
+     * 
+     */
+    public FeatureMatcherSet.CompoundMatcher createFeatureMatcherSetCompoundMatcher() {
+        return new FeatureMatcherSet.CompoundMatcher();
+    }
+
+    /**
+     * Create an instance of {@link JalviewUserColours.Colour }
+     * 
+     */
+    public JalviewUserColours.Colour createJalviewUserColoursColour() {
+        return new JalviewUserColours.Colour();
+    }
+
+    /**
+     * Create an instance of {@link JalviewUserColours.Filter }
+     * 
+     */
+    public JalviewUserColours.Filter createJalviewUserColoursFilter() {
+        return new JalviewUserColours.Filter();
+    }
+
+    /**
+     * Create an instance of {@link Pdbentry.Property }
+     * 
+     */
+    public Pdbentry.Property createPdbentryProperty() {
+        return new Pdbentry.Property();
+    }
+
+    /**
+     * Create an instance of {@link Feature.OtherData }
+     * 
+     */
+    public Feature.OtherData createFeatureOtherData() {
+        return new Feature.OtherData();
+    }
+
+    /**
+     * Create an instance of {@link JalviewModel.JGroup }
+     * 
+     */
+    public JalviewModel.JGroup createJalviewModelJGroup() {
+        return new JalviewModel.JGroup();
+    }
+
+    /**
+     * Create an instance of {@link JalviewModel.UserColours }
+     * 
+     */
+    public JalviewModel.UserColours createJalviewModelUserColours() {
+        return new JalviewModel.UserColours();
+    }
+
+    /**
+     * Create an instance of {@link JalviewModel.Tree }
+     * 
+     */
+    public JalviewModel.Tree createJalviewModelTree() {
+        return new JalviewModel.Tree();
+    }
+
+    /**
+     * Create an instance of {@link JalviewModel.FeatureSettings.Setting }
+     * 
+     */
+    public JalviewModel.FeatureSettings.Setting createJalviewModelFeatureSettingsSetting() {
+        return new JalviewModel.FeatureSettings.Setting();
+    }
+
+    /**
+     * Create an instance of {@link JalviewModel.FeatureSettings.Group }
+     * 
+     */
+    public JalviewModel.FeatureSettings.Group createJalviewModelFeatureSettingsGroup() {
+        return new JalviewModel.FeatureSettings.Group();
+    }
+
+    /**
+     * Create an instance of {@link JalviewModel.PcaViewer.SequencePoint }
+     * 
+     */
+    public JalviewModel.PcaViewer.SequencePoint createJalviewModelPcaViewerSequencePoint() {
+        return new JalviewModel.PcaViewer.SequencePoint();
+    }
+
+    /**
+     * Create an instance of {@link JalviewModel.PcaViewer.Axis }
+     * 
+     */
+    public JalviewModel.PcaViewer.Axis createJalviewModelPcaViewerAxis() {
+        return new JalviewModel.PcaViewer.Axis();
+    }
+
+    /**
+     * Create an instance of {@link JalviewModel.PcaViewer.SeqPointMin }
+     * 
+     */
+    public JalviewModel.PcaViewer.SeqPointMin createJalviewModelPcaViewerSeqPointMin() {
+        return new JalviewModel.PcaViewer.SeqPointMin();
+    }
+
+    /**
+     * Create an instance of {@link JalviewModel.PcaViewer.SeqPointMax }
+     * 
+     */
+    public JalviewModel.PcaViewer.SeqPointMax createJalviewModelPcaViewerSeqPointMax() {
+        return new JalviewModel.PcaViewer.SeqPointMax();
+    }
+
+    /**
+     * Create an instance of {@link JalviewModel.Viewport.HiddenColumns }
+     * 
+     */
+    public JalviewModel.Viewport.HiddenColumns createJalviewModelViewportHiddenColumns() {
+        return new JalviewModel.Viewport.HiddenColumns();
+    }
+
+    /**
+     * Create an instance of {@link JalviewModel.Viewport.CalcIdParam }
+     * 
+     */
+    public JalviewModel.Viewport.CalcIdParam createJalviewModelViewportCalcIdParam() {
+        return new JalviewModel.Viewport.CalcIdParam();
+    }
+
+    /**
+     * Create an instance of {@link JalviewModel.JSeq.RnaViewer.SecondaryStructure }
+     * 
+     */
+    public JalviewModel.JSeq.RnaViewer.SecondaryStructure createJalviewModelJSeqRnaViewerSecondaryStructure() {
+        return new JalviewModel.JSeq.RnaViewer.SecondaryStructure();
+    }
+
+    /**
+     * Create an instance of {@link JalviewModel.JSeq.Pdbids.StructureState }
+     * 
+     */
+    public JalviewModel.JSeq.Pdbids.StructureState createJalviewModelJSeqPdbidsStructureState() {
+        return new JalviewModel.JSeq.Pdbids.StructureState();
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link WebServiceParameterSet }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "www.jalview.org/xml/wsparamset", name = "WebServiceParameterSet")
+    public JAXBElement<WebServiceParameterSet> createWebServiceParameterSet(WebServiceParameterSet value) {
+        return new JAXBElement<WebServiceParameterSet>(_WebServiceParameterSet_QNAME, WebServiceParameterSet.class, null, value);
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link JalviewModel }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "www.jalview.org", name = "JalviewModel")
+    public JAXBElement<JalviewModel> createJalviewModel(JalviewModel value) {
+        return new JAXBElement<JalviewModel>(_JalviewModel_QNAME, JalviewModel.class, null, value);
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link JalviewUserColours }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "www.jalview.org/colours", name = "JalviewUserColours")
+    public JAXBElement<JalviewUserColours> createJalviewUserColours(JalviewUserColours value) {
+        return new JAXBElement<JalviewUserColours>(_JalviewUserColours_QNAME, JalviewUserColours.class, null, value);
+    }
+
+}
diff --git a/src/jalview/xml/binding/jalview/PcaDataType.java b/src/jalview/xml/binding/jalview/PcaDataType.java
new file mode 100644 (file)
index 0000000..e8c7cf2
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.12.20 at 11:47:26 AM GMT 
+//
+
+
+package jalview.xml.binding.jalview;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * 
+ *                             The results of a PCA calculation
+ *                     
+ * 
+ * <p>Java class for PcaDataType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="PcaDataType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="pairwiseMatrix" type="{www.jalview.org}DoubleMatrix"/>
+ *         &lt;element name="tridiagonalMatrix" type="{www.jalview.org}DoubleMatrix"/>
+ *         &lt;element name="eigenMatrix" type="{www.jalview.org}DoubleMatrix"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "PcaDataType", namespace = "www.jalview.org", propOrder = {
+    "pairwiseMatrix",
+    "tridiagonalMatrix",
+    "eigenMatrix"
+})
+public class PcaDataType {
+
+    @XmlElement(required = true)
+    protected DoubleMatrix pairwiseMatrix;
+    @XmlElement(required = true)
+    protected DoubleMatrix tridiagonalMatrix;
+    @XmlElement(required = true)
+    protected DoubleMatrix eigenMatrix;
+
+    /**
+     * Gets the value of the pairwiseMatrix property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link DoubleMatrix }
+     *     
+     */
+    public DoubleMatrix getPairwiseMatrix() {
+        return pairwiseMatrix;
+    }
+
+    /**
+     * Sets the value of the pairwiseMatrix property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link DoubleMatrix }
+     *     
+     */
+    public void setPairwiseMatrix(DoubleMatrix value) {
+        this.pairwiseMatrix = value;
+    }
+
+    /**
+     * Gets the value of the tridiagonalMatrix property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link DoubleMatrix }
+     *     
+     */
+    public DoubleMatrix getTridiagonalMatrix() {
+        return tridiagonalMatrix;
+    }
+
+    /**
+     * Sets the value of the tridiagonalMatrix property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link DoubleMatrix }
+     *     
+     */
+    public void setTridiagonalMatrix(DoubleMatrix value) {
+        this.tridiagonalMatrix = value;
+    }
+
+    /**
+     * Gets the value of the eigenMatrix property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link DoubleMatrix }
+     *     
+     */
+    public DoubleMatrix getEigenMatrix() {
+        return eigenMatrix;
+    }
+
+    /**
+     * Sets the value of the eigenMatrix property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link DoubleMatrix }
+     *     
+     */
+    public void setEigenMatrix(DoubleMatrix value) {
+        this.eigenMatrix = value;
+    }
+
+}
diff --git a/src/jalview/xml/binding/jalview/Pdbentry.java b/src/jalview/xml/binding/jalview/Pdbentry.java
new file mode 100644 (file)
index 0000000..843ea6c
--- /dev/null
@@ -0,0 +1,247 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.12.20 at 11:47:26 AM GMT 
+//
+
+
+package jalview.xml.binding.jalview;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for pdbentry complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="pdbentry">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence maxOccurs="unbounded" minOccurs="0">
+ *         &lt;element name="property" maxOccurs="unbounded" minOccurs="0">
+ *           &lt;complexType>
+ *             &lt;complexContent>
+ *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                 &lt;attribute name="value" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *               &lt;/restriction>
+ *             &lt;/complexContent>
+ *           &lt;/complexType>
+ *         &lt;/element>
+ *       &lt;/sequence>
+ *       &lt;attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="file" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "pdbentry", namespace = "www.jalview.org", propOrder = {
+    "property"
+})
+@XmlSeeAlso({
+    jalview.xml.binding.jalview.JalviewModel.JSeq.Pdbids.class
+})
+public class Pdbentry {
+
+    protected List<Pdbentry.Property> property;
+    @XmlAttribute(name = "id", required = true)
+    protected String id;
+    @XmlAttribute(name = "type")
+    protected String type;
+    @XmlAttribute(name = "file")
+    protected String file;
+
+    /**
+     * Gets the value of the property property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the property property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getProperty().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Pdbentry.Property }
+     * 
+     * 
+     */
+    public List<Pdbentry.Property> getProperty() {
+        if (property == null) {
+            property = new ArrayList<Pdbentry.Property>();
+        }
+        return this.property;
+    }
+
+    /**
+     * Gets the value of the id property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * Sets the value of the id property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setId(String value) {
+        this.id = value;
+    }
+
+    /**
+     * Gets the value of the type property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * Sets the value of the type property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setType(String value) {
+        this.type = value;
+    }
+
+    /**
+     * Gets the value of the file property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getFile() {
+        return file;
+    }
+
+    /**
+     * Sets the value of the file property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setFile(String value) {
+        this.file = value;
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *       &lt;attribute name="value" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "")
+    public static class Property {
+
+        @XmlAttribute(name = "name", required = true)
+        protected String name;
+        @XmlAttribute(name = "value", required = true)
+        protected String value;
+
+        /**
+         * Gets the value of the name property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getName() {
+            return name;
+        }
+
+        /**
+         * Sets the value of the name property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setName(String value) {
+            this.name = value;
+        }
+
+        /**
+         * Gets the value of the value property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getValue() {
+            return value;
+        }
+
+        /**
+         * Sets the value of the value property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setValue(String value) {
+            this.value = value;
+        }
+
+    }
+
+}
diff --git a/src/jalview/xml/binding/jalview/Sequence.java b/src/jalview/xml/binding/jalview/Sequence.java
new file mode 100644 (file)
index 0000000..abb40c9
--- /dev/null
@@ -0,0 +1,257 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.12.20 at 11:47:26 AM GMT 
+//
+
+
+package jalview.xml.binding.jalview;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;extension base="{www.vamsas.ac.uk/jalview/version2}SequenceType">
+ *       &lt;sequence>
+ *         &lt;element name="DBRef" maxOccurs="unbounded" minOccurs="0">
+ *           &lt;complexType>
+ *             &lt;complexContent>
+ *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 &lt;sequence>
+ *                   &lt;element ref="{www.vamsas.ac.uk/jalview/version2}Mapping" minOccurs="0"/>
+ *                 &lt;/sequence>
+ *                 &lt;attribute name="source" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                 &lt;attribute name="version" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                 &lt;attribute name="accessionId" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *               &lt;/restriction>
+ *             &lt;/complexContent>
+ *           &lt;/complexType>
+ *         &lt;/element>
+ *       &lt;/sequence>
+ *       &lt;attribute name="dsseqid" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     &lt;/extension>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "dbRef"
+})
+@XmlRootElement(name = "Sequence")
+public class Sequence
+    extends SequenceType
+{
+
+    @XmlElement(name = "DBRef")
+    protected List<Sequence.DBRef> dbRef;
+    @XmlAttribute(name = "dsseqid")
+    protected String dsseqid;
+
+    /**
+     * Gets the value of the dbRef property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the dbRef property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getDBRef().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Sequence.DBRef }
+     * 
+     * 
+     */
+    public List<Sequence.DBRef> getDBRef() {
+        if (dbRef == null) {
+            dbRef = new ArrayList<Sequence.DBRef>();
+        }
+        return this.dbRef;
+    }
+
+    /**
+     * Gets the value of the dsseqid property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getDsseqid() {
+        return dsseqid;
+    }
+
+    /**
+     * Sets the value of the dsseqid property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setDsseqid(String value) {
+        this.dsseqid = value;
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;sequence>
+     *         &lt;element ref="{www.vamsas.ac.uk/jalview/version2}Mapping" minOccurs="0"/>
+     *       &lt;/sequence>
+     *       &lt;attribute name="source" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *       &lt;attribute name="version" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *       &lt;attribute name="accessionId" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "mapping"
+    })
+    public static class DBRef {
+
+        @XmlElement(name = "Mapping")
+        protected Mapping mapping;
+        @XmlAttribute(name = "source")
+        protected String source;
+        @XmlAttribute(name = "version")
+        protected String version;
+        @XmlAttribute(name = "accessionId")
+        protected String accessionId;
+
+        /**
+         * Gets the value of the mapping property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link Mapping }
+         *     
+         */
+        public Mapping getMapping() {
+            return mapping;
+        }
+
+        /**
+         * Sets the value of the mapping property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link Mapping }
+         *     
+         */
+        public void setMapping(Mapping value) {
+            this.mapping = value;
+        }
+
+        /**
+         * Gets the value of the source property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getSource() {
+            return source;
+        }
+
+        /**
+         * Sets the value of the source property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setSource(String value) {
+            this.source = value;
+        }
+
+        /**
+         * Gets the value of the version property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getVersion() {
+            return version;
+        }
+
+        /**
+         * Sets the value of the version property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setVersion(String value) {
+            this.version = value;
+        }
+
+        /**
+         * Gets the value of the accessionId property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getAccessionId() {
+            return accessionId;
+        }
+
+        /**
+         * Sets the value of the accessionId property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setAccessionId(String value) {
+            this.accessionId = value;
+        }
+
+    }
+
+}
diff --git a/src/jalview/xml/binding/jalview/SequenceSet.java b/src/jalview/xml/binding/jalview/SequenceSet.java
new file mode 100644 (file)
index 0000000..0fc7771
--- /dev/null
@@ -0,0 +1,318 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.12.20 at 11:47:26 AM GMT 
+//
+
+
+package jalview.xml.binding.jalview;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element ref="{www.vamsas.ac.uk/jalview/version2}Sequence" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element ref="{www.vamsas.ac.uk/jalview/version2}Annotation" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="sequenceSetProperties" maxOccurs="unbounded" minOccurs="0">
+ *           &lt;complexType>
+ *             &lt;complexContent>
+ *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 &lt;attribute name="key" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                 &lt;attribute name="value" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *               &lt;/restriction>
+ *             &lt;/complexContent>
+ *           &lt;/complexType>
+ *         &lt;/element>
+ *         &lt;element ref="{www.vamsas.ac.uk/jalview/version2}AlcodonFrame" maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="gapChar" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="datasetId" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "sequence",
+    "annotation",
+    "sequenceSetProperties",
+    "alcodonFrame"
+})
+@XmlRootElement(name = "SequenceSet")
+public class SequenceSet {
+
+    @XmlElement(name = "Sequence")
+    protected List<Sequence> sequence;
+    @XmlElement(name = "Annotation")
+    protected List<Annotation> annotation;
+    protected List<SequenceSet.SequenceSetProperties> sequenceSetProperties;
+    @XmlElement(name = "AlcodonFrame")
+    protected List<AlcodonFrame> alcodonFrame;
+    @XmlAttribute(name = "gapChar", required = true)
+    protected String gapChar;
+    @XmlAttribute(name = "datasetId")
+    protected String datasetId;
+
+    /**
+     * Gets the value of the sequence property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the sequence property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getSequence().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Sequence }
+     * 
+     * 
+     */
+    public List<Sequence> getSequence() {
+        if (sequence == null) {
+            sequence = new ArrayList<Sequence>();
+        }
+        return this.sequence;
+    }
+
+    /**
+     * Gets the value of the annotation property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the annotation property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getAnnotation().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Annotation }
+     * 
+     * 
+     */
+    public List<Annotation> getAnnotation() {
+        if (annotation == null) {
+            annotation = new ArrayList<Annotation>();
+        }
+        return this.annotation;
+    }
+
+    /**
+     * Gets the value of the sequenceSetProperties property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the sequenceSetProperties property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getSequenceSetProperties().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link SequenceSet.SequenceSetProperties }
+     * 
+     * 
+     */
+    public List<SequenceSet.SequenceSetProperties> getSequenceSetProperties() {
+        if (sequenceSetProperties == null) {
+            sequenceSetProperties = new ArrayList<SequenceSet.SequenceSetProperties>();
+        }
+        return this.sequenceSetProperties;
+    }
+
+    /**
+     * Gets the value of the alcodonFrame property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the alcodonFrame property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getAlcodonFrame().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link AlcodonFrame }
+     * 
+     * 
+     */
+    public List<AlcodonFrame> getAlcodonFrame() {
+        if (alcodonFrame == null) {
+            alcodonFrame = new ArrayList<AlcodonFrame>();
+        }
+        return this.alcodonFrame;
+    }
+
+    /**
+     * Gets the value of the gapChar property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getGapChar() {
+        return gapChar;
+    }
+
+    /**
+     * Sets the value of the gapChar property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setGapChar(String value) {
+        this.gapChar = value;
+    }
+
+    /**
+     * Gets the value of the datasetId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getDatasetId() {
+        return datasetId;
+    }
+
+    /**
+     * Sets the value of the datasetId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setDatasetId(String value) {
+        this.datasetId = value;
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;attribute name="key" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *       &lt;attribute name="value" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "")
+    public static class SequenceSetProperties {
+
+        @XmlAttribute(name = "key")
+        protected String key;
+        @XmlAttribute(name = "value")
+        protected String value;
+
+        /**
+         * Gets the value of the key property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getKey() {
+            return key;
+        }
+
+        /**
+         * Sets the value of the key property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setKey(String value) {
+            this.key = value;
+        }
+
+        /**
+         * Gets the value of the value property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getValue() {
+            return value;
+        }
+
+        /**
+         * Sets the value of the value property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setValue(String value) {
+            this.value = value;
+        }
+
+    }
+
+}
diff --git a/src/jalview/xml/binding/jalview/SequenceType.java b/src/jalview/xml/binding/jalview/SequenceType.java
new file mode 100644 (file)
index 0000000..07b8c24
--- /dev/null
@@ -0,0 +1,153 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.12.20 at 11:47:26 AM GMT 
+//
+
+
+package jalview.xml.binding.jalview;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for SequenceType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="SequenceType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="sequence" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="description" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "SequenceType", propOrder = {
+    "sequence",
+    "name"
+})
+@XmlSeeAlso({
+    Sequence.class
+})
+public class SequenceType {
+
+    protected String sequence;
+    protected String name;
+    @XmlAttribute(name = "id")
+    protected String id;
+    @XmlAttribute(name = "description")
+    protected String description;
+
+    /**
+     * Gets the value of the sequence property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getSequence() {
+        return sequence;
+    }
+
+    /**
+     * Sets the value of the sequence property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setSequence(String value) {
+        this.sequence = value;
+    }
+
+    /**
+     * Gets the value of the name property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Sets the value of the name property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setName(String value) {
+        this.name = value;
+    }
+
+    /**
+     * Gets the value of the id property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * Sets the value of the id property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setId(String value) {
+        this.id = value;
+    }
+
+    /**
+     * Gets the value of the description property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * Sets the value of the description property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setDescription(String value) {
+        this.description = value;
+    }
+
+}
diff --git a/src/jalview/xml/binding/jalview/ThresholdType.java b/src/jalview/xml/binding/jalview/ThresholdType.java
new file mode 100644 (file)
index 0000000..e8b7e28
--- /dev/null
@@ -0,0 +1,47 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.12.20 at 11:47:26 AM GMT 
+//
+
+
+package jalview.xml.binding.jalview;
+
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for ThresholdType.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p>
+ * <pre>
+ * &lt;simpleType name="ThresholdType">
+ *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     &lt;enumeration value="NONE"/>
+ *     &lt;enumeration value="ABOVE"/>
+ *     &lt;enumeration value="BELOW"/>
+ *   &lt;/restriction>
+ * &lt;/simpleType>
+ * </pre>
+ * 
+ */
+@XmlType(name = "ThresholdType", namespace = "www.jalview.org/colours")
+@XmlEnum
+public enum ThresholdType {
+
+    NONE,
+    ABOVE,
+    BELOW;
+
+    public String value() {
+        return name();
+    }
+
+    public static ThresholdType fromValue(String v) {
+        return valueOf(v);
+    }
+
+}
diff --git a/src/jalview/xml/binding/jalview/VAMSAS.java b/src/jalview/xml/binding/jalview/VAMSAS.java
new file mode 100644 (file)
index 0000000..1f68de9
--- /dev/null
@@ -0,0 +1,109 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.12.20 at 11:47:26 AM GMT 
+//
+
+
+package jalview.xml.binding.jalview;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for VAMSAS complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="VAMSAS">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="Tree" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element ref="{www.vamsas.ac.uk/jalview/version2}SequenceSet" maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "VAMSAS", propOrder = {
+    "tree",
+    "sequenceSet"
+})
+public class VAMSAS {
+
+    @XmlElement(name = "Tree")
+    protected List<String> tree;
+    @XmlElement(name = "SequenceSet")
+    protected List<SequenceSet> sequenceSet;
+
+    /**
+     * Gets the value of the tree property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the tree property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getTree().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link String }
+     * 
+     * 
+     */
+    public List<String> getTree() {
+        if (tree == null) {
+            tree = new ArrayList<String>();
+        }
+        return this.tree;
+    }
+
+    /**
+     * Gets the value of the sequenceSet property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the sequenceSet property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getSequenceSet().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link SequenceSet }
+     * 
+     * 
+     */
+    public List<SequenceSet> getSequenceSet() {
+        if (sequenceSet == null) {
+            sequenceSet = new ArrayList<SequenceSet>();
+        }
+        return this.sequenceSet;
+    }
+
+}
diff --git a/src/jalview/xml/binding/jalview/WebServiceParameterSet.java b/src/jalview/xml/binding/jalview/WebServiceParameterSet.java
new file mode 100644 (file)
index 0000000..c884556
--- /dev/null
@@ -0,0 +1,194 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.12.20 at 11:47:26 AM GMT 
+//
+
+
+package jalview.xml.binding.jalview;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for WebServiceParameterSet complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="WebServiceParameterSet">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="Version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="serviceURL" type="{http://www.w3.org/2001/XMLSchema}anyURI" maxOccurs="unbounded"/>
+ *         &lt;element name="parameters" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "WebServiceParameterSet", namespace = "www.jalview.org/xml/wsparamset", propOrder = {
+    "version",
+    "description",
+    "serviceURL",
+    "parameters"
+})
+@XmlSeeAlso({
+    jalview.xml.binding.jalview.JalviewModel.Viewport.CalcIdParam.class
+})
+public class WebServiceParameterSet {
+
+    @XmlElement(name = "Version", namespace = "")
+    protected String version;
+    @XmlElement(namespace = "")
+    protected String description;
+    @XmlElement(namespace = "", required = true)
+    @XmlSchemaType(name = "anyURI")
+    protected List<String> serviceURL;
+    @XmlElement(namespace = "", required = true)
+    protected String parameters;
+    @XmlAttribute(name = "name", required = true)
+    protected String name;
+
+    /**
+     * Gets the value of the version property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVersion() {
+        return version;
+    }
+
+    /**
+     * Sets the value of the version property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVersion(String value) {
+        this.version = value;
+    }
+
+    /**
+     * Gets the value of the description property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * Sets the value of the description property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setDescription(String value) {
+        this.description = value;
+    }
+
+    /**
+     * Gets the value of the serviceURL property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the serviceURL property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getServiceURL().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link String }
+     * 
+     * 
+     */
+    public List<String> getServiceURL() {
+        if (serviceURL == null) {
+            serviceURL = new ArrayList<String>();
+        }
+        return this.serviceURL;
+    }
+
+    /**
+     * Gets the value of the parameters property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getParameters() {
+        return parameters;
+    }
+
+    /**
+     * Sets the value of the parameters property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setParameters(String value) {
+        this.parameters = value;
+    }
+
+    /**
+     * Gets the value of the name property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Sets the value of the name property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setName(String value) {
+        this.name = value;
+    }
+
+}
diff --git a/src/jalview/xml/binding/jalview/package-info.java b/src/jalview/xml/binding/jalview/package-info.java
new file mode 100644 (file)
index 0000000..bd6dc77
--- /dev/null
@@ -0,0 +1,9 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.12.20 at 11:47:26 AM GMT 
+//
+
+@javax.xml.bind.annotation.XmlSchema(namespace = "www.vamsas.ac.uk/jalview/version2", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package jalview.xml.binding.jalview;
diff --git a/src/jalview/xml/binding/uniprot/CitationType.java b/src/jalview/xml/binding/uniprot/CitationType.java
new file mode 100644 (file)
index 0000000..cc5f14e
--- /dev/null
@@ -0,0 +1,527 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.13 at 10:18:53 AM BST 
+//
+
+
+package jalview.xml.binding.uniprot;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Describes different types of citations.
+ *             Equivalent to the flat file RX-, RG-, RA-, RT- and RL-lines.
+ * 
+ * <p>Java class for citationType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="citationType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="title" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="editorList" type="{http://uniprot.org/uniprot}nameListType" minOccurs="0"/>
+ *         &lt;element name="authorList" type="{http://uniprot.org/uniprot}nameListType" minOccurs="0"/>
+ *         &lt;element name="locator" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="dbReference" type="{http://uniprot.org/uniprot}dbReferenceType" maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="type" use="required">
+ *         &lt;simpleType>
+ *           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             &lt;enumeration value="book"/>
+ *             &lt;enumeration value="journal article"/>
+ *             &lt;enumeration value="online journal article"/>
+ *             &lt;enumeration value="patent"/>
+ *             &lt;enumeration value="submission"/>
+ *             &lt;enumeration value="thesis"/>
+ *             &lt;enumeration value="unpublished observations"/>
+ *           &lt;/restriction>
+ *         &lt;/simpleType>
+ *       &lt;/attribute>
+ *       &lt;attribute name="date">
+ *         &lt;simpleType>
+ *           &lt;union memberTypes=" {http://www.w3.org/2001/XMLSchema}date {http://www.w3.org/2001/XMLSchema}gYearMonth {http://www.w3.org/2001/XMLSchema}gYear">
+ *           &lt;/union>
+ *         &lt;/simpleType>
+ *       &lt;/attribute>
+ *       &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="volume" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="first" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="last" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="publisher" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="city" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="db" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="number" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="institute" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="country" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "citationType", propOrder = {
+    "title",
+    "editorList",
+    "authorList",
+    "locator",
+    "dbReference"
+})
+public class CitationType {
+
+    protected String title;
+    protected NameListType editorList;
+    protected NameListType authorList;
+    protected String locator;
+    protected List<DbReferenceType> dbReference;
+    @XmlAttribute(name = "type", required = true)
+    protected String type;
+    @XmlAttribute(name = "date")
+    protected String date;
+    @XmlAttribute(name = "name")
+    protected String name;
+    @XmlAttribute(name = "volume")
+    protected String volume;
+    @XmlAttribute(name = "first")
+    protected String first;
+    @XmlAttribute(name = "last")
+    protected String last;
+    @XmlAttribute(name = "publisher")
+    protected String publisher;
+    @XmlAttribute(name = "city")
+    protected String city;
+    @XmlAttribute(name = "db")
+    protected String db;
+    @XmlAttribute(name = "number")
+    protected String number;
+    @XmlAttribute(name = "institute")
+    protected String institute;
+    @XmlAttribute(name = "country")
+    protected String country;
+
+    /**
+     * Gets the value of the title property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getTitle() {
+        return title;
+    }
+
+    /**
+     * Sets the value of the title property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setTitle(String value) {
+        this.title = value;
+    }
+
+    /**
+     * Gets the value of the editorList property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link NameListType }
+     *     
+     */
+    public NameListType getEditorList() {
+        return editorList;
+    }
+
+    /**
+     * Sets the value of the editorList property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link NameListType }
+     *     
+     */
+    public void setEditorList(NameListType value) {
+        this.editorList = value;
+    }
+
+    /**
+     * Gets the value of the authorList property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link NameListType }
+     *     
+     */
+    public NameListType getAuthorList() {
+        return authorList;
+    }
+
+    /**
+     * Sets the value of the authorList property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link NameListType }
+     *     
+     */
+    public void setAuthorList(NameListType value) {
+        this.authorList = value;
+    }
+
+    /**
+     * Gets the value of the locator property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getLocator() {
+        return locator;
+    }
+
+    /**
+     * Sets the value of the locator property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setLocator(String value) {
+        this.locator = value;
+    }
+
+    /**
+     * Gets the value of the dbReference property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the dbReference property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getDbReference().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link DbReferenceType }
+     * 
+     * 
+     */
+    public List<DbReferenceType> getDbReference() {
+        if (dbReference == null) {
+            dbReference = new ArrayList<DbReferenceType>();
+        }
+        return this.dbReference;
+    }
+
+    /**
+     * Gets the value of the type property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * Sets the value of the type property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setType(String value) {
+        this.type = value;
+    }
+
+    /**
+     * Gets the value of the date property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getDate() {
+        return date;
+    }
+
+    /**
+     * Sets the value of the date property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setDate(String value) {
+        this.date = value;
+    }
+
+    /**
+     * Gets the value of the name property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Sets the value of the name property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setName(String value) {
+        this.name = value;
+    }
+
+    /**
+     * Gets the value of the volume property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVolume() {
+        return volume;
+    }
+
+    /**
+     * Sets the value of the volume property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVolume(String value) {
+        this.volume = value;
+    }
+
+    /**
+     * Gets the value of the first property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getFirst() {
+        return first;
+    }
+
+    /**
+     * Sets the value of the first property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setFirst(String value) {
+        this.first = value;
+    }
+
+    /**
+     * Gets the value of the last property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getLast() {
+        return last;
+    }
+
+    /**
+     * Sets the value of the last property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setLast(String value) {
+        this.last = value;
+    }
+
+    /**
+     * Gets the value of the publisher property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getPublisher() {
+        return publisher;
+    }
+
+    /**
+     * Sets the value of the publisher property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setPublisher(String value) {
+        this.publisher = value;
+    }
+
+    /**
+     * Gets the value of the city property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getCity() {
+        return city;
+    }
+
+    /**
+     * Sets the value of the city property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setCity(String value) {
+        this.city = value;
+    }
+
+    /**
+     * Gets the value of the db property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getDb() {
+        return db;
+    }
+
+    /**
+     * Sets the value of the db property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setDb(String value) {
+        this.db = value;
+    }
+
+    /**
+     * Gets the value of the number property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getNumber() {
+        return number;
+    }
+
+    /**
+     * Sets the value of the number property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setNumber(String value) {
+        this.number = value;
+    }
+
+    /**
+     * Gets the value of the institute property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getInstitute() {
+        return institute;
+    }
+
+    /**
+     * Sets the value of the institute property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setInstitute(String value) {
+        this.institute = value;
+    }
+
+    /**
+     * Gets the value of the country property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getCountry() {
+        return country;
+    }
+
+    /**
+     * Sets the value of the country property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setCountry(String value) {
+        this.country = value;
+    }
+
+}
diff --git a/src/jalview/xml/binding/uniprot/CofactorType.java b/src/jalview/xml/binding/uniprot/CofactorType.java
new file mode 100644 (file)
index 0000000..9b91dc4
--- /dev/null
@@ -0,0 +1,134 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.13 at 10:18:53 AM BST 
+//
+
+
+package jalview.xml.binding.uniprot;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Describes a cofactor.
+ * 
+ * <p>Java class for cofactorType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="cofactorType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="dbReference" type="{http://uniprot.org/uniprot}dbReferenceType"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "cofactorType", propOrder = {
+    "name",
+    "dbReference"
+})
+public class CofactorType {
+
+    @XmlElement(required = true)
+    protected String name;
+    @XmlElement(required = true)
+    protected DbReferenceType dbReference;
+    @XmlAttribute(name = "evidence")
+    protected List<Integer> evidence;
+
+    /**
+     * Gets the value of the name property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Sets the value of the name property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setName(String value) {
+        this.name = value;
+    }
+
+    /**
+     * Gets the value of the dbReference property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link DbReferenceType }
+     *     
+     */
+    public DbReferenceType getDbReference() {
+        return dbReference;
+    }
+
+    /**
+     * Sets the value of the dbReference property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link DbReferenceType }
+     *     
+     */
+    public void setDbReference(DbReferenceType value) {
+        this.dbReference = value;
+    }
+
+    /**
+     * Gets the value of the evidence property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the evidence property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getEvidence().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Integer }
+     * 
+     * 
+     */
+    public List<Integer> getEvidence() {
+        if (evidence == null) {
+            evidence = new ArrayList<Integer>();
+        }
+        return this.evidence;
+    }
+
+}
diff --git a/src/jalview/xml/binding/uniprot/CommentType.java b/src/jalview/xml/binding/uniprot/CommentType.java
new file mode 100644 (file)
index 0000000..b0bbf77
--- /dev/null
@@ -0,0 +1,1730 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.13 at 10:18:53 AM BST 
+//
+
+
+package jalview.xml.binding.uniprot;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Describes different types of general annotations.
+ *             Equivalent to the flat file CC-line.
+ * 
+ * <p>Java class for commentType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="commentType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="molecule" type="{http://uniprot.org/uniprot}moleculeType" minOccurs="0"/>
+ *         &lt;choice minOccurs="0">
+ *           &lt;group ref="{http://uniprot.org/uniprot}bpcCommentGroup"/>
+ *           &lt;sequence>
+ *             &lt;element name="cofactor" type="{http://uniprot.org/uniprot}cofactorType" maxOccurs="unbounded"/>
+ *           &lt;/sequence>
+ *           &lt;sequence>
+ *             &lt;element name="subcellularLocation" type="{http://uniprot.org/uniprot}subcellularLocationType" maxOccurs="unbounded"/>
+ *           &lt;/sequence>
+ *           &lt;element name="conflict">
+ *             &lt;complexType>
+ *               &lt;complexContent>
+ *                 &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                   &lt;sequence>
+ *                     &lt;element name="sequence" minOccurs="0">
+ *                       &lt;complexType>
+ *                         &lt;complexContent>
+ *                           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                             &lt;attribute name="resource" use="required">
+ *                               &lt;simpleType>
+ *                                 &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *                                   &lt;enumeration value="EMBL-CDS"/>
+ *                                   &lt;enumeration value="EMBL"/>
+ *                                 &lt;/restriction>
+ *                               &lt;/simpleType>
+ *                             &lt;/attribute>
+ *                             &lt;attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                             &lt;attribute name="version" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *                           &lt;/restriction>
+ *                         &lt;/complexContent>
+ *                       &lt;/complexType>
+ *                     &lt;/element>
+ *                   &lt;/sequence>
+ *                   &lt;attribute name="type" use="required">
+ *                     &lt;simpleType>
+ *                       &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *                         &lt;enumeration value="frameshift"/>
+ *                         &lt;enumeration value="erroneous initiation"/>
+ *                         &lt;enumeration value="erroneous termination"/>
+ *                         &lt;enumeration value="erroneous gene model prediction"/>
+ *                         &lt;enumeration value="erroneous translation"/>
+ *                         &lt;enumeration value="miscellaneous discrepancy"/>
+ *                       &lt;/restriction>
+ *                     &lt;/simpleType>
+ *                   &lt;/attribute>
+ *                   &lt;attribute name="ref" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                 &lt;/restriction>
+ *               &lt;/complexContent>
+ *             &lt;/complexType>
+ *           &lt;/element>
+ *           &lt;sequence>
+ *             &lt;element name="link" maxOccurs="unbounded" minOccurs="0">
+ *               &lt;complexType>
+ *                 &lt;complexContent>
+ *                   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                     &lt;attribute name="uri" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *                   &lt;/restriction>
+ *                 &lt;/complexContent>
+ *               &lt;/complexType>
+ *             &lt;/element>
+ *           &lt;/sequence>
+ *           &lt;sequence>
+ *             &lt;element name="event" type="{http://uniprot.org/uniprot}eventType" maxOccurs="4"/>
+ *             &lt;element name="isoform" type="{http://uniprot.org/uniprot}isoformType" maxOccurs="unbounded" minOccurs="0"/>
+ *           &lt;/sequence>
+ *           &lt;sequence>
+ *             &lt;element name="interactant" type="{http://uniprot.org/uniprot}interactantType" maxOccurs="2" minOccurs="2"/>
+ *             &lt;element name="organismsDiffer" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ *             &lt;element name="experiments" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *           &lt;/sequence>
+ *           &lt;element name="disease">
+ *             &lt;complexType>
+ *               &lt;complexContent>
+ *                 &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                   &lt;sequence>
+ *                     &lt;element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *                     &lt;element name="acronym" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *                     &lt;element name="description" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *                     &lt;element name="dbReference" type="{http://uniprot.org/uniprot}dbReferenceType"/>
+ *                   &lt;/sequence>
+ *                   &lt;attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                 &lt;/restriction>
+ *               &lt;/complexContent>
+ *             &lt;/complexType>
+ *           &lt;/element>
+ *         &lt;/choice>
+ *         &lt;element name="location" type="{http://uniprot.org/uniprot}locationType" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="text" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="type" use="required">
+ *         &lt;simpleType>
+ *           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             &lt;enumeration value="allergen"/>
+ *             &lt;enumeration value="alternative products"/>
+ *             &lt;enumeration value="biotechnology"/>
+ *             &lt;enumeration value="biophysicochemical properties"/>
+ *             &lt;enumeration value="catalytic activity"/>
+ *             &lt;enumeration value="caution"/>
+ *             &lt;enumeration value="cofactor"/>
+ *             &lt;enumeration value="developmental stage"/>
+ *             &lt;enumeration value="disease"/>
+ *             &lt;enumeration value="domain"/>
+ *             &lt;enumeration value="disruption phenotype"/>
+ *             &lt;enumeration value="activity regulation"/>
+ *             &lt;enumeration value="function"/>
+ *             &lt;enumeration value="induction"/>
+ *             &lt;enumeration value="miscellaneous"/>
+ *             &lt;enumeration value="pathway"/>
+ *             &lt;enumeration value="pharmaceutical"/>
+ *             &lt;enumeration value="polymorphism"/>
+ *             &lt;enumeration value="PTM"/>
+ *             &lt;enumeration value="RNA editing"/>
+ *             &lt;enumeration value="similarity"/>
+ *             &lt;enumeration value="subcellular location"/>
+ *             &lt;enumeration value="sequence caution"/>
+ *             &lt;enumeration value="subunit"/>
+ *             &lt;enumeration value="tissue specificity"/>
+ *             &lt;enumeration value="toxic dose"/>
+ *             &lt;enumeration value="online information"/>
+ *             &lt;enumeration value="mass spectrometry"/>
+ *             &lt;enumeration value="interaction"/>
+ *           &lt;/restriction>
+ *         &lt;/simpleType>
+ *       &lt;/attribute>
+ *       &lt;attribute name="locationType" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="mass" type="{http://www.w3.org/2001/XMLSchema}float" />
+ *       &lt;attribute name="error" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="method" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "commentType", propOrder = {
+    "molecule",
+    "absorption",
+    "kinetics",
+    "phDependence",
+    "redoxPotential",
+    "temperatureDependence",
+    "cofactor",
+    "subcellularLocation",
+    "conflict",
+    "link",
+    "event",
+    "isoform",
+    "interactant",
+    "organismsDiffer",
+    "experiments",
+    "disease",
+    "location",
+    "text"
+})
+public class CommentType {
+
+    protected MoleculeType molecule;
+    protected CommentType.Absorption absorption;
+    protected CommentType.Kinetics kinetics;
+    protected CommentType.PhDependence phDependence;
+    protected CommentType.RedoxPotential redoxPotential;
+    protected CommentType.TemperatureDependence temperatureDependence;
+    protected List<CofactorType> cofactor;
+    protected List<SubcellularLocationType> subcellularLocation;
+    protected CommentType.Conflict conflict;
+    protected List<CommentType.Link> link;
+    protected List<EventType> event;
+    protected List<IsoformType> isoform;
+    protected List<InteractantType> interactant;
+    @XmlElement(defaultValue = "false")
+    protected Boolean organismsDiffer;
+    protected Integer experiments;
+    protected CommentType.Disease disease;
+    protected List<LocationType> location;
+    protected List<EvidencedStringType> text;
+    @XmlAttribute(name = "type", required = true)
+    protected String type;
+    @XmlAttribute(name = "locationType")
+    protected String locationType;
+    @XmlAttribute(name = "name")
+    protected String name;
+    @XmlAttribute(name = "mass")
+    protected Float mass;
+    @XmlAttribute(name = "error")
+    protected String error;
+    @XmlAttribute(name = "method")
+    protected String method;
+    @XmlAttribute(name = "evidence")
+    protected List<Integer> evidence;
+
+    /**
+     * Gets the value of the molecule property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link MoleculeType }
+     *     
+     */
+    public MoleculeType getMolecule() {
+        return molecule;
+    }
+
+    /**
+     * Sets the value of the molecule property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link MoleculeType }
+     *     
+     */
+    public void setMolecule(MoleculeType value) {
+        this.molecule = value;
+    }
+
+    /**
+     * Gets the value of the absorption property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link CommentType.Absorption }
+     *     
+     */
+    public CommentType.Absorption getAbsorption() {
+        return absorption;
+    }
+
+    /**
+     * Sets the value of the absorption property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link CommentType.Absorption }
+     *     
+     */
+    public void setAbsorption(CommentType.Absorption value) {
+        this.absorption = value;
+    }
+
+    /**
+     * Gets the value of the kinetics property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link CommentType.Kinetics }
+     *     
+     */
+    public CommentType.Kinetics getKinetics() {
+        return kinetics;
+    }
+
+    /**
+     * Sets the value of the kinetics property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link CommentType.Kinetics }
+     *     
+     */
+    public void setKinetics(CommentType.Kinetics value) {
+        this.kinetics = value;
+    }
+
+    /**
+     * Gets the value of the phDependence property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link CommentType.PhDependence }
+     *     
+     */
+    public CommentType.PhDependence getPhDependence() {
+        return phDependence;
+    }
+
+    /**
+     * Sets the value of the phDependence property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link CommentType.PhDependence }
+     *     
+     */
+    public void setPhDependence(CommentType.PhDependence value) {
+        this.phDependence = value;
+    }
+
+    /**
+     * Gets the value of the redoxPotential property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link CommentType.RedoxPotential }
+     *     
+     */
+    public CommentType.RedoxPotential getRedoxPotential() {
+        return redoxPotential;
+    }
+
+    /**
+     * Sets the value of the redoxPotential property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link CommentType.RedoxPotential }
+     *     
+     */
+    public void setRedoxPotential(CommentType.RedoxPotential value) {
+        this.redoxPotential = value;
+    }
+
+    /**
+     * Gets the value of the temperatureDependence property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link CommentType.TemperatureDependence }
+     *     
+     */
+    public CommentType.TemperatureDependence getTemperatureDependence() {
+        return temperatureDependence;
+    }
+
+    /**
+     * Sets the value of the temperatureDependence property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link CommentType.TemperatureDependence }
+     *     
+     */
+    public void setTemperatureDependence(CommentType.TemperatureDependence value) {
+        this.temperatureDependence = value;
+    }
+
+    /**
+     * Gets the value of the cofactor property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the cofactor property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getCofactor().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link CofactorType }
+     * 
+     * 
+     */
+    public List<CofactorType> getCofactor() {
+        if (cofactor == null) {
+            cofactor = new ArrayList<CofactorType>();
+        }
+        return this.cofactor;
+    }
+
+    /**
+     * Gets the value of the subcellularLocation property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the subcellularLocation property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getSubcellularLocation().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link SubcellularLocationType }
+     * 
+     * 
+     */
+    public List<SubcellularLocationType> getSubcellularLocation() {
+        if (subcellularLocation == null) {
+            subcellularLocation = new ArrayList<SubcellularLocationType>();
+        }
+        return this.subcellularLocation;
+    }
+
+    /**
+     * Gets the value of the conflict property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link CommentType.Conflict }
+     *     
+     */
+    public CommentType.Conflict getConflict() {
+        return conflict;
+    }
+
+    /**
+     * Sets the value of the conflict property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link CommentType.Conflict }
+     *     
+     */
+    public void setConflict(CommentType.Conflict value) {
+        this.conflict = value;
+    }
+
+    /**
+     * Gets the value of the link property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the link property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getLink().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link CommentType.Link }
+     * 
+     * 
+     */
+    public List<CommentType.Link> getLink() {
+        if (link == null) {
+            link = new ArrayList<CommentType.Link>();
+        }
+        return this.link;
+    }
+
+    /**
+     * Gets the value of the event property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the event property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getEvent().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link EventType }
+     * 
+     * 
+     */
+    public List<EventType> getEvent() {
+        if (event == null) {
+            event = new ArrayList<EventType>();
+        }
+        return this.event;
+    }
+
+    /**
+     * Gets the value of the isoform property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the isoform property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getIsoform().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link IsoformType }
+     * 
+     * 
+     */
+    public List<IsoformType> getIsoform() {
+        if (isoform == null) {
+            isoform = new ArrayList<IsoformType>();
+        }
+        return this.isoform;
+    }
+
+    /**
+     * Gets the value of the interactant property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the interactant property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getInteractant().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link InteractantType }
+     * 
+     * 
+     */
+    public List<InteractantType> getInteractant() {
+        if (interactant == null) {
+            interactant = new ArrayList<InteractantType>();
+        }
+        return this.interactant;
+    }
+
+    /**
+     * Gets the value of the organismsDiffer property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Boolean }
+     *     
+     */
+    public Boolean isOrganismsDiffer() {
+        return organismsDiffer;
+    }
+
+    /**
+     * Sets the value of the organismsDiffer property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Boolean }
+     *     
+     */
+    public void setOrganismsDiffer(Boolean value) {
+        this.organismsDiffer = value;
+    }
+
+    /**
+     * Gets the value of the experiments property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Integer }
+     *     
+     */
+    public Integer getExperiments() {
+        return experiments;
+    }
+
+    /**
+     * Sets the value of the experiments property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Integer }
+     *     
+     */
+    public void setExperiments(Integer value) {
+        this.experiments = value;
+    }
+
+    /**
+     * Gets the value of the disease property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link CommentType.Disease }
+     *     
+     */
+    public CommentType.Disease getDisease() {
+        return disease;
+    }
+
+    /**
+     * Sets the value of the disease property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link CommentType.Disease }
+     *     
+     */
+    public void setDisease(CommentType.Disease value) {
+        this.disease = value;
+    }
+
+    /**
+     * Gets the value of the location property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the location property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getLocation().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link LocationType }
+     * 
+     * 
+     */
+    public List<LocationType> getLocation() {
+        if (location == null) {
+            location = new ArrayList<LocationType>();
+        }
+        return this.location;
+    }
+
+    /**
+     * Gets the value of the text property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the text property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getText().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link EvidencedStringType }
+     * 
+     * 
+     */
+    public List<EvidencedStringType> getText() {
+        if (text == null) {
+            text = new ArrayList<EvidencedStringType>();
+        }
+        return this.text;
+    }
+
+    /**
+     * Gets the value of the type property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * Sets the value of the type property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setType(String value) {
+        this.type = value;
+    }
+
+    /**
+     * Gets the value of the locationType property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getLocationType() {
+        return locationType;
+    }
+
+    /**
+     * Sets the value of the locationType property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setLocationType(String value) {
+        this.locationType = value;
+    }
+
+    /**
+     * Gets the value of the name property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Sets the value of the name property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setName(String value) {
+        this.name = value;
+    }
+
+    /**
+     * Gets the value of the mass property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Float }
+     *     
+     */
+    public Float getMass() {
+        return mass;
+    }
+
+    /**
+     * Sets the value of the mass property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Float }
+     *     
+     */
+    public void setMass(Float value) {
+        this.mass = value;
+    }
+
+    /**
+     * Gets the value of the error property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getError() {
+        return error;
+    }
+
+    /**
+     * Sets the value of the error property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setError(String value) {
+        this.error = value;
+    }
+
+    /**
+     * Gets the value of the method property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getMethod() {
+        return method;
+    }
+
+    /**
+     * Sets the value of the method property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setMethod(String value) {
+        this.method = value;
+    }
+
+    /**
+     * Gets the value of the evidence property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the evidence property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getEvidence().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Integer }
+     * 
+     * 
+     */
+    public List<Integer> getEvidence() {
+        if (evidence == null) {
+            evidence = new ArrayList<Integer>();
+        }
+        return this.evidence;
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;sequence>
+     *         &lt;element name="max" type="{http://uniprot.org/uniprot}evidencedStringType" minOccurs="0"/>
+     *         &lt;element name="text" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
+     *       &lt;/sequence>
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "max",
+        "text"
+    })
+    public static class Absorption {
+
+        protected EvidencedStringType max;
+        protected List<EvidencedStringType> text;
+
+        /**
+         * Gets the value of the max property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link EvidencedStringType }
+         *     
+         */
+        public EvidencedStringType getMax() {
+            return max;
+        }
+
+        /**
+         * Sets the value of the max property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link EvidencedStringType }
+         *     
+         */
+        public void setMax(EvidencedStringType value) {
+            this.max = value;
+        }
+
+        /**
+         * Gets the value of the text property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the text property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getText().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link EvidencedStringType }
+         * 
+         * 
+         */
+        public List<EvidencedStringType> getText() {
+            if (text == null) {
+                text = new ArrayList<EvidencedStringType>();
+            }
+            return this.text;
+        }
+
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;sequence>
+     *         &lt;element name="sequence" minOccurs="0">
+     *           &lt;complexType>
+     *             &lt;complexContent>
+     *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                 &lt;attribute name="resource" use="required">
+     *                   &lt;simpleType>
+     *                     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+     *                       &lt;enumeration value="EMBL-CDS"/>
+     *                       &lt;enumeration value="EMBL"/>
+     *                     &lt;/restriction>
+     *                   &lt;/simpleType>
+     *                 &lt;/attribute>
+     *                 &lt;attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *                 &lt;attribute name="version" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *               &lt;/restriction>
+     *             &lt;/complexContent>
+     *           &lt;/complexType>
+     *         &lt;/element>
+     *       &lt;/sequence>
+     *       &lt;attribute name="type" use="required">
+     *         &lt;simpleType>
+     *           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+     *             &lt;enumeration value="frameshift"/>
+     *             &lt;enumeration value="erroneous initiation"/>
+     *             &lt;enumeration value="erroneous termination"/>
+     *             &lt;enumeration value="erroneous gene model prediction"/>
+     *             &lt;enumeration value="erroneous translation"/>
+     *             &lt;enumeration value="miscellaneous discrepancy"/>
+     *           &lt;/restriction>
+     *         &lt;/simpleType>
+     *       &lt;/attribute>
+     *       &lt;attribute name="ref" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "sequence"
+    })
+    public static class Conflict {
+
+        protected CommentType.Conflict.Sequence sequence;
+        @XmlAttribute(name = "type", required = true)
+        protected String type;
+        @XmlAttribute(name = "ref")
+        protected String ref;
+
+        /**
+         * Gets the value of the sequence property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link CommentType.Conflict.Sequence }
+         *     
+         */
+        public CommentType.Conflict.Sequence getSequence() {
+            return sequence;
+        }
+
+        /**
+         * Sets the value of the sequence property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link CommentType.Conflict.Sequence }
+         *     
+         */
+        public void setSequence(CommentType.Conflict.Sequence value) {
+            this.sequence = value;
+        }
+
+        /**
+         * Gets the value of the type property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getType() {
+            return type;
+        }
+
+        /**
+         * Sets the value of the type property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setType(String value) {
+            this.type = value;
+        }
+
+        /**
+         * Gets the value of the ref property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getRef() {
+            return ref;
+        }
+
+        /**
+         * Sets the value of the ref property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setRef(String value) {
+            this.ref = value;
+        }
+
+
+        /**
+         * <p>Java class for anonymous complex type.
+         * 
+         * <p>The following schema fragment specifies the expected content contained within this class.
+         * 
+         * <pre>
+         * &lt;complexType>
+         *   &lt;complexContent>
+         *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *       &lt;attribute name="resource" use="required">
+         *         &lt;simpleType>
+         *           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+         *             &lt;enumeration value="EMBL-CDS"/>
+         *             &lt;enumeration value="EMBL"/>
+         *           &lt;/restriction>
+         *         &lt;/simpleType>
+         *       &lt;/attribute>
+         *       &lt;attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+         *       &lt;attribute name="version" type="{http://www.w3.org/2001/XMLSchema}int" />
+         *     &lt;/restriction>
+         *   &lt;/complexContent>
+         * &lt;/complexType>
+         * </pre>
+         * 
+         * 
+         */
+        @XmlAccessorType(XmlAccessType.FIELD)
+        @XmlType(name = "")
+        public static class Sequence {
+
+            @XmlAttribute(name = "resource", required = true)
+            protected String resource;
+            @XmlAttribute(name = "id", required = true)
+            protected String id;
+            @XmlAttribute(name = "version")
+            protected Integer version;
+
+            /**
+             * Gets the value of the resource property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link String }
+             *     
+             */
+            public String getResource() {
+                return resource;
+            }
+
+            /**
+             * Sets the value of the resource property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link String }
+             *     
+             */
+            public void setResource(String value) {
+                this.resource = value;
+            }
+
+            /**
+             * Gets the value of the id property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link String }
+             *     
+             */
+            public String getId() {
+                return id;
+            }
+
+            /**
+             * Sets the value of the id property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link String }
+             *     
+             */
+            public void setId(String value) {
+                this.id = value;
+            }
+
+            /**
+             * Gets the value of the version property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link Integer }
+             *     
+             */
+            public Integer getVersion() {
+                return version;
+            }
+
+            /**
+             * Sets the value of the version property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link Integer }
+             *     
+             */
+            public void setVersion(Integer value) {
+                this.version = value;
+            }
+
+        }
+
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;sequence>
+     *         &lt;element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+     *         &lt;element name="acronym" type="{http://www.w3.org/2001/XMLSchema}string"/>
+     *         &lt;element name="description" type="{http://www.w3.org/2001/XMLSchema}string"/>
+     *         &lt;element name="dbReference" type="{http://uniprot.org/uniprot}dbReferenceType"/>
+     *       &lt;/sequence>
+     *       &lt;attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "name",
+        "acronym",
+        "description",
+        "dbReference"
+    })
+    public static class Disease {
+
+        @XmlElement(required = true)
+        protected String name;
+        @XmlElement(required = true)
+        protected String acronym;
+        @XmlElement(required = true)
+        protected String description;
+        @XmlElement(required = true)
+        protected DbReferenceType dbReference;
+        @XmlAttribute(name = "id", required = true)
+        protected String id;
+
+        /**
+         * Gets the value of the name property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getName() {
+            return name;
+        }
+
+        /**
+         * Sets the value of the name property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setName(String value) {
+            this.name = value;
+        }
+
+        /**
+         * Gets the value of the acronym property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getAcronym() {
+            return acronym;
+        }
+
+        /**
+         * Sets the value of the acronym property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setAcronym(String value) {
+            this.acronym = value;
+        }
+
+        /**
+         * Gets the value of the description property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getDescription() {
+            return description;
+        }
+
+        /**
+         * Sets the value of the description property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setDescription(String value) {
+            this.description = value;
+        }
+
+        /**
+         * Gets the value of the dbReference property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link DbReferenceType }
+         *     
+         */
+        public DbReferenceType getDbReference() {
+            return dbReference;
+        }
+
+        /**
+         * Sets the value of the dbReference property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link DbReferenceType }
+         *     
+         */
+        public void setDbReference(DbReferenceType value) {
+            this.dbReference = value;
+        }
+
+        /**
+         * Gets the value of the id property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getId() {
+            return id;
+        }
+
+        /**
+         * Sets the value of the id property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setId(String value) {
+            this.id = value;
+        }
+
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;sequence>
+     *         &lt;element name="KM" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
+     *         &lt;element name="Vmax" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
+     *         &lt;element name="text" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
+     *       &lt;/sequence>
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "km",
+        "vmax",
+        "text"
+    })
+    public static class Kinetics {
+
+        @XmlElement(name = "KM")
+        protected List<EvidencedStringType> km;
+        @XmlElement(name = "Vmax")
+        protected List<EvidencedStringType> vmax;
+        protected List<EvidencedStringType> text;
+
+        /**
+         * Gets the value of the km property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the km property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getKM().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link EvidencedStringType }
+         * 
+         * 
+         */
+        public List<EvidencedStringType> getKM() {
+            if (km == null) {
+                km = new ArrayList<EvidencedStringType>();
+            }
+            return this.km;
+        }
+
+        /**
+         * Gets the value of the vmax property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the vmax property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getVmax().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link EvidencedStringType }
+         * 
+         * 
+         */
+        public List<EvidencedStringType> getVmax() {
+            if (vmax == null) {
+                vmax = new ArrayList<EvidencedStringType>();
+            }
+            return this.vmax;
+        }
+
+        /**
+         * Gets the value of the text property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the text property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getText().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link EvidencedStringType }
+         * 
+         * 
+         */
+        public List<EvidencedStringType> getText() {
+            if (text == null) {
+                text = new ArrayList<EvidencedStringType>();
+            }
+            return this.text;
+        }
+
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;attribute name="uri" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "")
+    public static class Link {
+
+        @XmlAttribute(name = "uri", required = true)
+        @XmlSchemaType(name = "anyURI")
+        protected String uri;
+
+        /**
+         * Gets the value of the uri property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getUri() {
+            return uri;
+        }
+
+        /**
+         * Sets the value of the uri property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setUri(String value) {
+            this.uri = value;
+        }
+
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;sequence>
+     *         &lt;element name="text" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded"/>
+     *       &lt;/sequence>
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "text"
+    })
+    public static class PhDependence {
+
+        @XmlElement(required = true)
+        protected List<EvidencedStringType> text;
+
+        /**
+         * Gets the value of the text property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the text property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getText().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link EvidencedStringType }
+         * 
+         * 
+         */
+        public List<EvidencedStringType> getText() {
+            if (text == null) {
+                text = new ArrayList<EvidencedStringType>();
+            }
+            return this.text;
+        }
+
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;sequence>
+     *         &lt;element name="text" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded"/>
+     *       &lt;/sequence>
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "text"
+    })
+    public static class RedoxPotential {
+
+        @XmlElement(required = true)
+        protected List<EvidencedStringType> text;
+
+        /**
+         * Gets the value of the text property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the text property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getText().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link EvidencedStringType }
+         * 
+         * 
+         */
+        public List<EvidencedStringType> getText() {
+            if (text == null) {
+                text = new ArrayList<EvidencedStringType>();
+            }
+            return this.text;
+        }
+
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;sequence>
+     *         &lt;element name="text" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded"/>
+     *       &lt;/sequence>
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "text"
+    })
+    public static class TemperatureDependence {
+
+        @XmlElement(required = true)
+        protected List<EvidencedStringType> text;
+
+        /**
+         * Gets the value of the text property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the text property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getText().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link EvidencedStringType }
+         * 
+         * 
+         */
+        public List<EvidencedStringType> getText() {
+            if (text == null) {
+                text = new ArrayList<EvidencedStringType>();
+            }
+            return this.text;
+        }
+
+    }
+
+}
diff --git a/src/jalview/xml/binding/uniprot/ConsortiumType.java b/src/jalview/xml/binding/uniprot/ConsortiumType.java
new file mode 100644 (file)
index 0000000..c74c1e7
--- /dev/null
@@ -0,0 +1,68 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.13 at 10:18:53 AM BST 
+//
+
+
+package jalview.xml.binding.uniprot;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Describes the authors of a citation when these are represented by a consortium.
+ *             Equivalent to the flat file RG-line.
+ * 
+ * <p>Java class for consortiumType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="consortiumType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "consortiumType")
+public class ConsortiumType {
+
+    @XmlAttribute(name = "name", required = true)
+    protected String name;
+
+    /**
+     * Gets the value of the name property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Sets the value of the name property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setName(String value) {
+        this.name = value;
+    }
+
+}
diff --git a/src/jalview/xml/binding/uniprot/DbReferenceType.java b/src/jalview/xml/binding/uniprot/DbReferenceType.java
new file mode 100644 (file)
index 0000000..184ee40
--- /dev/null
@@ -0,0 +1,192 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.13 at 10:18:53 AM BST 
+//
+
+
+package jalview.xml.binding.uniprot;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Describes a database cross-reference.
+ *             Equivalent to the flat file DR-line.
+ *             
+ * 
+ * <p>Java class for dbReferenceType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="dbReferenceType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="molecule" type="{http://uniprot.org/uniprot}moleculeType" minOccurs="0"/>
+ *         &lt;element name="property" type="{http://uniprot.org/uniprot}propertyType" maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="type" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "dbReferenceType", propOrder = {
+    "molecule",
+    "property"
+})
+public class DbReferenceType {
+
+    protected MoleculeType molecule;
+    protected List<PropertyType> property;
+    @XmlAttribute(name = "type", required = true)
+    protected String type;
+    @XmlAttribute(name = "id", required = true)
+    protected String id;
+    @XmlAttribute(name = "evidence")
+    protected List<Integer> evidence;
+
+    /**
+     * Gets the value of the molecule property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link MoleculeType }
+     *     
+     */
+    public MoleculeType getMolecule() {
+        return molecule;
+    }
+
+    /**
+     * Sets the value of the molecule property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link MoleculeType }
+     *     
+     */
+    public void setMolecule(MoleculeType value) {
+        this.molecule = value;
+    }
+
+    /**
+     * Gets the value of the property property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the property property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getProperty().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link PropertyType }
+     * 
+     * 
+     */
+    public List<PropertyType> getProperty() {
+        if (property == null) {
+            property = new ArrayList<PropertyType>();
+        }
+        return this.property;
+    }
+
+    /**
+     * Gets the value of the type property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * Sets the value of the type property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setType(String value) {
+        this.type = value;
+    }
+
+    /**
+     * Gets the value of the id property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * Sets the value of the id property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setId(String value) {
+        this.id = value;
+    }
+
+    /**
+     * Gets the value of the evidence property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the evidence property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getEvidence().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Integer }
+     * 
+     * 
+     */
+    public List<Integer> getEvidence() {
+        if (evidence == null) {
+            evidence = new ArrayList<Integer>();
+        }
+        return this.evidence;
+    }
+
+}
diff --git a/src/jalview/xml/binding/uniprot/Entry.java b/src/jalview/xml/binding/uniprot/Entry.java
new file mode 100644 (file)
index 0000000..1ca91bc
--- /dev/null
@@ -0,0 +1,625 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.13 at 10:18:53 AM BST 
+//
+
+
+package jalview.xml.binding.uniprot;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.datatype.XMLGregorianCalendar;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="accession" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
+ *         &lt;element name="name" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
+ *         &lt;element name="protein" type="{http://uniprot.org/uniprot}proteinType"/>
+ *         &lt;element name="gene" type="{http://uniprot.org/uniprot}geneType" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="organism" type="{http://uniprot.org/uniprot}organismType"/>
+ *         &lt;element name="organismHost" type="{http://uniprot.org/uniprot}organismType" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="geneLocation" type="{http://uniprot.org/uniprot}geneLocationType" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="reference" type="{http://uniprot.org/uniprot}referenceType" maxOccurs="unbounded"/>
+ *         &lt;element name="comment" type="{http://uniprot.org/uniprot}commentType" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="dbReference" type="{http://uniprot.org/uniprot}dbReferenceType" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="proteinExistence" type="{http://uniprot.org/uniprot}proteinExistenceType"/>
+ *         &lt;element name="keyword" type="{http://uniprot.org/uniprot}keywordType" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="feature" type="{http://uniprot.org/uniprot}featureType" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="evidence" type="{http://uniprot.org/uniprot}evidenceType" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="sequence" type="{http://uniprot.org/uniprot}sequenceType"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="dataset" use="required">
+ *         &lt;simpleType>
+ *           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             &lt;enumeration value="Swiss-Prot"/>
+ *             &lt;enumeration value="TrEMBL"/>
+ *           &lt;/restriction>
+ *         &lt;/simpleType>
+ *       &lt;/attribute>
+ *       &lt;attribute name="created" use="required" type="{http://www.w3.org/2001/XMLSchema}date" />
+ *       &lt;attribute name="modified" use="required" type="{http://www.w3.org/2001/XMLSchema}date" />
+ *       &lt;attribute name="version" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "accession",
+    "name",
+    "protein",
+    "gene",
+    "organism",
+    "organismHost",
+    "geneLocation",
+    "reference",
+    "comment",
+    "dbReference",
+    "proteinExistence",
+    "keyword",
+    "feature",
+    "evidence",
+    "sequence"
+})
+@XmlRootElement(name = "entry")
+public class Entry {
+
+    @XmlElement(required = true)
+    protected List<String> accession;
+    @XmlElement(required = true)
+    protected List<String> name;
+    @XmlElement(required = true)
+    protected ProteinType protein;
+    protected List<GeneType> gene;
+    @XmlElement(required = true)
+    protected OrganismType organism;
+    protected List<OrganismType> organismHost;
+    protected List<GeneLocationType> geneLocation;
+    @XmlElement(required = true)
+    protected List<ReferenceType> reference;
+    @XmlElement(nillable = true)
+    protected List<CommentType> comment;
+    protected List<DbReferenceType> dbReference;
+    @XmlElement(required = true)
+    protected ProteinExistenceType proteinExistence;
+    protected List<KeywordType> keyword;
+    protected List<FeatureType> feature;
+    protected List<EvidenceType> evidence;
+    @XmlElement(required = true)
+    protected SequenceType sequence;
+    @XmlAttribute(name = "dataset", required = true)
+    protected String dataset;
+    @XmlAttribute(name = "created", required = true)
+    @XmlSchemaType(name = "date")
+    protected XMLGregorianCalendar created;
+    @XmlAttribute(name = "modified", required = true)
+    @XmlSchemaType(name = "date")
+    protected XMLGregorianCalendar modified;
+    @XmlAttribute(name = "version", required = true)
+    protected int version;
+
+    /**
+     * Gets the value of the accession property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the accession property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getAccession().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link String }
+     * 
+     * 
+     */
+    public List<String> getAccession() {
+        if (accession == null) {
+            accession = new ArrayList<String>();
+        }
+        return this.accession;
+    }
+
+    /**
+     * Gets the value of the name property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the name property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getName().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link String }
+     * 
+     * 
+     */
+    public List<String> getName() {
+        if (name == null) {
+            name = new ArrayList<String>();
+        }
+        return this.name;
+    }
+
+    /**
+     * Gets the value of the protein property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link ProteinType }
+     *     
+     */
+    public ProteinType getProtein() {
+        return protein;
+    }
+
+    /**
+     * Sets the value of the protein property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link ProteinType }
+     *     
+     */
+    public void setProtein(ProteinType value) {
+        this.protein = value;
+    }
+
+    /**
+     * Gets the value of the gene property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the gene property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getGene().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link GeneType }
+     * 
+     * 
+     */
+    public List<GeneType> getGene() {
+        if (gene == null) {
+            gene = new ArrayList<GeneType>();
+        }
+        return this.gene;
+    }
+
+    /**
+     * Gets the value of the organism property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link OrganismType }
+     *     
+     */
+    public OrganismType getOrganism() {
+        return organism;
+    }
+
+    /**
+     * Sets the value of the organism property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link OrganismType }
+     *     
+     */
+    public void setOrganism(OrganismType value) {
+        this.organism = value;
+    }
+
+    /**
+     * Gets the value of the organismHost property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the organismHost property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getOrganismHost().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link OrganismType }
+     * 
+     * 
+     */
+    public List<OrganismType> getOrganismHost() {
+        if (organismHost == null) {
+            organismHost = new ArrayList<OrganismType>();
+        }
+        return this.organismHost;
+    }
+
+    /**
+     * Gets the value of the geneLocation property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the geneLocation property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getGeneLocation().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link GeneLocationType }
+     * 
+     * 
+     */
+    public List<GeneLocationType> getGeneLocation() {
+        if (geneLocation == null) {
+            geneLocation = new ArrayList<GeneLocationType>();
+        }
+        return this.geneLocation;
+    }
+
+    /**
+     * Gets the value of the reference property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the reference property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getReference().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link ReferenceType }
+     * 
+     * 
+     */
+    public List<ReferenceType> getReference() {
+        if (reference == null) {
+            reference = new ArrayList<ReferenceType>();
+        }
+        return this.reference;
+    }
+
+    /**
+     * Gets the value of the comment property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the comment property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getComment().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link CommentType }
+     * 
+     * 
+     */
+    public List<CommentType> getComment() {
+        if (comment == null) {
+            comment = new ArrayList<CommentType>();
+        }
+        return this.comment;
+    }
+
+    /**
+     * Gets the value of the dbReference property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the dbReference property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getDbReference().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link DbReferenceType }
+     * 
+     * 
+     */
+    public List<DbReferenceType> getDbReference() {
+        if (dbReference == null) {
+            dbReference = new ArrayList<DbReferenceType>();
+        }
+        return this.dbReference;
+    }
+
+    /**
+     * Gets the value of the proteinExistence property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link ProteinExistenceType }
+     *     
+     */
+    public ProteinExistenceType getProteinExistence() {
+        return proteinExistence;
+    }
+
+    /**
+     * Sets the value of the proteinExistence property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link ProteinExistenceType }
+     *     
+     */
+    public void setProteinExistence(ProteinExistenceType value) {
+        this.proteinExistence = value;
+    }
+
+    /**
+     * Gets the value of the keyword property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the keyword property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getKeyword().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link KeywordType }
+     * 
+     * 
+     */
+    public List<KeywordType> getKeyword() {
+        if (keyword == null) {
+            keyword = new ArrayList<KeywordType>();
+        }
+        return this.keyword;
+    }
+
+    /**
+     * Gets the value of the feature property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the feature property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getFeature().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link FeatureType }
+     * 
+     * 
+     */
+    public List<FeatureType> getFeature() {
+        if (feature == null) {
+            feature = new ArrayList<FeatureType>();
+        }
+        return this.feature;
+    }
+
+    /**
+     * Gets the value of the evidence property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the evidence property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getEvidence().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link EvidenceType }
+     * 
+     * 
+     */
+    public List<EvidenceType> getEvidence() {
+        if (evidence == null) {
+            evidence = new ArrayList<EvidenceType>();
+        }
+        return this.evidence;
+    }
+
+    /**
+     * Gets the value of the sequence property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link SequenceType }
+     *     
+     */
+    public SequenceType getSequence() {
+        return sequence;
+    }
+
+    /**
+     * Sets the value of the sequence property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link SequenceType }
+     *     
+     */
+    public void setSequence(SequenceType value) {
+        this.sequence = value;
+    }
+
+    /**
+     * Gets the value of the dataset property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getDataset() {
+        return dataset;
+    }
+
+    /**
+     * Sets the value of the dataset property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setDataset(String value) {
+        this.dataset = value;
+    }
+
+    /**
+     * Gets the value of the created property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link XMLGregorianCalendar }
+     *     
+     */
+    public XMLGregorianCalendar getCreated() {
+        return created;
+    }
+
+    /**
+     * Sets the value of the created property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link XMLGregorianCalendar }
+     *     
+     */
+    public void setCreated(XMLGregorianCalendar value) {
+        this.created = value;
+    }
+
+    /**
+     * Gets the value of the modified property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link XMLGregorianCalendar }
+     *     
+     */
+    public XMLGregorianCalendar getModified() {
+        return modified;
+    }
+
+    /**
+     * Sets the value of the modified property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link XMLGregorianCalendar }
+     *     
+     */
+    public void setModified(XMLGregorianCalendar value) {
+        this.modified = value;
+    }
+
+    /**
+     * Gets the value of the version property.
+     * 
+     */
+    public int getVersion() {
+        return version;
+    }
+
+    /**
+     * Sets the value of the version property.
+     * 
+     */
+    public void setVersion(int value) {
+        this.version = value;
+    }
+
+}
diff --git a/src/jalview/xml/binding/uniprot/EventType.java b/src/jalview/xml/binding/uniprot/EventType.java
new file mode 100644 (file)
index 0000000..3b5b8a0
--- /dev/null
@@ -0,0 +1,76 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.13 at 10:18:53 AM BST 
+//
+
+
+package jalview.xml.binding.uniprot;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Describes the type of events that cause alternative products.
+ * 
+ * <p>Java class for eventType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="eventType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;attribute name="type" use="required">
+ *         &lt;simpleType>
+ *           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             &lt;enumeration value="alternative splicing"/>
+ *             &lt;enumeration value="alternative initiation"/>
+ *             &lt;enumeration value="alternative promoter"/>
+ *             &lt;enumeration value="ribosomal frameshifting"/>
+ *           &lt;/restriction>
+ *         &lt;/simpleType>
+ *       &lt;/attribute>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "eventType")
+public class EventType {
+
+    @XmlAttribute(name = "type", required = true)
+    protected String type;
+
+    /**
+     * Gets the value of the type property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * Sets the value of the type property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setType(String value) {
+        this.type = value;
+    }
+
+}
diff --git a/src/jalview/xml/binding/uniprot/EvidenceType.java b/src/jalview/xml/binding/uniprot/EvidenceType.java
new file mode 100644 (file)
index 0000000..77a7561
--- /dev/null
@@ -0,0 +1,153 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.13 at 10:18:53 AM BST 
+//
+
+
+package jalview.xml.binding.uniprot;
+
+import java.math.BigInteger;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Describes the evidence for an annotation.
+ *             No flat file equivalent.
+ * 
+ * <p>Java class for evidenceType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="evidenceType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="source" type="{http://uniprot.org/uniprot}sourceType" minOccurs="0"/>
+ *         &lt;element name="importedFrom" type="{http://uniprot.org/uniprot}importedFromType" minOccurs="0"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="type" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="key" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "evidenceType", propOrder = {
+    "source",
+    "importedFrom"
+})
+public class EvidenceType {
+
+    protected SourceType source;
+    protected ImportedFromType importedFrom;
+    @XmlAttribute(name = "type", required = true)
+    protected String type;
+    @XmlAttribute(name = "key", required = true)
+    protected BigInteger key;
+
+    /**
+     * Gets the value of the source property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link SourceType }
+     *     
+     */
+    public SourceType getSource() {
+        return source;
+    }
+
+    /**
+     * Sets the value of the source property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link SourceType }
+     *     
+     */
+    public void setSource(SourceType value) {
+        this.source = value;
+    }
+
+    /**
+     * Gets the value of the importedFrom property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link ImportedFromType }
+     *     
+     */
+    public ImportedFromType getImportedFrom() {
+        return importedFrom;
+    }
+
+    /**
+     * Sets the value of the importedFrom property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link ImportedFromType }
+     *     
+     */
+    public void setImportedFrom(ImportedFromType value) {
+        this.importedFrom = value;
+    }
+
+    /**
+     * Gets the value of the type property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * Sets the value of the type property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setType(String value) {
+        this.type = value;
+    }
+
+    /**
+     * Gets the value of the key property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link BigInteger }
+     *     
+     */
+    public BigInteger getKey() {
+        return key;
+    }
+
+    /**
+     * Sets the value of the key property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link BigInteger }
+     *     
+     */
+    public void setKey(BigInteger value) {
+        this.key = value;
+    }
+
+}
diff --git a/src/jalview/xml/binding/uniprot/EvidencedStringType.java b/src/jalview/xml/binding/uniprot/EvidencedStringType.java
new file mode 100644 (file)
index 0000000..4c1fa7b
--- /dev/null
@@ -0,0 +1,136 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.13 at 10:18:53 AM BST 
+//
+
+
+package jalview.xml.binding.uniprot;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+
+
+/**
+ * <p>Java class for evidencedStringType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="evidencedStringType">
+ *   &lt;simpleContent>
+ *     &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>string">
+ *       &lt;attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+ *       &lt;attribute name="status">
+ *         &lt;simpleType>
+ *           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             &lt;enumeration value="by similarity"/>
+ *             &lt;enumeration value="probable"/>
+ *             &lt;enumeration value="potential"/>
+ *           &lt;/restriction>
+ *         &lt;/simpleType>
+ *       &lt;/attribute>
+ *     &lt;/extension>
+ *   &lt;/simpleContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "evidencedStringType", propOrder = {
+    "value"
+})
+public class EvidencedStringType {
+
+    @XmlValue
+    protected String value;
+    @XmlAttribute(name = "evidence")
+    protected List<Integer> evidence;
+    @XmlAttribute(name = "status")
+    protected String status;
+
+    /**
+     * Gets the value of the value property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getValue() {
+        return value;
+    }
+
+    /**
+     * Sets the value of the value property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    /**
+     * Gets the value of the evidence property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the evidence property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getEvidence().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Integer }
+     * 
+     * 
+     */
+    public List<Integer> getEvidence() {
+        if (evidence == null) {
+            evidence = new ArrayList<Integer>();
+        }
+        return this.evidence;
+    }
+
+    /**
+     * Gets the value of the status property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getStatus() {
+        return status;
+    }
+
+    /**
+     * Sets the value of the status property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setStatus(String value) {
+        this.status = value;
+    }
+
+}
diff --git a/src/jalview/xml/binding/uniprot/FeatureType.java b/src/jalview/xml/binding/uniprot/FeatureType.java
new file mode 100644 (file)
index 0000000..0ef367c
--- /dev/null
@@ -0,0 +1,353 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.13 at 10:18:53 AM BST 
+//
+
+
+package jalview.xml.binding.uniprot;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Describes different types of sequence annotations.
+ *             Equivalent to the flat file FT-line.
+ * 
+ * <p>Java class for featureType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="featureType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="original" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="variation" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="location" type="{http://uniprot.org/uniprot}locationType"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="type" use="required">
+ *         &lt;simpleType>
+ *           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             &lt;enumeration value="active site"/>
+ *             &lt;enumeration value="binding site"/>
+ *             &lt;enumeration value="calcium-binding region"/>
+ *             &lt;enumeration value="chain"/>
+ *             &lt;enumeration value="coiled-coil region"/>
+ *             &lt;enumeration value="compositionally biased region"/>
+ *             &lt;enumeration value="cross-link"/>
+ *             &lt;enumeration value="disulfide bond"/>
+ *             &lt;enumeration value="DNA-binding region"/>
+ *             &lt;enumeration value="domain"/>
+ *             &lt;enumeration value="glycosylation site"/>
+ *             &lt;enumeration value="helix"/>
+ *             &lt;enumeration value="initiator methionine"/>
+ *             &lt;enumeration value="lipid moiety-binding region"/>
+ *             &lt;enumeration value="metal ion-binding site"/>
+ *             &lt;enumeration value="modified residue"/>
+ *             &lt;enumeration value="mutagenesis site"/>
+ *             &lt;enumeration value="non-consecutive residues"/>
+ *             &lt;enumeration value="non-terminal residue"/>
+ *             &lt;enumeration value="nucleotide phosphate-binding region"/>
+ *             &lt;enumeration value="peptide"/>
+ *             &lt;enumeration value="propeptide"/>
+ *             &lt;enumeration value="region of interest"/>
+ *             &lt;enumeration value="repeat"/>
+ *             &lt;enumeration value="non-standard amino acid"/>
+ *             &lt;enumeration value="sequence conflict"/>
+ *             &lt;enumeration value="sequence variant"/>
+ *             &lt;enumeration value="short sequence motif"/>
+ *             &lt;enumeration value="signal peptide"/>
+ *             &lt;enumeration value="site"/>
+ *             &lt;enumeration value="splice variant"/>
+ *             &lt;enumeration value="strand"/>
+ *             &lt;enumeration value="topological domain"/>
+ *             &lt;enumeration value="transit peptide"/>
+ *             &lt;enumeration value="transmembrane region"/>
+ *             &lt;enumeration value="turn"/>
+ *             &lt;enumeration value="unsure residue"/>
+ *             &lt;enumeration value="zinc finger region"/>
+ *             &lt;enumeration value="intramembrane region"/>
+ *           &lt;/restriction>
+ *         &lt;/simpleType>
+ *       &lt;/attribute>
+ *       &lt;attribute name="status">
+ *         &lt;simpleType>
+ *           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             &lt;enumeration value="by similarity"/>
+ *             &lt;enumeration value="probable"/>
+ *             &lt;enumeration value="potential"/>
+ *           &lt;/restriction>
+ *         &lt;/simpleType>
+ *       &lt;/attribute>
+ *       &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="description" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+ *       &lt;attribute name="ref" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "featureType", propOrder = {
+    "original",
+    "variation",
+    "location"
+})
+public class FeatureType {
+
+    protected String original;
+    protected List<String> variation;
+    @XmlElement(required = true)
+    protected LocationType location;
+    @XmlAttribute(name = "type", required = true)
+    protected String type;
+    @XmlAttribute(name = "status")
+    protected String status;
+    @XmlAttribute(name = "id")
+    protected String id;
+    @XmlAttribute(name = "description")
+    protected String description;
+    @XmlAttribute(name = "evidence")
+    protected List<Integer> evidence;
+    @XmlAttribute(name = "ref")
+    protected String ref;
+
+    /**
+     * Gets the value of the original property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getOriginal() {
+        return original;
+    }
+
+    /**
+     * Sets the value of the original property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setOriginal(String value) {
+        this.original = value;
+    }
+
+    /**
+     * Gets the value of the variation property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the variation property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getVariation().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link String }
+     * 
+     * 
+     */
+    public List<String> getVariation() {
+        if (variation == null) {
+            variation = new ArrayList<String>();
+        }
+        return this.variation;
+    }
+
+    /**
+     * Gets the value of the location property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link LocationType }
+     *     
+     */
+    public LocationType getLocation() {
+        return location;
+    }
+
+    /**
+     * Sets the value of the location property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link LocationType }
+     *     
+     */
+    public void setLocation(LocationType value) {
+        this.location = value;
+    }
+
+    /**
+     * Gets the value of the type property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * Sets the value of the type property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setType(String value) {
+        this.type = value;
+    }
+
+    /**
+     * Gets the value of the status property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getStatus() {
+        return status;
+    }
+
+    /**
+     * Sets the value of the status property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setStatus(String value) {
+        this.status = value;
+    }
+
+    /**
+     * Gets the value of the id property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * Sets the value of the id property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setId(String value) {
+        this.id = value;
+    }
+
+    /**
+     * Gets the value of the description property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * Sets the value of the description property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setDescription(String value) {
+        this.description = value;
+    }
+
+    /**
+     * Gets the value of the evidence property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the evidence property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getEvidence().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Integer }
+     * 
+     * 
+     */
+    public List<Integer> getEvidence() {
+        if (evidence == null) {
+            evidence = new ArrayList<Integer>();
+        }
+        return this.evidence;
+    }
+
+    /**
+     * Gets the value of the ref property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getRef() {
+        return ref;
+    }
+
+    /**
+     * Sets the value of the ref property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setRef(String value) {
+        this.ref = value;
+    }
+
+}
diff --git a/src/jalview/xml/binding/uniprot/GeneLocationType.java b/src/jalview/xml/binding/uniprot/GeneLocationType.java
new file mode 100644 (file)
index 0000000..5a2ebcf
--- /dev/null
@@ -0,0 +1,152 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.13 at 10:18:53 AM BST 
+//
+
+
+package jalview.xml.binding.uniprot;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Describes non-nuclear gene locations (organelles and plasmids).
+ *             Equivalent to the flat file OG-line.
+ * 
+ * <p>Java class for geneLocationType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="geneLocationType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="name" type="{http://uniprot.org/uniprot}statusType" maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="type" use="required">
+ *         &lt;simpleType>
+ *           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             &lt;enumeration value="apicoplast"/>
+ *             &lt;enumeration value="chloroplast"/>
+ *             &lt;enumeration value="organellar chromatophore"/>
+ *             &lt;enumeration value="cyanelle"/>
+ *             &lt;enumeration value="hydrogenosome"/>
+ *             &lt;enumeration value="mitochondrion"/>
+ *             &lt;enumeration value="non-photosynthetic plastid"/>
+ *             &lt;enumeration value="nucleomorph"/>
+ *             &lt;enumeration value="plasmid"/>
+ *             &lt;enumeration value="plastid"/>
+ *           &lt;/restriction>
+ *         &lt;/simpleType>
+ *       &lt;/attribute>
+ *       &lt;attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "geneLocationType", propOrder = {
+    "name"
+})
+public class GeneLocationType {
+
+    protected List<StatusType> name;
+    @XmlAttribute(name = "type", required = true)
+    protected String type;
+    @XmlAttribute(name = "evidence")
+    protected List<Integer> evidence;
+
+    /**
+     * Gets the value of the name property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the name property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getName().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link StatusType }
+     * 
+     * 
+     */
+    public List<StatusType> getName() {
+        if (name == null) {
+            name = new ArrayList<StatusType>();
+        }
+        return this.name;
+    }
+
+    /**
+     * Gets the value of the type property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * Sets the value of the type property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setType(String value) {
+        this.type = value;
+    }
+
+    /**
+     * Gets the value of the evidence property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the evidence property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getEvidence().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Integer }
+     * 
+     * 
+     */
+    public List<Integer> getEvidence() {
+        if (evidence == null) {
+            evidence = new ArrayList<Integer>();
+        }
+        return this.evidence;
+    }
+
+}
diff --git a/src/jalview/xml/binding/uniprot/GeneNameType.java b/src/jalview/xml/binding/uniprot/GeneNameType.java
new file mode 100644 (file)
index 0000000..1716731
--- /dev/null
@@ -0,0 +1,140 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.13 at 10:18:53 AM BST 
+//
+
+
+package jalview.xml.binding.uniprot;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+
+
+/**
+ * Describes different types of gene designations.
+ *             Equivalent to the flat file GN-line.
+ * 
+ * <p>Java class for geneNameType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="geneNameType">
+ *   &lt;simpleContent>
+ *     &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>string">
+ *       &lt;attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+ *       &lt;attribute name="type" use="required">
+ *         &lt;simpleType>
+ *           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             &lt;enumeration value="primary"/>
+ *             &lt;enumeration value="synonym"/>
+ *             &lt;enumeration value="ordered locus"/>
+ *             &lt;enumeration value="ORF"/>
+ *           &lt;/restriction>
+ *         &lt;/simpleType>
+ *       &lt;/attribute>
+ *     &lt;/extension>
+ *   &lt;/simpleContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "geneNameType", propOrder = {
+    "value"
+})
+public class GeneNameType {
+
+    @XmlValue
+    protected String value;
+    @XmlAttribute(name = "evidence")
+    protected List<Integer> evidence;
+    @XmlAttribute(name = "type", required = true)
+    protected String type;
+
+    /**
+     * Gets the value of the value property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getValue() {
+        return value;
+    }
+
+    /**
+     * Sets the value of the value property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    /**
+     * Gets the value of the evidence property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the evidence property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getEvidence().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Integer }
+     * 
+     * 
+     */
+    public List<Integer> getEvidence() {
+        if (evidence == null) {
+            evidence = new ArrayList<Integer>();
+        }
+        return this.evidence;
+    }
+
+    /**
+     * Gets the value of the type property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * Sets the value of the type property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setType(String value) {
+        this.type = value;
+    }
+
+}
diff --git a/src/jalview/xml/binding/uniprot/GeneType.java b/src/jalview/xml/binding/uniprot/GeneType.java
new file mode 100644 (file)
index 0000000..b466644
--- /dev/null
@@ -0,0 +1,79 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.13 at 10:18:53 AM BST 
+//
+
+
+package jalview.xml.binding.uniprot;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Describes a gene.
+ *             Equivalent to the flat file GN-line.
+ * 
+ * <p>Java class for geneType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="geneType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="name" type="{http://uniprot.org/uniprot}geneNameType" maxOccurs="unbounded"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "geneType", propOrder = {
+    "name"
+})
+public class GeneType {
+
+    @XmlElement(required = true)
+    protected List<GeneNameType> name;
+
+    /**
+     * Gets the value of the name property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the name property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getName().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link GeneNameType }
+     * 
+     * 
+     */
+    public List<GeneNameType> getName() {
+        if (name == null) {
+            name = new ArrayList<GeneNameType>();
+        }
+        return this.name;
+    }
+
+}
diff --git a/src/jalview/xml/binding/uniprot/ImportedFromType.java b/src/jalview/xml/binding/uniprot/ImportedFromType.java
new file mode 100644 (file)
index 0000000..92fa6f4
--- /dev/null
@@ -0,0 +1,71 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.13 at 10:18:53 AM BST 
+//
+
+
+package jalview.xml.binding.uniprot;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Describes the source of the evidence, when it is not assigned by UniProt, but imported from an external database.
+ * 
+ * <p>Java class for importedFromType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="importedFromType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="dbReference" type="{http://uniprot.org/uniprot}dbReferenceType"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "importedFromType", propOrder = {
+    "dbReference"
+})
+public class ImportedFromType {
+
+    @XmlElement(required = true)
+    protected DbReferenceType dbReference;
+
+    /**
+     * Gets the value of the dbReference property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link DbReferenceType }
+     *     
+     */
+    public DbReferenceType getDbReference() {
+        return dbReference;
+    }
+
+    /**
+     * Sets the value of the dbReference property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link DbReferenceType }
+     *     
+     */
+    public void setDbReference(DbReferenceType value) {
+        this.dbReference = value;
+    }
+
+}
diff --git a/src/jalview/xml/binding/uniprot/InteractantType.java b/src/jalview/xml/binding/uniprot/InteractantType.java
new file mode 100644 (file)
index 0000000..66ba19d
--- /dev/null
@@ -0,0 +1,119 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.13 at 10:18:53 AM BST 
+//
+
+
+package jalview.xml.binding.uniprot;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for interactantType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="interactantType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;group ref="{http://uniprot.org/uniprot}interactantGroup" minOccurs="0"/>
+ *       &lt;attribute name="intactId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "interactantType", propOrder = {
+    "id",
+    "label"
+})
+public class InteractantType {
+
+    protected String id;
+    protected String label;
+    @XmlAttribute(name = "intactId", required = true)
+    protected String intactId;
+
+    /**
+     * Gets the value of the id property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * Sets the value of the id property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setId(String value) {
+        this.id = value;
+    }
+
+    /**
+     * Gets the value of the label property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getLabel() {
+        return label;
+    }
+
+    /**
+     * Sets the value of the label property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setLabel(String value) {
+        this.label = value;
+    }
+
+    /**
+     * Gets the value of the intactId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getIntactId() {
+        return intactId;
+    }
+
+    /**
+     * Sets the value of the intactId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setIntactId(String value) {
+        this.intactId = value;
+    }
+
+}
diff --git a/src/jalview/xml/binding/uniprot/IsoformType.java b/src/jalview/xml/binding/uniprot/IsoformType.java
new file mode 100644 (file)
index 0000000..35a085a
--- /dev/null
@@ -0,0 +1,370 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.13 at 10:18:53 AM BST 
+//
+
+
+package jalview.xml.binding.uniprot;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+
+
+/**
+ * Describes isoforms in 'alternative products' annotations.
+ * 
+ * <p>Java class for isoformType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="isoformType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="id" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
+ *         &lt;element name="name" maxOccurs="unbounded">
+ *           &lt;complexType>
+ *             &lt;simpleContent>
+ *               &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>string">
+ *                 &lt;attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+ *               &lt;/extension>
+ *             &lt;/simpleContent>
+ *           &lt;/complexType>
+ *         &lt;/element>
+ *         &lt;element name="sequence">
+ *           &lt;complexType>
+ *             &lt;complexContent>
+ *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 &lt;attribute name="type" use="required">
+ *                   &lt;simpleType>
+ *                     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *                       &lt;enumeration value="not described"/>
+ *                       &lt;enumeration value="described"/>
+ *                       &lt;enumeration value="displayed"/>
+ *                       &lt;enumeration value="external"/>
+ *                     &lt;/restriction>
+ *                   &lt;/simpleType>
+ *                 &lt;/attribute>
+ *                 &lt;attribute name="ref" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *               &lt;/restriction>
+ *             &lt;/complexContent>
+ *           &lt;/complexType>
+ *         &lt;/element>
+ *         &lt;element name="text" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "isoformType", propOrder = {
+    "id",
+    "name",
+    "sequence",
+    "text"
+})
+public class IsoformType {
+
+    @XmlElement(required = true)
+    protected List<String> id;
+    @XmlElement(required = true)
+    protected List<IsoformType.Name> name;
+    @XmlElement(required = true)
+    protected IsoformType.Sequence sequence;
+    protected List<EvidencedStringType> text;
+
+    /**
+     * Gets the value of the id property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the id property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getId().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link String }
+     * 
+     * 
+     */
+    public List<String> getId() {
+        if (id == null) {
+            id = new ArrayList<String>();
+        }
+        return this.id;
+    }
+
+    /**
+     * Gets the value of the name property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the name property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getName().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link IsoformType.Name }
+     * 
+     * 
+     */
+    public List<IsoformType.Name> getName() {
+        if (name == null) {
+            name = new ArrayList<IsoformType.Name>();
+        }
+        return this.name;
+    }
+
+    /**
+     * Gets the value of the sequence property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link IsoformType.Sequence }
+     *     
+     */
+    public IsoformType.Sequence getSequence() {
+        return sequence;
+    }
+
+    /**
+     * Sets the value of the sequence property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link IsoformType.Sequence }
+     *     
+     */
+    public void setSequence(IsoformType.Sequence value) {
+        this.sequence = value;
+    }
+
+    /**
+     * Gets the value of the text property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the text property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getText().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link EvidencedStringType }
+     * 
+     * 
+     */
+    public List<EvidencedStringType> getText() {
+        if (text == null) {
+            text = new ArrayList<EvidencedStringType>();
+        }
+        return this.text;
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;simpleContent>
+     *     &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>string">
+     *       &lt;attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+     *     &lt;/extension>
+     *   &lt;/simpleContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "value"
+    })
+    public static class Name {
+
+        @XmlValue
+        protected String value;
+        @XmlAttribute(name = "evidence")
+        protected List<Integer> evidence;
+
+        /**
+         * Gets the value of the value property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getValue() {
+            return value;
+        }
+
+        /**
+         * Sets the value of the value property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setValue(String value) {
+            this.value = value;
+        }
+
+        /**
+         * Gets the value of the evidence property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the evidence property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getEvidence().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link Integer }
+         * 
+         * 
+         */
+        public List<Integer> getEvidence() {
+            if (evidence == null) {
+                evidence = new ArrayList<Integer>();
+            }
+            return this.evidence;
+        }
+
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;attribute name="type" use="required">
+     *         &lt;simpleType>
+     *           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+     *             &lt;enumeration value="not described"/>
+     *             &lt;enumeration value="described"/>
+     *             &lt;enumeration value="displayed"/>
+     *             &lt;enumeration value="external"/>
+     *           &lt;/restriction>
+     *         &lt;/simpleType>
+     *       &lt;/attribute>
+     *       &lt;attribute name="ref" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "")
+    public static class Sequence {
+
+        @XmlAttribute(name = "type", required = true)
+        protected String type;
+        @XmlAttribute(name = "ref")
+        protected String ref;
+
+        /**
+         * Gets the value of the type property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getType() {
+            return type;
+        }
+
+        /**
+         * Sets the value of the type property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setType(String value) {
+            this.type = value;
+        }
+
+        /**
+         * Gets the value of the ref property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getRef() {
+            return ref;
+        }
+
+        /**
+         * Sets the value of the ref property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setRef(String value) {
+            this.ref = value;
+        }
+
+    }
+
+}
diff --git a/src/jalview/xml/binding/uniprot/KeywordType.java b/src/jalview/xml/binding/uniprot/KeywordType.java
new file mode 100644 (file)
index 0000000..5b7e0f7
--- /dev/null
@@ -0,0 +1,128 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.13 at 10:18:53 AM BST 
+//
+
+
+package jalview.xml.binding.uniprot;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+
+
+/**
+ * <p>Java class for keywordType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="keywordType">
+ *   &lt;simpleContent>
+ *     &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>string">
+ *       &lt;attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+ *       &lt;attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     &lt;/extension>
+ *   &lt;/simpleContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "keywordType", propOrder = {
+    "value"
+})
+public class KeywordType {
+
+    @XmlValue
+    protected String value;
+    @XmlAttribute(name = "evidence")
+    protected List<Integer> evidence;
+    @XmlAttribute(name = "id", required = true)
+    protected String id;
+
+    /**
+     * Gets the value of the value property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getValue() {
+        return value;
+    }
+
+    /**
+     * Sets the value of the value property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    /**
+     * Gets the value of the evidence property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the evidence property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getEvidence().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Integer }
+     * 
+     * 
+     */
+    public List<Integer> getEvidence() {
+        if (evidence == null) {
+            evidence = new ArrayList<Integer>();
+        }
+        return this.evidence;
+    }
+
+    /**
+     * Gets the value of the id property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * Sets the value of the id property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setId(String value) {
+        this.id = value;
+    }
+
+}
diff --git a/src/jalview/xml/binding/uniprot/LocationType.java b/src/jalview/xml/binding/uniprot/LocationType.java
new file mode 100644 (file)
index 0000000..749871a
--- /dev/null
@@ -0,0 +1,153 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.13 at 10:18:53 AM BST 
+//
+
+
+package jalview.xml.binding.uniprot;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Describes a sequence location as either a range with a begin and end or as a position. The 'sequence' attribute is only used when the location is not on the canonical sequence displayed in the current entry.
+ * 
+ * <p>Java class for locationType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="locationType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;choice>
+ *         &lt;sequence>
+ *           &lt;element name="begin" type="{http://uniprot.org/uniprot}positionType"/>
+ *           &lt;element name="end" type="{http://uniprot.org/uniprot}positionType"/>
+ *         &lt;/sequence>
+ *         &lt;element name="position" type="{http://uniprot.org/uniprot}positionType"/>
+ *       &lt;/choice>
+ *       &lt;attribute name="sequence" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "locationType", propOrder = {
+    "begin",
+    "end",
+    "position"
+})
+public class LocationType {
+
+    protected PositionType begin;
+    protected PositionType end;
+    protected PositionType position;
+    @XmlAttribute(name = "sequence")
+    protected String sequence;
+
+    /**
+     * Gets the value of the begin property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link PositionType }
+     *     
+     */
+    public PositionType getBegin() {
+        return begin;
+    }
+
+    /**
+     * Sets the value of the begin property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link PositionType }
+     *     
+     */
+    public void setBegin(PositionType value) {
+        this.begin = value;
+    }
+
+    /**
+     * Gets the value of the end property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link PositionType }
+     *     
+     */
+    public PositionType getEnd() {
+        return end;
+    }
+
+    /**
+     * Sets the value of the end property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link PositionType }
+     *     
+     */
+    public void setEnd(PositionType value) {
+        this.end = value;
+    }
+
+    /**
+     * Gets the value of the position property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link PositionType }
+     *     
+     */
+    public PositionType getPosition() {
+        return position;
+    }
+
+    /**
+     * Sets the value of the position property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link PositionType }
+     *     
+     */
+    public void setPosition(PositionType value) {
+        this.position = value;
+    }
+
+    /**
+     * Gets the value of the sequence property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getSequence() {
+        return sequence;
+    }
+
+    /**
+     * Sets the value of the sequence property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setSequence(String value) {
+        this.sequence = value;
+    }
+
+}
diff --git a/src/jalview/xml/binding/uniprot/MoleculeType.java b/src/jalview/xml/binding/uniprot/MoleculeType.java
new file mode 100644 (file)
index 0000000..0392a4b
--- /dev/null
@@ -0,0 +1,96 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.13 at 10:18:53 AM BST 
+//
+
+
+package jalview.xml.binding.uniprot;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+
+
+/**
+ * Describes a molecule by name or unique identifier.
+ * 
+ * <p>Java class for moleculeType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="moleculeType">
+ *   &lt;simpleContent>
+ *     &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>string">
+ *       &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     &lt;/extension>
+ *   &lt;/simpleContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "moleculeType", propOrder = {
+    "value"
+})
+public class MoleculeType {
+
+    @XmlValue
+    protected String value;
+    @XmlAttribute(name = "id")
+    protected String id;
+
+    /**
+     * Gets the value of the value property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getValue() {
+        return value;
+    }
+
+    /**
+     * Sets the value of the value property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    /**
+     * Gets the value of the id property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * Sets the value of the id property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setId(String value) {
+        this.id = value;
+    }
+
+}
diff --git a/src/jalview/xml/binding/uniprot/NameListType.java b/src/jalview/xml/binding/uniprot/NameListType.java
new file mode 100644 (file)
index 0000000..70d5e2f
--- /dev/null
@@ -0,0 +1,82 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.13 at 10:18:53 AM BST 
+//
+
+
+package jalview.xml.binding.uniprot;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElements;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for nameListType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="nameListType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;choice maxOccurs="unbounded">
+ *         &lt;element name="consortium" type="{http://uniprot.org/uniprot}consortiumType"/>
+ *         &lt;element name="person" type="{http://uniprot.org/uniprot}personType"/>
+ *       &lt;/choice>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "nameListType", propOrder = {
+    "consortiumOrPerson"
+})
+public class NameListType {
+
+    @XmlElements({
+        @XmlElement(name = "consortium", type = ConsortiumType.class),
+        @XmlElement(name = "person", type = PersonType.class)
+    })
+    protected List<Object> consortiumOrPerson;
+
+    /**
+     * Gets the value of the consortiumOrPerson property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the consortiumOrPerson property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getConsortiumOrPerson().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link ConsortiumType }
+     * {@link PersonType }
+     * 
+     * 
+     */
+    public List<Object> getConsortiumOrPerson() {
+        if (consortiumOrPerson == null) {
+            consortiumOrPerson = new ArrayList<Object>();
+        }
+        return this.consortiumOrPerson;
+    }
+
+}
diff --git a/src/jalview/xml/binding/uniprot/ObjectFactory.java b/src/jalview/xml/binding/uniprot/ObjectFactory.java
new file mode 100644 (file)
index 0000000..20cba73
--- /dev/null
@@ -0,0 +1,492 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.13 at 10:18:53 AM BST 
+//
+
+
+package jalview.xml.binding.uniprot;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * This object contains factory methods for each 
+ * Java content interface and Java element interface 
+ * generated in the jalview.xml.binding.uniprot package. 
+ * <p>An ObjectFactory allows you to programatically 
+ * construct new instances of the Java representation 
+ * for XML content. The Java representation of XML 
+ * content can consist of schema derived interfaces 
+ * and classes representing the binding of schema 
+ * type definitions, element declarations and model 
+ * groups.  Factory methods for each of these are 
+ * provided in this class.
+ * 
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+    private final static QName _Copyright_QNAME = new QName("http://uniprot.org/uniprot", "copyright");
+
+    /**
+     * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: jalview.xml.binding.uniprot
+     * 
+     */
+    public ObjectFactory() {
+    }
+
+    /**
+     * Create an instance of {@link SourceDataType }
+     * 
+     */
+    public SourceDataType createSourceDataType() {
+        return new SourceDataType();
+    }
+
+    /**
+     * Create an instance of {@link IsoformType }
+     * 
+     */
+    public IsoformType createIsoformType() {
+        return new IsoformType();
+    }
+
+    /**
+     * Create an instance of {@link CommentType }
+     * 
+     */
+    public CommentType createCommentType() {
+        return new CommentType();
+    }
+
+    /**
+     * Create an instance of {@link CommentType.Conflict }
+     * 
+     */
+    public CommentType.Conflict createCommentTypeConflict() {
+        return new CommentType.Conflict();
+    }
+
+    /**
+     * Create an instance of {@link OrganismType }
+     * 
+     */
+    public OrganismType createOrganismType() {
+        return new OrganismType();
+    }
+
+    /**
+     * Create an instance of {@link ProteinType }
+     * 
+     */
+    public ProteinType createProteinType() {
+        return new ProteinType();
+    }
+
+    /**
+     * Create an instance of {@link Entry }
+     * 
+     */
+    public Entry createEntry() {
+        return new Entry();
+    }
+
+    /**
+     * Create an instance of {@link GeneType }
+     * 
+     */
+    public GeneType createGeneType() {
+        return new GeneType();
+    }
+
+    /**
+     * Create an instance of {@link GeneLocationType }
+     * 
+     */
+    public GeneLocationType createGeneLocationType() {
+        return new GeneLocationType();
+    }
+
+    /**
+     * Create an instance of {@link ReferenceType }
+     * 
+     */
+    public ReferenceType createReferenceType() {
+        return new ReferenceType();
+    }
+
+    /**
+     * Create an instance of {@link DbReferenceType }
+     * 
+     */
+    public DbReferenceType createDbReferenceType() {
+        return new DbReferenceType();
+    }
+
+    /**
+     * Create an instance of {@link ProteinExistenceType }
+     * 
+     */
+    public ProteinExistenceType createProteinExistenceType() {
+        return new ProteinExistenceType();
+    }
+
+    /**
+     * Create an instance of {@link KeywordType }
+     * 
+     */
+    public KeywordType createKeywordType() {
+        return new KeywordType();
+    }
+
+    /**
+     * Create an instance of {@link FeatureType }
+     * 
+     */
+    public FeatureType createFeatureType() {
+        return new FeatureType();
+    }
+
+    /**
+     * Create an instance of {@link EvidenceType }
+     * 
+     */
+    public EvidenceType createEvidenceType() {
+        return new EvidenceType();
+    }
+
+    /**
+     * Create an instance of {@link SequenceType }
+     * 
+     */
+    public SequenceType createSequenceType() {
+        return new SequenceType();
+    }
+
+    /**
+     * Create an instance of {@link Uniprot }
+     * 
+     */
+    public Uniprot createUniprot() {
+        return new Uniprot();
+    }
+
+    /**
+     * Create an instance of {@link StatusType }
+     * 
+     */
+    public StatusType createStatusType() {
+        return new StatusType();
+    }
+
+    /**
+     * Create an instance of {@link PositionType }
+     * 
+     */
+    public PositionType createPositionType() {
+        return new PositionType();
+    }
+
+    /**
+     * Create an instance of {@link ConsortiumType }
+     * 
+     */
+    public ConsortiumType createConsortiumType() {
+        return new ConsortiumType();
+    }
+
+    /**
+     * Create an instance of {@link GeneNameType }
+     * 
+     */
+    public GeneNameType createGeneNameType() {
+        return new GeneNameType();
+    }
+
+    /**
+     * Create an instance of {@link LocationType }
+     * 
+     */
+    public LocationType createLocationType() {
+        return new LocationType();
+    }
+
+    /**
+     * Create an instance of {@link CitationType }
+     * 
+     */
+    public CitationType createCitationType() {
+        return new CitationType();
+    }
+
+    /**
+     * Create an instance of {@link PropertyType }
+     * 
+     */
+    public PropertyType createPropertyType() {
+        return new PropertyType();
+    }
+
+    /**
+     * Create an instance of {@link CofactorType }
+     * 
+     */
+    public CofactorType createCofactorType() {
+        return new CofactorType();
+    }
+
+    /**
+     * Create an instance of {@link EvidencedStringType }
+     * 
+     */
+    public EvidencedStringType createEvidencedStringType() {
+        return new EvidencedStringType();
+    }
+
+    /**
+     * Create an instance of {@link PersonType }
+     * 
+     */
+    public PersonType createPersonType() {
+        return new PersonType();
+    }
+
+    /**
+     * Create an instance of {@link ImportedFromType }
+     * 
+     */
+    public ImportedFromType createImportedFromType() {
+        return new ImportedFromType();
+    }
+
+    /**
+     * Create an instance of {@link EventType }
+     * 
+     */
+    public EventType createEventType() {
+        return new EventType();
+    }
+
+    /**
+     * Create an instance of {@link InteractantType }
+     * 
+     */
+    public InteractantType createInteractantType() {
+        return new InteractantType();
+    }
+
+    /**
+     * Create an instance of {@link NameListType }
+     * 
+     */
+    public NameListType createNameListType() {
+        return new NameListType();
+    }
+
+    /**
+     * Create an instance of {@link SourceType }
+     * 
+     */
+    public SourceType createSourceType() {
+        return new SourceType();
+    }
+
+    /**
+     * Create an instance of {@link MoleculeType }
+     * 
+     */
+    public MoleculeType createMoleculeType() {
+        return new MoleculeType();
+    }
+
+    /**
+     * Create an instance of {@link OrganismNameType }
+     * 
+     */
+    public OrganismNameType createOrganismNameType() {
+        return new OrganismNameType();
+    }
+
+    /**
+     * Create an instance of {@link SubcellularLocationType }
+     * 
+     */
+    public SubcellularLocationType createSubcellularLocationType() {
+        return new SubcellularLocationType();
+    }
+
+    /**
+     * Create an instance of {@link SourceDataType.Strain }
+     * 
+     */
+    public SourceDataType.Strain createSourceDataTypeStrain() {
+        return new SourceDataType.Strain();
+    }
+
+    /**
+     * Create an instance of {@link SourceDataType.Plasmid }
+     * 
+     */
+    public SourceDataType.Plasmid createSourceDataTypePlasmid() {
+        return new SourceDataType.Plasmid();
+    }
+
+    /**
+     * Create an instance of {@link SourceDataType.Transposon }
+     * 
+     */
+    public SourceDataType.Transposon createSourceDataTypeTransposon() {
+        return new SourceDataType.Transposon();
+    }
+
+    /**
+     * Create an instance of {@link SourceDataType.Tissue }
+     * 
+     */
+    public SourceDataType.Tissue createSourceDataTypeTissue() {
+        return new SourceDataType.Tissue();
+    }
+
+    /**
+     * Create an instance of {@link IsoformType.Name }
+     * 
+     */
+    public IsoformType.Name createIsoformTypeName() {
+        return new IsoformType.Name();
+    }
+
+    /**
+     * Create an instance of {@link IsoformType.Sequence }
+     * 
+     */
+    public IsoformType.Sequence createIsoformTypeSequence() {
+        return new IsoformType.Sequence();
+    }
+
+    /**
+     * Create an instance of {@link CommentType.Absorption }
+     * 
+     */
+    public CommentType.Absorption createCommentTypeAbsorption() {
+        return new CommentType.Absorption();
+    }
+
+    /**
+     * Create an instance of {@link CommentType.Kinetics }
+     * 
+     */
+    public CommentType.Kinetics createCommentTypeKinetics() {
+        return new CommentType.Kinetics();
+    }
+
+    /**
+     * Create an instance of {@link CommentType.PhDependence }
+     * 
+     */
+    public CommentType.PhDependence createCommentTypePhDependence() {
+        return new CommentType.PhDependence();
+    }
+
+    /**
+     * Create an instance of {@link CommentType.RedoxPotential }
+     * 
+     */
+    public CommentType.RedoxPotential createCommentTypeRedoxPotential() {
+        return new CommentType.RedoxPotential();
+    }
+
+    /**
+     * Create an instance of {@link CommentType.TemperatureDependence }
+     * 
+     */
+    public CommentType.TemperatureDependence createCommentTypeTemperatureDependence() {
+        return new CommentType.TemperatureDependence();
+    }
+
+    /**
+     * Create an instance of {@link CommentType.Link }
+     * 
+     */
+    public CommentType.Link createCommentTypeLink() {
+        return new CommentType.Link();
+    }
+
+    /**
+     * Create an instance of {@link CommentType.Disease }
+     * 
+     */
+    public CommentType.Disease createCommentTypeDisease() {
+        return new CommentType.Disease();
+    }
+
+    /**
+     * Create an instance of {@link CommentType.Conflict.Sequence }
+     * 
+     */
+    public CommentType.Conflict.Sequence createCommentTypeConflictSequence() {
+        return new CommentType.Conflict.Sequence();
+    }
+
+    /**
+     * Create an instance of {@link OrganismType.Lineage }
+     * 
+     */
+    public OrganismType.Lineage createOrganismTypeLineage() {
+        return new OrganismType.Lineage();
+    }
+
+    /**
+     * Create an instance of {@link ProteinType.RecommendedName }
+     * 
+     */
+    public ProteinType.RecommendedName createProteinTypeRecommendedName() {
+        return new ProteinType.RecommendedName();
+    }
+
+    /**
+     * Create an instance of {@link ProteinType.AlternativeName }
+     * 
+     */
+    public ProteinType.AlternativeName createProteinTypeAlternativeName() {
+        return new ProteinType.AlternativeName();
+    }
+
+    /**
+     * Create an instance of {@link ProteinType.SubmittedName }
+     * 
+     */
+    public ProteinType.SubmittedName createProteinTypeSubmittedName() {
+        return new ProteinType.SubmittedName();
+    }
+
+    /**
+     * Create an instance of {@link ProteinType.Domain }
+     * 
+     */
+    public ProteinType.Domain createProteinTypeDomain() {
+        return new ProteinType.Domain();
+    }
+
+    /**
+     * Create an instance of {@link ProteinType.Component }
+     * 
+     */
+    public ProteinType.Component createProteinTypeComponent() {
+        return new ProteinType.Component();
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://uniprot.org/uniprot", name = "copyright")
+    public JAXBElement<String> createCopyright(String value) {
+        return new JAXBElement<String>(_Copyright_QNAME, String.class, null, value);
+    }
+
+}
diff --git a/src/jalview/xml/binding/uniprot/OrganismNameType.java b/src/jalview/xml/binding/uniprot/OrganismNameType.java
new file mode 100644 (file)
index 0000000..a658e36
--- /dev/null
@@ -0,0 +1,106 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.13 at 10:18:53 AM BST 
+//
+
+
+package jalview.xml.binding.uniprot;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+
+
+/**
+ * Describes different types of source organism names.
+ * 
+ * <p>Java class for organismNameType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="organismNameType">
+ *   &lt;simpleContent>
+ *     &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>string">
+ *       &lt;attribute name="type" use="required">
+ *         &lt;simpleType>
+ *           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             &lt;enumeration value="common"/>
+ *             &lt;enumeration value="full"/>
+ *             &lt;enumeration value="scientific"/>
+ *             &lt;enumeration value="synonym"/>
+ *             &lt;enumeration value="abbreviation"/>
+ *           &lt;/restriction>
+ *         &lt;/simpleType>
+ *       &lt;/attribute>
+ *     &lt;/extension>
+ *   &lt;/simpleContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "organismNameType", propOrder = {
+    "value"
+})
+public class OrganismNameType {
+
+    @XmlValue
+    protected String value;
+    @XmlAttribute(name = "type", required = true)
+    protected String type;
+
+    /**
+     * Gets the value of the value property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getValue() {
+        return value;
+    }
+
+    /**
+     * Sets the value of the value property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    /**
+     * Gets the value of the type property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * Sets the value of the type property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setType(String value) {
+        this.type = value;
+    }
+
+}
diff --git a/src/jalview/xml/binding/uniprot/OrganismType.java b/src/jalview/xml/binding/uniprot/OrganismType.java
new file mode 100644 (file)
index 0000000..feabacd
--- /dev/null
@@ -0,0 +1,241 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.13 at 10:18:53 AM BST 
+//
+
+
+package jalview.xml.binding.uniprot;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Describes the source organism.
+ * 
+ * <p>Java class for organismType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="organismType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="name" type="{http://uniprot.org/uniprot}organismNameType" maxOccurs="unbounded"/>
+ *         &lt;element name="dbReference" type="{http://uniprot.org/uniprot}dbReferenceType" maxOccurs="unbounded"/>
+ *         &lt;element name="lineage" minOccurs="0">
+ *           &lt;complexType>
+ *             &lt;complexContent>
+ *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 &lt;sequence>
+ *                   &lt;element name="taxon" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
+ *                 &lt;/sequence>
+ *               &lt;/restriction>
+ *             &lt;/complexContent>
+ *           &lt;/complexType>
+ *         &lt;/element>
+ *       &lt;/sequence>
+ *       &lt;attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "organismType", propOrder = {
+    "name",
+    "dbReference",
+    "lineage"
+})
+public class OrganismType {
+
+    @XmlElement(required = true)
+    protected List<OrganismNameType> name;
+    @XmlElement(required = true)
+    protected List<DbReferenceType> dbReference;
+    protected OrganismType.Lineage lineage;
+    @XmlAttribute(name = "evidence")
+    protected List<Integer> evidence;
+
+    /**
+     * Gets the value of the name property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the name property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getName().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link OrganismNameType }
+     * 
+     * 
+     */
+    public List<OrganismNameType> getName() {
+        if (name == null) {
+            name = new ArrayList<OrganismNameType>();
+        }
+        return this.name;
+    }
+
+    /**
+     * Gets the value of the dbReference property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the dbReference property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getDbReference().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link DbReferenceType }
+     * 
+     * 
+     */
+    public List<DbReferenceType> getDbReference() {
+        if (dbReference == null) {
+            dbReference = new ArrayList<DbReferenceType>();
+        }
+        return this.dbReference;
+    }
+
+    /**
+     * Gets the value of the lineage property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link OrganismType.Lineage }
+     *     
+     */
+    public OrganismType.Lineage getLineage() {
+        return lineage;
+    }
+
+    /**
+     * Sets the value of the lineage property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link OrganismType.Lineage }
+     *     
+     */
+    public void setLineage(OrganismType.Lineage value) {
+        this.lineage = value;
+    }
+
+    /**
+     * Gets the value of the evidence property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the evidence property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getEvidence().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Integer }
+     * 
+     * 
+     */
+    public List<Integer> getEvidence() {
+        if (evidence == null) {
+            evidence = new ArrayList<Integer>();
+        }
+        return this.evidence;
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;sequence>
+     *         &lt;element name="taxon" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
+     *       &lt;/sequence>
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "taxon"
+    })
+    public static class Lineage {
+
+        @XmlElement(required = true)
+        protected List<String> taxon;
+
+        /**
+         * Gets the value of the taxon property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the taxon property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getTaxon().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link String }
+         * 
+         * 
+         */
+        public List<String> getTaxon() {
+            if (taxon == null) {
+                taxon = new ArrayList<String>();
+            }
+            return this.taxon;
+        }
+
+    }
+
+}
diff --git a/src/jalview/xml/binding/uniprot/PersonType.java b/src/jalview/xml/binding/uniprot/PersonType.java
new file mode 100644 (file)
index 0000000..2a3e8bd
--- /dev/null
@@ -0,0 +1,65 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.13 at 10:18:53 AM BST 
+//
+
+
+package jalview.xml.binding.uniprot;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for personType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="personType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "personType")
+public class PersonType {
+
+    @XmlAttribute(name = "name", required = true)
+    protected String name;
+
+    /**
+     * Gets the value of the name property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Sets the value of the name property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setName(String value) {
+        this.name = value;
+    }
+
+}
diff --git a/src/jalview/xml/binding/uniprot/PositionType.java b/src/jalview/xml/binding/uniprot/PositionType.java
new file mode 100644 (file)
index 0000000..92d8906
--- /dev/null
@@ -0,0 +1,143 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.13 at 10:18:53 AM BST 
+//
+
+
+package jalview.xml.binding.uniprot;
+
+import java.math.BigInteger;
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for positionType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="positionType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;attribute name="position" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" />
+ *       &lt;attribute name="status" default="certain">
+ *         &lt;simpleType>
+ *           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             &lt;enumeration value="certain"/>
+ *             &lt;enumeration value="uncertain"/>
+ *             &lt;enumeration value="less than"/>
+ *             &lt;enumeration value="greater than"/>
+ *             &lt;enumeration value="unknown"/>
+ *           &lt;/restriction>
+ *         &lt;/simpleType>
+ *       &lt;/attribute>
+ *       &lt;attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "positionType")
+public class PositionType {
+
+    @XmlAttribute(name = "position")
+    @XmlSchemaType(name = "unsignedLong")
+    protected BigInteger position;
+    @XmlAttribute(name = "status")
+    protected String status;
+    @XmlAttribute(name = "evidence")
+    protected List<Integer> evidence;
+
+    /**
+     * Gets the value of the position property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link BigInteger }
+     *     
+     */
+    public BigInteger getPosition() {
+        return position;
+    }
+
+    /**
+     * Sets the value of the position property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link BigInteger }
+     *     
+     */
+    public void setPosition(BigInteger value) {
+        this.position = value;
+    }
+
+    /**
+     * Gets the value of the status property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getStatus() {
+        if (status == null) {
+            return "certain";
+        } else {
+            return status;
+        }
+    }
+
+    /**
+     * Sets the value of the status property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setStatus(String value) {
+        this.status = value;
+    }
+
+    /**
+     * Gets the value of the evidence property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the evidence property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getEvidence().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Integer }
+     * 
+     * 
+     */
+    public List<Integer> getEvidence() {
+        if (evidence == null) {
+            evidence = new ArrayList<Integer>();
+        }
+        return this.evidence;
+    }
+
+}
diff --git a/src/jalview/xml/binding/uniprot/PropertyType.java b/src/jalview/xml/binding/uniprot/PropertyType.java
new file mode 100644 (file)
index 0000000..a9299f4
--- /dev/null
@@ -0,0 +1,92 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.13 at 10:18:53 AM BST 
+//
+
+
+package jalview.xml.binding.uniprot;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for propertyType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="propertyType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;attribute name="type" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="value" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "propertyType")
+public class PropertyType {
+
+    @XmlAttribute(name = "type", required = true)
+    protected String type;
+    @XmlAttribute(name = "value", required = true)
+    protected String value;
+
+    /**
+     * Gets the value of the type property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * Sets the value of the type property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setType(String value) {
+        this.type = value;
+    }
+
+    /**
+     * Gets the value of the value property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getValue() {
+        return value;
+    }
+
+    /**
+     * Sets the value of the value property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+}
diff --git a/src/jalview/xml/binding/uniprot/ProteinExistenceType.java b/src/jalview/xml/binding/uniprot/ProteinExistenceType.java
new file mode 100644 (file)
index 0000000..315f62d
--- /dev/null
@@ -0,0 +1,78 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.13 at 10:18:53 AM BST 
+//
+
+
+package jalview.xml.binding.uniprot;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Describes the evidence for the protein's existence.
+ *             Equivalent to the flat file PE-line.
+ * 
+ * <p>Java class for proteinExistenceType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="proteinExistenceType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;attribute name="type" use="required">
+ *         &lt;simpleType>
+ *           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             &lt;enumeration value="evidence at protein level"/>
+ *             &lt;enumeration value="evidence at transcript level"/>
+ *             &lt;enumeration value="inferred from homology"/>
+ *             &lt;enumeration value="predicted"/>
+ *             &lt;enumeration value="uncertain"/>
+ *           &lt;/restriction>
+ *         &lt;/simpleType>
+ *       &lt;/attribute>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "proteinExistenceType")
+public class ProteinExistenceType {
+
+    @XmlAttribute(name = "type", required = true)
+    protected String type;
+
+    /**
+     * Gets the value of the type property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * Sets the value of the type property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setType(String value) {
+        this.type = value;
+    }
+
+}
diff --git a/src/jalview/xml/binding/uniprot/ProteinType.java b/src/jalview/xml/binding/uniprot/ProteinType.java
new file mode 100644 (file)
index 0000000..dd5a8be
--- /dev/null
@@ -0,0 +1,1109 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.13 at 10:18:53 AM BST 
+//
+
+
+package jalview.xml.binding.uniprot;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Describes the names for the protein and parts thereof.
+ *             Equivalent to the flat file DE-line.
+ * 
+ * <p>Java class for proteinType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="proteinType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;group ref="{http://uniprot.org/uniprot}proteinNameGroup"/>
+ *         &lt;element name="domain" maxOccurs="unbounded" minOccurs="0">
+ *           &lt;complexType>
+ *             &lt;complexContent>
+ *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 &lt;group ref="{http://uniprot.org/uniprot}proteinNameGroup"/>
+ *               &lt;/restriction>
+ *             &lt;/complexContent>
+ *           &lt;/complexType>
+ *         &lt;/element>
+ *         &lt;element name="component" maxOccurs="unbounded" minOccurs="0">
+ *           &lt;complexType>
+ *             &lt;complexContent>
+ *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 &lt;group ref="{http://uniprot.org/uniprot}proteinNameGroup"/>
+ *               &lt;/restriction>
+ *             &lt;/complexContent>
+ *           &lt;/complexType>
+ *         &lt;/element>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "proteinType", propOrder = {
+    "recommendedName",
+    "alternativeName",
+    "submittedName",
+    "allergenName",
+    "biotechName",
+    "cdAntigenName",
+    "innName",
+    "domain",
+    "component"
+})
+public class ProteinType {
+
+    protected ProteinType.RecommendedName recommendedName;
+    protected List<ProteinType.AlternativeName> alternativeName;
+    protected List<ProteinType.SubmittedName> submittedName;
+    protected EvidencedStringType allergenName;
+    protected EvidencedStringType biotechName;
+    protected List<EvidencedStringType> cdAntigenName;
+    protected List<EvidencedStringType> innName;
+    protected List<ProteinType.Domain> domain;
+    protected List<ProteinType.Component> component;
+
+    /**
+     * Gets the value of the recommendedName property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link ProteinType.RecommendedName }
+     *     
+     */
+    public ProteinType.RecommendedName getRecommendedName() {
+        return recommendedName;
+    }
+
+    /**
+     * Sets the value of the recommendedName property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link ProteinType.RecommendedName }
+     *     
+     */
+    public void setRecommendedName(ProteinType.RecommendedName value) {
+        this.recommendedName = value;
+    }
+
+    /**
+     * Gets the value of the alternativeName property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the alternativeName property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getAlternativeName().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link ProteinType.AlternativeName }
+     * 
+     * 
+     */
+    public List<ProteinType.AlternativeName> getAlternativeName() {
+        if (alternativeName == null) {
+            alternativeName = new ArrayList<ProteinType.AlternativeName>();
+        }
+        return this.alternativeName;
+    }
+
+    /**
+     * Gets the value of the submittedName property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the submittedName property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getSubmittedName().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link ProteinType.SubmittedName }
+     * 
+     * 
+     */
+    public List<ProteinType.SubmittedName> getSubmittedName() {
+        if (submittedName == null) {
+            submittedName = new ArrayList<ProteinType.SubmittedName>();
+        }
+        return this.submittedName;
+    }
+
+    /**
+     * Gets the value of the allergenName property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link EvidencedStringType }
+     *     
+     */
+    public EvidencedStringType getAllergenName() {
+        return allergenName;
+    }
+
+    /**
+     * Sets the value of the allergenName property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link EvidencedStringType }
+     *     
+     */
+    public void setAllergenName(EvidencedStringType value) {
+        this.allergenName = value;
+    }
+
+    /**
+     * Gets the value of the biotechName property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link EvidencedStringType }
+     *     
+     */
+    public EvidencedStringType getBiotechName() {
+        return biotechName;
+    }
+
+    /**
+     * Sets the value of the biotechName property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link EvidencedStringType }
+     *     
+     */
+    public void setBiotechName(EvidencedStringType value) {
+        this.biotechName = value;
+    }
+
+    /**
+     * Gets the value of the cdAntigenName property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the cdAntigenName property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getCdAntigenName().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link EvidencedStringType }
+     * 
+     * 
+     */
+    public List<EvidencedStringType> getCdAntigenName() {
+        if (cdAntigenName == null) {
+            cdAntigenName = new ArrayList<EvidencedStringType>();
+        }
+        return this.cdAntigenName;
+    }
+
+    /**
+     * Gets the value of the innName property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the innName property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getInnName().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link EvidencedStringType }
+     * 
+     * 
+     */
+    public List<EvidencedStringType> getInnName() {
+        if (innName == null) {
+            innName = new ArrayList<EvidencedStringType>();
+        }
+        return this.innName;
+    }
+
+    /**
+     * Gets the value of the domain property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the domain property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getDomain().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link ProteinType.Domain }
+     * 
+     * 
+     */
+    public List<ProteinType.Domain> getDomain() {
+        if (domain == null) {
+            domain = new ArrayList<ProteinType.Domain>();
+        }
+        return this.domain;
+    }
+
+    /**
+     * Gets the value of the component property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the component property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getComponent().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link ProteinType.Component }
+     * 
+     * 
+     */
+    public List<ProteinType.Component> getComponent() {
+        if (component == null) {
+            component = new ArrayList<ProteinType.Component>();
+        }
+        return this.component;
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;sequence>
+     *         &lt;element name="fullName" type="{http://uniprot.org/uniprot}evidencedStringType" minOccurs="0"/>
+     *         &lt;element name="shortName" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
+     *         &lt;element name="ecNumber" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
+     *       &lt;/sequence>
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "fullName",
+        "shortName",
+        "ecNumber"
+    })
+    public static class AlternativeName {
+
+        protected EvidencedStringType fullName;
+        protected List<EvidencedStringType> shortName;
+        protected List<EvidencedStringType> ecNumber;
+
+        /**
+         * Gets the value of the fullName property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link EvidencedStringType }
+         *     
+         */
+        public EvidencedStringType getFullName() {
+            return fullName;
+        }
+
+        /**
+         * Sets the value of the fullName property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link EvidencedStringType }
+         *     
+         */
+        public void setFullName(EvidencedStringType value) {
+            this.fullName = value;
+        }
+
+        /**
+         * Gets the value of the shortName property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the shortName property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getShortName().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link EvidencedStringType }
+         * 
+         * 
+         */
+        public List<EvidencedStringType> getShortName() {
+            if (shortName == null) {
+                shortName = new ArrayList<EvidencedStringType>();
+            }
+            return this.shortName;
+        }
+
+        /**
+         * Gets the value of the ecNumber property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the ecNumber property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getEcNumber().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link EvidencedStringType }
+         * 
+         * 
+         */
+        public List<EvidencedStringType> getEcNumber() {
+            if (ecNumber == null) {
+                ecNumber = new ArrayList<EvidencedStringType>();
+            }
+            return this.ecNumber;
+        }
+
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;group ref="{http://uniprot.org/uniprot}proteinNameGroup"/>
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "recommendedName",
+        "alternativeName",
+        "submittedName",
+        "allergenName",
+        "biotechName",
+        "cdAntigenName",
+        "innName"
+    })
+    public static class Component {
+
+        protected ProteinType.RecommendedName recommendedName;
+        protected List<ProteinType.AlternativeName> alternativeName;
+        protected List<ProteinType.SubmittedName> submittedName;
+        protected EvidencedStringType allergenName;
+        protected EvidencedStringType biotechName;
+        protected List<EvidencedStringType> cdAntigenName;
+        protected List<EvidencedStringType> innName;
+
+        /**
+         * Gets the value of the recommendedName property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link ProteinType.RecommendedName }
+         *     
+         */
+        public ProteinType.RecommendedName getRecommendedName() {
+            return recommendedName;
+        }
+
+        /**
+         * Sets the value of the recommendedName property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link ProteinType.RecommendedName }
+         *     
+         */
+        public void setRecommendedName(ProteinType.RecommendedName value) {
+            this.recommendedName = value;
+        }
+
+        /**
+         * Gets the value of the alternativeName property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the alternativeName property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getAlternativeName().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link ProteinType.AlternativeName }
+         * 
+         * 
+         */
+        public List<ProteinType.AlternativeName> getAlternativeName() {
+            if (alternativeName == null) {
+                alternativeName = new ArrayList<ProteinType.AlternativeName>();
+            }
+            return this.alternativeName;
+        }
+
+        /**
+         * Gets the value of the submittedName property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the submittedName property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getSubmittedName().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link ProteinType.SubmittedName }
+         * 
+         * 
+         */
+        public List<ProteinType.SubmittedName> getSubmittedName() {
+            if (submittedName == null) {
+                submittedName = new ArrayList<ProteinType.SubmittedName>();
+            }
+            return this.submittedName;
+        }
+
+        /**
+         * Gets the value of the allergenName property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link EvidencedStringType }
+         *     
+         */
+        public EvidencedStringType getAllergenName() {
+            return allergenName;
+        }
+
+        /**
+         * Sets the value of the allergenName property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link EvidencedStringType }
+         *     
+         */
+        public void setAllergenName(EvidencedStringType value) {
+            this.allergenName = value;
+        }
+
+        /**
+         * Gets the value of the biotechName property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link EvidencedStringType }
+         *     
+         */
+        public EvidencedStringType getBiotechName() {
+            return biotechName;
+        }
+
+        /**
+         * Sets the value of the biotechName property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link EvidencedStringType }
+         *     
+         */
+        public void setBiotechName(EvidencedStringType value) {
+            this.biotechName = value;
+        }
+
+        /**
+         * Gets the value of the cdAntigenName property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the cdAntigenName property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getCdAntigenName().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link EvidencedStringType }
+         * 
+         * 
+         */
+        public List<EvidencedStringType> getCdAntigenName() {
+            if (cdAntigenName == null) {
+                cdAntigenName = new ArrayList<EvidencedStringType>();
+            }
+            return this.cdAntigenName;
+        }
+
+        /**
+         * Gets the value of the innName property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the innName property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getInnName().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link EvidencedStringType }
+         * 
+         * 
+         */
+        public List<EvidencedStringType> getInnName() {
+            if (innName == null) {
+                innName = new ArrayList<EvidencedStringType>();
+            }
+            return this.innName;
+        }
+
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;group ref="{http://uniprot.org/uniprot}proteinNameGroup"/>
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "recommendedName",
+        "alternativeName",
+        "submittedName",
+        "allergenName",
+        "biotechName",
+        "cdAntigenName",
+        "innName"
+    })
+    public static class Domain {
+
+        protected ProteinType.RecommendedName recommendedName;
+        protected List<ProteinType.AlternativeName> alternativeName;
+        protected List<ProteinType.SubmittedName> submittedName;
+        protected EvidencedStringType allergenName;
+        protected EvidencedStringType biotechName;
+        protected List<EvidencedStringType> cdAntigenName;
+        protected List<EvidencedStringType> innName;
+
+        /**
+         * Gets the value of the recommendedName property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link ProteinType.RecommendedName }
+         *     
+         */
+        public ProteinType.RecommendedName getRecommendedName() {
+            return recommendedName;
+        }
+
+        /**
+         * Sets the value of the recommendedName property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link ProteinType.RecommendedName }
+         *     
+         */
+        public void setRecommendedName(ProteinType.RecommendedName value) {
+            this.recommendedName = value;
+        }
+
+        /**
+         * Gets the value of the alternativeName property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the alternativeName property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getAlternativeName().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link ProteinType.AlternativeName }
+         * 
+         * 
+         */
+        public List<ProteinType.AlternativeName> getAlternativeName() {
+            if (alternativeName == null) {
+                alternativeName = new ArrayList<ProteinType.AlternativeName>();
+            }
+            return this.alternativeName;
+        }
+
+        /**
+         * Gets the value of the submittedName property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the submittedName property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getSubmittedName().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link ProteinType.SubmittedName }
+         * 
+         * 
+         */
+        public List<ProteinType.SubmittedName> getSubmittedName() {
+            if (submittedName == null) {
+                submittedName = new ArrayList<ProteinType.SubmittedName>();
+            }
+            return this.submittedName;
+        }
+
+        /**
+         * Gets the value of the allergenName property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link EvidencedStringType }
+         *     
+         */
+        public EvidencedStringType getAllergenName() {
+            return allergenName;
+        }
+
+        /**
+         * Sets the value of the allergenName property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link EvidencedStringType }
+         *     
+         */
+        public void setAllergenName(EvidencedStringType value) {
+            this.allergenName = value;
+        }
+
+        /**
+         * Gets the value of the biotechName property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link EvidencedStringType }
+         *     
+         */
+        public EvidencedStringType getBiotechName() {
+            return biotechName;
+        }
+
+        /**
+         * Sets the value of the biotechName property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link EvidencedStringType }
+         *     
+         */
+        public void setBiotechName(EvidencedStringType value) {
+            this.biotechName = value;
+        }
+
+        /**
+         * Gets the value of the cdAntigenName property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the cdAntigenName property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getCdAntigenName().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link EvidencedStringType }
+         * 
+         * 
+         */
+        public List<EvidencedStringType> getCdAntigenName() {
+            if (cdAntigenName == null) {
+                cdAntigenName = new ArrayList<EvidencedStringType>();
+            }
+            return this.cdAntigenName;
+        }
+
+        /**
+         * Gets the value of the innName property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the innName property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getInnName().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link EvidencedStringType }
+         * 
+         * 
+         */
+        public List<EvidencedStringType> getInnName() {
+            if (innName == null) {
+                innName = new ArrayList<EvidencedStringType>();
+            }
+            return this.innName;
+        }
+
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;sequence>
+     *         &lt;element name="fullName" type="{http://uniprot.org/uniprot}evidencedStringType"/>
+     *         &lt;element name="shortName" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
+     *         &lt;element name="ecNumber" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
+     *       &lt;/sequence>
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "fullName",
+        "shortName",
+        "ecNumber"
+    })
+    public static class RecommendedName {
+
+        @XmlElement(required = true)
+        protected EvidencedStringType fullName;
+        protected List<EvidencedStringType> shortName;
+        protected List<EvidencedStringType> ecNumber;
+
+        /**
+         * Gets the value of the fullName property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link EvidencedStringType }
+         *     
+         */
+        public EvidencedStringType getFullName() {
+            return fullName;
+        }
+
+        /**
+         * Sets the value of the fullName property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link EvidencedStringType }
+         *     
+         */
+        public void setFullName(EvidencedStringType value) {
+            this.fullName = value;
+        }
+
+        /**
+         * Gets the value of the shortName property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the shortName property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getShortName().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link EvidencedStringType }
+         * 
+         * 
+         */
+        public List<EvidencedStringType> getShortName() {
+            if (shortName == null) {
+                shortName = new ArrayList<EvidencedStringType>();
+            }
+            return this.shortName;
+        }
+
+        /**
+         * Gets the value of the ecNumber property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the ecNumber property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getEcNumber().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link EvidencedStringType }
+         * 
+         * 
+         */
+        public List<EvidencedStringType> getEcNumber() {
+            if (ecNumber == null) {
+                ecNumber = new ArrayList<EvidencedStringType>();
+            }
+            return this.ecNumber;
+        }
+
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;sequence>
+     *         &lt;element name="fullName" type="{http://uniprot.org/uniprot}evidencedStringType"/>
+     *         &lt;element name="ecNumber" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
+     *       &lt;/sequence>
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "fullName",
+        "ecNumber"
+    })
+    public static class SubmittedName {
+
+        @XmlElement(required = true)
+        protected EvidencedStringType fullName;
+        protected List<EvidencedStringType> ecNumber;
+
+        /**
+         * Gets the value of the fullName property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link EvidencedStringType }
+         *     
+         */
+        public EvidencedStringType getFullName() {
+            return fullName;
+        }
+
+        /**
+         * Sets the value of the fullName property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link EvidencedStringType }
+         *     
+         */
+        public void setFullName(EvidencedStringType value) {
+            this.fullName = value;
+        }
+
+        /**
+         * Gets the value of the ecNumber property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the ecNumber property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getEcNumber().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link EvidencedStringType }
+         * 
+         * 
+         */
+        public List<EvidencedStringType> getEcNumber() {
+            if (ecNumber == null) {
+                ecNumber = new ArrayList<EvidencedStringType>();
+            }
+            return this.ecNumber;
+        }
+
+    }
+
+}
diff --git a/src/jalview/xml/binding/uniprot/ReferenceType.java b/src/jalview/xml/binding/uniprot/ReferenceType.java
new file mode 100644 (file)
index 0000000..33e6251
--- /dev/null
@@ -0,0 +1,193 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.13 at 10:18:53 AM BST 
+//
+
+
+package jalview.xml.binding.uniprot;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Describes a citation and a summary of its content.
+ *             Equivalent to the flat file RN-, RP-, RC-, RX-, RG-, RA-, RT- and RL-lines.
+ * 
+ * <p>Java class for referenceType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="referenceType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="citation" type="{http://uniprot.org/uniprot}citationType"/>
+ *         &lt;group ref="{http://uniprot.org/uniprot}sptrCitationGroup"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+ *       &lt;attribute name="key" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "referenceType", propOrder = {
+    "citation",
+    "scope",
+    "source"
+})
+public class ReferenceType {
+
+    @XmlElement(required = true)
+    protected CitationType citation;
+    @XmlElement(required = true)
+    protected List<String> scope;
+    protected SourceDataType source;
+    @XmlAttribute(name = "evidence")
+    protected List<Integer> evidence;
+    @XmlAttribute(name = "key", required = true)
+    protected String key;
+
+    /**
+     * Gets the value of the citation property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link CitationType }
+     *     
+     */
+    public CitationType getCitation() {
+        return citation;
+    }
+
+    /**
+     * Sets the value of the citation property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link CitationType }
+     *     
+     */
+    public void setCitation(CitationType value) {
+        this.citation = value;
+    }
+
+    /**
+     * Gets the value of the scope property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the scope property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getScope().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link String }
+     * 
+     * 
+     */
+    public List<String> getScope() {
+        if (scope == null) {
+            scope = new ArrayList<String>();
+        }
+        return this.scope;
+    }
+
+    /**
+     * Gets the value of the source property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link SourceDataType }
+     *     
+     */
+    public SourceDataType getSource() {
+        return source;
+    }
+
+    /**
+     * Sets the value of the source property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link SourceDataType }
+     *     
+     */
+    public void setSource(SourceDataType value) {
+        this.source = value;
+    }
+
+    /**
+     * Gets the value of the evidence property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the evidence property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getEvidence().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Integer }
+     * 
+     * 
+     */
+    public List<Integer> getEvidence() {
+        if (evidence == null) {
+            evidence = new ArrayList<Integer>();
+        }
+        return this.evidence;
+    }
+
+    /**
+     * Gets the value of the key property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getKey() {
+        return key;
+    }
+
+    /**
+     * Sets the value of the key property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setKey(String value) {
+        this.key = value;
+    }
+
+}
diff --git a/src/jalview/xml/binding/uniprot/SequenceType.java b/src/jalview/xml/binding/uniprot/SequenceType.java
new file mode 100644 (file)
index 0000000..f0b110b
--- /dev/null
@@ -0,0 +1,242 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.13 at 10:18:53 AM BST 
+//
+
+
+package jalview.xml.binding.uniprot;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+import javax.xml.datatype.XMLGregorianCalendar;
+
+
+/**
+ * <p>Java class for sequenceType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="sequenceType">
+ *   &lt;simpleContent>
+ *     &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>string">
+ *       &lt;attribute name="length" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *       &lt;attribute name="mass" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *       &lt;attribute name="checksum" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="modified" use="required" type="{http://www.w3.org/2001/XMLSchema}date" />
+ *       &lt;attribute name="version" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *       &lt;attribute name="precursor" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       &lt;attribute name="fragment">
+ *         &lt;simpleType>
+ *           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             &lt;enumeration value="single"/>
+ *             &lt;enumeration value="multiple"/>
+ *           &lt;/restriction>
+ *         &lt;/simpleType>
+ *       &lt;/attribute>
+ *     &lt;/extension>
+ *   &lt;/simpleContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "sequenceType", propOrder = {
+    "value"
+})
+public class SequenceType {
+
+    @XmlValue
+    protected String value;
+    @XmlAttribute(name = "length", required = true)
+    protected int length;
+    @XmlAttribute(name = "mass", required = true)
+    protected int mass;
+    @XmlAttribute(name = "checksum", required = true)
+    protected String checksum;
+    @XmlAttribute(name = "modified", required = true)
+    @XmlSchemaType(name = "date")
+    protected XMLGregorianCalendar modified;
+    @XmlAttribute(name = "version", required = true)
+    protected int version;
+    @XmlAttribute(name = "precursor")
+    protected Boolean precursor;
+    @XmlAttribute(name = "fragment")
+    protected String fragment;
+
+    /**
+     * Gets the value of the value property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getValue() {
+        return value;
+    }
+
+    /**
+     * Sets the value of the value property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    /**
+     * Gets the value of the length property.
+     * 
+     */
+    public int getLength() {
+        return length;
+    }
+
+    /**
+     * Sets the value of the length property.
+     * 
+     */
+    public void setLength(int value) {
+        this.length = value;
+    }
+
+    /**
+     * Gets the value of the mass property.
+     * 
+     */
+    public int getMass() {
+        return mass;
+    }
+
+    /**
+     * Sets the value of the mass property.
+     * 
+     */
+    public void setMass(int value) {
+        this.mass = value;
+    }
+
+    /**
+     * Gets the value of the checksum property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getChecksum() {
+        return checksum;
+    }
+
+    /**
+     * Sets the value of the checksum property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setChecksum(String value) {
+        this.checksum = value;
+    }
+
+    /**
+     * Gets the value of the modified property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link XMLGregorianCalendar }
+     *     
+     */
+    public XMLGregorianCalendar getModified() {
+        return modified;
+    }
+
+    /**
+     * Sets the value of the modified property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link XMLGregorianCalendar }
+     *     
+     */
+    public void setModified(XMLGregorianCalendar value) {
+        this.modified = value;
+    }
+
+    /**
+     * Gets the value of the version property.
+     * 
+     */
+    public int getVersion() {
+        return version;
+    }
+
+    /**
+     * Sets the value of the version property.
+     * 
+     */
+    public void setVersion(int value) {
+        this.version = value;
+    }
+
+    /**
+     * Gets the value of the precursor property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Boolean }
+     *     
+     */
+    public Boolean isPrecursor() {
+        return precursor;
+    }
+
+    /**
+     * Sets the value of the precursor property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Boolean }
+     *     
+     */
+    public void setPrecursor(Boolean value) {
+        this.precursor = value;
+    }
+
+    /**
+     * Gets the value of the fragment property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getFragment() {
+        return fragment;
+    }
+
+    /**
+     * Sets the value of the fragment property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setFragment(String value) {
+        this.fragment = value;
+    }
+
+}
diff --git a/src/jalview/xml/binding/uniprot/SourceDataType.java b/src/jalview/xml/binding/uniprot/SourceDataType.java
new file mode 100644 (file)
index 0000000..03cace3
--- /dev/null
@@ -0,0 +1,461 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.13 at 10:18:53 AM BST 
+//
+
+
+package jalview.xml.binding.uniprot;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElements;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+
+
+/**
+ * Describes the source of the sequence according to the citation.
+ *             Equivalent to the flat file RC-line.
+ * 
+ * <p>Java class for sourceDataType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="sourceDataType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;choice maxOccurs="unbounded">
+ *         &lt;element name="strain">
+ *           &lt;complexType>
+ *             &lt;simpleContent>
+ *               &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>string">
+ *                 &lt;attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+ *               &lt;/extension>
+ *             &lt;/simpleContent>
+ *           &lt;/complexType>
+ *         &lt;/element>
+ *         &lt;element name="plasmid">
+ *           &lt;complexType>
+ *             &lt;simpleContent>
+ *               &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>string">
+ *                 &lt;attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+ *               &lt;/extension>
+ *             &lt;/simpleContent>
+ *           &lt;/complexType>
+ *         &lt;/element>
+ *         &lt;element name="transposon">
+ *           &lt;complexType>
+ *             &lt;simpleContent>
+ *               &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>string">
+ *                 &lt;attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+ *               &lt;/extension>
+ *             &lt;/simpleContent>
+ *           &lt;/complexType>
+ *         &lt;/element>
+ *         &lt;element name="tissue">
+ *           &lt;complexType>
+ *             &lt;simpleContent>
+ *               &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>string">
+ *                 &lt;attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+ *               &lt;/extension>
+ *             &lt;/simpleContent>
+ *           &lt;/complexType>
+ *         &lt;/element>
+ *       &lt;/choice>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "sourceDataType", propOrder = {
+    "strainOrPlasmidOrTransposon"
+})
+public class SourceDataType {
+
+    @XmlElements({
+        @XmlElement(name = "strain", type = SourceDataType.Strain.class),
+        @XmlElement(name = "plasmid", type = SourceDataType.Plasmid.class),
+        @XmlElement(name = "transposon", type = SourceDataType.Transposon.class),
+        @XmlElement(name = "tissue", type = SourceDataType.Tissue.class)
+    })
+    protected List<Object> strainOrPlasmidOrTransposon;
+
+    /**
+     * Gets the value of the strainOrPlasmidOrTransposon property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the strainOrPlasmidOrTransposon property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getStrainOrPlasmidOrTransposon().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link SourceDataType.Strain }
+     * {@link SourceDataType.Plasmid }
+     * {@link SourceDataType.Transposon }
+     * {@link SourceDataType.Tissue }
+     * 
+     * 
+     */
+    public List<Object> getStrainOrPlasmidOrTransposon() {
+        if (strainOrPlasmidOrTransposon == null) {
+            strainOrPlasmidOrTransposon = new ArrayList<Object>();
+        }
+        return this.strainOrPlasmidOrTransposon;
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;simpleContent>
+     *     &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>string">
+     *       &lt;attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+     *     &lt;/extension>
+     *   &lt;/simpleContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "value"
+    })
+    public static class Plasmid {
+
+        @XmlValue
+        protected String value;
+        @XmlAttribute(name = "evidence")
+        protected List<Integer> evidence;
+
+        /**
+         * Gets the value of the value property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getValue() {
+            return value;
+        }
+
+        /**
+         * Sets the value of the value property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setValue(String value) {
+            this.value = value;
+        }
+
+        /**
+         * Gets the value of the evidence property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the evidence property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getEvidence().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link Integer }
+         * 
+         * 
+         */
+        public List<Integer> getEvidence() {
+            if (evidence == null) {
+                evidence = new ArrayList<Integer>();
+            }
+            return this.evidence;
+        }
+
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;simpleContent>
+     *     &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>string">
+     *       &lt;attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+     *     &lt;/extension>
+     *   &lt;/simpleContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "value"
+    })
+    public static class Strain {
+
+        @XmlValue
+        protected String value;
+        @XmlAttribute(name = "evidence")
+        protected List<Integer> evidence;
+
+        /**
+         * Gets the value of the value property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getValue() {
+            return value;
+        }
+
+        /**
+         * Sets the value of the value property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setValue(String value) {
+            this.value = value;
+        }
+
+        /**
+         * Gets the value of the evidence property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the evidence property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getEvidence().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link Integer }
+         * 
+         * 
+         */
+        public List<Integer> getEvidence() {
+            if (evidence == null) {
+                evidence = new ArrayList<Integer>();
+            }
+            return this.evidence;
+        }
+
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;simpleContent>
+     *     &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>string">
+     *       &lt;attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+     *     &lt;/extension>
+     *   &lt;/simpleContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "value"
+    })
+    public static class Tissue {
+
+        @XmlValue
+        protected String value;
+        @XmlAttribute(name = "evidence")
+        protected List<Integer> evidence;
+
+        /**
+         * Gets the value of the value property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getValue() {
+            return value;
+        }
+
+        /**
+         * Sets the value of the value property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setValue(String value) {
+            this.value = value;
+        }
+
+        /**
+         * Gets the value of the evidence property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the evidence property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getEvidence().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link Integer }
+         * 
+         * 
+         */
+        public List<Integer> getEvidence() {
+            if (evidence == null) {
+                evidence = new ArrayList<Integer>();
+            }
+            return this.evidence;
+        }
+
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;simpleContent>
+     *     &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>string">
+     *       &lt;attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+     *     &lt;/extension>
+     *   &lt;/simpleContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "value"
+    })
+    public static class Transposon {
+
+        @XmlValue
+        protected String value;
+        @XmlAttribute(name = "evidence")
+        protected List<Integer> evidence;
+
+        /**
+         * Gets the value of the value property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getValue() {
+            return value;
+        }
+
+        /**
+         * Sets the value of the value property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setValue(String value) {
+            this.value = value;
+        }
+
+        /**
+         * Gets the value of the evidence property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the evidence property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getEvidence().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link Integer }
+         * 
+         * 
+         */
+        public List<Integer> getEvidence() {
+            if (evidence == null) {
+                evidence = new ArrayList<Integer>();
+            }
+            return this.evidence;
+        }
+
+    }
+
+}
diff --git a/src/jalview/xml/binding/uniprot/SourceType.java b/src/jalview/xml/binding/uniprot/SourceType.java
new file mode 100644 (file)
index 0000000..44edbba
--- /dev/null
@@ -0,0 +1,98 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.13 at 10:18:53 AM BST 
+//
+
+
+package jalview.xml.binding.uniprot;
+
+import java.math.BigInteger;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Describes the source of the data using a database cross-reference (or a 'ref' attribute when the source cannot be found in a public data source, such as PubMed, and is cited only within the UniProtKB entry).
+ * 
+ * <p>Java class for sourceType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="sourceType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="dbReference" type="{http://uniprot.org/uniprot}dbReferenceType" minOccurs="0"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="ref" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "sourceType", propOrder = {
+    "dbReference"
+})
+public class SourceType {
+
+    protected DbReferenceType dbReference;
+    @XmlAttribute(name = "ref")
+    protected BigInteger ref;
+
+    /**
+     * Gets the value of the dbReference property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link DbReferenceType }
+     *     
+     */
+    public DbReferenceType getDbReference() {
+        return dbReference;
+    }
+
+    /**
+     * Sets the value of the dbReference property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link DbReferenceType }
+     *     
+     */
+    public void setDbReference(DbReferenceType value) {
+        this.dbReference = value;
+    }
+
+    /**
+     * Gets the value of the ref property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link BigInteger }
+     *     
+     */
+    public BigInteger getRef() {
+        return ref;
+    }
+
+    /**
+     * Sets the value of the ref property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link BigInteger }
+     *     
+     */
+    public void setRef(BigInteger value) {
+        this.ref = value;
+    }
+
+}
diff --git a/src/jalview/xml/binding/uniprot/StatusType.java b/src/jalview/xml/binding/uniprot/StatusType.java
new file mode 100644 (file)
index 0000000..29fb34e
--- /dev/null
@@ -0,0 +1,107 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.13 at 10:18:53 AM BST 
+//
+
+
+package jalview.xml.binding.uniprot;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+
+
+/**
+ * Indicates whether the name of a plasmid is known or unknown.
+ * 
+ * <p>Java class for statusType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="statusType">
+ *   &lt;simpleContent>
+ *     &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>string">
+ *       &lt;attribute name="status" default="known">
+ *         &lt;simpleType>
+ *           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             &lt;enumeration value="known"/>
+ *             &lt;enumeration value="unknown"/>
+ *           &lt;/restriction>
+ *         &lt;/simpleType>
+ *       &lt;/attribute>
+ *     &lt;/extension>
+ *   &lt;/simpleContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "statusType", propOrder = {
+    "value"
+})
+public class StatusType {
+
+    @XmlValue
+    protected String value;
+    @XmlAttribute(name = "status")
+    protected String status;
+
+    /**
+     * Gets the value of the value property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getValue() {
+        return value;
+    }
+
+    /**
+     * Sets the value of the value property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    /**
+     * Gets the value of the status property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getStatus() {
+        if (status == null) {
+            return "known";
+        } else {
+            return status;
+        }
+    }
+
+    /**
+     * Sets the value of the status property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setStatus(String value) {
+        this.status = value;
+    }
+
+}
diff --git a/src/jalview/xml/binding/uniprot/SubcellularLocationType.java b/src/jalview/xml/binding/uniprot/SubcellularLocationType.java
new file mode 100644 (file)
index 0000000..29848d7
--- /dev/null
@@ -0,0 +1,142 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.13 at 10:18:53 AM BST 
+//
+
+
+package jalview.xml.binding.uniprot;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Describes the subcellular location and optionally the topology and orientation of a molecule.
+ * 
+ * <p>Java class for subcellularLocationType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="subcellularLocationType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="location" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded"/>
+ *         &lt;element name="topology" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="orientation" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "subcellularLocationType", propOrder = {
+    "location",
+    "topology",
+    "orientation"
+})
+public class SubcellularLocationType {
+
+    @XmlElement(required = true)
+    protected List<EvidencedStringType> location;
+    protected List<EvidencedStringType> topology;
+    protected List<EvidencedStringType> orientation;
+
+    /**
+     * Gets the value of the location property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the location property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getLocation().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link EvidencedStringType }
+     * 
+     * 
+     */
+    public List<EvidencedStringType> getLocation() {
+        if (location == null) {
+            location = new ArrayList<EvidencedStringType>();
+        }
+        return this.location;
+    }
+
+    /**
+     * Gets the value of the topology property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the topology property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getTopology().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link EvidencedStringType }
+     * 
+     * 
+     */
+    public List<EvidencedStringType> getTopology() {
+        if (topology == null) {
+            topology = new ArrayList<EvidencedStringType>();
+        }
+        return this.topology;
+    }
+
+    /**
+     * Gets the value of the orientation property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the orientation property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getOrientation().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link EvidencedStringType }
+     * 
+     * 
+     */
+    public List<EvidencedStringType> getOrientation() {
+        if (orientation == null) {
+            orientation = new ArrayList<EvidencedStringType>();
+        }
+        return this.orientation;
+    }
+
+}
diff --git a/src/jalview/xml/binding/uniprot/Uniprot.java b/src/jalview/xml/binding/uniprot/Uniprot.java
new file mode 100644 (file)
index 0000000..4e2cdb0
--- /dev/null
@@ -0,0 +1,105 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.13 at 10:18:53 AM BST 
+//
+
+
+package jalview.xml.binding.uniprot;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element ref="{http://uniprot.org/uniprot}entry" maxOccurs="unbounded"/>
+ *         &lt;element ref="{http://uniprot.org/uniprot}copyright" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "entry",
+    "copyright"
+})
+@XmlRootElement(name = "uniprot")
+public class Uniprot {
+
+    @XmlElement(required = true)
+    protected List<Entry> entry;
+    protected String copyright;
+
+    /**
+     * Gets the value of the entry property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the entry property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getEntry().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Entry }
+     * 
+     * 
+     */
+    public List<Entry> getEntry() {
+        if (entry == null) {
+            entry = new ArrayList<Entry>();
+        }
+        return this.entry;
+    }
+
+    /**
+     * Gets the value of the copyright property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getCopyright() {
+        return copyright;
+    }
+
+    /**
+     * Sets the value of the copyright property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setCopyright(String value) {
+        this.copyright = value;
+    }
+
+}
diff --git a/src/jalview/xml/binding/uniprot/package-info.java b/src/jalview/xml/binding/uniprot/package-info.java
new file mode 100644 (file)
index 0000000..9741acc
--- /dev/null
@@ -0,0 +1,9 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2018.09.13 at 10:18:53 AM BST 
+//
+
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://uniprot.org/uniprot", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package jalview.xml.binding.uniprot;
index 837e970..bd827f9 100644 (file)
@@ -52,6 +52,7 @@ public class AlignSeqTest
     assertEquals(AlignSeq.extractGaps(" -", " AC-G.T"), "ACG.T");
     assertEquals(AlignSeq.extractGaps(" -.", " AC-G.T ."), "ACGT");
     assertEquals(AlignSeq.extractGaps("-", " AC-G.T"), " ACG.T");
+    assertEquals(AlignSeq.extractGaps("-. ", " -. .-"), "");
   }
 
   @Test(groups = { "Functional" })
index a7a7d34..70ae6a0 100644 (file)
@@ -2040,44 +2040,48 @@ public class AlignmentUtilsTests
     String dbSnp = "dbSNP";
     String cosmic = "COSMIC";
 
+    /*
+     * NB setting "id" (as returned by Ensembl for features in JSON format);
+     * previously "ID" (as returned for GFF3 format)
+     */
     SequenceFeature sf1 = new SequenceFeature("sequence_variant", "", 1, 1,
             0f, ensembl);
     sf1.setValue("alleles", "A,G"); // AAA -> GAA -> K/E
-    sf1.setValue("ID", "var1.125A>G");
+    sf1.setValue("id", "var1.125A>G");
 
     SequenceFeature sf2 = new SequenceFeature("sequence_variant", "", 1, 1,
             0f, dbSnp);
     sf2.setValue("alleles", "A,C"); // AAA -> CAA -> K/Q
-    sf2.setValue("ID", "var2");
+    sf2.setValue("id", "var2");
     sf2.setValue("clinical_significance", "Dodgy");
 
     SequenceFeature sf3 = new SequenceFeature("sequence_variant", "", 1, 1,
             0f, dbSnp);
     sf3.setValue("alleles", "A,T"); // AAA -> TAA -> stop codon
-    sf3.setValue("ID", "var3");
+    sf3.setValue("id", "var3");
     sf3.setValue("clinical_significance", "Bad");
 
     SequenceFeature sf4 = new SequenceFeature("sequence_variant", "", 3, 3,
             0f, cosmic);
     sf4.setValue("alleles", "A,G"); // AAA -> AAG synonymous
-    sf4.setValue("ID", "var4");
+    sf4.setValue("id", "var4");
     sf4.setValue("clinical_significance", "None");
 
     SequenceFeature sf5 = new SequenceFeature("sequence_variant", "", 3, 3,
             0f, ensembl);
     sf5.setValue("alleles", "A,T"); // AAA -> AAT -> K/N
-    sf5.setValue("ID", "sequence_variant:var5"); // prefix gets stripped off
+    sf5.setValue("id", "sequence_variant:var5"); // prefix gets stripped off
     sf5.setValue("clinical_significance", "Benign");
 
     SequenceFeature sf6 = new SequenceFeature("sequence_variant", "", 6, 6,
             0f, dbSnp);
     sf6.setValue("alleles", "T,C"); // TTT -> TTC synonymous
-    sf6.setValue("ID", "var6");
+    sf6.setValue("id", "var6");
 
     SequenceFeature sf7 = new SequenceFeature("sequence_variant", "", 8, 8,
             0f, cosmic);
     sf7.setValue("alleles", "C,A,G"); // CCC -> CAC,CGC -> P/H/R
-    sf7.setValue("ID", "var7");
+    sf7.setValue("id", "var7");
     sf7.setValue("clinical_significance", "Good");
 
     List<DnaVariant> codon1Variants = new ArrayList<>();
@@ -2149,9 +2153,9 @@ public class AlignmentUtilsTests
     assertEquals(1, sf.getEnd());
     assertEquals("nonsynonymous_variant", sf.getType());
     assertEquals("p.Lys1Asn", sf.getDescription());
-    assertEquals("var5", sf.getValue("ID"));
+    assertEquals("var5", sf.getValue("id"));
     assertEquals("Benign", sf.getValue("clinical_significance"));
-    assertEquals("ID=var5;clinical_significance=Benign",
+    assertEquals("id=var5;clinical_significance=Benign",
             sf.getAttributes());
     assertEquals(1, sf.links.size());
     assertEquals(
@@ -2165,9 +2169,9 @@ public class AlignmentUtilsTests
     assertEquals(1, sf.getEnd());
     assertEquals("nonsynonymous_variant", sf.getType());
     assertEquals("p.Lys1Gln", sf.getDescription());
-    assertEquals("var2", sf.getValue("ID"));
+    assertEquals("var2", sf.getValue("id"));
     assertEquals("Dodgy", sf.getValue("clinical_significance"));
-    assertEquals("ID=var2;clinical_significance=Dodgy", sf.getAttributes());
+    assertEquals("id=var2;clinical_significance=Dodgy", sf.getAttributes());
     assertEquals(1, sf.links.size());
     assertEquals(
             "p.Lys1Gln var2|http://www.ensembl.org/Homo_sapiens/Variation/Summary?v=var2",
@@ -2180,9 +2184,9 @@ public class AlignmentUtilsTests
     assertEquals(1, sf.getEnd());
     assertEquals("nonsynonymous_variant", sf.getType());
     assertEquals("p.Lys1Glu", sf.getDescription());
-    assertEquals("var1.125A>G", sf.getValue("ID"));
+    assertEquals("var1.125A>G", sf.getValue("id"));
     assertNull(sf.getValue("clinical_significance"));
-    assertEquals("ID=var1.125A>G", sf.getAttributes());
+    assertEquals("id=var1.125A>G", sf.getAttributes());
     assertEquals(1, sf.links.size());
     // link to variation is urlencoded
     assertEquals(
@@ -2196,9 +2200,9 @@ public class AlignmentUtilsTests
     assertEquals(1, sf.getEnd());
     assertEquals("stop_gained", sf.getType());
     assertEquals("Aaa/Taa", sf.getDescription());
-    assertEquals("var3", sf.getValue("ID"));
+    assertEquals("var3", sf.getValue("id"));
     assertEquals("Bad", sf.getValue("clinical_significance"));
-    assertEquals("ID=var3;clinical_significance=Bad", sf.getAttributes());
+    assertEquals("id=var3;clinical_significance=Bad", sf.getAttributes());
     assertEquals(1, sf.links.size());
     assertEquals(
             "Aaa/Taa var3|http://www.ensembl.org/Homo_sapiens/Variation/Summary?v=var3",
@@ -2211,9 +2215,9 @@ public class AlignmentUtilsTests
     assertEquals(1, sf.getEnd());
     assertEquals("synonymous_variant", sf.getType());
     assertEquals("aaA/aaG", sf.getDescription());
-    assertEquals("var4", sf.getValue("ID"));
+    assertEquals("var4", sf.getValue("id"));
     assertEquals("None", sf.getValue("clinical_significance"));
-    assertEquals("ID=var4;clinical_significance=None", sf.getAttributes());
+    assertEquals("id=var4;clinical_significance=None", sf.getAttributes());
     assertEquals(1, sf.links.size());
     assertEquals(
             "aaA/aaG var4|http://www.ensembl.org/Homo_sapiens/Variation/Summary?v=var4",
@@ -2226,9 +2230,9 @@ public class AlignmentUtilsTests
     assertEquals(2, sf.getEnd());
     assertEquals("synonymous_variant", sf.getType());
     assertEquals("ttT/ttC", sf.getDescription());
-    assertEquals("var6", sf.getValue("ID"));
+    assertEquals("var6", sf.getValue("id"));
     assertNull(sf.getValue("clinical_significance"));
-    assertEquals("ID=var6", sf.getAttributes());
+    assertEquals("id=var6", sf.getAttributes());
     assertEquals(1, sf.links.size());
     assertEquals(
             "ttT/ttC var6|http://www.ensembl.org/Homo_sapiens/Variation/Summary?v=var6",
@@ -2242,9 +2246,9 @@ public class AlignmentUtilsTests
     assertEquals(3, sf.getEnd());
     assertEquals("nonsynonymous_variant", sf.getType());
     assertEquals("p.Pro3Arg", sf.getDescription());
-    assertEquals("var7", sf.getValue("ID"));
+    assertEquals("var7", sf.getValue("id"));
     assertEquals("Good", sf.getValue("clinical_significance"));
-    assertEquals("ID=var7;clinical_significance=Good", sf.getAttributes());
+    assertEquals("id=var7;clinical_significance=Good", sf.getAttributes());
     assertEquals(1, sf.links.size());
     assertEquals(
             "p.Pro3Arg var7|http://www.ensembl.org/Homo_sapiens/Variation/Summary?v=var7",
@@ -2257,9 +2261,9 @@ public class AlignmentUtilsTests
     assertEquals(3, sf.getEnd());
     assertEquals("nonsynonymous_variant", sf.getType());
     assertEquals("p.Pro3His", sf.getDescription());
-    assertEquals("var7", sf.getValue("ID"));
+    assertEquals("var7", sf.getValue("id"));
     assertEquals("Good", sf.getValue("clinical_significance"));
-    assertEquals("ID=var7;clinical_significance=Good", sf.getAttributes());
+    assertEquals("id=var7;clinical_significance=Good", sf.getAttributes());
     assertEquals(1, sf.links.size());
     assertEquals(
             "p.Pro3His var7|http://www.ensembl.org/Homo_sapiens/Variation/Summary?v=var7",
index b3c78be..81ec443 100644 (file)
@@ -454,7 +454,7 @@ public class CrossRefTest
     assertSame(pep2, xrefs.getSequenceAt(1));
   }
 
-  @AfterClass
+  @AfterClass(alwaysRun = true)
   public void tearDown()
   {
     SequenceFetcherFactory.setSequenceFetcher(null);
index 6a31b31..27ae8cd 100644 (file)
@@ -139,7 +139,8 @@ public class DnaTest
     Iterator<int[]> contigs = cs.getVisContigsIterator(0, alf.getWidth(),
             false);
     Dna dna = new Dna(av, contigs);
-    AlignmentI translated = dna.translateCdna();
+    AlignmentI translated = dna.translateCdna(GeneticCodes.getInstance()
+            .getStandardCodeTable());
     assertNotNull("Couldn't do a full width translation of test data.",
             translated);
   }
@@ -170,7 +171,8 @@ public class DnaTest
               alf.getWidth(), false);
       AlignViewportI av = new AlignViewport(alf, cs);
       Dna dna = new Dna(av, vcontigs);
-      AlignmentI transAlf = dna.translateCdna();
+      AlignmentI transAlf = dna.translateCdna(GeneticCodes.getInstance()
+              .getStandardCodeTable());
 
       assertTrue("Translation failed (ipos=" + ipos
               + ") No alignment data.", transAlf != null);
@@ -197,7 +199,8 @@ public class DnaTest
     Iterator<int[]> contigs = cs.getVisContigsIterator(0, alf.getWidth(),
             false);
     Dna dna = new Dna(av, contigs);
-    AlignmentI translated = dna.translateCdna();
+    AlignmentI translated = dna.translateCdna(GeneticCodes.getInstance()
+            .getStandardCodeTable());
     String aa = translated.getSequenceAt(0).getSequenceAsString();
     assertEquals(
             "AAAACCDDEEFFGGGGHHIIIKKLLLLLLMNNPPPPQQRRRRRRSSSSSSTTTTVVVVWYY***",
@@ -222,7 +225,8 @@ public class DnaTest
     Iterator<int[]> contigs = cs.getVisContigsIterator(0, alf.getWidth(),
             false);
     Dna dna = new Dna(av, contigs);
-    AlignmentI translated = dna.translateCdna();
+    AlignmentI translated = dna.translateCdna(GeneticCodes.getInstance()
+            .getStandardCodeTable());
     String aa = translated.getSequenceAt(0).getSequenceAsString();
     assertEquals("AACDDGGGGHHIIIKKLLLLLLMNNPPPPQQRRRRRRSSSSSSTTTTVVVVW", aa);
   }
@@ -309,7 +313,8 @@ public class DnaTest
     Iterator<int[]> contigs = cs.getVisContigsIterator(0, cdna.getWidth(),
             false);
     Dna dna = new Dna(av, contigs);
-    AlignmentI translated = dna.translateCdna();
+    AlignmentI translated = dna.translateCdna(GeneticCodes.getInstance()
+            .getStandardCodeTable());
 
     /*
      * Jumble the cDNA sequences and translate.
@@ -325,7 +330,8 @@ public class DnaTest
     av = new AlignViewport(cdnaReordered, cs);
     contigs = cs.getVisContigsIterator(0, cdna.getWidth(), false);
     dna = new Dna(av, contigs);
-    AlignmentI translated2 = dna.translateCdna();
+    AlignmentI translated2 = dna.translateCdna(GeneticCodes.getInstance()
+            .getStandardCodeTable());
 
     /*
      * Check translated sequences are the same in both alignments.
index d7a509f..5f64b28 100644 (file)
@@ -24,21 +24,31 @@ import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertSame;
 import static org.testng.Assert.assertTrue;
 
+import jalview.api.AlignViewportI;
+import jalview.api.FinderI;
+import jalview.bin.Cache;
 import jalview.datamodel.Alignment;
 import jalview.datamodel.AlignmentI;
+import jalview.datamodel.ColumnSelection;
+import jalview.datamodel.HiddenColumns;
 import jalview.datamodel.SearchResultMatchI;
 import jalview.datamodel.SearchResultsI;
 import jalview.datamodel.Sequence;
+import jalview.datamodel.SequenceGroup;
 import jalview.gui.AlignFrame;
+import jalview.gui.AlignViewport;
 import jalview.gui.JvOptionPane;
 import jalview.io.DataSourceType;
 import jalview.io.FileLoader;
 
 import java.util.List;
 
+import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
+import junit.extensions.PA;
+
 public class FinderTest
 {
   @BeforeClass(alwaysRun = true)
@@ -52,32 +62,56 @@ public class FinderTest
 
   private AlignmentI al;
 
+  private AlignViewportI av;
+
   @BeforeClass(groups = "Functional")
   public void setUp()
   {
-    String seqData = "seq1 ABCD--EF-GHI\n" + "seq2 A--BCDefHI\n"
+    Cache.loadProperties("test/jalview/io/testProps.jvprops");
+    Cache.applicationProperties.setProperty("PAD_GAPS",
+            Boolean.FALSE.toString());
+
+    String seqData = "seq1seq1/8-18 ABCD--EF-GHIJI\n" + "seq2 A--BCDefHI\n"
             + "seq3 --bcdEFH\n" + "seq4 aa---aMMMMMaaa\n";
     af = new FileLoader().LoadFileWaitTillLoaded(seqData,
             DataSourceType.PASTE);
-    al = af.getViewport().getAlignment();
+    av = af.getViewport();
+    al = av.getAlignment();
+  }
+
+  @AfterMethod(alwaysRun = true)
+  public void tearDownAfterTest()
+  {
+    av.setSelectionGroup(null);
   }
 
   /**
-   * Test for find all matches of a regular expression
+   * Test for find matches of a regular expression
    */
   @Test(groups = "Functional")
-  public void testFindAll_regex()
+  public void testFind_regex()
   {
-    Finder f = new Finder(al, null);
-    f.setFindAll(true);
-    f.find("E.H"); // 'E, any character, H'
+    /*
+     * find next match only
+     */
+    Finder f = new Finder(av);
+    f.findNext("E.H", false, false); // 'E, any character, H'
+    // should match seq2 efH only
+    SearchResultsI sr = f.getSearchResults();
+    assertEquals(sr.getSize(), 1);
+    List<SearchResultMatchI> matches = sr.getResults();
+    assertSame(matches.get(0).getSequence(), al.getSequenceAt(1));
+    assertEquals(matches.get(0).getStart(), 5);
+    assertEquals(matches.get(0).getEnd(), 7);
 
+    f = new Finder(av);
+    f.findAll("E.H", false, false); // 'E, any character, H'
     // should match seq2 efH and seq3 EFH
-    SearchResultsI sr = f.getSearchResults();
+    sr = f.getSearchResults();
     assertEquals(sr.getSize(), 2);
-    List<SearchResultMatchI> matches = sr.getResults();
-    assertSame(al.getSequenceAt(1), matches.get(0).getSequence());
-    assertSame(al.getSequenceAt(2), matches.get(1).getSequence());
+    matches = sr.getResults();
+    assertSame(matches.get(0).getSequence(), al.getSequenceAt(1));
+    assertSame(matches.get(1).getSequence(), al.getSequenceAt(2));
     assertEquals(matches.get(0).getStart(), 5);
     assertEquals(matches.get(0).getEnd(), 7);
     assertEquals(matches.get(1).getStart(), 4);
@@ -90,20 +124,40 @@ public class FinderTest
   @Test(groups = "Functional")
   public void testFind_residueNumber()
   {
-    Finder f = new Finder(al, null);
-    f.setFindAll(true);
-    f.find("9");
+    Finder f = new Finder(av);
 
-    // seq1 and seq4 have 9 residues; no match in other sequences
+    /*
+     * find first match should return seq1 residue 9
+     */
+    f.findNext("9", false, false);
     SearchResultsI sr = f.getSearchResults();
-    assertEquals(sr.getSize(), 2);
+    assertEquals(sr.getSize(), 1);
     List<SearchResultMatchI> matches = sr.getResults();
-    assertSame(al.getSequenceAt(0), matches.get(0).getSequence());
-    assertSame(al.getSequenceAt(3), matches.get(1).getSequence());
+    assertSame(matches.get(0).getSequence(), al.getSequenceAt(0));
+    assertEquals(matches.get(0).getStart(), 9);
+    assertEquals(matches.get(0).getEnd(), 9);
+
+    /*
+     * find all matches should return seq1 and seq4 (others are too short)
+     */
+    f = new Finder(av);
+    f.findAll("9", false, false);
+    sr = f.getSearchResults();
+    assertEquals(sr.getSize(), 2);
+    matches = sr.getResults();
+    assertSame(matches.get(0).getSequence(), al.getSequenceAt(0));
+    assertSame(matches.get(1).getSequence(), al.getSequenceAt(3));
     assertEquals(matches.get(0).getStart(), 9);
     assertEquals(matches.get(0).getEnd(), 9);
     assertEquals(matches.get(1).getStart(), 9);
     assertEquals(matches.get(1).getEnd(), 9);
+
+    /*
+     * parsing of search string as integer is strict
+     */
+    f = new Finder(av);
+    f.findNext(" 9", false, false);
+    assertTrue(f.getSearchResults().isEmpty());
   }
 
   /**
@@ -113,69 +167,84 @@ public class FinderTest
   public void testFindNext()
   {
     /*
-     * start at second sequence; resIndex of -1
+     * start at second sequence; colIndex of -1
      * means sequence id / description is searched
      */
-    Finder f = new Finder(al, null, 1, -1);
-    f.find("e"); // matches id
+    Finder f = new Finder(av);
+    PA.setValue(f, "sequenceIndex", 1);
+    PA.setValue(f, "columnIndex", -1);
+    f.findNext("e", false, false); // matches id
 
     assertTrue(f.getSearchResults().isEmpty());
-    assertEquals(f.getIdMatch().size(), 1);
-    assertSame(f.getIdMatch().get(0), al.getSequenceAt(1));
-
-    // resIndex is now 0 - for use in next find next
-    assertEquals(f.getResIndex(), 0);
-    f = new Finder(al, null, 1, 0);
-    f.find("e"); // matches in sequence
-    assertTrue(f.getIdMatch().isEmpty());
+    assertEquals(f.getIdMatches().size(), 1);
+    assertSame(f.getIdMatches().get(0), al.getSequenceAt(1));
+
+    // colIndex is now 0 - for use in next find next
+    // searching A--BCDefHI
+    assertEquals(PA.getValue(f, "columnIndex"), 0);
+    f = new Finder(av);
+    PA.setValue(f, "sequenceIndex", 1);
+    PA.setValue(f, "columnIndex", 0);
+    f.findNext("e", false, false); // matches in sequence
+    assertTrue(f.getIdMatches().isEmpty());
     assertEquals(f.getSearchResults().getSize(), 1);
     List<SearchResultMatchI> matches = f.getSearchResults().getResults();
     assertEquals(matches.get(0).getStart(), 5);
     assertEquals(matches.get(0).getEnd(), 5);
     assertSame(matches.get(0).getSequence(), al.getSequenceAt(1));
     // still in the second sequence
-    assertEquals(f.getSeqIndex(), 1);
-    // next residue position to search from is 5
-    // (used as base 0 by RegEx so the same as 6 if base 1)
-    assertEquals(f.getResIndex(), 5);
+    assertEquals(PA.getValue(f, "sequenceIndex"), 1);
+    // next column position to search from is 7
+    assertEquals(PA.getValue(f, "columnIndex"), 7);
 
     // find next from end of sequence - finds next sequence id
-    f = new Finder(al, null, 1, 5);
-    f.find("e");
-    assertEquals(f.getIdMatch().size(), 1);
-    assertSame(f.getIdMatch().get(0), al.getSequenceAt(2));
+    f = new Finder(av);
+    PA.setValue(f, "sequenceIndex", 1);
+    PA.setValue(f, "columnIndex", 7);
+    f.findNext("e", false, false);
+    assertEquals(f.getIdMatches().size(), 1);
+    assertSame(f.getIdMatches().get(0), al.getSequenceAt(2));
+    assertTrue(f.getSearchResults().isEmpty());
   }
 
   /**
    * Test for matching within sequence descriptions
    */
   @Test(groups = "Functional")
-  public void testFindAll_inDescription()
+  public void testFind_inDescription()
   {
     AlignmentI al2 = new Alignment(al);
     al2.getSequenceAt(0).setDescription("BRAF");
     al2.getSequenceAt(1).setDescription("braf");
-    Finder f = new Finder(al2, null);
-    f.setFindAll(true);
-    f.setIncludeDescription(true);
-
-    f.find("rAF");
-    assertEquals(f.getIdMatch().size(), 2);
-    assertSame(f.getIdMatch().get(0), al2.getSequenceAt(0));
-    assertSame(f.getIdMatch().get(1), al2.getSequenceAt(1));
+
+    AlignViewportI av2 = new AlignViewport(al2);
+
+    /*
+     * find first match only
+     */
+    Finder f = new Finder(av2);
+    f.findNext("rAF", false, true);
+    assertEquals(f.getIdMatches().size(), 1);
+    assertSame(f.getIdMatches().get(0), al2.getSequenceAt(0));
     assertTrue(f.getSearchResults().isEmpty());
 
     /*
-     * case sensitive
+     * find all matches
      */
-    f = new Finder(al2, null);
-    f.setFindAll(true);
-    f.setCaseSensitive(true);
-    f.setIncludeDescription(true);
+    f = new Finder(av2);
+    f.findAll("rAF", false, true);
+    assertEquals(f.getIdMatches().size(), 2);
+    assertSame(f.getIdMatches().get(0), al2.getSequenceAt(0));
+    assertSame(f.getIdMatches().get(1), al2.getSequenceAt(1));
+    assertTrue(f.getSearchResults().isEmpty());
 
-    f.find("RAF");
-    assertEquals(f.getIdMatch().size(), 1);
-    assertSame(f.getIdMatch().get(0), al2.getSequenceAt(0));
+    /*
+     * case sensitive
+     */
+    f = new Finder(av2);
+    f.findAll("RAF", true, true);
+    assertEquals(f.getIdMatches().size(), 1);
+    assertSame(f.getIdMatches().get(0), al2.getSequenceAt(0));
     assertTrue(f.getSearchResults().isEmpty());
 
     /*
@@ -184,27 +253,25 @@ public class FinderTest
     al2.getSequenceAt(0).setDescription("the efh sequence");
     al2.getSequenceAt(0).setName("mouseEFHkinase");
     al2.getSequenceAt(1).setName("humanEFHkinase");
-    f = new Finder(al2, null);
-    f.setFindAll(true);
-    f.setIncludeDescription(true);
+    f = new Finder(av2);
 
     /*
      * sequence matches should have no duplicates
      */
-    f.find("EFH");
-    assertEquals(f.getIdMatch().size(), 2);
-    assertSame(f.getIdMatch().get(0), al2.getSequenceAt(0));
-    assertSame(f.getIdMatch().get(1), al2.getSequenceAt(1));
+    f.findAll("EFH", false, true);
+    assertEquals(f.getIdMatches().size(), 2);
+    assertSame(f.getIdMatches().get(0), al2.getSequenceAt(0));
+    assertSame(f.getIdMatches().get(1), al2.getSequenceAt(1));
 
     assertEquals(f.getSearchResults().getSize(), 2);
     SearchResultMatchI match = f.getSearchResults().getResults().get(0);
-    assertSame(al2.getSequenceAt(1), match.getSequence());
-    assertEquals(5, match.getStart());
-    assertEquals(7, match.getEnd());
+    assertSame(match.getSequence(), al2.getSequenceAt(1));
+    assertEquals(match.getStart(), 5);
+    assertEquals(match.getEnd(), 7);
     match = f.getSearchResults().getResults().get(1);
-    assertSame(al2.getSequenceAt(2), match.getSequence());
-    assertEquals(4, match.getStart());
-    assertEquals(6, match.getEnd());
+    assertSame(match.getSequence(), al2.getSequenceAt(2));
+    assertEquals(match.getStart(), 4);
+    assertEquals(match.getEnd(), 6);
   }
 
   /**
@@ -213,105 +280,454 @@ public class FinderTest
   @Test(groups = "Functional")
   public void testFindAll_sequenceIds()
   {
-    Finder f = new Finder(al, null);
-    f.setFindAll(true);
+    Finder f = new Finder(av);
 
     /*
-     * case insensitive
+     * case insensitive; seq1 occurs twice in sequence id but
+     * only one match should be returned
      */
-    f.find("SEQ1");
-    assertEquals(f.getIdMatch().size(), 1);
-    assertSame(f.getIdMatch().get(0), al.getSequenceAt(0));
-    assertTrue(f.getSearchResults().isEmpty());
+    f.findAll("SEQ1", false, false);
+    assertEquals(f.getIdMatches().size(), 1);
+    assertSame(f.getIdMatches().get(0), al.getSequenceAt(0));
+    SearchResultsI searchResults = f.getSearchResults();
+    assertTrue(searchResults.isEmpty());
 
     /*
      * case sensitive
      */
-    f = new Finder(al, null);
-    f.setFindAll(true);
-    f.setCaseSensitive(true);
-    f.find("SEQ1");
-    assertTrue(f.getSearchResults().isEmpty());
+    f = new Finder(av);
+    f.findAll("SEQ1", true, false);
+    searchResults = f.getSearchResults();
+    assertTrue(searchResults.isEmpty());
 
     /*
      * match both sequence id and sequence
      */
     AlignmentI al2 = new Alignment(al);
+    AlignViewportI av2 = new AlignViewport(al2);
     al2.addSequence(new Sequence("aBz", "xyzabZpqrAbZ"));
-    f = new Finder(al2, null);
-    f.setFindAll(true);
-    f.find("ABZ");
-    assertEquals(f.getIdMatch().size(), 1);
-    assertSame(f.getIdMatch().get(0), al2.getSequenceAt(4));
-    assertEquals(f.getSearchResults().getSize(), 2);
-    SearchResultMatchI match = f.getSearchResults().getResults().get(0);
-    assertSame(al2.getSequenceAt(4), match.getSequence());
-    assertEquals(4, match.getStart());
-    assertEquals(6, match.getEnd());
-    match = f.getSearchResults().getResults().get(1);
-    assertSame(al2.getSequenceAt(4), match.getSequence());
-    assertEquals(10, match.getStart());
-    assertEquals(12, match.getEnd());
+    f = new Finder(av2);
+    f.findAll("ABZ", false, false);
+    assertEquals(f.getIdMatches().size(), 1);
+    assertSame(f.getIdMatches().get(0), al2.getSequenceAt(4));
+    searchResults = f.getSearchResults();
+    assertEquals(searchResults.getSize(), 2);
+    SearchResultMatchI match = searchResults.getResults().get(0);
+    assertSame(match.getSequence(), al2.getSequenceAt(4));
+    assertEquals(match.getStart(), 4);
+    assertEquals(match.getEnd(), 6);
+    match = searchResults.getResults().get(1);
+    assertSame(match.getSequence(), al2.getSequenceAt(4));
+    assertEquals(match.getStart(), 10);
+    assertEquals(match.getEnd(), 12);
   }
 
   /**
-   * Test finding all matches of a sequence pattern in an alignment
+   * Test finding next match of a sequence pattern in an alignment
    */
   @Test(groups = "Functional")
-  public void testFindAll_simpleMatch()
+  public void testFind_findNext()
   {
-    Finder f = new Finder(al, null);
-    f.setFindAll(true);
+    /*
+     * efh should be matched in seq2 only
+     */
+    FinderI f = new Finder(av);
+    f.findNext("EfH", false, false);
+    SearchResultsI searchResults = f.getSearchResults();
+    assertEquals(searchResults.getSize(), 1);
+    SearchResultMatchI match = searchResults.getResults().get(0);
+    assertSame(match.getSequence(), al.getSequenceAt(1));
+    assertEquals(match.getStart(), 5);
+    assertEquals(match.getEnd(), 7);
 
     /*
-     * case insensitive first
+     * I should be found in seq1 (twice) and seq2 (once)
      */
-    f.find("EfH");
+    f = new Finder(av);
+    f.findNext("I", false, false); // find next: seq1/16
+    searchResults = f.getSearchResults();
+    assertEquals(searchResults.getSize(), 1);
+    match = searchResults.getResults().get(0);
+    assertSame(match.getSequence(), al.getSequenceAt(0));
+    assertEquals(match.getStart(), 16);
+    assertEquals(match.getEnd(), 16);
+
+    f.findNext("I", false, false); // find next: seq1/18
+    searchResults = f.getSearchResults();
+    assertEquals(searchResults.getSize(), 1);
+    match = searchResults.getResults().get(0);
+    assertSame(match.getSequence(), al.getSequenceAt(0));
+    assertEquals(match.getStart(), 18);
+    assertEquals(match.getEnd(), 18);
+
+    f.findNext("I", false, false); // find next: seq2/8
+    searchResults = f.getSearchResults();
+    assertEquals(searchResults.getSize(), 1);
+    match = searchResults.getResults().get(0);
+    assertSame(match.getSequence(), al.getSequenceAt(1));
+    assertEquals(match.getStart(), 8);
+    assertEquals(match.getEnd(), 8);
+
+    f.findNext("I", false, false);
+    assertTrue(f.getSearchResults().isEmpty());
+
+    /*
+     * find should reset to start of alignment after a failed search
+     */
+    f.findNext("I", false, false); // find next: seq1/16
+    searchResults = f.getSearchResults();
+    assertEquals(searchResults.getSize(), 1);
+    match = searchResults.getResults().get(0);
+    assertSame(match.getSequence(), al.getSequenceAt(0));
+    assertEquals(match.getStart(), 16);
+    assertEquals(match.getEnd(), 16);
+  }
+
+  /**
+   * Test for JAL-2302 to verify that sub-matches are not included in a find all
+   * result
+   */
+  @Test(groups = "Functional")
+  public void testFind_maximalResultOnly()
+  {
+    Finder f = new Finder(av);
+    f.findAll("M+", false, false);
+    SearchResultsI searchResults = f.getSearchResults();
+    assertEquals(searchResults.getSize(), 1);
+    SearchResultMatchI match = searchResults.getResults().get(0);
+    assertSame(match.getSequence(), al.getSequenceAt(3));
+    assertEquals(match.getStart(), 4); // dataset sequence positions
+    assertEquals(match.getEnd(), 8); // base 1
+  }
+
+  /**
+   * Test finding all matches of a sequence pattern in an alignment
+   */
+  @Test(groups = "Functional")
+  public void testFind_findAll()
+  {
+    Finder f = new Finder(av);
+    f.findAll("EfH", false, false);
     SearchResultsI searchResults = f.getSearchResults();
     assertEquals(searchResults.getSize(), 2);
     SearchResultMatchI match = searchResults.getResults().get(0);
-    assertSame(al.getSequenceAt(1), match.getSequence());
-    assertEquals(5, match.getStart());
-    assertEquals(7, match.getEnd());
+    assertSame(match.getSequence(), al.getSequenceAt(1));
+    assertEquals(match.getStart(), 5);
+    assertEquals(match.getEnd(), 7);
     match = searchResults.getResults().get(1);
-    assertSame(al.getSequenceAt(2), match.getSequence());
-    assertEquals(4, match.getStart());
-    assertEquals(6, match.getEnd());
+    assertSame(match.getSequence(), al.getSequenceAt(2));
+    assertEquals(match.getStart(), 4);
+    assertEquals(match.getEnd(), 6);
 
     /*
-     * case sensitive
+     * find all I should find 2 positions in seq1, 1 in seq2
      */
-    f = new Finder(al, null);
-    f.setFindAll(true);
-    f.setCaseSensitive(true);
-    f.find("BC");
+    f.findAll("I", false, false);
     searchResults = f.getSearchResults();
+    assertEquals(searchResults.getSize(), 3);
+    match = searchResults.getResults().get(0);
+    assertSame(match.getSequence(), al.getSequenceAt(0));
+    assertEquals(match.getStart(), 16);
+    assertEquals(match.getEnd(), 16);
+    match = searchResults.getResults().get(1);
+    assertSame(match.getSequence(), al.getSequenceAt(0));
+    assertEquals(match.getStart(), 18);
+    assertEquals(match.getEnd(), 18);
+    match = searchResults.getResults().get(2);
+    assertSame(match.getSequence(), al.getSequenceAt(1));
+    assertEquals(match.getStart(), 8);
+    assertEquals(match.getEnd(), 8);
+  }
+
+  /**
+   * Test finding all matches, case-sensitive
+   */
+  @Test(groups = "Functional")
+  public void testFind_findAllCaseSensitive()
+  {
+    Finder f = new Finder(av);
+
+    /*
+     * BC should match seq1/9-10 and seq2/2-3
+     */
+    f.findAll("BC", true, false);
+    SearchResultsI searchResults = f.getSearchResults();
     assertEquals(searchResults.getSize(), 2);
+    SearchResultMatchI match = searchResults.getResults().get(0);
+    assertSame(match.getSequence(), al.getSequenceAt(0));
+    assertEquals(match.getStart(), 9);
+    assertEquals(match.getEnd(), 10);
+    match = searchResults.getResults().get(1);
+    assertSame(match.getSequence(), al.getSequenceAt(1));
+    assertEquals(match.getStart(), 2);
+    assertEquals(match.getEnd(), 3);
+
+    /*
+     * bc should match seq3/1-2
+     */
+    f = new Finder(av);
+    f.findAll("bc", true, false);
+    searchResults = f.getSearchResults();
+    assertEquals(searchResults.getSize(), 1);
+    match = searchResults.getResults().get(0);
+    assertSame(match.getSequence(), al.getSequenceAt(2));
+    assertEquals(match.getStart(), 1);
+    assertEquals(match.getEnd(), 2);
+
+    f.findAll("bC", true, false);
+    assertTrue(f.getSearchResults().isEmpty());
+  }
+
+  /**
+   * Test finding next match of a sequence pattern in a selection group
+   */
+  @Test(groups = "Functional")
+  public void testFind_inSelection()
+  {
+    /*
+     * select sequences 2 and 3, columns 4-6 which contains
+     * BCD
+     * cdE
+     */
+    SequenceGroup sg = new SequenceGroup();
+    sg.setStartRes(3);
+    sg.setEndRes(5);
+    sg.addSequence(al.getSequenceAt(1), false);
+    sg.addSequence(al.getSequenceAt(2), false);
+    av.setSelectionGroup(sg);
+
+    FinderI f = new Finder(av);
+    f.findNext("b", false, false);
+    assertTrue(f.getIdMatches().isEmpty());
+    SearchResultsI searchResults = f.getSearchResults();
+    assertEquals(searchResults.getSize(), 1);
+    SearchResultMatchI match = searchResults.getResults().get(0);
+    assertSame(match.getSequence(), al.getSequenceAt(1));
+    assertEquals(match.getStart(), 2);
+    assertEquals(match.getEnd(), 2);
+
+    /*
+     * a second Find should not return the 'b' in seq3 as outside the selection
+     */
+    f.findNext("b", false, false);
+    assertTrue(f.getSearchResults().isEmpty());
+    assertTrue(f.getIdMatches().isEmpty());
+
+    f = new Finder(av);
+    f.findNext("d", false, false);
+    assertTrue(f.getIdMatches().isEmpty());
+    searchResults = f.getSearchResults();
+    assertEquals(searchResults.getSize(), 1);
     match = searchResults.getResults().get(0);
-    assertSame(al.getSequenceAt(0), match.getSequence());
-    assertEquals(2, match.getStart());
-    assertEquals(3, match.getEnd());
+    assertSame(match.getSequence(), al.getSequenceAt(1));
+    assertEquals(match.getStart(), 4);
+    assertEquals(match.getEnd(), 4);
+    f.findNext("d", false, false);
+    assertTrue(f.getIdMatches().isEmpty());
+    searchResults = f.getSearchResults();
+    assertEquals(searchResults.getSize(), 1);
+    match = searchResults.getResults().get(0);
+    assertSame(match.getSequence(), al.getSequenceAt(2));
+    assertEquals(match.getStart(), 3);
+    assertEquals(match.getEnd(), 3);
+  }
+
+  /**
+   * Test finding all matches of a search pattern in a selection group
+   */
+  @Test(groups = "Functional")
+  public void testFind_findAllInSelection()
+  {
+    /*
+     * select sequences 2 and 3, columns 4-6 which contains
+     * BCD
+     * cdE
+     */
+    SequenceGroup sg = new SequenceGroup();
+    sg.setStartRes(3);
+    sg.setEndRes(5);
+    sg.addSequence(al.getSequenceAt(1), false);
+    sg.addSequence(al.getSequenceAt(2), false);
+    av.setSelectionGroup(sg);
+  
+    /*
+     * search for 'e' should match two sequence ids and one residue
+     */
+    Finder f = new Finder(av);
+    f.findAll("e", false, false);
+    assertEquals(f.getIdMatches().size(), 2);
+    assertSame(f.getIdMatches().get(0), al.getSequenceAt(1));
+    assertSame(f.getIdMatches().get(1), al.getSequenceAt(2));
+    SearchResultsI searchResults = f.getSearchResults();
+    assertEquals(searchResults.getSize(), 1);
+    SearchResultMatchI match = searchResults.getResults().get(0);
+    assertSame(match.getSequence(), al.getSequenceAt(2));
+    assertEquals(match.getStart(), 4);
+    assertEquals(match.getEnd(), 4);
+
+    /*
+     * search for 'Q' should match two sequence ids only
+     */
+    f = new Finder(av);
+    f.findAll("Q", false, false);
+    assertEquals(f.getIdMatches().size(), 2);
+    assertSame(f.getIdMatches().get(0), al.getSequenceAt(1));
+    assertSame(f.getIdMatches().get(1), al.getSequenceAt(2));
+    assertTrue(f.getSearchResults().isEmpty());
+  }
+
+  /**
+   * Test finding in selection with a sequence too short to reach it
+   */
+  @Test(groups = "Functional")
+  public void testFind_findAllInSelectionWithShortSequence()
+  {
+    /*
+     * select all sequences, columns 10-12
+     * BCD
+     * cdE
+     */
+    SequenceGroup sg = new SequenceGroup();
+    sg.setStartRes(9);
+    sg.setEndRes(11);
+    sg.addSequence(al.getSequenceAt(0), false);
+    sg.addSequence(al.getSequenceAt(1), false);
+    sg.addSequence(al.getSequenceAt(2), false);
+    sg.addSequence(al.getSequenceAt(3), false);
+    av.setSelectionGroup(sg);
+
+    /*
+     * search for 'I' should match two sequence positions
+     */
+    Finder f = new Finder(av);
+    f.findAll("I", false, false);
+    assertTrue(f.getIdMatches().isEmpty());
+    SearchResultsI searchResults = f.getSearchResults();
+    assertEquals(searchResults.getSize(), 2);
+    SearchResultMatchI match = searchResults.getResults().get(0);
+    assertSame(match.getSequence(), al.getSequenceAt(0));
+    assertEquals(match.getStart(), 16);
+    assertEquals(match.getEnd(), 16);
     match = searchResults.getResults().get(1);
-    assertSame(al.getSequenceAt(1), match.getSequence());
-    assertEquals(2, match.getStart());
-    assertEquals(3, match.getEnd());
+    assertSame(match.getSequence(), al.getSequenceAt(1));
+    assertEquals(match.getStart(), 8);
+    assertEquals(match.getEnd(), 8);
   }
 
   /**
-   * Test for JAL-2302 to verify that sub-matches are not included in a find all
-   * result
+   * Test that find does not report hidden positions
    */
   @Test(groups = "Functional")
-  public void testFind_maximalResultOnly()
+  public void testFind_withHiddenColumns()
   {
-    Finder f = new Finder(al, null);
-    f.setFindAll(true);
-    f.find("M+");
+    /*
+     * 0    5   9
+     * ABCD--EF-GHI
+     * A--BCDefHI
+     * --bcdEFH
+     * aa---aMMMMMaaa
+     */
+
+    /*
+     * hide 2-4 (CD- -BC bcd ---)
+     */
+    HiddenColumns hc = new HiddenColumns();
+    hc.hideColumns(2, 4);
+    al.setHiddenColumns(hc);
+
+    /*
+     * find all search for D should ignore hidden positions in seq1 and seq3,
+     * find the visible D in seq2
+     */
+    Finder f = new Finder(av);
+    f.findAll("D", false, false);
     SearchResultsI searchResults = f.getSearchResults();
     assertEquals(searchResults.getSize(), 1);
     SearchResultMatchI match = searchResults.getResults().get(0);
-    assertSame(al.getSequenceAt(3), match.getSequence());
-    assertEquals(4, match.getStart()); // dataset sequence positions
-    assertEquals(8, match.getEnd()); // base 1
+    assertSame(match.getSequence(), al.getSequenceAt(1));
+    assertEquals(match.getStart(), 4);
+    assertEquals(match.getEnd(), 4);
+
+    /*
+     * hide columns 2-5:
+     * find all 'aaa' should find end of seq4 only
+     */
+    hc.hideColumns(2, 5);
+    f = new Finder(av);
+    f.findAll("aaa", false, false);
+    searchResults = f.getSearchResults();
+    assertEquals(searchResults.getSize(), 1);
+    match = searchResults.getResults().get(0);
+    assertSame(match.getSequence(), al.getSequenceAt(3));
+    assertEquals(match.getStart(), 9);
+    assertEquals(match.getEnd(), 11);
+
+    /*
+     * find all 'BE' should not match across hidden columns in seq1
+     */
+    f.findAll("BE", false, false);
+    assertTrue(f.getSearchResults().isEmpty());
+
+    /*
+     * boundary case: hide columns at end of alignment
+     * search for H should match seq3/6 only
+     */
+    hc.revealAllHiddenColumns(new ColumnSelection());
+    hc.hideColumns(8, 13);
+    f = new Finder(av);
+    f.findNext("H", false, false);
+    searchResults = f.getSearchResults();
+    assertEquals(searchResults.getSize(), 1);
+    match = searchResults.getResults().get(0);
+    assertSame(match.getSequence(), al.getSequenceAt(2));
+    assertEquals(match.getStart(), 6);
+    assertEquals(match.getEnd(), 6);
+  }
+
+  @Test(groups = "Functional")
+  public void testFind_withHiddenColumnsAndSelection()
+  {
+    /*
+     * 0    5   9
+     * ABCD--EF-GHI
+     * A--BCDefHI
+     * --bcdEFH
+     * aa---aMMMMMaaa
+     */
+  
+    /*
+     * hide columns 2-4 and 6-7
+     */
+    HiddenColumns hc = new HiddenColumns();
+    hc.hideColumns(2, 4);
+    hc.hideColumns(6, 7);
+    al.setHiddenColumns(hc);
+  
+    /*
+     * select rows 2-3
+     */
+    SequenceGroup sg = new SequenceGroup();
+    sg.addSequence(al.getSequenceAt(1), false);
+    sg.addSequence(al.getSequenceAt(2), false);
+    sg.setStartRes(0);
+    sg.setEndRes(13);
+    av.setSelectionGroup(sg);
+
+    /*
+     * find all search for A or H
+     * should match seq2/1, seq2/7, not seq3/6
+     */
+    Finder f = new Finder(av);
+    f.findAll("[AH]", false, false);
+    SearchResultsI searchResults = f.getSearchResults();
+    assertEquals(searchResults.getSize(), 2);
+    SearchResultMatchI match = searchResults.getResults().get(0);
+    assertSame(match.getSequence(), al.getSequenceAt(1));
+    assertEquals(match.getStart(), 1);
+    assertEquals(match.getEnd(), 1);
+    match = searchResults.getResults().get(1);
+    assertSame(match.getSequence(), al.getSequenceAt(1));
+    assertEquals(match.getStart(), 7);
+    assertEquals(match.getEnd(), 7);
   }
 }
diff --git a/test/jalview/analysis/GeneticCodesTest.java b/test/jalview/analysis/GeneticCodesTest.java
new file mode 100644 (file)
index 0000000..5f49092
--- /dev/null
@@ -0,0 +1,298 @@
+package jalview.analysis;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertNull;
+import static org.testng.Assert.assertSame;
+
+import java.util.Iterator;
+
+import org.testng.annotations.Test;
+
+public class GeneticCodesTest
+{
+  @Test(groups = "Functional")
+  public void testGetCodeTable()
+  {
+    GeneticCodes codes = GeneticCodes.getInstance();
+    assertEquals(codes.getStandardCodeTable().getName(), "Standard");
+    assertEquals(codes.getStandardCodeTable().getId(), "1");
+    assertSame(codes.getStandardCodeTable(), codes.getCodeTable("1"));
+    assertEquals(codes.getCodeTable("2").getName(),
+            "Vertebrate Mitochondrial");
+    assertEquals(codes.getCodeTable("11").getName(),
+            "Bacterial, Archaeal and Plant Plastid");
+    assertEquals(codes.getCodeTable("31").getName(),
+            "Blastocrithidia Nuclear");
+  }
+
+  @Test(groups = "Functional")
+  public void testGetCodeTables()
+  {
+    GeneticCodes codes = GeneticCodes.getInstance();
+    Iterator<GeneticCodeI> tableIterator = codes.getCodeTables().iterator();
+    String[] ids = new String[] { "1", "2", "3", "4", "5", "6", "9", "10",
+        "11", "12", "13", "14", "15", "16", "21", "22", "23", "24", "25",
+        "26", "27", "28", "29", "30", "31" };
+    for (int i = 0; i < ids.length; i++)
+    {
+      assertEquals(tableIterator.next().getId(), ids[i]);
+    }
+    assertFalse(tableIterator.hasNext());
+  }
+
+  @Test(groups = "Functional")
+  public void testTranslate()
+  {
+    GeneticCodes codes = GeneticCodes.getInstance();
+
+    GeneticCodeI gc = codes.getCodeTable("1");
+    assertNull(gc.translate("XYZ"));
+    assertEquals(gc.translate("AGA"), "R");
+
+    gc = codes.getCodeTable("2");
+    assertEquals(gc.translate("AGA"), "*"); // variant
+    assertEquals(gc.translate("ttc"), "F"); // non-variant
+
+    // table 11 has no variant translations - should serve the standard values
+    gc = codes.getCodeTable("11");
+    assertEquals(gc.translate("ttc"), "F");
+
+    gc = codes.getCodeTable("31");
+    assertEquals(gc.translate("TGA"), "W"); // variant
+    assertEquals(gc.translate("tag"), "E"); // variant
+    assertEquals(gc.translate("AGC"), "S"); // non-variant
+  }
+
+  /**
+   * Test 'standard' codon translations (no ambiguity codes)
+   */
+  @Test(groups = { "Functional" })
+  public void testTranslate_standardTable()
+  {
+    GeneticCodeI st = GeneticCodes.getInstance().getStandardCodeTable();
+    assertEquals("F", st.translate("TTT"));
+    assertEquals("F", st.translate("TTC"));
+    assertEquals("L", st.translate("TTA"));
+    assertEquals("L", st.translate("TTG"));
+    assertEquals("L", st.translate("CTT"));
+    assertEquals("L", st.translate("CTC"));
+    assertEquals("L", st.translate("CTA"));
+    assertEquals("L", st.translate("CTG"));
+    assertEquals("I", st.translate("ATT"));
+    assertEquals("I", st.translate("ATC"));
+    assertEquals("I", st.translate("ATA"));
+    assertEquals("M", st.translate("ATG"));
+    assertEquals("V", st.translate("GTT"));
+    assertEquals("V", st.translate("GTC"));
+    assertEquals("V", st.translate("GTA"));
+    assertEquals("V", st.translate("GTG"));
+    assertEquals("S", st.translate("TCT"));
+    assertEquals("S", st.translate("TCC"));
+    assertEquals("S", st.translate("TCA"));
+    assertEquals("S", st.translate("TCG"));
+    assertEquals("P", st.translate("CCT"));
+    assertEquals("P", st.translate("CCC"));
+    assertEquals("P", st.translate("CCA"));
+    assertEquals("P", st.translate("CCG"));
+    assertEquals("T", st.translate("ACT"));
+    assertEquals("T", st.translate("ACC"));
+    assertEquals("T", st.translate("ACA"));
+    assertEquals("T", st.translate("ACG"));
+    assertEquals("A", st.translate("GCT"));
+    assertEquals("A", st.translate("GCC"));
+    assertEquals("A", st.translate("GCA"));
+    assertEquals("A", st.translate("GCG"));
+    assertEquals("Y", st.translate("TAT"));
+    assertEquals("Y", st.translate("TAC"));
+    assertEquals("*", st.translate("TAA"));
+    assertEquals("*", st.translate("TAG"));
+    assertEquals("H", st.translate("CAT"));
+    assertEquals("H", st.translate("CAC"));
+    assertEquals("Q", st.translate("CAA"));
+    assertEquals("Q", st.translate("CAG"));
+    assertEquals("N", st.translate("AAT"));
+    assertEquals("N", st.translate("AAC"));
+    assertEquals("K", st.translate("AAA"));
+    assertEquals("K", st.translate("AAG"));
+    assertEquals("D", st.translate("GAT"));
+    assertEquals("D", st.translate("GAC"));
+    assertEquals("E", st.translate("GAA"));
+    assertEquals("E", st.translate("GAG"));
+    assertEquals("C", st.translate("TGT"));
+    assertEquals("C", st.translate("TGC"));
+    assertEquals("*", st.translate("TGA"));
+    assertEquals("W", st.translate("TGG"));
+    assertEquals("R", st.translate("CGT"));
+    assertEquals("R", st.translate("CGC"));
+    assertEquals("R", st.translate("CGA"));
+    assertEquals("R", st.translate("CGG"));
+    assertEquals("S", st.translate("AGT"));
+    assertEquals("S", st.translate("AGC"));
+    assertEquals("R", st.translate("AGA"));
+    assertEquals("R", st.translate("AGG"));
+    assertEquals("G", st.translate("GGT"));
+    assertEquals("G", st.translate("GGC"));
+    assertEquals("G", st.translate("GGA"));
+    assertEquals("G", st.translate("GGG"));
+  }
+
+  /**
+   * Test a sample of codon translations involving ambiguity codes. Should
+   * return a protein value where the ambiguity does not affect the translation.
+   */
+  @Test(groups = { "Functional" })
+  public void testTranslate_standardTableAmbiguityCodes()
+  {
+    GeneticCodeI st = GeneticCodes.getInstance().getStandardCodeTable();
+    // Y is C or T
+    assertEquals("C", st.translate("TGY"));
+    // Phenylalanine first base variation
+    assertEquals("L", st.translate("YTA"));
+
+    // W is A or T
+    assertEquals("L", st.translate("CTW"));
+    assertNull(st.translate("TTW"));
+
+    // S is G or C
+    assertEquals("G", st.translate("GGS"));
+    assertNull(st.translate("ATS"));
+
+    // K is T or G
+    assertEquals("S", st.translate("TCK"));
+    assertNull(st.translate("ATK"));
+
+    // M is C or A
+    assertEquals("T", st.translate("ACM"));
+    // Arginine first base variation
+    assertEquals("R", st.translate("MGA"));
+    assertEquals("R", st.translate("MGG"));
+    assertNull(st.translate("TAM"));
+
+    // D is A, G or T
+    assertEquals("P", st.translate("CCD"));
+    assertNull(st.translate("AAD"));
+
+    // V is A, C or G
+    assertEquals("V", st.translate("GTV"));
+    assertNull(st.translate("TTV"));
+
+    // H is A, C or T
+    assertEquals("A", st.translate("GCH"));
+    assertEquals("I", st.translate("ATH"));
+    assertNull(st.translate("AGH"));
+
+    // B is C, G or T
+    assertEquals("P", st.translate("CCB"));
+    assertNull(st.translate("TAB"));
+
+    // R is A or G
+    // additional tests for JAL-1685 (resolved)
+    assertEquals("L", st.translate("CTR"));
+    assertEquals("V", st.translate("GTR"));
+    assertEquals("S", st.translate("TCR"));
+    assertEquals("P", st.translate("CCR"));
+    assertEquals("T", st.translate("ACR"));
+    assertEquals("A", st.translate("GCR"));
+    assertEquals("R", st.translate("CGR"));
+    assertEquals("G", st.translate("GGR"));
+    assertEquals("R", st.translate("AGR"));
+    assertEquals("E", st.translate("GAR"));
+    assertEquals("K", st.translate("AAR"));
+    assertEquals("L", st.translate("TTR"));
+    assertEquals("Q", st.translate("CAR"));
+    assertEquals("*", st.translate("TAR"));
+    assertEquals("*", st.translate("TRA"));
+    // Arginine first and third base ambiguity
+    assertEquals("R", st.translate("MGR"));
+    assertNull(st.translate("ATR"));
+
+    // N is any base; 8 proteins accept any base in 3rd position
+    assertEquals("L", st.translate("CTN"));
+    assertEquals("V", st.translate("GTN"));
+    assertEquals("S", st.translate("TCN"));
+    assertEquals("P", st.translate("CCN"));
+    assertEquals("T", st.translate("ACN"));
+    assertEquals("A", st.translate("GCN"));
+    assertEquals("R", st.translate("CGN"));
+    assertEquals("G", st.translate("GGN"));
+    assertNull(st.translate("ATN"));
+    assertNull(st.translate("ANT"));
+    assertNull(st.translate("NAT"));
+    assertNull(st.translate("ANN"));
+    assertNull(st.translate("NNA"));
+    assertNull(st.translate("NNN"));
+
+    // some random stuff
+    assertNull(st.translate("YWB"));
+    assertNull(st.translate("VHD"));
+    assertNull(st.translate("WSK"));
+  }
+
+  /**
+   * Test a sample of codon translations involving ambiguity codes. Should
+   * return a protein value where the ambiguity does not affect the translation.
+   */
+  @Test(groups = { "Functional" })
+  public void testTranslate_nonStandardTableAmbiguityCodes()
+  {
+    GeneticCodeI standard = GeneticCodes.getInstance()
+            .getStandardCodeTable();
+
+    /*
+     * Vertebrate Mitochondrial (Table 2)
+     */
+    GeneticCodeI gc = GeneticCodes.getInstance().getCodeTable("2");
+    // AGR is AGA or AGG - R in standard code, * in table 2
+    assertEquals(gc.translate("AGR"), "*");
+    assertEquals(standard.translate("AGR"), "R");
+    // TGR is TGA or TGG - ambiguous in standard code, W in table 2
+    assertEquals(gc.translate("TGR"), "W");
+    assertNull(standard.translate("TGR"));
+
+    /*
+     * Yeast Mitochondrial (Table 3)
+     */
+    gc = GeneticCodes.getInstance().getCodeTable("3");
+    // CTN is L in standard code, T in table 3
+    assertEquals(gc.translate("ctn"), "T");
+    assertEquals(standard.translate("CTN"), "L");
+
+    /*
+     * Alternative Yeast Nuclear (Table 12)
+     */
+    gc = GeneticCodes.getInstance().getCodeTable("12");
+    // CTG is S; in the standard code CTN is L
+    assertEquals(gc.translate("CTG"), "S");
+    assertNull(gc.translate("CTK")); // K is G or T -> S or L
+    assertEquals(standard.translate("CTK"), "L");
+    assertEquals(gc.translate("CTH"), "L"); // H is anything other than G
+    assertEquals(standard.translate("CTH"), "L");
+    assertEquals(standard.translate("CTN"), "L");
+
+    /*
+     * Trematode Mitochondrial (Table 21)
+     */
+    gc = GeneticCodes.getInstance().getCodeTable("21");
+    // AAR is K in standard code, ambiguous in table 21 as AAA=N not K
+    assertNull(gc.translate("AAR"));
+    assertEquals(standard.translate("AAR"), "K");
+  }
+
+  @Test(groups = "Functional")
+  public void testTranslateCanonical()
+  {
+    GeneticCodes codes = GeneticCodes.getInstance();
+
+    GeneticCodeI gc = codes.getCodeTable("1");
+    assertNull(gc.translateCanonical("XYZ"));
+    assertEquals(gc.translateCanonical("AGA"), "R");
+    // translateCanonical should not resolve ambiguity codes
+    assertNull(gc.translateCanonical("TGY"));
+
+    gc = codes.getCodeTable("2");
+    assertNull(gc.translateCanonical("AGR"));
+    assertEquals(gc.translateCanonical("AGA"), "*"); // variant
+    assertEquals(gc.translateCanonical("ttc"), "F"); // non-variant
+  }
+}
index 212f825..e8ffd2f 100644 (file)
@@ -44,6 +44,8 @@ public class PIDModelTest
     double newScore = PIDModel.computePID(s1, s2, params);
     double oldScore = Comparison.PID(s1, s2);
     assertEquals(newScore, oldScore, DELTA);
+    // and verify PIDModel calculation is symmetric
+    assertEquals(newScore, PIDModel.computePID(s2, s1, params));
 
     /*
      * same length, with gaps
@@ -54,6 +56,7 @@ public class PIDModelTest
     newScore = PIDModel.computePID(s1, s2, params);
     oldScore = Comparison.PID(s1, s2);
     assertEquals(newScore, oldScore, DELTA);
+    assertEquals(newScore, PIDModel.computePID(s2, s1, params));
 
     /*
      * s2 longer than s1, with gaps
@@ -64,6 +67,7 @@ public class PIDModelTest
     newScore = PIDModel.computePID(s1, s2, params);
     oldScore = Comparison.PID(s1, s2);
     assertEquals(newScore, oldScore, DELTA);
+    assertEquals(newScore, PIDModel.computePID(s2, s1, params));
 
     /*
      * s1 longer than s2, with gaps
@@ -74,6 +78,7 @@ public class PIDModelTest
     newScore = PIDModel.computePID(s1, s2, params);
     oldScore = Comparison.PID(s1, s2);
     assertEquals(newScore, oldScore, DELTA);
+    assertEquals(newScore, PIDModel.computePID(s2, s1, params));
 
     /*
      * same but now also with gapped columns
@@ -84,6 +89,7 @@ public class PIDModelTest
     newScore = PIDModel.computePID(s1, s2, params);
     oldScore = Comparison.PID(s1, s2);
     assertEquals(newScore, oldScore, DELTA);
+    assertEquals(newScore, PIDModel.computePID(s2, s1, params));
   }
 
   /**
@@ -102,6 +108,7 @@ public class PIDModelTest
      */
     SimilarityParamsI params = new SimilarityParams(true, true, true, true);
     assertEquals(PIDModel.computePID(s1, s2, params), 80d);
+    assertEquals(PIDModel.computePID(s2, s1, params), 80d);
 
     /*
      * match gap-char but not gap-gap
@@ -109,6 +116,7 @@ public class PIDModelTest
      */
     params = new SimilarityParams(false, true, true, true);
     assertEquals(PIDModel.computePID(s1, s2, params), 75d);
+    assertEquals(PIDModel.computePID(s2, s1, params), 75d);
 
     /*
      * include gaps but don't match them
@@ -117,6 +125,7 @@ public class PIDModelTest
      */
     params = new SimilarityParams(true, false, true, true);
     assertEquals(PIDModel.computePID(s1, s2, params), 40d);
+    assertEquals(PIDModel.computePID(s2, s1, params), 40d);
 
     /*
      * include gaps but don't match them
@@ -125,6 +134,7 @@ public class PIDModelTest
      */
     params = new SimilarityParams(false, false, true, true);
     assertEquals(PIDModel.computePID(s1, s2, params), 25d);
+    assertEquals(PIDModel.computePID(s2, s1, params), 25d);
   }
 
   /**
@@ -144,6 +154,7 @@ public class PIDModelTest
      */
     SimilarityParamsI params = new SimilarityParams(true, true, true, false);
     assertEquals(PIDModel.computePID(s1, s2, params), 500d / 6);
+    assertEquals(PIDModel.computePID(s2, s1, params), 500d / 6);
   
     /*
      * match gap-char but not gap-gap
@@ -151,6 +162,7 @@ public class PIDModelTest
      */
     params = new SimilarityParams(false, true, true, false);
     assertEquals(PIDModel.computePID(s1, s2, params), 80d);
+    assertEquals(PIDModel.computePID(s2, s1, params), 80d);
   
     /*
      * include gaps but don't match them
@@ -159,6 +171,7 @@ public class PIDModelTest
      */
     params = new SimilarityParams(true, false, true, false);
     assertEquals(PIDModel.computePID(s1, s2, params), 100d / 3);
+    assertEquals(PIDModel.computePID(s2, s1, params), 100d / 3);
   
     /*
      * include gaps but don't match them
@@ -167,6 +180,7 @@ public class PIDModelTest
      */
     params = new SimilarityParams(false, false, true, false);
     assertEquals(PIDModel.computePID(s1, s2, params), 20d);
+    assertEquals(PIDModel.computePID(s2, s1, params), 20d);
 
     /*
      * no tests for matchGaps=true, includeGaps=false
index 1a5d43c..15bdce1 100644 (file)
@@ -13,6 +13,7 @@ import jalview.api.analysis.SimilarityParamsI;
 import jalview.io.DataSourceType;
 import jalview.io.FileParse;
 import jalview.io.ScoreMatrixFile;
+import jalview.math.Matrix;
 import jalview.math.MatrixI;
 import jalview.schemes.ResidueProperties;
 
@@ -22,6 +23,8 @@ import java.util.Arrays;
 
 import org.testng.annotations.Test;
 
+import junit.extensions.PA;
+
 public class ScoreMatrixTest
 {
   @Test(groups = "Functional")
@@ -33,6 +36,7 @@ public class ScoreMatrixTest
     scores[1] = new float[] { -4f, 5f, 6f };
     scores[2] = new float[] { 7f, 8f, 9f };
     ScoreMatrix sm = new ScoreMatrix("Test", "ABC".toCharArray(), scores);
+    assertFalse(sm.isSymmetric());
     assertEquals(sm.getSize(), 3);
     assertArrayEquals(scores, sm.getMatrix());
     assertEquals(sm.getPairwiseScore('A', 'a'), 1f);
@@ -50,7 +54,8 @@ public class ScoreMatrixTest
 
   @Test(
     groups = "Functional",
-    expectedExceptions = { IllegalArgumentException.class })
+    expectedExceptions =
+    { IllegalArgumentException.class })
   public void testConstructor_matrixTooSmall()
   {
     float[][] scores = new float[2][];
@@ -61,7 +66,8 @@ public class ScoreMatrixTest
 
   @Test(
     groups = "Functional",
-    expectedExceptions = { IllegalArgumentException.class })
+    expectedExceptions =
+    { IllegalArgumentException.class })
   public void testConstructor_matrixTooBig()
   {
     float[][] scores = new float[2][];
@@ -72,7 +78,8 @@ public class ScoreMatrixTest
 
   @Test(
     groups = "Functional",
-    expectedExceptions = { IllegalArgumentException.class })
+    expectedExceptions =
+    { IllegalArgumentException.class })
   public void testConstructor_matrixNotSquare()
   {
     float[][] scores = new float[2][];
@@ -240,8 +247,8 @@ public class ScoreMatrixTest
    * @throws MalformedURLException
    */
   @Test(groups = "Functional")
-  public void testOutputMatrix_roundTrip() throws MalformedURLException,
-          IOException
+  public void testOutputMatrix_roundTrip()
+          throws MalformedURLException, IOException
   {
     ScoreMatrix sm = ScoreModels.getInstance().getBlosum62();
     String output = sm.outputMatrix(false);
@@ -256,8 +263,8 @@ public class ScoreMatrixTest
   public void testEqualsAndHashCode()
   {
     ScoreMatrix sm = ScoreModels.getInstance().getBlosum62();
-    ScoreMatrix sm2 = new ScoreMatrix(sm.getName(), sm.getSymbols()
-            .toCharArray(), sm.getMatrix());
+    ScoreMatrix sm2 = new ScoreMatrix(sm.getName(),
+            sm.getSymbols().toCharArray(), sm.getMatrix());
     assertTrue(sm.equals(sm2));
     assertEquals(sm.hashCode(), sm2.hashCode());
 
@@ -280,19 +287,20 @@ public class ScoreMatrixTest
     String s1 = "FR-K-S";
     String s2 = "FS--L";
     ScoreMatrix blosum = ScoreModels.getInstance().getBlosum62();
-  
+
     /*
      * score gap-gap and gap-char
      * shorter sequence treated as if with trailing gaps
      * score = F^F + R^S + -^- + K^- + -^L + S^-
      * = 6 + -1 + 1 + -4 + -4 + -4 = -6
      */
-    SimilarityParamsI params = new SimilarityParams(true, true, true, false);
+    SimilarityParamsI params = new SimilarityParams(true, true, true,
+            false);
     assertEquals(blosum.computeSimilarity(s1, s2, params), -6d);
     // matchGap (arg2) is ignored:
     params = new SimilarityParams(true, false, true, false);
     assertEquals(blosum.computeSimilarity(s1, s2, params), -6d);
-  
+
     /*
      * score gap-char but not gap-gap
      * score = F^F + R^S + 0 + K^- + -^L + S^-
@@ -303,7 +311,7 @@ public class ScoreMatrixTest
     // matchGap (arg2) is ignored:
     params = new SimilarityParams(false, false, true, false);
     assertEquals(blosum.computeSimilarity(s1, s2, params), -7d);
-  
+
     /*
      * score gap-gap but not gap-char
      * score = F^F + R^S + -^- + 0 + 0 + 0
@@ -314,7 +322,7 @@ public class ScoreMatrixTest
     // matchGap (arg2) is ignored:
     params = new SimilarityParams(true, true, false, false);
     assertEquals(blosum.computeSimilarity(s1, s2, params), 6d);
-  
+
     /*
      * score neither gap-gap nor gap-char
      * score = F^F + R^S + 0 + 0 + 0 + 0
@@ -352,7 +360,7 @@ public class ScoreMatrixTest
     // matchGap (arg2) is ignored:
     params = new SimilarityParams(true, false, true, true);
     assertEquals(blosum.computeSimilarity(s1, s2, params), -2d);
-  
+
     /*
      * score gap-char but not gap-gap
      * score = F^F + R^S + 0 + K^- + -^L
@@ -363,7 +371,7 @@ public class ScoreMatrixTest
     // matchGap (arg2) is ignored:
     params = new SimilarityParams(false, false, true, true);
     assertEquals(blosum.computeSimilarity(s1, s2, params), -3d);
-  
+
     /*
      * score gap-gap but not gap-char
      * score = F^F + R^S + -^- + 0 + 0
@@ -374,7 +382,7 @@ public class ScoreMatrixTest
     // matchGap (arg2) is ignored:
     params = new SimilarityParams(true, true, false, true);
     assertEquals(blosum.computeSimilarity(s1, s2, params), 6d);
-  
+
     /*
      * score neither gap-gap nor gap-char
      * score = F^F + R^S + 0 + 0 + 0
@@ -395,6 +403,12 @@ public class ScoreMatrixTest
     verifySymmetric(ScoreModels.getInstance().getDefaultModel(false)); // dna
   }
 
+  /**
+   * A helper method that inspects a loaded matrix and reports any asymmetry as
+   * a test failure
+   * 
+   * @param sm
+   */
   private void verifySymmetric(ScoreMatrix sm)
   {
     float[][] m = sm.getMatrix();
@@ -404,9 +418,10 @@ public class ScoreMatrixTest
       assertEquals(m[row].length, rows);
       for (int col = 0; col < rows; col++)
       {
-        assertEquals(m[row][col], m[col][row], String.format("%s [%s, %s]",
-                sm.getName(), ResidueProperties.aa[row],
-                ResidueProperties.aa[col]));
+        assertEquals(m[row][col], m[col][row],
+                String.format("%s [%s, %s]", sm.getName(),
+                        ResidueProperties.aa[row],
+                        ResidueProperties.aa[col]));
       }
     }
   }
@@ -427,63 +442,98 @@ public class ScoreMatrixTest
      * verify expected scores against ARNDCQEGHILKMFPSTWYVBZX
      * scraped from https://www.ncbi.nlm.nih.gov/Class/FieldGuide/BLOSUM62.txt
      */
-    verifyValues(sm, 'A', new float[] { 4, -1, -2, -2, 0, -1, -1, 0, -2,
-        -1,
-        -1, -1, -1, -2, -1, 1, 0, -3, -2, 0, -2, -1, 0 });
-    verifyValues(sm, 'R', new float[] { -1, 5, 0, -2, -3, 1, 0, -2, 0, -3,
-        -2, 2, -1, -3, -2, -1, -1, -3, -2, -3, -1, 0, -1 });
-    verifyValues(sm, 'N', new float[] { -2, 0, 6, 1, -3, 0, 0, 0, 1, -3,
-        -3,
-        0, -2, -3, -2, 1, 0, -4, -2, -3, 3, 0, -1 });
-    verifyValues(sm, 'D', new float[] { -2, -2, 1, 6, -3, 0, 2, -1, -1, -3,
-        -4, -1, -3, -3, -1, 0, -1, -4, -3, -3, 4, 1, -1 });
-    verifyValues(sm, 'C', new float[] { 0, -3, -3, -3, 9, -3, -4, -3, -3,
-        -1,
-        -1, -3, -1, -2, -3, -1, -1, -2, -2, -1, -3, -3, -2 });
-    verifyValues(sm, 'Q', new float[] { -1, 1, 0, 0, -3, 5, 2, -2, 0, -3,
-        -2,
-        1, 0, -3, -1, 0, -1, -2, -1, -2, 0, 3, -1 });
-    verifyValues(sm, 'E', new float[] { -1, 0, 0, 2, -4, 2, 5, -2, 0, -3,
-        -3,
-        1, -2, -3, -1, 0, -1, -3, -2, -2, 1, 4, -1 });
-    verifyValues(sm, 'G', new float[] { 0, -2, 0, -1, -3, -2, -2, 6, -2,
-        -4,
-        -4, -2, -3, -3, -2, 0, -2, -2, -3, -3, -1, -2, -1 });
-    verifyValues(sm, 'H', new float[] { -2, 0, 1, -1, -3, 0, 0, -2, 8, -3,
-        -3, -1, -2, -1, -2, -1, -2, -2, 2, -3, 0, 0, -1 });
-    verifyValues(sm, 'I', new float[] { -1, -3, -3, -3, -1, -3, -3, -4, -3,
-        4, 2, -3, 1, 0, -3, -2, -1, -3, -1, 3, -3, -3, -1 });
-    verifyValues(sm, 'L', new float[] { -1, -2, -3, -4, -1, -2, -3, -4, -3,
-        2, 4, -2, 2, 0, -3, -2, -1, -2, -1, 1, -4, -3, -1 });
-    verifyValues(sm, 'K', new float[] { -1, 2, 0, -1, -3, 1, 1, -2, -1, -3,
-        -2, 5, -1, -3, -1, 0, -1, -3, -2, -2, 0, 1, -1 });
-    verifyValues(sm, 'M', new float[] { -1, -1, -2, -3, -1, 0, -2, -3, -2,
-        1,
-        2, -1, 5, 0, -2, -1, -1, -1, -1, 1, -3, -1, -1 });
-    verifyValues(sm, 'F', new float[] { -2, -3, -3, -3, -2, -3, -3, -3, -1,
-        0, 0, -3, 0, 6, -4, -2, -2, 1, 3, -1, -3, -3, -1 });
-    verifyValues(sm, 'P', new float[] { -1, -2, -2, -1, -3, -1, -1, -2, -2,
-        -3, -3, -1, -2, -4, 7, -1, -1, -4, -3, -2, -2, -1, -2 });
-    verifyValues(sm, 'S', new float[] { 1, -1, 1, 0, -1, 0, 0, 0, -1, -2,
-        -2,
-        0, -1, -2, -1, 4, 1, -3, -2, -2, 0, 0, 0 });
-    verifyValues(sm, 'T', new float[] { 0, -1, 0, -1, -1, -1, -1, -2, -2,
-        -1,
-        -1, -1, -1, -2, -1, 1, 5, -2, -2, 0, -1, -1, 0 });
-    verifyValues(sm, 'W', new float[] { -3, -3, -4, -4, -2, -2, -3, -2, -2,
-        -3, -2, -3, -1, 1, -4, -3, -2, 11, 2, -3, -4, -3, -2 });
-    verifyValues(sm, 'Y', new float[] { -2, -2, -2, -3, -2, -1, -2, -3, 2,
-        -1, -1, -2, -1, 3, -3, -2, -2, 2, 7, -1, -3, -2, -1 });
-    verifyValues(sm, 'V', new float[] { 0, -3, -3, -3, -1, -2, -2, -3, -3,
-        3,
-        1, -2, 1, -1, -2, -2, 0, -3, -1, 4, -3, -2, -1 });
-    verifyValues(sm, 'B', new float[] { -2, -1, 3, 4, -3, 0, 1, -1, 0, -3,
-        -4, 0, -3, -3, -2, 0, -1, -4, -3, -3, 4, 1, -1 });
-    verifyValues(sm, 'Z', new float[] { -1, 0, 0, 1, -3, 3, 4, -2, 0, -3,
-        -3,
-        1, -1, -3, -1, 0, -1, -3, -2, -2, 1, 4, -1 });
-    verifyValues(sm, 'X', new float[] { 0, -1, -1, -1, -2, -1, -1, -1, -1,
-        -1, -1, -1, -1, -1, -2, 0, 0, -2, -1, -1, -1, -1, -1 });
+    verifyValues(sm, 'A',
+            new float[]
+            { 4, -1, -2, -2, 0, -1, -1, 0, -2, -1, -1, -1, -1, -2, -1, 1, 0,
+                -3, -2, 0, -2, -1, 0 });
+    verifyValues(sm, 'R',
+            new float[]
+            { -1, 5, 0, -2, -3, 1, 0, -2, 0, -3, -2, 2, -1, -3, -2, -1, -1,
+                -3, -2, -3, -1, 0, -1 });
+    verifyValues(sm, 'N',
+            new float[]
+            { -2, 0, 6, 1, -3, 0, 0, 0, 1, -3, -3, 0, -2, -3, -2, 1, 0, -4,
+                -2, -3, 3, 0, -1 });
+    verifyValues(sm, 'D',
+            new float[]
+            { -2, -2, 1, 6, -3, 0, 2, -1, -1, -3, -4, -1, -3, -3, -1, 0, -1,
+                -4, -3, -3, 4, 1, -1 });
+    verifyValues(sm, 'C',
+            new float[]
+            { 0, -3, -3, -3, 9, -3, -4, -3, -3, -1, -1, -3, -1, -2, -3, -1,
+                -1, -2, -2, -1, -3, -3, -2 });
+    verifyValues(sm, 'Q',
+            new float[]
+            { -1, 1, 0, 0, -3, 5, 2, -2, 0, -3, -2, 1, 0, -3, -1, 0, -1, -2,
+                -1, -2, 0, 3, -1 });
+    verifyValues(sm, 'E',
+            new float[]
+            { -1, 0, 0, 2, -4, 2, 5, -2, 0, -3, -3, 1, -2, -3, -1, 0, -1,
+                -3, -2, -2, 1, 4, -1 });
+    verifyValues(sm, 'G',
+            new float[]
+            { 0, -2, 0, -1, -3, -2, -2, 6, -2, -4, -4, -2, -3, -3, -2, 0,
+                -2, -2, -3, -3, -1, -2, -1 });
+    verifyValues(sm, 'H',
+            new float[]
+            { -2, 0, 1, -1, -3, 0, 0, -2, 8, -3, -3, -1, -2, -1, -2, -1, -2,
+                -2, 2, -3, 0, 0, -1 });
+    verifyValues(sm, 'I',
+            new float[]
+            { -1, -3, -3, -3, -1, -3, -3, -4, -3, 4, 2, -3, 1, 0, -3, -2,
+                -1, -3, -1, 3, -3, -3, -1 });
+    verifyValues(sm, 'L',
+            new float[]
+            { -1, -2, -3, -4, -1, -2, -3, -4, -3, 2, 4, -2, 2, 0, -3, -2,
+                -1, -2, -1, 1, -4, -3, -1 });
+    verifyValues(sm, 'K',
+            new float[]
+            { -1, 2, 0, -1, -3, 1, 1, -2, -1, -3, -2, 5, -1, -3, -1, 0, -1,
+                -3, -2, -2, 0, 1, -1 });
+    verifyValues(sm, 'M',
+            new float[]
+            { -1, -1, -2, -3, -1, 0, -2, -3, -2, 1, 2, -1, 5, 0, -2, -1, -1,
+                -1, -1, 1, -3, -1, -1 });
+    verifyValues(sm, 'F',
+            new float[]
+            { -2, -3, -3, -3, -2, -3, -3, -3, -1, 0, 0, -3, 0, 6, -4, -2,
+                -2, 1, 3, -1, -3, -3, -1 });
+    verifyValues(sm, 'P',
+            new float[]
+            { -1, -2, -2, -1, -3, -1, -1, -2, -2, -3, -3, -1, -2, -4, 7, -1,
+                -1, -4, -3, -2, -2, -1, -2 });
+    verifyValues(sm, 'S',
+            new float[]
+            { 1, -1, 1, 0, -1, 0, 0, 0, -1, -2, -2, 0, -1, -2, -1, 4, 1, -3,
+                -2, -2, 0, 0, 0 });
+    verifyValues(sm, 'T',
+            new float[]
+            { 0, -1, 0, -1, -1, -1, -1, -2, -2, -1, -1, -1, -1, -2, -1, 1,
+                5, -2, -2, 0, -1, -1, 0 });
+    verifyValues(sm, 'W',
+            new float[]
+            { -3, -3, -4, -4, -2, -2, -3, -2, -2, -3, -2, -3, -1, 1, -4, -3,
+                -2, 11, 2, -3, -4, -3, -2 });
+    verifyValues(sm, 'Y',
+            new float[]
+            { -2, -2, -2, -3, -2, -1, -2, -3, 2, -1, -1, -2, -1, 3, -3, -2,
+                -2, 2, 7, -1, -3, -2, -1 });
+    verifyValues(sm, 'V',
+            new float[]
+            { 0, -3, -3, -3, -1, -2, -2, -3, -3, 3, 1, -2, 1, -1, -2, -2, 0,
+                -3, -1, 4, -3, -2, -1 });
+    verifyValues(sm, 'B',
+            new float[]
+            { -2, -1, 3, 4, -3, 0, 1, -1, 0, -3, -4, 0, -3, -3, -2, 0, -1,
+                -4, -3, -3, 4, 1, -1 });
+    verifyValues(sm, 'Z',
+            new float[]
+            { -1, 0, 0, 1, -3, 3, 4, -2, 0, -3, -3, 1, -1, -3, -1, 0, -1,
+                -3, -2, -2, 1, 4, -1 });
+    verifyValues(sm, 'X',
+            new float[]
+            { 0, -1, -1, -1, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -2, 0,
+                0, -2, -1, -1, -1, -1, -1 });
   }
 
   /**
@@ -585,4 +635,76 @@ public class ScoreMatrixTest
             + "</table>";
     assertEquals(html, expected);
   }
+
+  @Test(groups = "Functional")
+  public void testIsSymmetric()
+  {
+    double delta = 0.0001d;
+    float[][] scores = new float[][] { { 1f, -2f }, { -2f, 3f } };
+    ScoreMatrix sm = new ScoreMatrix("Test", "AB".toCharArray(), scores);
+    assertTrue(sm.isSymmetric());
+
+    /*
+     * verify that with a symmetric score matrix,
+     * pairwise similarity matrix is also symmetric
+     * seq1.seq1 = 5*A.A + 3*B.B = 5+9 = 14
+     * seq1.seq2 = 3*A.A + 2*A.B + B.A + 2*B.B = 3 + -4 + -2 + 6 = 3
+     * seq2.seq1 = 3*A.A + A.B + 2*B.A + 2*B.B = 3 + -2 + -4 + 6 = 3   
+     * seq2.seq2 = 4*A.A + 4*B.B = 4 + 12 = 16   
+     */
+    SimilarityParamsI params = new SimilarityParams(true, true, true,
+            false);
+    String seq1 = "AAABBBAA";
+    String seq2 = "AABBABBA";
+    String[] seqs1 = new String[] { seq1, seq2 };
+    MatrixI res1 = sm.findSimilarities(seqs1, params);
+    assertTrue(
+            res1.equals(new Matrix(new double[][]
+            { { 14d, 3d }, { 3d, 16d } }), delta));
+
+    /*
+     * order of sequences affects diagonal, but not off-diagonal values
+     * [0, 0] is now seq2.seq2, [1, 1] is seq1.seq1
+     * [0, 1] is now seq2.seq1 = seq1.seq2 by symmetry
+     */
+    String[] seqs2 = new String[] { seq2, seq1 };
+    MatrixI res2 = sm.findSimilarities(seqs2, params);
+    assertFalse(res1.equals(res2));
+    assertTrue(res2.equals(new Matrix(new double[][]
+            { { 16d, 3d }, { 3d, 14d } }), delta));
+
+    /*
+     * now make the score matrix asymmetric
+     * seq1.seq1 = 5*A.A + 3*B.B = 5+9 = 14
+     * seq1.seq2 = 3*A.A + 2*A.B + B.A + 2*B.B = 3 + -4 + 2 + 6 = 7
+     * seq2.seq1 = 3*A.A + A.B + 2*B.A + 2*B.B = 3 + -2 + 4 + 6 = 11  
+     * seq2.seq2 = 4*A.A + 4*B.B = 4 + 12 = 16   
+     */
+    scores = new float[][] { { 1f, -2f }, { 2f, 3f } };
+    sm = new ScoreMatrix("Test", "AB".toCharArray(), scores);
+    assertFalse(sm.isSymmetric()); // [0, 1] != [1, 0]
+    res1 = sm.findSimilarities(seqs1, params);
+    assertTrue(res1.equals(new Matrix(new double[][]
+            { { 14d, 7d }, { 11d, 16d } }), delta));
+
+    /*
+     * reverse order of sequences
+     * - reverses order of main diagonal
+     * - reflects off-diagonal values
+     */
+    res2 = sm.findSimilarities(seqs2, params);
+    assertFalse(res1.equals(res2));
+    assertTrue(
+            res2.equals(new Matrix(new double[][]
+            { { 16d, 11d }, { 7d, 14d } }), delta));
+
+    /*
+     * verify that forcing an asymmetric matrix to use
+     * symmetric calculation gives a different (wrong) result
+     */
+    PA.setValue(sm, "symmetric", true);
+    assertTrue(sm.isSymmetric()); // it's not true!
+    res2 = sm.findSimilarities(seqs1, params);
+    assertFalse(res1.equals(res2, delta));
+  }
 }
index ffcd1a8..5e44d3d 100644 (file)
@@ -45,16 +45,16 @@ public class ScoreModelsTest
     assertTrue(sm instanceof SimilarityScoreModel);
     assertTrue(sm instanceof PairwiseScoreModelI);
     assertFalse(sm instanceof DistanceScoreModel);
-    assertEquals(sm.getName(), "PID");
-    assertEquals(((PairwiseScoreModelI) sm).getPairwiseScore('R', 'C'), 0f);
-    assertEquals(((PairwiseScoreModelI) sm).getPairwiseScore('R', 'r'), 1f);
+    assertEquals(sm.getName(), "DNA");
+    assertEquals(((PairwiseScoreModelI) sm).getPairwiseScore('c', 'x'), 1f);
 
     sm = models.next();
     assertTrue(sm instanceof SimilarityScoreModel);
     assertTrue(sm instanceof PairwiseScoreModelI);
     assertFalse(sm instanceof DistanceScoreModel);
-    assertEquals(sm.getName(), "DNA");
-    assertEquals(((PairwiseScoreModelI) sm).getPairwiseScore('c', 'x'), 1f);
+    assertEquals(sm.getName(), "PID");
+    assertEquals(((PairwiseScoreModelI) sm).getPairwiseScore('R', 'C'), 0f);
+    assertEquals(((PairwiseScoreModelI) sm).getPairwiseScore('R', 'r'), 1f);
 
     sm = models.next();
     assertFalse(sm instanceof SimilarityScoreModel);
index 3ac8656..c7b1d53 100644 (file)
@@ -20,6 +20,9 @@
  */
 package jalview.bin;
 
+import static org.testng.Assert.assertNotNull;
+import static org.testng.Assert.assertTrue;
+
 import jalview.gui.JvOptionPane;
 
 import java.io.BufferedReader;
@@ -140,7 +143,8 @@ public class CommandLineOperations
     }
     return classpath;
   }
-  private Worker jalviewDesktopRunner(boolean withAwt, String cmd,
+
+  private Worker getJalviewDesktopRunner(boolean withAwt, String cmd,
           int timeout)
   {
     // Note: JAL-3065 - don't include quotes for lib/* because the arguments are
@@ -154,7 +158,7 @@ public class CommandLineOperations
     try
     {
       ls2_proc = Runtime.getRuntime().exec(_cmd + cmd);
-    } catch (IOException e1)
+    } catch (Throwable e1)
     {
       e1.printStackTrace();
     }
@@ -171,7 +175,7 @@ public class CommandLineOperations
         worker.join(timeout);
       } catch (InterruptedException e)
       {
-        // e.printStackTrace();
+        System.err.println("Thread interrupted");
       }
       worker.setOutputReader(outputReader);
       worker.setErrorReader(errorReader);
@@ -189,23 +193,27 @@ public class CommandLineOperations
   public void setUpForHeadlessCommandLineInputOperations()
           throws IOException
   {
-    String cmds = "nodisplay -open examples/uniref50.fa -sortbytree -props FILE -colour zappo "
-            + "-jabaws http://www.compbio.dundee.ac.uk/jabaws -nosortbytree -dasserver nickname=www.test.com "
+    String cmds = "nodisplay -open examples/uniref50.fa -sortbytree -props test/jalview/io/testProps.jvprops -colour zappo "
+            + "-jabaws http://www.compbio.dundee.ac.uk/jabaws -nosortbytree "
             + "-features examples/testdata/plantfdx.features -annotations examples/testdata/plantfdx.annotations -tree examples/testdata/uniref50_test_tree";
-    Worker worker = jalviewDesktopRunner(true, cmds, SETUP_TIMEOUT);
+    Worker worker = getJalviewDesktopRunner(true, cmds, SETUP_TIMEOUT);
     String ln = null;
     while ((ln = worker.getOutputReader().readLine()) != null)
     {
       System.out.println(ln);
       successfulCMDs.add(ln);
     }
+    while ((ln = worker.getErrorReader().readLine()) != null)
+    {
+      System.err.println(ln);
+    }
   }
 
   @BeforeTest(alwaysRun = true)
   public void setUpForCommandLineInputOperations() throws IOException
   {
     String cmds = "-open examples/uniref50.fa -noquestionnaire -nousagestats";
-    Worker worker = jalviewDesktopRunner(false, cmds, SETUP_TIMEOUT);
+    Worker worker = getJalviewDesktopRunner(false, cmds, SETUP_TIMEOUT);
     String ln = null;
     int count = 0;
     while ((ln = worker.getErrorReader().readLine()) != null)
@@ -225,7 +233,7 @@ public class CommandLineOperations
     }
   }
 
-  @Test(groups = { "Functional" }, dataProvider = "allInputOpearationsData")
+  @Test(groups = { "Functional" }, dataProvider = "allInputOperationsData")
   public void testAllInputOperations(String expectedString,
           String failureMsg)
   {
@@ -242,11 +250,13 @@ public class CommandLineOperations
     String cmd = harg + type + " " + fileName;
     // System.out.println(">>>>>>>>>>>>>>>> Command : " + cmd);
     File file = new File(fileName);
-    Worker worker = jalviewDesktopRunner(withAWT, cmd, timeout);
-
-    FileAssert.assertFile(file, "Didn't create an output" + type
-            + " file.[" + harg + "]");
-    FileAssert.assertMinLength(new File(fileName), expectedMinFileSize);
+    file.deleteOnExit();
+    Worker worker = getJalviewDesktopRunner(withAWT, cmd, timeout);
+    assertNotNull(worker, "worker is null");
+    String msg = "Didn't create an output" + type + " file.[" + harg + "]";
+    assertTrue(file.exists(), msg);
+    FileAssert.assertFile(file, msg);
+    FileAssert.assertMinLength(file, expectedMinFileSize);
     if (worker != null && worker.exit == null)
     {
       worker.interrupt();
@@ -258,44 +268,37 @@ public class CommandLineOperations
               + SETUP_TIMEOUT + "ms). ["
               + harg + "]");
     }
-    new File(fileName).delete();
+    file.delete();
   }
 
-  @DataProvider(name = "allInputOpearationsData")
+  @DataProvider(name = "allInputOperationsData")
   public Object[][] getHeadlessModeInputParams()
   {
     return new Object[][] {
         // headless mode input operations
         { "CMD [-color zappo] executed successfully!",
             "Failed command : -color zappo" },
-        { "CMD [-props FILE] executed successfully!",
+        { "CMD [-props test/jalview/io/testProps.jvprops] executed successfully!",
             "Failed command : -props File" },
         { "CMD [-sortbytree] executed successfully!",
             "Failed command : -sortbytree" },
-        {
-            "CMD [-jabaws http://www.compbio.dundee.ac.uk/jabaws] executed successfully!",
+        { "CMD [-jabaws http://www.compbio.dundee.ac.uk/jabaws] executed successfully!",
             "Failed command : -jabaws http://www.compbio.dundee.ac.uk/jabaws" },
         { "CMD [-open examples/uniref50.fa] executed successfully!",
             "Failed command : -open examples/uniref50.fa" },
         { "CMD [-nosortbytree] executed successfully!",
             "Failed command : -nosortbytree" },
-        { "CMD [-dasserver nickname=www.test.com] executed successfully!",
-            "Failed command : -dasserver nickname=www.test.com" },
-        {
-            "CMD [-features examples/testdata/plantfdx.features]  executed successfully!",
+        { "CMD [-features examples/testdata/plantfdx.features]  executed successfully!",
             "Failed command : -features examples/testdata/plantfdx.features" },
-        {
-            "CMD [-annotations examples/testdata/plantfdx.annotations] executed successfully!",
+        { "CMD [-annotations examples/testdata/plantfdx.annotations] executed successfully!",
             "Failed command : -annotations examples/testdata/plantfdx.annotations" },
-        {
-            "CMD [-tree examples/testdata/uniref50_test_tree] executed successfully!",
+        { "CMD [-tree examples/testdata/uniref50_test_tree] executed successfully!",
             "Failed command : -tree examples/testdata/uniref50_test_tree" },
         // non headless mode input operations
         { "CMD [-nousagestats] executed successfully!",
             "Failed command : -nousagestats" },
         { "CMD [-noquestionnaire] executed successfully!",
-            "Failed command : -noquestionnaire nickname=www.test.com" } };
-
+            "Failed command : -noquestionnaire" } };
   }
 
   @DataProvider(name = "headlessModeOutputOperationsData")
@@ -303,36 +306,52 @@ public class CommandLineOperations
   {
     return new Object[][] {
         { "nodisplay -open examples/uniref50.fa", " -eps",
-            "test_uniref50_out.eps", true, MINFILESIZE_BIG, TEST_TIMEOUT },
+            "test/jalview/bin/test_uniref50_out.eps", true, MINFILESIZE_BIG,
+            TEST_TIMEOUT },
         { "nodisplay -open examples/uniref50.fa", " -eps",
-            "test_uniref50_out.eps", false, MINFILESIZE_BIG, TEST_TIMEOUT },
+            "test/jalview/bin/test_uniref50_out.eps", false,
+            MINFILESIZE_BIG, TEST_TIMEOUT },
         { "nogui -open examples/uniref50.fa", " -eps",
-            "test_uniref50_out.eps", true, MINFILESIZE_BIG, TEST_TIMEOUT },
+            "test/jalview/bin/test_uniref50_out.eps", true, MINFILESIZE_BIG,
+            TEST_TIMEOUT },
         { "nogui -open examples/uniref50.fa", " -eps",
-            "test_uniref50_out.eps", false, MINFILESIZE_BIG, TEST_TIMEOUT },
+            "test/jalview/bin/test_uniref50_out.eps", false,
+            MINFILESIZE_BIG, TEST_TIMEOUT },
         { "headless -open examples/uniref50.fa", " -eps",
-            "test_uniref50_out.eps", true, MINFILESIZE_BIG, TEST_TIMEOUT },
+            "test/jalview/bin/test_uniref50_out.eps", true, MINFILESIZE_BIG,
+            TEST_TIMEOUT },
         { "headless -open examples/uniref50.fa", " -svg",
-            "test_uniref50_out.svg", false, MINFILESIZE_BIG, TEST_TIMEOUT },
+            "test/jalview/bin/test_uniref50_out.svg", false,
+            MINFILESIZE_BIG, TEST_TIMEOUT },
         { "headless -open examples/uniref50.fa", " -png",
-            "test_uniref50_out.png", true, MINFILESIZE_BIG, TEST_TIMEOUT },
+            "test/jalview/bin/test_uniref50_out.png", true, MINFILESIZE_BIG,
+            TEST_TIMEOUT },
         { "headless -open examples/uniref50.fa", " -html",
-            "test_uniref50_out.html", true, MINFILESIZE_BIG, TEST_TIMEOUT },
+            "test/jalview/bin/test_uniref50_out.html", true,
+            MINFILESIZE_BIG, TEST_TIMEOUT },
         { "headless -open examples/uniref50.fa", " -fasta",
-            "test_uniref50_out.mfa", true, MINFILESIZE_SMALL, TEST_TIMEOUT },
+            "test/jalview/bin/test_uniref50_out.mfa", true,
+            MINFILESIZE_SMALL, TEST_TIMEOUT },
         { "headless -open examples/uniref50.fa", " -clustal",
-            "test_uniref50_out.aln", true, MINFILESIZE_SMALL, TEST_TIMEOUT },
+            "test/jalview/bin/test_uniref50_out.aln", true,
+            MINFILESIZE_SMALL, TEST_TIMEOUT },
         { "headless -open examples/uniref50.fa", " -msf",
-            "test_uniref50_out.msf", true, MINFILESIZE_SMALL, TEST_TIMEOUT },
+            "test/jalview/bin/test_uniref50_out.msf", true,
+            MINFILESIZE_SMALL, TEST_TIMEOUT },
         { "headless -open examples/uniref50.fa", " -pileup",
-            "test_uniref50_out.aln", true, MINFILESIZE_SMALL, TEST_TIMEOUT },
+            "test/jalview/bin/test_uniref50_out.aln", true,
+            MINFILESIZE_SMALL, TEST_TIMEOUT },
         { "headless -open examples/uniref50.fa", " -pir",
-            "test_uniref50_out.pir", true, MINFILESIZE_SMALL, TEST_TIMEOUT },
+            "test/jalview/bin/test_uniref50_out.pir", true,
+            MINFILESIZE_SMALL, TEST_TIMEOUT },
         { "headless -open examples/uniref50.fa", " -pfam",
-            "test_uniref50_out.pfam", true, MINFILESIZE_SMALL, TEST_TIMEOUT },
+            "test/jalview/bin/test_uniref50_out.pfam", true,
+            MINFILESIZE_SMALL, TEST_TIMEOUT },
         { "headless -open examples/uniref50.fa", " -blc",
-            "test_uniref50_out.blc", true, MINFILESIZE_SMALL, TEST_TIMEOUT },
+            "test/jalview/bin/test_uniref50_out.blc", true,
+            MINFILESIZE_SMALL, TEST_TIMEOUT },
         { "headless -open examples/uniref50.fa", " -jalview",
-            "test_uniref50_out.jvp", true, MINFILESIZE_SMALL, TEST_TIMEOUT }, };
+            "test/jalview/bin/test_uniref50_out.jvp", true,
+            MINFILESIZE_SMALL, TEST_TIMEOUT }, };
   }
 }
index efee93b..7990d21 100644 (file)
@@ -26,6 +26,7 @@ import static org.testng.AssertJUnit.assertTrue;
 import jalview.analysis.Finder;
 import jalview.api.AlignViewControllerI;
 import jalview.api.FeatureColourI;
+import jalview.api.FinderI;
 import jalview.datamodel.Alignment;
 import jalview.datamodel.SearchResults;
 import jalview.datamodel.SearchResultsI;
@@ -147,7 +148,8 @@ public class AlignViewControllerTest
      * seq1 feature in columns 4-6 is hidden
      * seq2 feature in columns 6-7 is shown
      */
-    FeatureColourI fc = new FeatureColour(Color.red, Color.blue, 0f, 10f);
+    FeatureColourI fc = new FeatureColour(null, Color.red, Color.blue, null,
+            0f, 10f);
     fc.setAboveThreshold(true);
     fc.setThreshold(5f);
     af.getFeatureRenderer().setColour("Metal", fc);
@@ -222,10 +224,8 @@ public class AlignViewControllerTest
     /*
      *  test Match/Find works first
      */
-    Finder f = new Finder(af.getViewport().getAlignment(), null);
-    f.setFindAll(true);
-    f.setCaseSensitive(true);
-    f.find("M+");
+    FinderI f = new Finder(af.getViewport());
+    f.findAll("M+", true, false);
     assertEquals(
             "Finder found different set of results to manually created SearchResults",
             sr, f.getSearchResults());
index 1d1ebd6..dd19eb6 100644 (file)
@@ -1484,4 +1484,82 @@ public class AlignmentTest
     assertEquals(".JKLMNO", seq2.getSequenceAsString());
     assertEquals(".PQR...", seq3.getSequenceAsString());
   }
+
+  /**
+   * Test for setHiddenColumns, to check it returns true if the hidden columns
+   * have changed, else false
+   */
+  @Test(groups = { "Functional" })
+  public void testSetHiddenColumns()
+  {
+    AlignmentI al = new Alignment(new SequenceI[] {});
+    assertFalse(al.getHiddenColumns().hasHiddenColumns());
+
+    HiddenColumns hc = new HiddenColumns();
+    assertFalse(al.setHiddenColumns(hc)); // no change
+    assertSame(hc, al.getHiddenColumns());
+
+    hc.hideColumns(2, 4);
+    assertTrue(al.getHiddenColumns().hasHiddenColumns());
+
+    /*
+     * set a different object but with the same columns hidden
+     */
+    HiddenColumns hc2 = new HiddenColumns();
+    hc2.hideColumns(2, 4);
+    assertFalse(al.setHiddenColumns(hc2)); // no change
+    assertSame(hc2, al.getHiddenColumns());
+
+    assertTrue(al.setHiddenColumns(null));
+    assertNull(al.getHiddenColumns());
+    assertTrue(al.setHiddenColumns(hc));
+    assertSame(hc, al.getHiddenColumns());
+
+    al.getHiddenColumns().hideColumns(10, 12);
+    hc2.hideColumns(10, 12);
+    assertFalse(al.setHiddenColumns(hc2)); // no change
+
+    /*
+     * hide columns 15-16 then 17-18 in hc
+     * hide columns 15-18 in hc2
+     * these are not now 'equal' objects even though they
+     * represent the same set of columns
+     */
+    assertSame(hc2, al.getHiddenColumns());
+    hc.hideColumns(15, 16);
+    hc.hideColumns(17, 18);
+    hc2.hideColumns(15, 18);
+    assertFalse(hc.equals(hc2));
+    assertTrue(al.setHiddenColumns(hc)); // 'changed'
+  }
+
+  @Test(groups = { "Functional" })
+  public void testGetWidth()
+  {
+    SequenceI seq1 = new Sequence("seq1", "ABCDEF--");
+    SequenceI seq2 = new Sequence("seq2", "-JKLMNO--");
+    SequenceI seq3 = new Sequence("seq2", "-PQR");
+    AlignmentI a = new Alignment(new SequenceI[] { seq1, seq2, seq3 });
+
+    assertEquals(9, a.getWidth());
+
+    // width includes hidden columns
+    a.getHiddenColumns().hideColumns(2, 5);
+    assertEquals(9, a.getWidth());
+  }
+
+  @Test(groups = { "Functional" })
+  public void testGetVisibleWidth()
+  {
+    SequenceI seq1 = new Sequence("seq1", "ABCDEF--");
+    SequenceI seq2 = new Sequence("seq2", "-JKLMNO--");
+    SequenceI seq3 = new Sequence("seq2", "-PQR");
+    AlignmentI a = new Alignment(new SequenceI[] { seq1, seq2, seq3 });
+
+    assertEquals(9, a.getVisibleWidth());
+
+    // width excludes hidden columns
+    a.getHiddenColumns().hideColumns(2, 5);
+    assertEquals(5, a.getVisibleWidth());
+  }
 }
index 3942f0b..0dfcc21 100644 (file)
@@ -31,11 +31,11 @@ public class AllColsIteratorTest
 {
   HiddenColumns hiddenCols;
   
-  @BeforeClass
+  @BeforeClass(alwaysRun = true)
   public void setup()
   {
     hiddenCols = new HiddenColumns();
-   hiddenCols.hideColumns(2,4);
+    hiddenCols.hideColumns(2, 4);
   }
   
 
index aeff71d..90ed891 100644 (file)
@@ -36,7 +36,7 @@ public class AllRowsIteratorTest
 
   Hashtable<SequenceI, SequenceCollectionI> hiddenRepSequences = new Hashtable<>();
 
-  @BeforeClass
+  @BeforeClass(alwaysRun = true)
   public void setup()
   {
     // create random alignment
index 8709961..2dda4d3 100644 (file)
@@ -27,6 +27,9 @@ import static org.testng.AssertJUnit.fail;
 
 import jalview.analysis.AlignmentGenerator;
 import jalview.gui.JvOptionPane;
+import jalview.viewmodel.annotationfilter.AnnotationFilterParameter;
+import jalview.viewmodel.annotationfilter.AnnotationFilterParameter.SearchableAnnotationField;
+import jalview.viewmodel.annotationfilter.AnnotationFilterParameter.ThresholdType;
 
 import java.util.Arrays;
 import java.util.BitSet;
@@ -598,4 +601,129 @@ public class ColumnSelectionTest
     assertEquals(sg.getStartRes(), 10);
     assertEquals(sg.getEndRes(), 19);
   }
+
+  @Test(groups = { "Functional" })
+  public void testFilterAnnotations()
+  {
+    ColumnSelection cs = new ColumnSelection();
+
+    /*
+     * filter with no conditions clears the selection
+     */
+    Annotation[] anns = new Annotation[] { null };
+    AnnotationFilterParameter filter = new AnnotationFilterParameter();
+    cs.addElement(3);
+    int added = cs.filterAnnotations(anns, filter);
+    assertEquals(0, added);
+    assertTrue(cs.isEmpty());
+
+    /*
+     * select on description (regex)
+     */
+    filter.setRegexString("w.rld");
+    filter.addRegexSearchField(SearchableAnnotationField.DESCRIPTION);
+    Annotation helix = new Annotation("(", "hello", '<', 2f);
+    Annotation sheet = new Annotation("(", "world", '<', 2f);
+    added = cs.filterAnnotations(new Annotation[] { null, helix, sheet },
+            filter);
+    assertEquals(1, added);
+    assertTrue(cs.contains(2));
+
+    /*
+     * select on label (invalid regex, exact match)
+     */
+    filter = new AnnotationFilterParameter();
+    filter.setRegexString("(");
+    filter.addRegexSearchField(SearchableAnnotationField.DISPLAY_STRING);
+    added = cs.filterAnnotations(new Annotation[] { null, helix, sheet },
+            filter);
+    assertEquals(2, added);
+    assertTrue(cs.contains(1));
+    assertTrue(cs.contains(2));
+
+    /*
+     * select Helix (secondary structure symbol H)
+     */
+    filter = new AnnotationFilterParameter();
+    filter.setFilterAlphaHelix(true);
+    helix = new Annotation("x", "desc", 'H', 0f);
+    sheet = new Annotation("x", "desc", 'E', 1f);
+    Annotation turn = new Annotation("x", "desc", 'S', 2f);
+    Annotation ann4 = new Annotation("x", "desc", 'Y', 3f);
+    added = cs
+            .filterAnnotations(new Annotation[]
+            { null, helix, sheet, turn, ann4 },
+            filter);
+    assertEquals(1, added);
+    assertTrue(cs.contains(1));
+
+    /*
+     * select Helix and Sheet (E)
+     */
+    filter.setFilterBetaSheet(true);
+    added = cs
+            .filterAnnotations(new Annotation[]
+            { null, helix, sheet, turn, ann4 }, filter);
+    assertEquals(2, added);
+    assertTrue(cs.contains(1));
+    assertTrue(cs.contains(2));
+
+    /*
+     * select Sheet and Turn (S)
+     */
+    filter.setFilterAlphaHelix(false);
+    filter.setFilterTurn(true);
+    added = cs
+            .filterAnnotations(new Annotation[]
+            { null, helix, sheet, turn, ann4 }, filter);
+    assertEquals(2, added);
+    assertTrue(cs.contains(2));
+    assertTrue(cs.contains(3));
+
+    /*
+     * select value < 2f (ann1, ann2)
+     */
+    filter = new AnnotationFilterParameter();
+    filter.setThresholdType(ThresholdType.BELOW_THRESHOLD);
+    filter.setThresholdValue(2f);
+    added = cs
+            .filterAnnotations(new Annotation[]
+            { null, helix, sheet, turn, ann4 }, filter);
+    assertEquals(2, added);
+    assertTrue(cs.contains(1));
+    assertTrue(cs.contains(2));
+
+    /*
+     * select value > 2f (ann4 only)
+     */
+    filter.setThresholdType(ThresholdType.ABOVE_THRESHOLD);
+    added = cs
+            .filterAnnotations(new Annotation[]
+            { null, helix, sheet, turn, ann4 }, filter);
+    assertEquals(1, added);
+    assertTrue(cs.contains(4));
+
+    /*
+     * select >2f or Helix
+     */
+    filter.setFilterAlphaHelix(true);
+    added = cs
+            .filterAnnotations(new Annotation[]
+            { null, helix, sheet, turn, ann4 }, filter);
+    assertEquals(2, added);
+    assertTrue(cs.contains(1));
+    assertTrue(cs.contains(4));
+
+    /*
+     * select < 1f or Helix; one annotation matches both
+     * return value should only count it once
+     */
+    filter.setThresholdType(ThresholdType.BELOW_THRESHOLD);
+    filter.setThresholdValue(1f);
+    added = cs
+            .filterAnnotations(new Annotation[]
+            { null, helix, sheet, turn, ann4 }, filter);
+    assertEquals(1, added);
+    assertTrue(cs.contains(1));
+  }
 }
index f1a6e20..349b5d1 100644 (file)
@@ -186,6 +186,25 @@ public class SearchResultsTest
     assertEquals(5, m.getEnd());
   }
 
+  @Test(groups = { "Functional" })
+  public void testMatchContains()
+  {
+    SequenceI seq1 = new Sequence("", "abcdefghijklm");
+    SequenceI seq2 = new Sequence("", "abcdefghijklm");
+    SearchResultMatchI m = new SearchResults().new Match(seq1, 2, 5);
+
+    assertTrue(m.contains(seq1, 2, 5));
+    assertTrue(m.contains(seq1, 3, 5));
+    assertTrue(m.contains(seq1, 2, 4));
+    assertTrue(m.contains(seq1, 3, 3));
+
+    assertFalse(m.contains(seq1, 2, 6));
+    assertFalse(m.contains(seq1, 1, 5));
+    assertFalse(m.contains(seq1, 1, 8));
+    assertFalse(m.contains(seq2, 3, 3));
+    assertFalse(m.contains(null, 3, 3));
+  }
+
   /**
    * test markColumns for creating column selections
    */
@@ -268,4 +287,20 @@ public class SearchResultsTest
             "Didn't set expected number of columns in total for two successive marks",
             2, tbs.cardinality());
   }
+
+  /**
+   * Test to verify adding doesn't create duplicate results
+   */
+  @Test(groups = { "Functional" })
+  public void testAddResult()
+  {
+    SequenceI seq1 = new Sequence("", "abcdefghijklm");
+    SearchResultsI sr = new SearchResults();
+    sr.addResult(seq1, 3, 5);
+    assertEquals(1, sr.getSize());
+    sr.addResult(seq1, 3, 5);
+    assertEquals(1, sr.getSize());
+    sr.addResult(seq1, 3, 6);
+    assertEquals(2, sr.getSize());
+  }
 }
index b0af5c8..8419d4c 100644 (file)
@@ -14,12 +14,14 @@ import jalview.schemes.NucleotideColourScheme;
 import jalview.schemes.PIDColourScheme;
 
 import java.awt.Color;
+import java.util.ArrayList;
 import java.util.Collections;
-
-import junit.extensions.PA;
+import java.util.List;
 
 import org.testng.annotations.Test;
 
+import junit.extensions.PA;
+
 public class SequenceGroupTest
 {
   @Test(groups={"Functional"})
@@ -301,4 +303,36 @@ public class SequenceGroupTest
      */
     assertNull(sg2.getContext());
   }
+
+  @Test(groups = { "Functional" })
+  public void testConstructor_list()
+  {
+    SequenceI s1 = new Sequence("abcde", "fg");
+    SequenceI s2 = new Sequence("foo", "bar");
+    List<SequenceI> seqs = new ArrayList<SequenceI>();
+    seqs.add(s1);
+    seqs.add(s2);
+    SequenceGroup sg = new SequenceGroup(seqs);
+
+    /*
+     * verify sg has a copy of the original list
+     */
+    List<SequenceI> sgList = sg.getSequences();
+    assertNotSame(sgList, seqs);
+    assertEquals(sgList, seqs);
+
+    /*
+     * add to sgList, original is unchanged
+     */
+    sg.addSequence(new Sequence("bar", "foo"), false);
+    assertEquals(sgList.size(), 3);
+    assertEquals(seqs.size(), 2);
+
+    /*
+     * delete from original, sgList is unchanged
+     */
+    seqs.remove(s1);
+    assertEquals(sgList.size(), 3);
+    assertEquals(seqs.size(), 1);
+  }
 }
index 9629b6f..c344645 100644 (file)
@@ -52,7 +52,6 @@ import junit.extensions.PA;
 
 public class SequenceTest
 {
-
   @BeforeClass(alwaysRun = true)
   public void setUpJvOptionPane()
   {
index 6e7dd02..c38cb1e 100644 (file)
@@ -185,58 +185,6 @@ public class FeatureStoreTest
     assertTrue(overlaps.contains(sf));
   }
 
-  /**
-   * Tests for the method that returns false for an attempt to add a feature
-   * that would enclose, or be enclosed by, another feature
-   */
-  @Test(groups = "Functional")
-  public void testAddNonNestedFeature()
-  {
-    FeatureStore fs = new FeatureStore();
-
-    String type = "Domain";
-    SequenceFeature sf1 = new SequenceFeature(type, type, 10, 20,
-            Float.NaN, null);
-    assertTrue(fs.addNonNestedFeature(sf1));
-
-    // co-located feature is ok
-    SequenceFeature sf2 = new SequenceFeature(type, type, 10, 20,
-            Float.NaN, null);
-    assertTrue(fs.addNonNestedFeature(sf2));
-
-    // overlap left is ok
-    SequenceFeature sf3 = new SequenceFeature(type, type, 5, 15, Float.NaN,
-            null);
-    assertTrue(fs.addNonNestedFeature(sf3));
-
-    // overlap right is ok
-    SequenceFeature sf4 = new SequenceFeature(type, type, 15, 25,
-            Float.NaN, null);
-    assertTrue(fs.addNonNestedFeature(sf4));
-
-    // add enclosing feature is not ok
-    SequenceFeature sf5 = new SequenceFeature(type, type, 10, 21,
-            Float.NaN, null);
-    assertFalse(fs.addNonNestedFeature(sf5));
-    SequenceFeature sf6 = new SequenceFeature(type, type, 4, 15, Float.NaN,
-            null);
-    assertFalse(fs.addNonNestedFeature(sf6));
-    SequenceFeature sf7 = new SequenceFeature(type, type, 1, 50, Float.NaN,
-            null);
-    assertFalse(fs.addNonNestedFeature(sf7));
-
-    // add enclosed feature is not ok
-    SequenceFeature sf8 = new SequenceFeature(type, type, 10, 19,
-            Float.NaN, null);
-    assertFalse(fs.addNonNestedFeature(sf8));
-    SequenceFeature sf9 = new SequenceFeature(type, type, 16, 25,
-            Float.NaN, null);
-    assertFalse(fs.addNonNestedFeature(sf9));
-    SequenceFeature sf10 = new SequenceFeature(type, type, 7, 7, Float.NaN,
-            null);
-    assertFalse(fs.addNonNestedFeature(sf10));
-  }
-
   @Test(groups = "Functional")
   public void testGetPositionalFeatures()
   {
@@ -463,9 +411,7 @@ public class FeatureStoreTest
     assertEquals(fs.getFeatureCount(true), 3);
     assertTrue(fs.delete(sf1));
     assertEquals(fs.getFeatureCount(true), 2);
-    // FeatureStore should now only contain features in the NCList
-    assertTrue(fs.nonNestedFeatures.isEmpty());
-    assertEquals(fs.nestedFeatures.size(), 2);
+    assertEquals(fs.features.size(), 2);
     assertFalse(fs.isEmpty());
     assertTrue(fs.delete(sf2));
     assertEquals(fs.getFeatureCount(true), 1);
@@ -694,7 +640,7 @@ public class FeatureStoreTest
   public void testListContains()
   {
     assertFalse(FeatureStore.listContains(null, null));
-    List<SequenceFeature> features = new ArrayList<SequenceFeature>();
+    List<SequenceFeature> features = new ArrayList<>();
     assertFalse(FeatureStore.listContains(features, null));
 
     SequenceFeature sf1 = new SequenceFeature("type1", "desc1", 20, 30, 3f,
@@ -869,8 +815,8 @@ public class FeatureStoreTest
     assertEquals(features.size(), 2);
     assertTrue(features.contains(sf1));
     assertTrue(features.contains(sf2));
-    assertTrue(store.nonNestedFeatures.contains(sf1));
-    assertTrue(store.nestedFeatures.contains(sf2));
+    assertTrue(store.features.contains(sf1));
+    assertTrue(store.features.contains(sf2));
   
     /*
      * delete the first feature
diff --git a/test/jalview/datamodel/features/NCListTest.java b/test/jalview/datamodel/features/NCListTest.java
deleted file mode 100644 (file)
index 2c7f752..0000000
+++ /dev/null
@@ -1,682 +0,0 @@
-package jalview.datamodel.features;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertSame;
-import static org.testng.Assert.assertTrue;
-
-import jalview.datamodel.ContiguousI;
-import jalview.datamodel.Range;
-import jalview.datamodel.SequenceFeature;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-import java.util.Random;
-
-import junit.extensions.PA;
-
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-public class NCListTest
-{
-
-  private Random random = new Random(107);
-
-  private Comparator<ContiguousI> sorter = new RangeComparator(true);
-
-  /**
-   * A basic sanity test of the constructor
-   */
-  @Test(groups = "Functional")
-  public void testConstructor()
-  {
-    List<Range> ranges = new ArrayList<Range>();
-    ranges.add(new Range(20, 20));
-    ranges.add(new Range(10, 20));
-    ranges.add(new Range(15, 30));
-    ranges.add(new Range(10, 30));
-    ranges.add(new Range(11, 19));
-    ranges.add(new Range(10, 20));
-    ranges.add(new Range(1, 100));
-
-    NCList<Range> ncl = new NCList<Range>(ranges);
-    String expected = "[1-100 [10-30 [10-20 [10-20 [11-19]]]], 15-30 [20-20]]";
-    assertEquals(ncl.toString(), expected);
-    assertTrue(ncl.isValid());
-
-    Collections.reverse(ranges);
-    ncl = new NCList<Range>(ranges);
-    assertEquals(ncl.toString(), expected);
-    assertTrue(ncl.isValid());
-  }
-
-  @Test(groups = "Functional")
-  public void testFindOverlaps()
-  {
-    List<Range> ranges = new ArrayList<Range>();
-    ranges.add(new Range(20, 50));
-    ranges.add(new Range(30, 70));
-    ranges.add(new Range(1, 100));
-    ranges.add(new Range(70, 120));
-  
-    NCList<Range> ncl = new NCList<Range>(ranges);
-
-    List<Range> overlaps = ncl.findOverlaps(121, 122);
-    assertEquals(overlaps.size(), 0);
-
-    overlaps = ncl.findOverlaps(21, 22);
-    assertEquals(overlaps.size(), 2);
-    assertEquals(((ContiguousI) overlaps.get(0)).getBegin(), 1);
-    assertEquals(((ContiguousI) overlaps.get(0)).getEnd(), 100);
-    assertEquals(((ContiguousI) overlaps.get(1)).getBegin(), 20);
-    assertEquals(((ContiguousI) overlaps.get(1)).getEnd(), 50);
-
-    overlaps = ncl.findOverlaps(110, 110);
-    assertEquals(overlaps.size(), 1);
-    assertEquals(((ContiguousI) overlaps.get(0)).getBegin(), 70);
-    assertEquals(((ContiguousI) overlaps.get(0)).getEnd(), 120);
-  }
-
-  @Test(groups = "Functional")
-  public void testAdd_onTheEnd()
-  {
-    List<Range> ranges = new ArrayList<Range>();
-    ranges.add(new Range(20, 50));
-    NCList<Range> ncl = new NCList<Range>(ranges);
-    assertEquals(ncl.toString(), "[20-50]");
-    assertTrue(ncl.isValid());
-
-    ncl.add(new Range(60, 70));
-    assertEquals(ncl.toString(), "[20-50, 60-70]");
-    assertTrue(ncl.isValid());
-  }
-
-  @Test(groups = "Functional")
-  public void testAdd_inside()
-  {
-    List<Range> ranges = new ArrayList<Range>();
-    ranges.add(new Range(20, 50));
-    NCList<Range> ncl = new NCList<Range>(ranges);
-    assertEquals(ncl.toString(), "[20-50]");
-    assertTrue(ncl.isValid());
-
-    ncl.add(new Range(30, 40));
-    assertEquals(ncl.toString(), "[20-50 [30-40]]");
-  }
-
-  @Test(groups = "Functional")
-  public void testAdd_onTheFront()
-  {
-    List<Range> ranges = new ArrayList<Range>();
-    ranges.add(new Range(20, 50));
-    NCList<Range> ncl = new NCList<Range>(ranges);
-    assertEquals(ncl.toString(), "[20-50]");
-    assertTrue(ncl.isValid());
-
-    ncl.add(new Range(5, 15));
-    assertEquals(ncl.toString(), "[5-15, 20-50]");
-    assertTrue(ncl.isValid());
-  }
-
-  @Test(groups = "Functional")
-  public void testAdd_enclosing()
-  {
-    List<Range> ranges = new ArrayList<Range>();
-    ranges.add(new Range(20, 50));
-    ranges.add(new Range(30, 60));
-    NCList<Range> ncl = new NCList<Range>(ranges);
-    assertEquals(ncl.toString(), "[20-50, 30-60]");
-    assertTrue(ncl.isValid());
-    assertEquals(ncl.getStart(), 20);
-
-    ncl.add(new Range(10, 70));
-    assertEquals(ncl.toString(), "[10-70 [20-50, 30-60]]");
-    assertTrue(ncl.isValid());
-  }
-
-  @Test(groups = "Functional")
-  public void testAdd_spanning()
-  {
-    List<Range> ranges = new ArrayList<Range>();
-    ranges.add(new Range(20, 40));
-    ranges.add(new Range(60, 70));
-    NCList<Range> ncl = new NCList<Range>(ranges);
-    assertEquals(ncl.toString(), "[20-40, 60-70]");
-    assertTrue(ncl.isValid());
-
-    ncl.add(new Range(30, 50));
-    assertEquals(ncl.toString(), "[20-40, 30-50, 60-70]");
-    assertTrue(ncl.isValid());
-
-    ncl.add(new Range(40, 65));
-    assertEquals(ncl.toString(), "[20-40, 30-50, 40-65, 60-70]");
-    assertTrue(ncl.isValid());
-  }
-
-  /**
-   * Provides the scales for pseudo-random NCLists i.e. the range of the maximal
-   * [0-scale] interval to be stored
-   * 
-   * @return
-   */
-  @DataProvider(name = "scalesOfLife")
-  public Object[][] getScales()
-  {
-    return new Object[][] { new Integer[] { 10 }, new Integer[] { 100 } };
-  }
-
-  /**
-   * Do a number of pseudo-random (reproducible) builds of an NCList, to
-   * exercise as many methods of the class as possible while generating the
-   * range of possible structure topologies
-   * <ul>
-   * <li>verify that add adds an entry and increments size</li>
-   * <li>...except where the entry is already contained (by equals test)</li>
-   * <li>verify that the structure is valid at all stages of construction</li>
-   * <li>generate, run and verify a range of overlap queries</li>
-   * <li>tear down the structure by deleting entries, verifying correctness at
-   * each stage</li>
-   * </ul>
-   */
-  @Test(groups = "Functional", dataProvider = "scalesOfLife")
-  public void test_pseudoRandom(Integer scale)
-  {
-    NCList<SequenceFeature> ncl = new NCList<SequenceFeature>();
-    List<SequenceFeature> features = new ArrayList<SequenceFeature>(scale);
-    
-    testAdd_pseudoRandom(scale, ncl, features);
-
-    /*
-     * sort the list of added ranges - this doesn't affect the test,
-     * just makes it easier to inspect the data in the debugger
-     */
-    Collections.sort(features, sorter);
-
-    testFindOverlaps_pseudoRandom(ncl, scale, features);
-
-    testDelete_pseudoRandom(ncl, features);
-  }
-
-  /**
-   * Pick randomly selected entries to delete in turn, checking the NCList size
-   * and validity at each stage, until it is empty
-   * 
-   * @param ncl
-   * @param features
-   */
-  protected void testDelete_pseudoRandom(NCList<SequenceFeature> ncl,
-          List<SequenceFeature> features)
-  {
-    int deleted = 0;
-
-    while (!features.isEmpty())
-    {
-      assertEquals(ncl.size(), features.size());
-      int toDelete = random.nextInt(features.size());
-      SequenceFeature entry = features.get(toDelete);
-      assertTrue(ncl.contains(entry), String.format(
-              "NCList doesn't contain entry [%d] '%s'!", deleted,
-              entry.toString()));
-
-      ncl.delete(entry);
-      assertFalse(ncl.contains(entry), String.format(
-              "NCList still contains deleted entry [%d] '%s'!", deleted,
-              entry.toString()));
-      features.remove(toDelete);
-      deleted++;
-
-      assertTrue(ncl.isValid(), String.format(
-              "NCList invalid after %d deletions, last deleted was '%s'",
-              deleted, entry.toString()));
-
-      /*
-       * brute force check that deleting one entry didn't delete any others
-       */
-      for (int i = 0; i < features.size(); i++)
-      {
-        SequenceFeature sf = features.get(i);
-        assertTrue(ncl.contains(sf), String.format(
-                        "NCList doesn't contain entry [%d] %s after deleting '%s'!",
-                        i, sf.toString(), entry.toString()));
-      }
-    }
-    assertEquals(ncl.size(), 0); // all gone
-  }
-
-  /**
-   * Randomly generate entries and add them to the NCList, checking its validity
-   * and size at each stage. A few entries should be duplicates (by equals test)
-   * so not get added.
-   * 
-   * @param scale
-   * @param ncl
-   * @param features
-   */
-  protected void testAdd_pseudoRandom(Integer scale,
-          NCList<SequenceFeature> ncl,
-          List<SequenceFeature> features)
-  {
-    int count = 0;
-    final int size = 50;
-
-    for (int i = 0; i < size; i++)
-    {
-      int r1 = random.nextInt(scale + 1);
-      int r2 = random.nextInt(scale + 1);
-      int from = Math.min(r1, r2);
-      int to = Math.max(r1, r2);
-
-      /*
-       * choice of two feature values means that occasionally an identical
-       * feature may be generated, in which case it should not be added 
-       */
-      float value = (float) i % 2;
-      SequenceFeature feature = new SequenceFeature("Pfam", "", from, to,
-              value, "group");
-
-      /*
-       * add to NCList - with duplicate entries (by equals) disallowed
-       */
-      ncl.add(feature, false);
-      if (features.contains(feature))
-      {
-        System.out.println("Duplicate feature generated "
-                + feature.toString());
-      }
-      else
-      {
-        features.add(feature);
-        count++;
-      }
-    
-      /*
-       * check list format is valid at each stage of its construction
-       */
-      assertTrue(ncl.isValid(),
-              String.format("Failed for scale = %d, i=%d", scale, i));
-      assertEquals(ncl.size(), count);
-    }
-    // System.out.println(ncl.prettyPrint());
-  }
-
-  /**
-   * A helper method that generates pseudo-random range queries and veries that
-   * findOverlaps returns the correct matches
-   * 
-   * @param ncl
-   *          the NCList to query
-   * @param scale
-   *          ncl maximal range is [0, scale]
-   * @param features
-   *          a list of the ranges stored in ncl
-   */
-  protected void testFindOverlaps_pseudoRandom(NCList<SequenceFeature> ncl,
-          int scale,
-          List<SequenceFeature> features)
-  {
-    int halfScale = scale / 2;
-    int minIterations = 20;
-
-    /*
-     * generates ranges in [-halfScale, scale+halfScale]
-     * - some should be internal to [0, scale] P = 1/4
-     * - some should lie before 0 P = 1/16
-     * - some should lie after scale P = 1/16
-     * - some should overlap left P = 1/4
-     * - some should overlap right P = 1/4
-     * - some should enclose P = 1/8
-     * 
-     * 50 iterations give a 96% probability of including the
-     * unlikeliest case; keep going until we have done all!
-     */
-    boolean inside = false;
-    boolean enclosing = false;
-    boolean before = false;
-    boolean after = false;
-    boolean overlapLeft = false;
-    boolean overlapRight = false;
-    boolean allCasesCovered = false;
-
-    int i = 0;
-    while (i < minIterations || !allCasesCovered)
-    {
-      i++;
-      int r1 = random.nextInt((scale + 1) * 2);
-      int r2 = random.nextInt((scale + 1) * 2);
-      int from = Math.min(r1, r2) - halfScale;
-      int to = Math.max(r1, r2) - halfScale;
-
-      /*
-       * ensure all cases of interest get covered
-       */
-      inside |= from >= 0 && to <= scale;
-      enclosing |= from <= 0 && to >= scale;
-      before |= to < 0;
-      after |= from > scale;
-      overlapLeft |= from < 0 && to >= 0 && to <= scale;
-      overlapRight |= from >= 0 && from <= scale && to > scale;
-      if (!allCasesCovered)
-      {
-        allCasesCovered |= inside && enclosing && before && after
-              && overlapLeft && overlapRight;
-        if (allCasesCovered)
-        {
-          System.out
-                  .println(String
-                          .format("Covered all findOverlaps cases after %d iterations for scale %d",
-                                  i, scale));
-        }
-      }
-
-      verifyFindOverlaps(ncl, from, to, features);
-    }
-  }
-
-  /**
-   * A helper method that verifies that overlaps found by interrogating an
-   * NCList correctly match those found by brute force search
-   * 
-   * @param ncl
-   * @param from
-   * @param to
-   * @param features
-   */
-  protected void verifyFindOverlaps(NCList<SequenceFeature> ncl, int from,
-          int to, List<SequenceFeature> features)
-  {
-    List<SequenceFeature> overlaps = ncl.findOverlaps(from, to);
-
-    /*
-     * check returned entries do indeed overlap from-to range
-     */
-    for (ContiguousI sf : overlaps)
-    {
-      int begin = sf.getBegin();
-      int end = sf.getEnd();
-      assertTrue(begin <= to && end >= from, String.format(
-              "[%d, %d] does not overlap query range [%d, %d]", begin, end,
-              from, to));
-    }
-
-    /*
-     * check overlapping ranges are included in the results
-     * (the test above already shows non-overlapping ranges are not)
-     */
-    for (ContiguousI sf : features)
-    {
-      int begin = sf.getBegin();
-      int end = sf.getEnd();
-      if (begin <= to && end >= from)
-      {
-        boolean found = overlaps.contains(sf);
-        assertTrue(found, String.format(
-                "[%d, %d] missing in query range [%d, %d]", begin, end,
-                from, to));
-      }
-    }
-  }
-
-  @Test(groups = "Functional")
-  public void testGetEntries()
-  {
-    List<Range> ranges = new ArrayList<Range>();
-    Range r1 = new Range(20, 20);
-    Range r2 = new Range(10, 20);
-    Range r3 = new Range(15, 30);
-    Range r4 = new Range(10, 30);
-    Range r5 = new Range(11, 19);
-    Range r6 = new Range(10, 20);
-    ranges.add(r1);
-    ranges.add(r2);
-    ranges.add(r3);
-    ranges.add(r4);
-    ranges.add(r5);
-    ranges.add(r6);
-  
-    NCList<Range> ncl = new NCList<Range>(ranges);
-    Range r7 = new Range(1, 100);
-    ncl.add(r7);
-
-    List<Range> contents = ncl.getEntries();
-    assertEquals(contents.size(), 7);
-    assertTrue(contents.contains(r1));
-    assertTrue(contents.contains(r2));
-    assertTrue(contents.contains(r3));
-    assertTrue(contents.contains(r4));
-    assertTrue(contents.contains(r5));
-    assertTrue(contents.contains(r6));
-    assertTrue(contents.contains(r7));
-
-    ncl = new NCList<Range>();
-    assertTrue(ncl.getEntries().isEmpty());
-  }
-
-  @Test(groups = "Functional")
-  public void testDelete()
-  {
-    List<Range> ranges = new ArrayList<Range>();
-    Range r1 = new Range(20, 30);
-    ranges.add(r1);
-    NCList<Range> ncl = new NCList<Range>(ranges);
-    assertTrue(ncl.getEntries().contains(r1));
-
-    Range r2 = new Range(20, 30);
-    assertFalse(ncl.delete(null)); // null argument
-    assertFalse(ncl.delete(r2)); // never added
-    assertTrue(ncl.delete(r1)); // success
-    assertTrue(ncl.getEntries().isEmpty());
-
-    /*
-     * tests where object.equals() == true
-     */
-    NCList<SequenceFeature> features = new NCList<SequenceFeature>();
-    SequenceFeature sf1 = new SequenceFeature("type", "desc", 1, 10, 2f,
-            "group");
-    SequenceFeature sf2 = new SequenceFeature("type", "desc", 1, 10, 2f,
-            "group");
-    features.add(sf1);
-    assertEquals(sf1, sf2); // sf1.equals(sf2)
-    assertFalse(features.delete(sf2)); // equality is not enough for deletion
-    assertTrue(features.getEntries().contains(sf1)); // still there!
-    assertTrue(features.delete(sf1));
-    assertTrue(features.getEntries().isEmpty()); // gone now
-
-    /*
-     * test with duplicate objects in NCList
-     */
-    features.add(sf1);
-    features.add(sf1);
-    assertEquals(features.getEntries().size(), 2);
-    assertSame(features.getEntries().get(0), sf1);
-    assertSame(features.getEntries().get(1), sf1);
-    assertTrue(features.delete(sf1)); // first match only is deleted
-    assertTrue(features.contains(sf1));
-    assertEquals(features.size(), 1);
-    assertTrue(features.delete(sf1));
-    assertTrue(features.getEntries().isEmpty());
-  }
-
-  @Test(groups = "Functional")
-  public void testAdd_overlapping()
-  {
-    List<Range> ranges = new ArrayList<Range>();
-    ranges.add(new Range(40, 50));
-    ranges.add(new Range(20, 30));
-    NCList<Range> ncl = new NCList<Range>(ranges);
-    assertEquals(ncl.toString(), "[20-30, 40-50]");
-    assertTrue(ncl.isValid());
-  
-    /*
-     * add range overlapping internally
-     */
-    ncl.add(new Range(25, 35));
-    assertEquals(ncl.toString(), "[20-30, 25-35, 40-50]");
-    assertTrue(ncl.isValid());
-
-    /*
-     * add range overlapping last range
-     */
-    ncl.add(new Range(45, 55));
-    assertEquals(ncl.toString(), "[20-30, 25-35, 40-50, 45-55]");
-    assertTrue(ncl.isValid());
-
-    /*
-     * add range overlapping first range
-     */
-    ncl.add(new Range(15, 25));
-    assertEquals(ncl.toString(), "[15-25, 20-30, 25-35, 40-50, 45-55]");
-    assertTrue(ncl.isValid());
-  }
-
-  /**
-   * Test the contains method (which uses object equals test)
-   */
-  @Test(groups = "Functional")
-  public void testContains()
-  {
-    NCList<SequenceFeature> ncl = new NCList<SequenceFeature>();
-    SequenceFeature sf1 = new SequenceFeature("type", "desc", 1, 10, 2f,
-            "group");
-    SequenceFeature sf2 = new SequenceFeature("type", "desc", 1, 10, 2f,
-            "group");
-    SequenceFeature sf3 = new SequenceFeature("type", "desc", 1, 10, 2f,
-            "anothergroup");
-    ncl.add(sf1);
-
-    assertTrue(ncl.contains(sf1));
-    assertTrue(ncl.contains(sf2)); // sf1.equals(sf2)
-    assertFalse(ncl.contains(sf3)); // !sf1.equals(sf3)
-
-    /*
-     * make some deeper structure in the NCList
-     */
-    SequenceFeature sf4 = new SequenceFeature("type", "desc", 2, 9, 2f,
-            "group");
-    ncl.add(sf4);
-    assertTrue(ncl.contains(sf4));
-    SequenceFeature sf5 = new SequenceFeature("type", "desc", 4, 5, 2f,
-            "group");
-    SequenceFeature sf6 = new SequenceFeature("type", "desc", 6, 8, 2f,
-            "group");
-    ncl.add(sf5);
-    ncl.add(sf6);
-    assertTrue(ncl.contains(sf5));
-    assertTrue(ncl.contains(sf6));
-  }
-
-  @Test(groups = "Functional")
-  public void testIsValid()
-  {
-    List<Range> ranges = new ArrayList<Range>();
-    Range r1 = new Range(40, 50);
-    ranges.add(r1);
-    NCList<Range> ncl = new NCList<Range>(ranges);
-    assertTrue(ncl.isValid());
-
-    Range r2 = new Range(42, 44);
-    ncl.add(r2);
-    assertTrue(ncl.isValid());
-    Range r3 = new Range(46, 48);
-    ncl.add(r3);
-    assertTrue(ncl.isValid());
-    Range r4 = new Range(43, 43);
-    ncl.add(r4);
-    assertTrue(ncl.isValid());
-
-    assertEquals(ncl.toString(), "[40-50 [42-44 [43-43], 46-48]]");
-    assertTrue(ncl.isValid());
-
-    PA.setValue(r1, "start", 43);
-    assertFalse(ncl.isValid()); // r2 not inside r1
-    PA.setValue(r1, "start", 40);
-    assertTrue(ncl.isValid());
-
-    PA.setValue(r3, "start", 41);
-    assertFalse(ncl.isValid()); // r3 should precede r2
-    PA.setValue(r3, "start", 46);
-    assertTrue(ncl.isValid());
-
-    PA.setValue(r4, "start", 41);
-    assertFalse(ncl.isValid()); // r4 not inside r2
-    PA.setValue(r4, "start", 43);
-    assertTrue(ncl.isValid());
-
-    PA.setValue(r4, "start", 44);
-    assertFalse(ncl.isValid()); // r4 has reverse range
-  }
-
-  @Test(groups = "Functional")
-  public void testPrettyPrint()
-  {
-    /*
-     * construct NCList from a list of ranges
-     * they are sorted then assembled into NCList subregions
-     * notice that 42-42 end up inside 41-46
-     */
-    List<Range> ranges = new ArrayList<Range>();
-    ranges.add(new Range(40, 50));
-    ranges.add(new Range(45, 55));
-    ranges.add(new Range(40, 45));
-    ranges.add(new Range(41, 46));
-    ranges.add(new Range(42, 42));
-    ranges.add(new Range(42, 42));
-    NCList<Range> ncl = new NCList<Range>(ranges);
-    assertTrue(ncl.isValid());
-    assertEquals(ncl.toString(),
-            "[40-50 [40-45], 41-46 [42-42 [42-42]], 45-55]");
-    String expected = "40-50\n  40-45\n41-46\n  42-42\n    42-42\n45-55\n";
-    assertEquals(ncl.prettyPrint(), expected);
-
-    /*
-     * repeat but now add ranges one at a time
-     * notice that 42-42 end up inside 40-50 so we get
-     * a different but equal valid NCList structure
-     */
-    ranges.clear();
-    ncl = new NCList<Range>(ranges);
-    ncl.add(new Range(40, 50));
-    ncl.add(new Range(45, 55));
-    ncl.add(new Range(40, 45));
-    ncl.add(new Range(41, 46));
-    ncl.add(new Range(42, 42));
-    ncl.add(new Range(42, 42));
-    assertTrue(ncl.isValid());
-    assertEquals(ncl.toString(),
-            "[40-50 [40-45 [42-42 [42-42]], 41-46], 45-55]");
-    expected = "40-50\n  40-45\n    42-42\n      42-42\n  41-46\n45-55\n";
-    assertEquals(ncl.prettyPrint(), expected);
-  }
-
-  /**
-   * A test that shows different valid trees can be constructed from the same
-   * set of ranges, depending on the order of construction
-   */
-  @Test(groups = "Functional")
-  public void testConstructor_alternativeTrees()
-  {
-    List<Range> ranges = new ArrayList<Range>();
-    ranges.add(new Range(10, 60));
-    ranges.add(new Range(20, 30));
-    ranges.add(new Range(40, 50));
-  
-    /*
-     * constructor with greedy traversal of sorted ranges to build nested
-     * containment lists results in 20-30 inside 10-60, 40-50 a sibling
-     */
-    NCList<Range> ncl = new NCList<Range>(ranges);
-    assertEquals(ncl.toString(), "[10-60 [20-30], 40-50]");
-    assertTrue(ncl.isValid());
-
-    /*
-     * adding ranges one at a time results in 40-50 
-     * a sibling of 20-30 inside 10-60
-     */
-    ncl = new NCList<Range>(new Range(10, 60));
-    ncl.add(new Range(20, 30));
-    ncl.add(new Range(40, 50));
-    assertEquals(ncl.toString(), "[10-60 [20-30, 40-50]]");
-    assertTrue(ncl.isValid());
-  }
-}
diff --git a/test/jalview/datamodel/features/NCNodeTest.java b/test/jalview/datamodel/features/NCNodeTest.java
deleted file mode 100644 (file)
index 4713084..0000000
+++ /dev/null
@@ -1,136 +0,0 @@
-package jalview.datamodel.features;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertTrue;
-
-import jalview.datamodel.Range;
-import jalview.datamodel.SequenceFeature;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import junit.extensions.PA;
-
-import org.testng.annotations.Test;
-
-public class NCNodeTest
-{
-  @Test(groups = "Functional")
-  public void testAdd()
-  {
-    Range r1 = new Range(10, 20);
-    NCNode<Range> node = new NCNode<Range>(r1);
-    assertEquals(node.getBegin(), 10);
-    Range r2 = new Range(10, 15);
-    node.add(r2);
-
-    List<Range> contents = new ArrayList<Range>();
-    node.getEntries(contents);
-    assertEquals(contents.size(), 2);
-    assertTrue(contents.contains(r1));
-    assertTrue(contents.contains(r2));
-  }
-
-  @Test(
-    groups = "Functional",
-    expectedExceptions = { IllegalArgumentException.class })
-  public void testAdd_invalidRangeStart()
-  {
-    Range r1 = new Range(10, 20);
-    NCNode<Range> node = new NCNode<Range>(r1);
-    assertEquals(node.getBegin(), 10);
-    Range r2 = new Range(9, 15);
-    node.add(r2);
-  }
-
-  @Test(
-    groups = "Functional",
-    expectedExceptions = { IllegalArgumentException.class })
-  public void testAdd_invalidRangeEnd()
-  {
-    Range r1 = new Range(10, 20);
-    NCNode<Range> node = new NCNode<Range>(r1);
-    assertEquals(node.getBegin(), 10);
-    Range r2 = new Range(12, 21);
-    node.add(r2);
-  }
-
-  @Test(groups = "Functional")
-  public void testGetEntries()
-  {
-    Range r1 = new Range(10, 20);
-    NCNode<Range> node = new NCNode<Range>(r1);
-    List<Range> entries = new ArrayList<Range>();
-
-    node.getEntries(entries);
-    assertEquals(entries.size(), 1);
-    assertTrue(entries.contains(r1));
-
-    // clearing the returned list does not affect the NCNode
-    entries.clear();
-    node.getEntries(entries);
-    assertEquals(entries.size(), 1);
-    assertTrue(entries.contains(r1));
-
-    Range r2 = new Range(15, 18);
-    node.add(r2);
-    entries.clear();
-    node.getEntries(entries);
-    assertEquals(entries.size(), 2);
-    assertTrue(entries.contains(r1));
-    assertTrue(entries.contains(r2));
-  }
-
-  /**
-   * Tests for the contains method (uses entry.equals() test)
-   */
-  @Test(groups = "Functional")
-  public void testContains()
-  {
-    SequenceFeature sf1 = new SequenceFeature("type", "desc", 1, 10, 2f,
-            "group");
-    SequenceFeature sf2 = new SequenceFeature("type", "desc", 1, 10, 2f,
-            "group");
-    SequenceFeature sf3 = new SequenceFeature("type", "desc", 1, 10, 2f,
-            "anothergroup");
-    NCNode<SequenceFeature> node = new NCNode<SequenceFeature>(sf1);
-
-    assertFalse(node.contains(null));
-    assertTrue(node.contains(sf1));
-    assertTrue(node.contains(sf2)); // sf1.equals(sf2)
-    assertFalse(node.contains(sf3)); // !sf1.equals(sf3)
-  }
-
-  /**
-   * Test method that checks for valid structure. Valid means that all
-   * subregions (if any) lie within the root range, and that all subregions have
-   * valid structure.
-   */
-  @Test(groups = "Functional")
-  public void testIsValid()
-  {
-    Range r1 = new Range(10, 20);
-    Range r2 = new Range(14, 15);
-    Range r3 = new Range(16, 17);
-    NCNode<Range> node = new NCNode<Range>(r1);
-    node.add(r2);
-    node.add(r3);
-
-    /*
-     * node has root range [10-20] and contains an
-     * NCList of [14-15, 16-17]
-     */
-    assertTrue(node.isValid());
-    PA.setValue(r1, "start", 15);
-    assertFalse(node.isValid()); // r2 not within r1
-    PA.setValue(r1, "start", 10);
-    assertTrue(node.isValid());
-    PA.setValue(r1, "end", 16);
-    assertFalse(node.isValid()); // r3 not within r1
-    PA.setValue(r1, "end", 20);
-    assertTrue(node.isValid());
-    PA.setValue(r3, "start", 12);
-    assertFalse(node.isValid()); // r3 should precede r2
-  }
-}
diff --git a/test/jalview/datamodel/features/RangeComparatorTest.java b/test/jalview/datamodel/features/RangeComparatorTest.java
deleted file mode 100644 (file)
index 4849b38..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-package jalview.datamodel.features;
-
-import static org.testng.Assert.assertEquals;
-
-import jalview.datamodel.ContiguousI;
-import jalview.datamodel.Range;
-
-import java.util.Comparator;
-
-import org.testng.annotations.Test;
-
-public class RangeComparatorTest
-{
-
-  @Test(groups = "Functional")
-  public void testCompare()
-  {
-    RangeComparator comp = new RangeComparator(true);
-
-    // same position, same length
-    assertEquals(comp.compare(10, 10, 20, 20), 0);
-    // same position, len1 > len2
-    assertEquals(comp.compare(10, 10, 20, 19), -1);
-    // same position, len1 < len2
-    assertEquals(comp.compare(10, 10, 20, 21), 1);
-    // pos1 > pos2
-    assertEquals(comp.compare(11, 10, 20, 20), 1);
-    // pos1 < pos2
-    assertEquals(comp.compare(10, 11, 20, 10), -1);
-  }
-
-  @Test(groups = "Functional")
-  public void testCompare_byStart()
-  {
-    Comparator<ContiguousI> comp = RangeComparator.BY_START_POSITION;
-
-    // same start position, same length
-    assertEquals(comp.compare(new Range(10, 20), new Range(10, 20)), 0);
-    // same start position, len1 > len2
-    assertEquals(comp.compare(new Range(10, 20), new Range(10, 19)), -1);
-    // same start position, len1 < len2
-    assertEquals(comp.compare(new Range(10, 18), new Range(10, 20)), 1);
-    // pos1 > pos2
-    assertEquals(comp.compare(new Range(11, 20), new Range(10, 20)), 1);
-    // pos1 < pos2
-    assertEquals(comp.compare(new Range(10, 20), new Range(11, 20)), -1);
-  }
-
-  @Test(groups = "Functional")
-  public void testCompare_byEnd()
-  {
-    Comparator<ContiguousI> comp = RangeComparator.BY_END_POSITION;
-
-    // same end position, same length
-    assertEquals(comp.compare(new Range(10, 20), new Range(10, 20)), 0);
-    // same end position, len1 > len2
-    assertEquals(comp.compare(new Range(10, 20), new Range(11, 20)), -1);
-    // same end position, len1 < len2
-    assertEquals(comp.compare(new Range(11, 20), new Range(10, 20)), 1);
-    // end1 > end2
-    assertEquals(comp.compare(new Range(10, 21), new Range(10, 20)), 1);
-    // end1 < end2
-    assertEquals(comp.compare(new Range(10, 20), new Range(10, 21)), -1);
-  }
-}
diff --git a/test/jalview/datamodel/xdb/embl/EmblEntryTest.java b/test/jalview/datamodel/xdb/embl/EmblEntryTest.java
deleted file mode 100644 (file)
index 4672574..0000000
+++ /dev/null
@@ -1,264 +0,0 @@
-/*
- * 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.datamodel.xdb.embl;
-
-import static org.testng.AssertJUnit.assertEquals;
-import static org.testng.AssertJUnit.assertNull;
-import static org.testng.AssertJUnit.assertSame;
-
-import jalview.analysis.SequenceIdMatcher;
-import jalview.datamodel.DBRefEntry;
-import jalview.datamodel.DBRefSource;
-import jalview.datamodel.SequenceI;
-import jalview.gui.JvOptionPane;
-import jalview.util.MapList;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-public class EmblEntryTest
-{
-
-  @BeforeClass(alwaysRun = true)
-  public void setUpJvOptionPane()
-  {
-    JvOptionPane.setInteractiveMode(false);
-    JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
-  }
-
-  @Test(groups = "Functional")
-  public void testGetCdsRanges()
-  {
-    EmblEntry testee = new EmblEntry();
-
-    /*
-     * Make a (CDS) Feature with 5 locations
-     */
-    EmblFeature cds = new EmblFeature();
-    cds.setLocation("join(10..20,complement(30..40),50..60,70..80,complement(110..120))");
-
-    int[] exons = testee.getCdsRanges(cds);
-    assertEquals("[10, 20, 40, 30, 50, 60, 70, 80, 120, 110]",
-            Arrays.toString(exons));
-  }
-
-  @Test(groups = "Functional")
-  public void testParseCodingFeature()
-  {
-    // not the whole sequence but enough for this test...
-    List<SequenceI> peptides = new ArrayList<SequenceI>();
-    SequenceIdMatcher matcher = new SequenceIdMatcher(peptides);
-    EmblFile ef = EmblTestHelper.getEmblFile();
-    assertEquals(1, ef.getEntries().size());
-    EmblEntry testee = ef.getEntries().get(0);
-    String sourceDb = "EMBL";
-    SequenceI dna = testee.makeSequence(sourceDb);
-
-    /*
-     * parse three CDS features, with two/one/no Uniprot cross-refs
-     */
-    for (EmblFeature feature : ef.getEntries().get(0).getFeatures())
-    {
-      if ("CDS".equals(feature.getName()))
-      {
-        testee.parseCodingFeature(feature, sourceDb, dna, peptides, matcher);
-      }
-    }
-
-    /*
-     * peptides should now have five entries:
-     * EMBL product and two Uniprot accessions for the first CDS / translation
-     * EMBL product and one Uniprot accession for the second CDS / "
-     * EMBL product only for the third
-     */
-    assertEquals(6, peptides.size());
-    assertEquals("CAA30420.1", peptides.get(0).getName());
-    assertEquals("MLCF", peptides.get(0).getSequenceAsString());
-    assertEquals("UNIPROT|B0BCM4", peptides.get(1).getName());
-    assertEquals("MLCF", peptides.get(1).getSequenceAsString());
-    assertEquals("UNIPROT|P0CE20", peptides.get(2).getName());
-    assertEquals("MLCF", peptides.get(2).getSequenceAsString());
-    assertEquals("CAA30421.1", peptides.get(3).getName());
-    assertEquals("MSSS", peptides.get(3).getSequenceAsString());
-    assertEquals("UNIPROT|B0BCM3", peptides.get(4).getName());
-    assertEquals("MSSS", peptides.get(4).getSequenceAsString());
-    assertEquals("CAA12345.6", peptides.get(5).getName());
-    assertEquals("MSS", peptides.get(5).getSequenceAsString());
-
-    /*
-     * verify dna sequence has dbrefs with CDS mappings to the peptide 'products'
-     */
-    MapList cds1Map = new MapList(new int[] { 57, 46 }, new int[] { 1, 4 },
-            3, 1);
-    MapList cds2Map = new MapList(new int[] { 4, 15 }, new int[] { 1, 4 },
-            3, 1);
-    MapList cds3Map = new MapList(new int[] { 4, 6, 10, 15 }, new int[] {
-        1, 3 }, 3, 1);
-    DBRefEntry[] dbrefs = dna.getDBRefs();
-    assertEquals(4, dbrefs.length);
-    DBRefEntry dbRefEntry = dbrefs[0];
-    assertEquals("UNIPROT", dbRefEntry.getSource());
-    assertEquals("B0BCM4", dbRefEntry.getAccessionId());
-    assertSame(peptides.get(1), dbRefEntry.getMap().getTo());
-    assertEquals(cds1Map, dbRefEntry.getMap().getMap());
-
-    dbRefEntry = dbrefs[1];
-    assertEquals("UNIPROT", dbRefEntry.getSource());
-    assertEquals("P0CE20", dbRefEntry.getAccessionId());
-    assertSame(peptides.get(2), dbRefEntry.getMap().getTo());
-    assertEquals(cds1Map, dbRefEntry.getMap().getMap());
-
-    dbRefEntry = dbrefs[2];
-    assertEquals("UNIPROT", dbRefEntry.getSource());
-    assertEquals("B0BCM3", dbRefEntry.getAccessionId());
-    assertSame(peptides.get(4), dbRefEntry.getMap().getTo());
-    assertEquals(cds2Map, dbRefEntry.getMap().getMap());
-
-    dbRefEntry = dbrefs[3];
-    assertEquals("EMBLCDSPROTEIN", dbRefEntry.getSource());
-    assertEquals("CAA12345.6", dbRefEntry.getAccessionId());
-    assertSame(peptides.get(5), dbRefEntry.getMap().getTo());
-    assertEquals(cds3Map, dbRefEntry.getMap().getMap());
-
-    /*
-     * verify peptides have dbrefs
-     * - to EMBL sequence (with inverse 1:3 cds mapping)
-     * - to EMBLCDS (with 1:3 mapping)
-     * - direct (no mapping) to other protein accessions
-     */
-    MapList proteinToCdsMap1 = new MapList(new int[] { 1, 4 }, new int[] {
-        1, 12 }, 1, 3);
-    MapList proteinToCdsMap2 = new MapList(new int[] { 1, 3 }, new int[] {
-        1, 9 }, 1, 3);
-
-    // dbrefs for first CDS EMBL product CAA30420.1
-    dbrefs = peptides.get(0).getDBRefs();
-    assertEquals(5, dbrefs.length);
-    assertEquals(DBRefSource.EMBL, dbrefs[0].getSource());
-    assertEquals("CAA30420.1", dbrefs[0].getAccessionId());
-    // TODO: verify getPrimaryDBRefs() for peptide products
-    assertEquals(cds1Map.getInverse(), dbrefs[0].getMap().getMap());
-    assertEquals(DBRefSource.EMBLCDS, dbrefs[1].getSource());
-    assertEquals("CAA30420.1", dbrefs[1].getAccessionId());
-    assertEquals(proteinToCdsMap1, dbrefs[1].getMap().getMap());
-    assertEquals(DBRefSource.EMBLCDSProduct, dbrefs[2].getSource());
-    assertEquals("CAA30420.1", dbrefs[2].getAccessionId());
-    assertNull(dbrefs[2].getMap());
-    assertEquals(new DBRefEntry(DBRefSource.UNIPROT, "2.1", "B0BCM4"),
-            dbrefs[3]);
-    assertNull(dbrefs[3].getMap());
-    assertEquals(new DBRefEntry(DBRefSource.UNIPROT, "0", "P0CE20"),
-            dbrefs[4]);
-    assertNull(dbrefs[4].getMap());
-
-    // dbrefs for first CDS first Uniprot xref
-    dbrefs = peptides.get(1).getDBRefs();
-    assertEquals(2, dbrefs.length);
-    assertEquals(new DBRefEntry(DBRefSource.UNIPROT, "2.1", "B0BCM4"),
-            dbrefs[0]);
-    assertNull(dbrefs[0].getMap());
-    assertEquals(DBRefSource.EMBL, dbrefs[1].getSource());
-    assertEquals("X07547", dbrefs[1].getAccessionId());
-    assertEquals(cds1Map.getInverse(), dbrefs[1].getMap().getMap());
-
-    // dbrefs for first CDS second Uniprot xref
-    dbrefs = peptides.get(2).getDBRefs();
-    assertEquals(2, dbrefs.length);
-    assertEquals(new DBRefEntry(DBRefSource.UNIPROT, "0", "P0CE20"),
-            dbrefs[0]);
-    assertNull(dbrefs[0].getMap());
-    assertEquals(DBRefSource.EMBL, dbrefs[1].getSource());
-    assertEquals("X07547", dbrefs[1].getAccessionId());
-    assertEquals(cds1Map.getInverse(), dbrefs[1].getMap().getMap());
-
-    // dbrefs for second CDS EMBL product CAA30421.1
-    dbrefs = peptides.get(3).getDBRefs();
-    assertEquals(4, dbrefs.length);
-    assertEquals(DBRefSource.EMBL, dbrefs[0].getSource());
-    assertEquals("CAA30421.1", dbrefs[0].getAccessionId());
-    assertEquals(cds2Map.getInverse(), dbrefs[0].getMap().getMap());
-    assertEquals(DBRefSource.EMBLCDS, dbrefs[1].getSource());
-    assertEquals("CAA30421.1", dbrefs[1].getAccessionId());
-    assertEquals(proteinToCdsMap1, dbrefs[1].getMap().getMap());
-    assertEquals(DBRefSource.EMBLCDSProduct, dbrefs[2].getSource());
-    assertEquals("CAA30421.1", dbrefs[2].getAccessionId());
-    assertNull(dbrefs[2].getMap());
-    assertEquals(new DBRefEntry(DBRefSource.UNIPROT, "0", "B0BCM3"),
-            dbrefs[3]);
-    assertNull(dbrefs[3].getMap());
-
-    // dbrefs for second CDS second Uniprot xref
-    dbrefs = peptides.get(4).getDBRefs();
-    assertEquals(2, dbrefs.length);
-    assertEquals(new DBRefEntry(DBRefSource.UNIPROT, "0", "B0BCM3"),
-            dbrefs[0]);
-    assertNull(dbrefs[0].getMap());
-    assertEquals(DBRefSource.EMBL, dbrefs[1].getSource());
-    assertEquals("X07547", dbrefs[1].getAccessionId());
-    assertEquals(cds2Map.getInverse(), dbrefs[1].getMap().getMap());
-
-    // dbrefs for third CDS inferred EMBL product CAA12345.6
-    dbrefs = peptides.get(5).getDBRefs();
-    assertEquals(3, dbrefs.length);
-    assertEquals(DBRefSource.EMBL, dbrefs[0].getSource());
-    assertEquals("CAA12345.6", dbrefs[0].getAccessionId());
-    assertEquals(cds3Map.getInverse(), dbrefs[0].getMap().getMap());
-    assertEquals(DBRefSource.EMBLCDS, dbrefs[1].getSource());
-    assertEquals("CAA12345.6", dbrefs[1].getAccessionId());
-    assertEquals(proteinToCdsMap2, dbrefs[1].getMap().getMap());
-    assertEquals(DBRefSource.EMBLCDSProduct, dbrefs[2].getSource());
-    assertEquals("CAA12345.6", dbrefs[2].getAccessionId());
-    assertNull(dbrefs[2].getMap());
-  }
-
-  @Test(groups = "Functional")
-  public void testAdjustForProteinLength()
-  {
-    int[] exons = new int[] { 11, 15, 21, 25, 31, 38 }; // 18 bp
-
-    // exact length match:
-    assertSame(exons, EmblEntry.adjustForProteinLength(6, exons));
-
-    // match if we assume exons include stop codon not in protein:
-    assertSame(exons, EmblEntry.adjustForProteinLength(5, exons));
-
-    // truncate last exon by 6bp
-    int[] truncated = EmblEntry.adjustForProteinLength(4, exons);
-    assertEquals("[11, 15, 21, 25, 31, 32]", Arrays.toString(truncated));
-
-    // remove last exon and truncate preceding by 1bp
-    truncated = EmblEntry.adjustForProteinLength(3, exons);
-    assertEquals("[11, 15, 21, 24]", Arrays.toString(truncated));
-
-    // exact removal of exon case:
-    exons = new int[] { 11, 15, 21, 27, 33, 38 }; // 18 bp
-    truncated = EmblEntry.adjustForProteinLength(4, exons);
-    assertEquals("[11, 15, 21, 27]", Arrays.toString(truncated));
-
-    // what if exons are too short for protein?
-    truncated = EmblEntry.adjustForProteinLength(7, exons);
-    assertSame(exons, truncated);
-  }
-}
diff --git a/test/jalview/datamodel/xdb/embl/EmblFileTest.java b/test/jalview/datamodel/xdb/embl/EmblFileTest.java
deleted file mode 100644 (file)
index 7510de1..0000000
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * 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.datamodel.xdb.embl;
-
-import static org.testng.AssertJUnit.assertEquals;
-import static org.testng.AssertJUnit.assertNull;
-
-import jalview.datamodel.DBRefEntry;
-import jalview.gui.JvOptionPane;
-
-import java.util.Vector;
-
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-public class EmblFileTest
-{
-
-  @BeforeClass(alwaysRun = true)
-  public void setUpJvOptionPane()
-  {
-    JvOptionPane.setInteractiveMode(false);
-    JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
-  }
-
-  @Test(groups = { "Functional" })
-  public void testGetEmblFile()
-  {
-    Vector<EmblEntry> entries = EmblTestHelper.getEmblFile().getEntries();
-    assertEquals(1, entries.size());
-    EmblEntry entry = entries.get(0);
-
-    assertEquals("X07547", entry.getAccession());
-    assertEquals("C. trachomatis plasmid", entry.getDescription());
-    assertEquals("STD", entry.getDataClass());
-    assertEquals("PRO", entry.getTaxonomicDivision());
-    assertEquals("1999-02-10", entry.getLastUpdatedDate());
-    assertEquals("58", entry.getLastUpdatedRelease());
-    assertEquals("1988-11-10", entry.getFirstPublicDate());
-    assertEquals("18", entry.getFirstPublicRelease());
-    assertEquals("genomic DNA", entry.getMoleculeType());
-    assertEquals("1", entry.getSequenceVersion());
-    assertEquals("8", entry.getEntryVersion());
-    assertEquals("linear", entry.getTopology());
-    assertEquals("7499", entry.getSequenceLength());
-
-    /*
-     * FIXME these assertions fail - values are null - why?? Adding or removing
-     * attributes in the test XML modifies behaviour. eg. inserting an attribute
-     * _before_ lastUpdated results in a null value in this field.
-     */
-    assertEquals("1988-11-10", entry.getFirstPublicDate());
-    assertEquals("18", entry.getFirstPublicRelease());
-
-    assertEquals(2, entry.getKeywords().size());
-    assertEquals("plasmid", entry.getKeywords().get(0));
-    assertEquals("unidentified reading frame", entry.getKeywords().get(1));
-
-    /*
-     * dbrefs
-     */
-    assertEquals(2, entry.getDbRefs().size());
-    DBRefEntry dbref = entry.getDbRefs().get(0);
-    assertEquals("EuropePMC", dbref.getSource());
-    assertEquals("PMC107176", dbref.getAccessionId());
-    assertEquals("9573186", dbref.getVersion());
-    dbref = entry.getDbRefs().get(1);
-    assertEquals("MD5", dbref.getSource());
-    assertEquals("ac73317", dbref.getAccessionId());
-    // blank version has been converted to "0"
-    assertEquals("0", dbref.getVersion());
-
-    /*
-     * three sequence features for CDS
-     */
-    assertEquals(3, entry.getFeatures().size());
-    /*
-     * first CDS
-     */
-    EmblFeature ef = entry.getFeatures().get(0);
-    assertEquals("CDS", ef.getName());
-    assertEquals("complement(46..57)", ef.getLocation());
-    assertEquals(2, ef.getDbRefs().size());
-    dbref = ef.getDbRefs().get(0);
-    assertEquals("UniProtKB/Swiss-Prot", dbref.getSource());
-    assertEquals("B0BCM4", dbref.getAccessionId());
-    assertEquals("2.1", dbref.getVersion());
-    dbref = ef.getDbRefs().get(1);
-    assertEquals("UniProtKB/Swiss-Prot", dbref.getSource());
-    assertEquals("P0CE20", dbref.getAccessionId());
-    // blank version gets converted to "0":
-    assertEquals("0", dbref.getVersion());
-    // CDS feature qualifiers
-    assertEquals(3, ef.getQualifiers().size());
-    Qualifier q = ef.getQualifiers().get(0);
-    assertEquals("note", q.getName());
-    assertEquals(2, q.getValues().length);
-    assertEquals("ORF 8 (AA 1-330)", q.getValues()[0]);
-    assertEquals("pickle", q.getValues()[1]);
-    assertNull(q.getEvidence());
-    q = ef.getQualifiers().get(1);
-    assertEquals("protein_id", q.getName());
-    assertEquals(1, q.getValues().length);
-    assertEquals("CAA30420.1", q.getValues()[0]);
-    q = ef.getQualifiers().get(2);
-    assertEquals("translation", q.getName());
-    assertEquals(1, q.getValues().length);
-    assertEquals("MLCF", q.getValues()[0]);
-    assertEquals(1, q.getEvidence().length);
-    assertEquals("Keith", q.getEvidence()[0]);
-
-    /*
-     * second CDS
-     */
-    ef = entry.getFeatures().get(1);
-    assertEquals("CDS", ef.getName());
-    assertEquals("4..15", ef.getLocation());
-    assertEquals(1, ef.getDbRefs().size());
-    dbref = ef.getDbRefs().get(0);
-    assertEquals("UniProtKB/Swiss-Prot", dbref.getSource());
-    assertEquals("B0BCM3", dbref.getAccessionId());
-    assertEquals("0", dbref.getVersion());
-    assertEquals(2, ef.getQualifiers().size());
-    q = ef.getQualifiers().get(0);
-    assertEquals("protein_id", q.getName());
-    assertEquals(1, q.getValues().length);
-    assertEquals("CAA30421.1", q.getValues()[0]);
-    q = ef.getQualifiers().get(1);
-    assertEquals("translation", q.getName());
-    assertEquals(1, q.getValues().length);
-    assertEquals("MSSS", q.getValues()[0]);
-
-    /*
-     * third CDS
-     */
-    ef = entry.getFeatures().get(2);
-    assertEquals("CDS", ef.getName());
-    assertEquals("join(4..6,10..15)", ef.getLocation());
-    assertNull(ef.getDbRefs());
-    assertEquals(2, ef.getQualifiers().size());
-    q = ef.getQualifiers().get(0);
-    assertEquals("protein_id", q.getName());
-    assertEquals(1, q.getValues().length);
-    assertEquals("CAA12345.6", q.getValues()[0]);
-    q = ef.getQualifiers().get(1);
-    assertEquals("translation", q.getName());
-    assertEquals(1, q.getValues().length);
-    assertEquals("MSS", q.getValues()[0]);
-
-    /*
-     * Sequence - verify newline not converted to space (JAL-2029)
-     */
-    EmblSequence seq = entry.getSequence();
-    assertEquals(
-            "GGTATGTCCTCTAGTACAAACACCCCCAATATTGTGATATAATTAAAAACATAGCAT",
-            seq.getSequence());
-
-    /*
-     * getSequence() converts empty DBRefEntry.version to "0"
-     */
-    assertEquals("0", entry.getDbRefs().get(1).getVersion());
-    assertEquals("0", entry.getFeatures().get(0).getDbRefs().get(1)
-            .getVersion());
-  }
-}
diff --git a/test/jalview/datamodel/xdb/embl/EmblTestHelper.java b/test/jalview/datamodel/xdb/embl/EmblTestHelper.java
deleted file mode 100644 (file)
index 0c7624f..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * 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.datamodel.xdb.embl;
-
-import java.io.StringReader;
-
-public class EmblTestHelper
-{
-  // adapted from http://www.ebi.ac.uk/ena/data/view/X07547&display=xml
-  // dna and translations truncated for convenience
-  private static final String TESTDATA = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>"
-          + "<ROOT>"
-          + "<entry accession=\"X07547\" version=\"1\" entryVersion=\"8\""
-          + " dataClass=\"STD\" taxonomicDivision=\"PRO\""
-          + " moleculeType=\"genomic DNA\" sequenceLength=\"7499\" topology=\"linear\""
-          + " firstPublic=\"1988-11-10\" firstPublicRelease=\"18\""
-          + " lastUpdated=\"1999-02-10\" lastUpdatedRelease=\"58\">"
-          + "<secondaryAccession>X07574</secondaryAccession>"
-          + "<description>C. trachomatis plasmid</description>"
-          + "<keyword>plasmid</keyword><keyword>unidentified reading frame</keyword>"
-          + "<xref db=\"EuropePMC\" id=\"PMC107176\" secondaryId=\"9573186\" />"
-          + "<xref db=\"MD5\" id=\"ac73317\" />"
-          /*
-           * first CDS (range and translation changed to keep test data manageable)
-           */
-          + "<feature name=\"CDS\" location=\"complement(46..57)\">"
-          // test the case of >1 cross-ref to the same database (JAL-2029)
-          + "<xref db=\"UniProtKB/Swiss-Prot\" id=\"B0BCM4\" secondaryId=\"2.1\" />"
-          + "<xref db=\"UniProtKB/Swiss-Prot\" id=\"P0CE20\" />"
-          + "<qualifier name=\"note\"><value>ORF 8 (AA 1-330)</value><value>pickle</value></qualifier>"
-          + "<qualifier name=\"protein_id\"><value>CAA30420.1</value></qualifier>"
-          + "<qualifier name=\"translation\"><value>MLCF</value><evidence>Keith</evidence></qualifier>"
-          + "</feature>"
-          /*
-           * second CDS (range and translation changed to keep test data manageable)
-           */
-          + "<feature name=\"CDS\" location=\"4..15\">"
-          + "<xref db=\"UniProtKB/Swiss-Prot\" id=\"B0BCM3\" />"
-          + "<qualifier name=\"protein_id\"><value>CAA30421.1</value></qualifier>"
-          + "<qualifier name=\"translation\"><value>MSSS</value></qualifier>"
-          + "</feature>"
-          /*
-           * third CDS is made up - has no xref - code should synthesize 
-           * one to an assumed EMBLCDSPROTEIN accession
-           */
-          + "<feature name=\"CDS\" location=\"join(4..6,10..15)\">"
-          + "<qualifier name=\"protein_id\"><value>CAA12345.6</value></qualifier>"
-          + "<qualifier name=\"translation\"><value>MSS</value></qualifier>"
-          + "</feature>"
-          /*
-           * sequence (modified for test purposes)
-           * emulates EMBL XML 1.2 which splits sequence data every 60 characters
-           * see EmblSequence.setSequence
-           */
-          + "<sequence>GGTATGTCCTCTAGTACAAAC\n"
-          + "ACCCCCAATATTGTGATATAATTAAAAACATAGCAT"
-          + "</sequence></entry></ROOT>";
-
-  static EmblFile getEmblFile()
-  {
-    return EmblFile.getEmblFile(new StringReader(TESTDATA));
-  }
-}
index c9d8deb..9e9d9a4 100644 (file)
@@ -79,19 +79,19 @@ public class EnsemblCdnaTest
     // exon at (start+10000) length 501
     SequenceFeature sf = new SequenceFeature("exon", "", 20000, 20500, 0f,
             null);
-    sf.setValue("Parent", "transcript:" + transcriptId);
+    sf.setValue("Parent", transcriptId);
     sf.setStrand("-");
     genomic.addSequenceFeature(sf);
 
     // exon (sub-type) at (start + exon_variant) length 101
     sf = new SequenceFeature("coding_exon", "", 10500, 10600, 0f, null);
-    sf.setValue("Parent", "transcript:" + transcriptId);
+    sf.setValue("Parent", transcriptId);
     sf.setStrand("-");
     genomic.addSequenceFeature(sf);
 
     // exon belonging to a different transcript doesn't count
     sf = new SequenceFeature("exon", "", 11500, 12600, 0f, null);
-    sf.setValue("Parent", "transcript:anotherOne");
+    sf.setValue("Parent", "anotherOne");
     genomic.addSequenceFeature(sf);
 
     // transcript feature doesn't count
@@ -134,19 +134,19 @@ public class EnsemblCdnaTest
     // exon at (start+10000) length 501
     SequenceFeature sf = new SequenceFeature("exon", "", 20000, 20500, 0f,
             null);
-    sf.setValue("Parent", "transcript:" + transcriptId);
+    sf.setValue("Parent", transcriptId);
     sf.setStrand("+");
     genomic.addSequenceFeature(sf);
 
     // exon (sub-type) at (start + exon_variant) length 101
     sf = new SequenceFeature("coding_exon", "", 10500, 10600, 0f, null);
-    sf.setValue("Parent", "transcript:" + transcriptId);
+    sf.setValue("Parent", transcriptId);
     sf.setStrand("+");
     genomic.addSequenceFeature(sf);
 
     // exon belonging to a different transcript doesn't count
     sf = new SequenceFeature("exon", "", 11500, 12600, 0f, null);
-    sf.setValue("Parent", "transcript:anotherOne");
+    sf.setValue("Parent", "anotherOne");
     genomic.addSequenceFeature(sf);
 
     // transcript feature doesn't count
@@ -226,14 +226,14 @@ public class EnsemblCdnaTest
     assertTrue(testee.retainFeature(sf, accId));
 
     // other feature with desired parent is retained
-    sf.setValue("Parent", "transcript:" + accId);
+    sf.setValue("Parent", accId);
     assertTrue(testee.retainFeature(sf, accId));
 
     // test is not case-sensitive
     assertTrue(testee.retainFeature(sf, accId.toLowerCase()));
 
     // feature with wrong parent is not retained
-    sf.setValue("Parent", "transcript:XYZ");
+    sf.setValue("Parent", "XYZ");
     assertFalse(testee.retainFeature(sf, accId));
   }
 
@@ -253,30 +253,30 @@ public class EnsemblCdnaTest
 
     // exon with wrong parent: not valid
     SequenceFeature sf2 = new SequenceFeature("exon", "", 1, 2, 0f, null);
-    sf2.setValue("Parent", "transcript:XYZ");
+    sf2.setValue("Parent", "XYZ");
     seq.addSequenceFeature(sf2);
 
     // exon with right parent is valid
     SequenceFeature sf3 = new SequenceFeature("exon", "", 1, 2, 0f, null);
-    sf3.setValue("Parent", "transcript:" + accId);
+    sf3.setValue("Parent", accId);
     seq.addSequenceFeature(sf3);
 
     // exon sub-type with right parent is valid
     SequenceFeature sf4 = new SequenceFeature("coding_exon", "", 1, 2, 0f,
             null);
-    sf4.setValue("Parent", "transcript:" + accId);
+    sf4.setValue("Parent", accId);
     seq.addSequenceFeature(sf4);
 
     // transcript not valid:
     SequenceFeature sf5 = new SequenceFeature("transcript", "", 1, 2, 0f,
             null);
-    sf5.setValue("Parent", "transcript:" + accId);
+    sf5.setValue("Parent", accId);
     seq.addSequenceFeature(sf5);
 
     // CDS not valid:
     SequenceFeature sf6 = new SequenceFeature("transcript", "", 1, 2, 0f,
             null);
-    sf6.setValue("Parent", "transcript:" + accId);
+    sf6.setValue("Parent", accId);
     seq.addSequenceFeature(sf6);
 
     List<SequenceFeature> sfs = new EnsemblCdna()
index a44ab7f..e7574eb 100644 (file)
@@ -78,19 +78,19 @@ public class EnsemblCdsTest
     // CDS at (start+10000) length 501
     SequenceFeature sf = new SequenceFeature("CDS", "", 20000, 20500, 0f,
             null);
-    sf.setValue("Parent", "transcript:" + transcriptId);
+    sf.setValue("Parent", transcriptId);
     sf.setStrand("+");
     genomic.addSequenceFeature(sf);
 
     // CDS (sub-type) at (start + 10500) length 101
     sf = new SequenceFeature("CDS_predicted", "", 10500, 10600, 0f, null);
-    sf.setValue("Parent", "transcript:" + transcriptId);
+    sf.setValue("Parent", transcriptId);
     sf.setStrand("+");
     genomic.addSequenceFeature(sf);
 
     // CDS belonging to a different transcript doesn't count
     sf = new SequenceFeature("CDS", "", 11500, 12600, 0f, null);
-    sf.setValue("Parent", "transcript:anotherOne");
+    sf.setValue("Parent", "anotherOne");
     genomic.addSequenceFeature(sf);
 
     // exon feature doesn't count
@@ -135,16 +135,16 @@ public class EnsemblCdsTest
     assertFalse(testee.retainFeature(sf, accId));
 
     // other feature with no parent is retained
-    sf = new SequenceFeature("CDS_psequence_variantredicted", "", 20000,
+    sf = new SequenceFeature("anotherType", "", 20000,
             20500, 0f, null);
     assertTrue(testee.retainFeature(sf, accId));
 
     // other feature with desired parent is retained
-    sf.setValue("Parent", "transcript:" + accId);
+    sf.setValue("Parent", accId);
     assertTrue(testee.retainFeature(sf, accId));
 
     // feature with wrong parent is not retained
-    sf.setValue("Parent", "transcript:XYZ");
+    sf.setValue("Parent", "XYZ");
     assertFalse(testee.retainFeature(sf, accId));
   }
 
@@ -164,29 +164,29 @@ public class EnsemblCdsTest
 
     // cds with wrong parent not valid
     SequenceFeature sf2 = new SequenceFeature("CDS", "", 1, 2, 0f, null);
-    sf2.setValue("Parent", "transcript:XYZ");
+    sf2.setValue("Parent", "XYZ");
     seq.addSequenceFeature(sf2);
 
     // cds with right parent is valid
     SequenceFeature sf3 = new SequenceFeature("CDS", "", 1, 2, 0f, null);
-    sf3.setValue("Parent", "transcript:" + accId);
+    sf3.setValue("Parent", accId);
     seq.addSequenceFeature(sf3);
 
     // cds sub-type with right parent is valid
     SequenceFeature sf4 = new SequenceFeature("CDS_predicted", "", 1, 2, 0f,
             null);
-    sf4.setValue("Parent", "transcript:" + accId);
+    sf4.setValue("Parent", accId);
     seq.addSequenceFeature(sf4);
 
     // transcript not valid:
     SequenceFeature sf5 = new SequenceFeature("transcript", "", 1, 2, 0f,
             null);
-    sf5.setValue("Parent", "transcript:" + accId);
+    sf5.setValue("Parent", accId);
     seq.addSequenceFeature(sf5);
 
     // exon not valid:
     SequenceFeature sf6 = new SequenceFeature("exon", "", 1, 2, 0f, null);
-    sf6.setValue("Parent", "transcript:" + accId);
+    sf6.setValue("Parent", accId);
     seq.addSequenceFeature(sf6);
 
     List<SequenceFeature> sfs = new EnsemblCds().getIdentifyingFeatures(seq,
index 446b4f7..8b1e840 100644 (file)
@@ -81,7 +81,7 @@ public class EnsemblGeneTest
     // gene at (start + 10500) length 101
     SequenceFeature sf = new SequenceFeature("gene", "", 10500, 10600, 0f,
             null);
-    sf.setValue("ID", "gene:" + geneId);
+    sf.setValue("id", geneId);
     sf.setStrand("+");
     genomic.addSequenceFeature(sf);
 
@@ -113,7 +113,7 @@ public class EnsemblGeneTest
     // gene at (start + 10500) length 101
     SequenceFeature sf = new SequenceFeature("gene", "", 10500, 10600, 0f,
             null);
-    sf.setValue("ID", "gene:" + geneId);
+    sf.setValue("id", geneId);
     sf.setStrand("+");
     genomic.addSequenceFeature(sf);
 
@@ -146,30 +146,30 @@ public class EnsemblGeneTest
     // transcript feature
     SequenceFeature sf1 = new SequenceFeature("transcript", "", 20000,
             20500, 0f, null);
-    sf1.setValue("Parent", "gene:" + geneId);
-    sf1.setValue("transcript_id", "transcript1");
+    sf1.setValue("Parent", geneId);
+    sf1.setValue("id", "transcript1");
     genomic.addSequenceFeature(sf1);
 
     // transcript sub-type feature
     SequenceFeature sf2 = new SequenceFeature("snRNA", "", 21000, 21500,
             0f, null);
-    sf2.setValue("Parent", "gene:" + geneId);
-    sf2.setValue("transcript_id", "transcript2");
+    sf2.setValue("Parent", geneId);
+    sf2.setValue("id", "transcript2");
     genomic.addSequenceFeature(sf2);
 
     // NMD_transcript_variant treated like transcript in Ensembl
     SequenceFeature sf3 = new SequenceFeature("NMD_transcript_variant", "",
             22000, 22500, 0f, null);
     // id matching should not be case-sensitive
-    sf3.setValue("Parent", "gene:" + geneId.toLowerCase());
-    sf3.setValue("transcript_id", "transcript3");
+    sf3.setValue("Parent", geneId.toLowerCase());
+    sf3.setValue("id", "transcript3");
     genomic.addSequenceFeature(sf3);
 
     // transcript for a different gene - ignored
     SequenceFeature sf4 = new SequenceFeature("snRNA", "", 23000, 23500,
             0f, null);
-    sf4.setValue("Parent", "gene:XYZ");
-    sf4.setValue("transcript_id", "transcript4");
+    sf4.setValue("Parent", "XYZ");
+    sf4.setValue("id", "transcript4");
     genomic.addSequenceFeature(sf4);
 
     EnsemblGene testee = new EnsemblGene();
@@ -196,24 +196,24 @@ public class EnsemblGeneTest
     EnsemblGene testee = new EnsemblGene();
     SequenceFeature sf = new SequenceFeature("gene", "", 20000, 20500, 0f,
             null);
-    sf.setValue("ID", "gene:" + geneId);
+    sf.setValue("id", geneId);
     assertFalse(testee.retainFeature(sf, geneId));
 
     sf = new SequenceFeature("transcript", "", 20000, 20500, 0f, null);
-    sf.setValue("Parent", "gene:" + geneId);
+    sf.setValue("Parent", geneId);
     assertTrue(testee.retainFeature(sf, geneId));
 
     sf = new SequenceFeature("mature_transcript", "", 20000, 20500, 0f,
             null);
-    sf.setValue("Parent", "gene:" + geneId);
+    sf.setValue("Parent", geneId);
     assertTrue(testee.retainFeature(sf, geneId));
 
     sf = new SequenceFeature("NMD_transcript_variant", "", 20000, 20500,
             0f, null);
-    sf.setValue("Parent", "gene:" + geneId);
+    sf.setValue("Parent", geneId);
     assertTrue(testee.retainFeature(sf, geneId));
 
-    sf.setValue("Parent", "gene:XYZ");
+    sf.setValue("Parent", "ßXYZ");
     assertFalse(testee.retainFeature(sf, geneId));
 
     sf = new SequenceFeature("anything", "", 20000, 20500, 0f, null);
@@ -235,28 +235,28 @@ public class EnsemblGeneTest
     seq.addSequenceFeature(sf1);
 
     // gene with wrong ID not valid
-    SequenceFeature sf2 = new SequenceFeature("gene", "", 1, 2, 0f, null);
-    sf2.setValue("ID", "gene:XYZ");
+    SequenceFeature sf2 = new SequenceFeature("gene", "a", 1, 2, 0f, null);
+    sf2.setValue("id", "XYZ");
     seq.addSequenceFeature(sf2);
 
     // gene with right ID is valid
-    SequenceFeature sf3 = new SequenceFeature("gene", "", 1, 2, 0f, null);
-    sf3.setValue("ID", "gene:" + accId);
+    SequenceFeature sf3 = new SequenceFeature("gene", "b", 1, 2, 0f, null);
+    sf3.setValue("id", accId);
     seq.addSequenceFeature(sf3);
 
     // gene sub-type with right ID is valid
     SequenceFeature sf4 = new SequenceFeature("snRNA_gene", "", 1, 2, 0f, null);
-    sf4.setValue("ID", "gene:" + accId);
+    sf4.setValue("id", accId);
     seq.addSequenceFeature(sf4);
 
     // transcript not valid:
     SequenceFeature sf5 = new SequenceFeature("transcript", "", 1, 2, 0f, null);
-    sf5.setValue("ID", "gene:" + accId);
+    sf5.setValue("id", accId);
     seq.addSequenceFeature(sf5);
 
     // exon not valid:
     SequenceFeature sf6 = new SequenceFeature("exon", "", 1, 2, 0f, null);
-    sf6.setValue("ID", "gene:" + accId);
+    sf6.setValue("id", accId);
     seq.addSequenceFeature(sf6);
     
     List<SequenceFeature> sfs = new EnsemblGene()
index 72ee492..11140f9 100644 (file)
@@ -77,13 +77,13 @@ public class EnsemblGenomeTest
     // transcript at (start+10000) length 501
     SequenceFeature sf = new SequenceFeature("transcript", "", 20000,
             20500, 0f, null);
-    sf.setValue("ID", "transcript:" + transcriptId);
+    sf.setValue("id", transcriptId);
     sf.setStrand("+");
     genomic.addSequenceFeature(sf);
 
     // transcript (sub-type) at (start + 10500) length 101
     sf = new SequenceFeature("ncRNA", "", 10500, 10600, 0f, null);
-    sf.setValue("ID", "transcript:" + transcriptId);
+    sf.setValue("id", transcriptId);
     sf.setStrand("+");
     genomic.addSequenceFeature(sf);
 
@@ -91,13 +91,13 @@ public class EnsemblGenomeTest
     // although strictly it is a sequence_variant in SO
     sf = new SequenceFeature("NMD_transcript_variant", "", 11000, 12000,
             0f, null);
-    sf.setValue("ID", "transcript:" + transcriptId);
+    sf.setValue("id", transcriptId);
     sf.setStrand("+");
     genomic.addSequenceFeature(sf);
 
     // transcript with a different ID doesn't count
     sf = new SequenceFeature("transcript", "", 11500, 12600, 0f, null);
-    sf.setValue("ID", "transcript:anotherOne");
+    sf.setValue("id", "anotherOne");
     genomic.addSequenceFeature(sf);
 
     // parent of transcript feature doesn't count
@@ -150,11 +150,11 @@ public class EnsemblGenomeTest
     assertTrue(testee.retainFeature(sf, accId));
 
     // other feature with correct parent is kept
-    sf.setValue("Parent", "transcript:" + accId);
+    sf.setValue("Parent", accId);
     assertTrue(testee.retainFeature(sf, accId));
 
     // other feature with wrong parent is not kept
-    sf.setValue("Parent", "transcript:XYZ");
+    sf.setValue("Parent", "XYZ");
     assertFalse(testee.retainFeature(sf, accId));
   }
 
@@ -174,36 +174,37 @@ public class EnsemblGenomeTest
     seq.addSequenceFeature(sf1);
 
     // transcript with wrong ID not valid
-    SequenceFeature sf2 = new SequenceFeature("transcript", "", 1, 2, 0f,
+    // NB change desc to avoid rejection of duplicate feature!
+    SequenceFeature sf2 = new SequenceFeature("transcript", "a", 1, 2, 0f,
             null);
-    sf2.setValue("ID", "transcript");
+    sf2.setValue("id", "transcript");
     seq.addSequenceFeature(sf2);
 
     // transcript with right ID is valid
-    SequenceFeature sf3 = new SequenceFeature("transcript", "", 1, 2, 0f,
+    SequenceFeature sf3 = new SequenceFeature("transcript", "b", 1, 2, 0f,
             null);
-    sf3.setValue("ID", "transcript:" + accId);
+    sf3.setValue("id", accId);
     seq.addSequenceFeature(sf3);
 
     // transcript sub-type with right ID is valid
     SequenceFeature sf4 = new SequenceFeature("ncRNA", "", 1, 2, 0f, null);
-    sf4.setValue("ID", "transcript:" + accId);
+    sf4.setValue("id", accId);
     seq.addSequenceFeature(sf4);
 
     // Ensembl treats NMD_transcript_variant as if a transcript
     SequenceFeature sf5 = new SequenceFeature("NMD_transcript_variant", "",
             1, 2, 0f, null);
-    sf5.setValue("ID", "transcript:" + accId);
+    sf5.setValue("id", accId);
     seq.addSequenceFeature(sf5);
 
     // gene not valid:
     SequenceFeature sf6 = new SequenceFeature("gene", "", 1, 2, 0f, null);
-    sf6.setValue("ID", "transcript:" + accId);
+    sf6.setValue("id", accId);
     seq.addSequenceFeature(sf6);
 
     // exon not valid:
     SequenceFeature sf7 = new SequenceFeature("exon", "", 1, 2, 0f, null);
-    sf7.setValue("ID", "transcript:" + accId);
+    sf7.setValue("id", accId);
     seq.addSequenceFeature(sf7);
 
     List<SequenceFeature> sfs = new EnsemblGenome()
index 69b2ad4..17e92c8 100644 (file)
@@ -234,30 +234,4 @@ public class EnsemblSeqProxyTest
     // verify attributes string is updated with reverse complement
     assertEquals("x=y,z;alleles=" + revcomp + ";a=b,c", sf.getAttributes());
   }
-
-  @Test(groups = "Functional")
-  public void testSortFeatures()
-  {
-    SequenceFeature sf1 = new SequenceFeature("", "", 10, 15, 0f, null);
-    SequenceFeature sf2 = new SequenceFeature("", "", 8, 12, 0f, null);
-    SequenceFeature sf3 = new SequenceFeature("", "", 8, 13, 0f, null);
-    SequenceFeature sf4 = new SequenceFeature("", "", 11, 11, 0f, null);
-    List<SequenceFeature> sfs = Arrays.asList(new SequenceFeature[] { sf1,
-        sf2, sf3, sf4 });
-
-    // sort by start position ascending (forward strand)
-    // sf2 and sf3 tie and should not be reordered by sorting
-    SequenceFeatures.sortFeatures(sfs, true);
-    assertSame(sfs.get(0), sf2);
-    assertSame(sfs.get(1), sf3);
-    assertSame(sfs.get(2), sf1);
-    assertSame(sfs.get(3), sf4);
-
-    // sort by end position descending (reverse strand)
-    SequenceFeatures.sortFeatures(sfs, false);
-    assertSame(sfs.get(0), sf1);
-    assertSame(sfs.get(1), sf3);
-    assertSame(sfs.get(2), sf2);
-    assertSame(sfs.get(3), sf4);
-  }
 }
index b0aaab9..454ff61 100644 (file)
@@ -20,6 +20,7 @@
  */
 package jalview.gui;
 
+import static org.junit.Assert.assertNotEquals;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertFalse;
 import static org.testng.Assert.assertNotSame;
@@ -38,7 +39,7 @@ import jalview.datamodel.SequenceGroup;
 import jalview.datamodel.SequenceI;
 import jalview.io.DataSourceType;
 import jalview.io.FileLoader;
-import jalview.io.Jalview2xmlTests;
+import jalview.project.Jalview2xmlTests;
 import jalview.renderer.ResidueShaderI;
 import jalview.schemes.BuriedColourScheme;
 import jalview.schemes.FeatureColour;
@@ -118,7 +119,8 @@ public class AlignFrameTest
      * seq1 feature in columns 1-5 is hidden
      * seq2 feature in columns 6-10 is shown
      */
-    FeatureColourI fc = new FeatureColour(Color.red, Color.blue, 0f, 10f);
+    FeatureColourI fc = new FeatureColour(null, Color.red, Color.blue, null,
+            0f, 10f);
     fc.setAboveThreshold(true);
     fc.setThreshold(5f);
     alignFrame.getFeatureRenderer().setColour("Metal", fc);
@@ -599,4 +601,26 @@ public class AlignFrameTest
     sp.valueChanged(22);
     assertEquals(av2.getResidueShading().getConservationInc(), 22);
   }
+
+  /**
+   * Verify that making a New View preserves the dataset reference for the
+   * alignment. Otherwise, see a 'duplicate jar entry' reference when trying to
+   * save alignments with multiple views, and codon mappings will not be shared
+   * across all panels in a split frame.
+   * 
+   * @see Jalview2xmlTests#testStoreAndRecoverColourThresholds()
+   */
+  @Test(groups = "Functional")
+  public void testNewView_dsRefPreserved()
+  {
+    AlignViewport av = af.getViewport();
+    AlignmentI al = av.getAlignment();
+    AlignmentI original_ds = al.getDataset();
+    af.newView_actionPerformed(null);
+    assertNotEquals("New view didn't select the a new panel", av,
+            af.getViewport());
+    org.testng.Assert.assertEquals(original_ds,
+            af.getViewport().getAlignment().getDataset(),
+            "Dataset was not preserved in new view");
+  }
 }
index 7801250..959abb0 100644 (file)
@@ -23,6 +23,7 @@ package jalview.gui;
 import static org.testng.AssertJUnit.assertEquals;
 import static org.testng.AssertJUnit.assertFalse;
 import static org.testng.AssertJUnit.assertNotNull;
+import static org.testng.AssertJUnit.assertNotSame;
 import static org.testng.AssertJUnit.assertSame;
 import static org.testng.AssertJUnit.assertTrue;
 
@@ -33,8 +34,6 @@ import jalview.datamodel.Alignment;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.Annotation;
-import jalview.datamodel.PDBEntry;
-import jalview.datamodel.PDBEntry.Type;
 import jalview.datamodel.SearchResults;
 import jalview.datamodel.SearchResultsI;
 import jalview.datamodel.Sequence;
@@ -42,6 +41,7 @@ import jalview.datamodel.SequenceGroup;
 import jalview.datamodel.SequenceI;
 import jalview.io.DataSourceType;
 import jalview.io.FileLoader;
+import jalview.schemes.ClustalxColourScheme;
 import jalview.schemes.ColourSchemeI;
 import jalview.schemes.PIDColourScheme;
 import jalview.structure.StructureSelectionManager;
@@ -333,9 +333,34 @@ public class AlignViewportTest
     AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(
             "examples/uniref50.fa", DataSourceType.FILE);
     ColourSchemeI cs = new PIDColourScheme();
-    af.getViewport().setGlobalColourScheme(cs);
-    assertFalse(af.getViewport().getResidueShading()
+    AlignViewport viewport = af.getViewport();
+    viewport.setGlobalColourScheme(cs);
+    assertFalse(viewport.getResidueShading()
             .conservationApplied());
+
+    /*
+     * JAL-3201 groups have their own ColourSchemeI instances
+     */
+    AlignmentI aln = viewport.getAlignment();
+    SequenceGroup sg1 = new SequenceGroup();
+    sg1.addSequence(aln.getSequenceAt(0), false);
+    sg1.addSequence(aln.getSequenceAt(2), false);
+    SequenceGroup sg2 = new SequenceGroup();
+    sg2.addSequence(aln.getSequenceAt(1), false);
+    sg2.addSequence(aln.getSequenceAt(3), false);
+    aln.addGroup(sg1);
+    aln.addGroup(sg2);
+    viewport.setColourAppliesToAllGroups(true);
+    viewport.setGlobalColourScheme(new ClustalxColourScheme());
+    ColourSchemeI cs0 = viewport.getGlobalColourScheme();
+    ColourSchemeI cs1 = sg1.getColourScheme();
+    ColourSchemeI cs2 = sg2.getColourScheme();
+    assertTrue(cs0 instanceof ClustalxColourScheme);
+    assertTrue(cs1 instanceof ClustalxColourScheme);
+    assertTrue(cs2 instanceof ClustalxColourScheme);
+    assertNotSame(cs0, cs1);
+    assertNotSame(cs0, cs2);
+    assertNotSame(cs1, cs2);
   }
 
   @Test(groups = { "Functional" })
diff --git a/test/jalview/gui/AnnotationLabelsTest.java b/test/jalview/gui/AnnotationLabelsTest.java
new file mode 100644 (file)
index 0000000..616a1a6
--- /dev/null
@@ -0,0 +1,153 @@
+package jalview.gui;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNull;
+
+import jalview.datamodel.AlignmentAnnotation;
+import jalview.datamodel.Sequence;
+
+import org.testng.annotations.Test;
+
+public class AnnotationLabelsTest
+{
+  @Test(groups = "Functional")
+  public void testGetTooltip()
+  {
+    assertNull(AnnotationLabels.getTooltip(null));
+
+    /*
+     * simple description only
+     */
+    AlignmentAnnotation ann = new AlignmentAnnotation("thelabel", "thedesc",
+            null);
+    String expected = "<html>thedesc</html>";
+    assertEquals(AnnotationLabels.getTooltip(ann), expected);
+
+    /*
+     * description needing html encoding
+     * (no idea why '<' is encoded but '>' is not)
+     */
+    ann.description = "TCoffee scores < 56 and > 28";
+    expected = "<html>TCoffee scores &lt; 56 and > 28</html>";
+    assertEquals(AnnotationLabels.getTooltip(ann), expected);
+
+    /*
+     * description already html formatted
+     */
+    ann.description = "<html>hello world</html>";
+    assertEquals(AnnotationLabels.getTooltip(ann), ann.description);
+
+    /*
+     * simple description and score
+     */
+    ann.description = "hello world";
+    ann.setScore(2.34d);
+    expected = "<html>hello world<br/> Score: 2.34</html>";
+    assertEquals(AnnotationLabels.getTooltip(ann), expected);
+
+    /*
+     * html description and score
+     */
+    ann.description = "<html>hello world</html>";
+    ann.setScore(2.34d);
+    expected = "<html>hello world<br/> Score: 2.34</html>";
+    assertEquals(AnnotationLabels.getTooltip(ann), expected);
+
+    /*
+     * score, no description
+     */
+    ann.description = " ";
+    assertEquals(AnnotationLabels.getTooltip(ann),
+            "<html> Score: 2.34</html>");
+    ann.description = null;
+    assertEquals(AnnotationLabels.getTooltip(ann),
+            "<html> Score: 2.34</html>");
+    
+    /*
+     * sequenceref, simple description
+     */
+    ann.description = "Count < 12";
+    ann.sequenceRef = new Sequence("Seq1", "MLRIQST");
+    ann.hasScore = false;
+    ann.score = Double.NaN;
+    expected = "<html>Seq1 : Count &lt; 12</html>";
+    assertEquals(AnnotationLabels.getTooltip(ann), expected);
+
+    /*
+     * sequenceref, html description, score
+     */
+    ann.description = "<html>Score < 4.8</html>";
+    ann.sequenceRef = new Sequence("Seq1", "MLRIQST");
+    ann.setScore(-2.1D);
+    expected = "<html>Seq1 : Score < 4.8<br/> Score: -2.1</html>";
+    assertEquals(AnnotationLabels.getTooltip(ann), expected);
+
+    /*
+     * no score, null description
+     */
+    ann.description = null;
+    ann.hasScore = false;
+    ann.score = Double.NaN;
+    assertNull(AnnotationLabels.getTooltip(ann));
+
+    /*
+     * no score, empty description, sequenceRef
+     */
+    ann.description = "";
+    assertEquals(AnnotationLabels.getTooltip(ann), "<html>Seq1 :</html>");
+
+    /*
+     * no score, empty description, no sequenceRef
+     */
+    ann.sequenceRef = null;
+    assertNull(AnnotationLabels.getTooltip(ann));
+  }
+
+  @Test(groups = "Functional")
+  public void testGetStatusMessage()
+  {
+    assertNull(AnnotationLabels.getStatusMessage(null, null));
+
+    /*
+     * simple label
+     */
+    AlignmentAnnotation aa = new AlignmentAnnotation("IUPredWS Short",
+            "Protein disorder", null);
+    assertEquals(AnnotationLabels.getStatusMessage(aa, null),
+            "IUPredWS Short");
+
+    /*
+     * with sequence ref
+     */
+    aa.setSequenceRef(new Sequence("FER_CAPAA", "MIGRKQL"));
+    assertEquals(AnnotationLabels.getStatusMessage(aa, null),
+            "FER_CAPAA : IUPredWS Short");
+
+    /*
+     * with graph group (degenerate, one annotation only)
+     */
+    aa.graphGroup = 1;
+    AlignmentAnnotation aa2 = new AlignmentAnnotation("IUPredWS Long",
+            "Protein disorder", null);
+    assertEquals(
+            AnnotationLabels.getStatusMessage(aa, new AlignmentAnnotation[]
+            { aa, aa2 }), "FER_CAPAA : IUPredWS Short");
+
+    /*
+     * graph group with two members; note labels are appended in
+     * reverse order (matching rendering order on screen)
+     */
+    aa2.graphGroup = 1;
+    assertEquals(
+            AnnotationLabels.getStatusMessage(aa, new AlignmentAnnotation[]
+            { aa, aa2 }), "FER_CAPAA : IUPredWS Long, IUPredWS Short");
+
+    /*
+     * graph group with no sequence ref
+     */
+    aa.sequenceRef = null;
+    assertEquals(
+            AnnotationLabels.getStatusMessage(aa, new AlignmentAnnotation[]
+            { aa, aa2 }), "IUPredWS Long, IUPredWS Short");
+  }
+}
diff --git a/test/jalview/gui/AnnotationPanelTest.java b/test/jalview/gui/AnnotationPanelTest.java
new file mode 100644 (file)
index 0000000..5f7d5a7
--- /dev/null
@@ -0,0 +1,51 @@
+package jalview.gui;
+
+import static org.testng.Assert.assertEquals;
+
+import jalview.datamodel.AlignmentAnnotation;
+
+import org.testng.annotations.Test;
+
+public class AnnotationPanelTest
+{
+
+  @Test(groups = "Functional")
+  public void testGetRowIndex()
+  {
+    assertEquals(AnnotationPanel.getRowIndex(0, null), -1);
+
+    AlignmentAnnotation[] anns = new AlignmentAnnotation[] {};
+    assertEquals(AnnotationPanel.getRowIndex(0, anns), -1);
+
+    AlignmentAnnotation ann1 = new AlignmentAnnotation(null, null, null);
+    AlignmentAnnotation ann2 = new AlignmentAnnotation(null, null, null);
+    AlignmentAnnotation ann3 = new AlignmentAnnotation(null, null, null);
+    ann1.visible = true;
+    ann2.visible = true;
+    ann3.visible = true;
+    ann1.height = 10;
+    ann2.height = 20;
+    ann3.height = 30;
+    anns = new AlignmentAnnotation[] { ann1, ann2, ann3 };
+
+    assertEquals(AnnotationPanel.getRowIndex(0, anns), 0);
+    assertEquals(AnnotationPanel.getRowIndex(9, anns), 0);
+    assertEquals(AnnotationPanel.getRowIndex(10, anns), 1);
+    assertEquals(AnnotationPanel.getRowIndex(29, anns), 1);
+    assertEquals(AnnotationPanel.getRowIndex(30, anns), 2);
+    assertEquals(AnnotationPanel.getRowIndex(59, anns), 2);
+    assertEquals(AnnotationPanel.getRowIndex(60, anns), -1);
+
+    ann2.visible = false;
+    assertEquals(AnnotationPanel.getRowIndex(0, anns), 0);
+    assertEquals(AnnotationPanel.getRowIndex(9, anns), 0);
+    assertEquals(AnnotationPanel.getRowIndex(10, anns), 2);
+    assertEquals(AnnotationPanel.getRowIndex(39, anns), 2);
+    assertEquals(AnnotationPanel.getRowIndex(40, anns), -1);
+
+    ann1.visible = false;
+    assertEquals(AnnotationPanel.getRowIndex(0, anns), 2);
+    assertEquals(AnnotationPanel.getRowIndex(29, anns), 2);
+    assertEquals(AnnotationPanel.getRowIndex(30, anns), -1);
+  }
+}
diff --git a/test/jalview/gui/CalculationChooserTest.java b/test/jalview/gui/CalculationChooserTest.java
new file mode 100644 (file)
index 0000000..6c2e777
--- /dev/null
@@ -0,0 +1,98 @@
+package jalview.gui;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertSame;
+
+import jalview.analysis.scoremodels.ScoreModels;
+import jalview.api.analysis.ScoreModelI;
+import jalview.bin.Cache;
+
+import java.util.List;
+
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+public class CalculationChooserTest
+{
+  @BeforeClass(alwaysRun = true)
+  public void setUp()
+  {
+    // read-only Jalview properties
+    Cache.loadProperties("test/jalview/io/testProps.jvprops");
+    Cache.applicationProperties.setProperty("BLOSUM62_PCA_FOR_NUCLEOTIDE",
+            Boolean.FALSE.toString());
+  }
+
+  @Test(groups = "Functional")
+  public void testGetApplicableScoreModels()
+  {
+    ScoreModels models = ScoreModels.getInstance();
+    ScoreModelI blosum62 = models.getBlosum62();
+    ScoreModelI pam250 = models.getPam250();
+    ScoreModelI dna = models.getDefaultModel(false);
+
+    /*
+     * peptide models for PCA
+     */
+    List<ScoreModelI> filtered = CalculationChooser
+            .getApplicableScoreModels(false, true);
+    assertEquals(filtered.size(), 4);
+    assertSame(filtered.get(0), blosum62);
+    assertSame(filtered.get(1), pam250);
+    assertEquals(filtered.get(2).getName(), "PID");
+    assertEquals(filtered.get(3).getName(), "Sequence Feature Similarity");
+
+    /*
+     * peptide models for Tree are the same
+     */
+    filtered = CalculationChooser.getApplicableScoreModels(false, false);
+    assertEquals(filtered.size(), 4);
+    assertSame(filtered.get(0), blosum62);
+    assertSame(filtered.get(1), pam250);
+    assertEquals(filtered.get(2).getName(), "PID");
+    assertEquals(filtered.get(3).getName(), "Sequence Feature Similarity");
+
+    /*
+     * nucleotide models for PCA
+     */
+    filtered = CalculationChooser.getApplicableScoreModels(true, true);
+    assertEquals(filtered.size(), 3);
+    assertSame(filtered.get(0), dna);
+    assertEquals(filtered.get(1).getName(), "PID");
+    assertEquals(filtered.get(2).getName(), "Sequence Feature Similarity");
+
+    /*
+     * nucleotide models for Tree are the same
+     */
+    filtered = CalculationChooser.getApplicableScoreModels(true, false);
+    assertEquals(filtered.size(), 3);
+    assertSame(filtered.get(0), dna);
+    assertEquals(filtered.get(1).getName(), "PID");
+    assertEquals(filtered.get(2).getName(), "Sequence Feature Similarity");
+
+    /*
+     * enable inclusion of BLOSUM62 for nucleotide PCA (JAL-2962)
+     */
+    Cache.applicationProperties.setProperty("BLOSUM62_PCA_FOR_NUCLEOTIDE",
+            Boolean.TRUE.toString());
+
+    /*
+     * nucleotide models for Tree are unchanged
+     */
+    filtered = CalculationChooser.getApplicableScoreModels(true, false);
+    assertEquals(filtered.size(), 3);
+    assertSame(filtered.get(0), dna);
+    assertEquals(filtered.get(1).getName(), "PID");
+    assertEquals(filtered.get(2).getName(), "Sequence Feature Similarity");
+
+    /*
+     * nucleotide models for PCA add BLOSUM62 as last option
+     */
+    filtered = CalculationChooser.getApplicableScoreModels(true, true);
+    assertEquals(filtered.size(), 4);
+    assertSame(filtered.get(0), dna);
+    assertEquals(filtered.get(1).getName(), "PID");
+    assertEquals(filtered.get(2).getName(), "Sequence Feature Similarity");
+    assertSame(filtered.get(3), blosum62);
+  }
+}
diff --git a/test/jalview/gui/ColourMenuHelperTest.java b/test/jalview/gui/ColourMenuHelperTest.java
new file mode 100644 (file)
index 0000000..5128fe5
--- /dev/null
@@ -0,0 +1,263 @@
+package jalview.gui;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertSame;
+import static org.testng.Assert.assertTrue;
+
+import jalview.bin.Cache;
+import jalview.datamodel.Alignment;
+import jalview.datamodel.AlignmentI;
+import jalview.datamodel.Sequence;
+import jalview.datamodel.SequenceI;
+import jalview.schemes.ClustalxColourScheme;
+import jalview.schemes.ColourSchemeI;
+import jalview.schemes.ColourSchemes;
+import jalview.schemes.NucleotideColourScheme;
+import jalview.schemes.PIDColourScheme;
+import jalview.schemes.ResidueColourScheme;
+import jalview.util.MessageManager;
+
+import java.util.Enumeration;
+import java.util.Iterator;
+
+import javax.swing.AbstractButton;
+import javax.swing.ButtonGroup;
+import javax.swing.JMenu;
+import javax.swing.JMenuItem;
+
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+public class ColourMenuHelperTest
+{
+  /**
+   * Use a properties file with a user-defined colour scheme
+   */
+  @BeforeClass(alwaysRun = true)
+  public void setUp()
+  {
+    Cache.loadProperties("test/jalview/io/testProps.jvprops");
+  }
+
+  @Test(groups = "Functional")
+  public void testAddMenuItems_peptide()
+  {
+    SequenceI s1 = new Sequence("s1", "KFRQSILM");
+    AlignmentI al = new Alignment(new SequenceI[] { s1 });
+    JMenu menu = new JMenu();
+
+    ButtonGroup bg = ColourMenuHelper.addMenuItems(menu, null, al, false);
+    Enumeration<AbstractButton> bgElements = bg.getElements();
+
+    /*
+     * first entry is 'No Colour' option
+     */
+    JMenuItem item = menu.getItem(0);
+    assertEquals(item.getName(), ResidueColourScheme.NONE);
+    assertEquals(item.getText(), MessageManager.getString("label.none"));
+    AbstractButton bgItem = bgElements.nextElement();
+    assertSame(bgItem, item);
+
+    /*
+     * check that each registered colour scheme is in the menu,
+     * and in the button group;
+     * nucleotide-only schemes should be disabled menu items
+     */
+    Iterator<ColourSchemeI> colourSchemes = ColourSchemes.getInstance()
+            .getColourSchemes().iterator();
+    final int items = menu.getItemCount();
+    for (int i = 1; i < items; i++)
+    {
+      item = menu.getItem(i);
+      bgItem = bgElements.nextElement();
+      assertSame(bgItem, item);
+      ColourSchemeI cs = colourSchemes.next();
+      String name = cs.getSchemeName();
+      assertEquals(item.getName(), name);
+      boolean enabled = item.isEnabled();
+      assertEquals(enabled, cs.isApplicableTo(al));
+      if (cs instanceof NucleotideColourScheme) // nucleotide only
+      {
+        assertFalse(enabled);
+      }
+      if (cs instanceof ClustalxColourScheme) // peptide only
+      {
+        assertTrue(enabled);
+      }
+      if (cs instanceof PIDColourScheme) // nucleotide or peptide
+      {
+        assertTrue(enabled);
+      }
+
+      /*
+       * check i18n for display name
+       */
+      String label = MessageManager.getStringOrReturn("label.colourScheme_",
+              name);
+      assertEquals(item.getText(), label);
+    }
+
+    /*
+     * check nothing left over
+     */
+    assertFalse(colourSchemes.hasNext());
+    assertFalse(bgElements.hasMoreElements());
+  }
+
+  @Test(groups = "Functional")
+  public void testAddMenuItems_nucleotide()
+  {
+    SequenceI s1 = new Sequence("s1", "GAATAATCCATAACAG");
+    AlignmentI al = new Alignment(new SequenceI[] { s1 });
+    JMenu menu = new JMenu();
+    AlignFrame af = new AlignFrame(al, 500, 500);
+
+    /*
+     * menu for SequenceGroup excludes 'User Defined Colour'
+     */
+    PopupMenu popup = new PopupMenu(af.alignPanel, s1, null);
+    ButtonGroup bg = ColourMenuHelper.addMenuItems(menu, popup, al, false);
+    Enumeration<AbstractButton> bgElements = bg.getElements();
+  
+    /*
+     * first entry is 'No Colour' option
+     */
+    JMenuItem item = menu.getItem(0);
+    assertEquals(item.getName(), ResidueColourScheme.NONE);
+    assertEquals(item.getText(), MessageManager.getString("label.none"));
+    AbstractButton bgItem = bgElements.nextElement();
+    assertSame(bgItem, item);
+  
+    /*
+     * check that each registered colour scheme is in the menu,
+     * and in the button group;
+     * nucleotide-only schemes should be disabled menu items
+     */
+    Iterator<ColourSchemeI> colourSchemes = ColourSchemes.getInstance()
+            .getColourSchemes().iterator();
+    final int items = menu.getItemCount();
+    for (int i = 1; i < items; i++)
+    {
+      item = menu.getItem(i);
+      bgItem = bgElements.nextElement();
+      assertSame(bgItem, item);
+      ColourSchemeI cs = colourSchemes.next();
+      String name = cs.getSchemeName();
+      assertEquals(item.getName(), name);
+      boolean enabled = item.isEnabled();
+      assertEquals(enabled, cs.isApplicableTo(al));
+      if (cs instanceof NucleotideColourScheme) // nucleotide only
+      {
+        assertTrue(enabled);
+      }
+      if (cs instanceof ClustalxColourScheme) // peptide only
+      {
+        assertFalse(enabled);
+      }
+      if (cs instanceof PIDColourScheme) // nucleotide or peptide
+      {
+        assertTrue(enabled);
+      }
+  
+      /*
+       * check i18n for display name
+       */
+      String label = MessageManager.getStringOrReturn("label.colourScheme_",
+              name);
+      assertEquals(item.getText(), label);
+    }
+  
+    /*
+     * check nothing left over
+     */
+    assertFalse(colourSchemes.hasNext());
+    assertFalse(bgElements.hasMoreElements());
+  }
+
+  /**
+   * 'Simple only' mode constructs colour menu for structures
+   * <ul>
+   * <li>no 'No Colour' option</li>
+   * <li>only simple colour schemes (colour per residue)</li>
+   * </ul>
+   */
+  @Test(groups = "Functional")
+  public void testAddMenuItems_simpleOnly()
+  {
+    SequenceI s1 = new Sequence("s1", "KFRQSILM");
+    AlignmentI al = new Alignment(new SequenceI[] { s1 });
+    JMenu menu = new JMenu();
+  
+    ButtonGroup bg = ColourMenuHelper.addMenuItems(menu, null, al, true);
+    Enumeration<AbstractButton> bgElements = bg.getElements();
+  
+    /*
+     * check that only 'simple' colour schemes are included
+     */
+    Iterator<ColourSchemeI> colourSchemes = ColourSchemes.getInstance()
+            .getColourSchemes().iterator();
+    int i = 0;
+    while (colourSchemes.hasNext())
+    {
+      ColourSchemeI cs = colourSchemes.next();
+      if (!cs.isSimple())
+      {
+        continue;
+      }
+      JMenuItem item = menu.getItem(i++);
+      AbstractButton bgItem = bgElements.nextElement();
+      assertSame(bgItem, item);
+    }
+  
+    /*
+     * check nothing left over
+     */
+    assertEquals(i, menu.getItemCount());
+    assertFalse(bgElements.hasMoreElements());
+  }
+
+  /*
+   * menu for AlignFrame includes 'User Defined Colour'
+   */
+  @Test(groups = "Functional")
+  public void testAddMenuItems_forAlignFrame()
+  {
+    SequenceI s1 = new Sequence("s1", "KFRQSILM");
+    AlignmentI al = new Alignment(new SequenceI[] { s1 });
+    AlignFrame af = new AlignFrame(al, 500, 500);
+    JMenu menu = new JMenu();
+  
+    ButtonGroup bg = ColourMenuHelper.addMenuItems(menu, af, al, false);
+    Enumeration<AbstractButton> bgElements = bg.getElements();
+  
+    /*
+     * check that each registered colour scheme is in the menu,
+     * (skipping over No Colour which is the first menu item),
+     * and in the button group
+     */
+    bgElements.nextElement(); // skip No Colour
+    Iterator<ColourSchemeI> colourSchemes = ColourSchemes.getInstance()
+            .getColourSchemes().iterator();
+    final int items = menu.getItemCount();
+    for (int i = 1; i < items - 1; i++)
+    {
+      JMenuItem item = menu.getItem(i);
+      AbstractButton bgItem = bgElements.nextElement();
+      assertSame(bgItem, item);
+      ColourSchemeI cs = colourSchemes.next();
+      assertEquals(item.getName(), cs.getSchemeName());
+    }
+  
+    /*
+     * check menu also has User Defined Colour
+     */
+    assertFalse(colourSchemes.hasNext());
+    JMenuItem item = menu.getItem(items - 1);
+    AbstractButton bgItem = bgElements.nextElement();
+    assertSame(bgItem, item);
+    assertEquals(item.getName(), ResidueColourScheme.USER_DEFINED_MENU);
+    assertEquals(item.getText(),
+            MessageManager.getString("action.user_defined"));
+  }
+}
index 6ddebf8..6d8a47e 100644 (file)
@@ -13,6 +13,7 @@ import jalview.datamodel.features.FeatureMatcherSetI;
 import jalview.io.DataSourceType;
 import jalview.io.FileLoader;
 import jalview.schemes.FeatureColour;
+import jalview.schemes.FeatureColourTest;
 import jalview.util.matcher.Condition;
 
 import java.awt.Color;
@@ -60,8 +61,8 @@ public class FeatureSettingsTest
     fr.setColour("type2", byLabel);
 
     // type3: by score above threshold
-    FeatureColourI byScore = new FeatureColour(Color.BLACK, Color.BLUE, 1,
-            10);
+    FeatureColourI byScore = new FeatureColour(null, Color.BLACK,
+            Color.BLUE, null, 1, 10);
     byScore.setAboveThreshold(true);
     byScore.setThreshold(2f);
     fr.setColour("type3", byScore);
@@ -73,8 +74,8 @@ public class FeatureSettingsTest
     fr.setColour("type4", byAF);
 
     // type5: by attribute CSQ:PolyPhen below threshold
-    FeatureColourI byPolyPhen = new FeatureColour(Color.BLACK, Color.BLUE,
-            1, 10);
+    FeatureColourI byPolyPhen = new FeatureColour(null, Color.BLACK,
+            Color.BLUE, null, 1, 10);
     byPolyPhen.setBelowThreshold(true);
     byPolyPhen.setThreshold(3f);
     byPolyPhen.setAttributeName("CSQ", "PolyPhen");
@@ -188,4 +189,50 @@ public class FeatureSettingsTest
     });
     seq.addSequenceFeature(sf);
   }
+
+  /**
+   * @see FeatureColourTest#testGetDescription()
+   * @throws IOException
+   */
+  @Test(groups = "Functional")
+  public void testGetColorTooltip() throws IOException
+  {
+    assertNull(FeatureSettings.getColorTooltip(null, false));
+
+    /*
+     * simple colour
+     */
+    FeatureColourI fc = new FeatureColour(Color.black);
+    String simpleTooltip = "Click to edit, right-click for menu";
+    assertEquals(FeatureSettings.getColorTooltip(fc, true), simpleTooltip);
+    assertNull(FeatureSettings.getColorTooltip(fc, false));
+
+    /*
+     * graduated colour tooltip includes description of colour
+     */
+    fc.setColourByLabel(true);
+    assertEquals(FeatureSettings.getColorTooltip(fc, false),
+            "<html>By Label</html>");
+    assertEquals(FeatureSettings.getColorTooltip(fc, true),
+            "<html>By Label<br>" + simpleTooltip + "</br></html>");
+
+    /*
+     * graduated colour with threshold is html-encoded
+     */
+    fc = new FeatureColour(null, Color.red, Color.blue, null, 2f, 10f);
+    fc.setBelowThreshold(true);
+    fc.setThreshold(4f);
+    assertEquals(FeatureSettings.getColorTooltip(fc, false),
+            "<html>By Score (&lt; 4.0)</html>");
+    assertEquals(FeatureSettings.getColorTooltip(fc, true),
+            "<html>By Score (&lt; 4.0)<br>" + simpleTooltip
+                    + "</br></html>");
+
+    fc.setAboveThreshold(true);
+    assertEquals(FeatureSettings.getColorTooltip(fc, false),
+            "<html>By Score (&gt; 4.0)</html>");
+    assertEquals(FeatureSettings.getColorTooltip(fc, true),
+            "<html>By Score (&gt; 4.0)<br>" + simpleTooltip
+                    + "</br></html>");
+  }
 }
index 91b541c..0ec1c1f 100644 (file)
@@ -1,12 +1,18 @@
 package jalview.gui;
 
+import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertTrue;
 
+import jalview.bin.Cache;
+import jalview.bin.Jalview;
 import jalview.datamodel.Alignment;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.Sequence;
 import jalview.datamodel.SequenceGroup;
 import jalview.datamodel.SequenceI;
+import jalview.io.DataSourceType;
+import jalview.io.FileLoader;
+import jalview.viewmodel.ViewportRanges;
 
 import java.awt.event.MouseEvent;
 
@@ -28,16 +34,12 @@ public class ScalePanelTest
     SequenceI seq1 = new Sequence("Seq1", "MATRESS");
     SequenceI seq2 = new Sequence("Seq2", "MADNESS");
     AlignmentI al = new Alignment(new SequenceI[] { seq1, seq2 });
-    
+
     AlignFrame alignFrame = new AlignFrame(al, al.getWidth(),
             al.getHeight());
-    ScalePanel scalePanel = new ScalePanel(
-            alignFrame.getViewport(), alignFrame.alignPanel
-    );
-    
-    MouseEvent mouse = new MouseEvent(
-            scalePanel, 0, 1, 0, 4, 0, 1, false
-    );
+    ScalePanel scalePanel = alignFrame.alignPanel.getScalePanel();
+
+    MouseEvent mouse = new MouseEvent(scalePanel, 0, 1, 0, 4, 0, 1, false);
     scalePanel.mousePressed(mouse);
     scalePanel.mouseDragged(mouse);
 
@@ -51,8 +53,56 @@ public class ScalePanelTest
     int startCol = sg.getStartRes();
 
     assertTrue(startCol >= 0);
+  }
 
+  /**
+   * Test for JAL-3212
+   */
+  @Test(groups = "Functional")
+  public void testSelectColumns_withHidden()
+  {
+    String seq1 = ">Seq1\nANTOFAGASTAVALPARAISOMONTEVIDEOANTANANARIVO";
+    AlignFrame alignFrame = new FileLoader().LoadFileWaitTillLoaded(seq1,
+            DataSourceType.PASTE);
+    ScalePanel scalePanel = alignFrame.alignPanel.getScalePanel();
 
+    /*
+     * hide columns 1-20 (of 43); then 'drag' to select columns 30-31;
+     * 31 is 51 in absolute columns but bug JAL-3212 reduces it to
+     * endRes which is 22
+     */
+    AlignViewport viewport = alignFrame.getViewport();
+    ViewportRanges ranges = viewport.getRanges();
+    assertEquals(ranges.getStartRes(), 0);
+    assertEquals(ranges.getEndRes(), 42);
+    viewport.hideColumns(0, 19);
+    alignFrame.alignPanel.updateLayout();
+    assertEquals(ranges.getStartRes(), 0);
+    assertEquals(ranges.getEndRes(), 22);
+    
+    int cw = viewport.getCharWidth();
+    int xPos = 9 * cw + 2;
+    MouseEvent mouse = new MouseEvent(scalePanel, 0, 1, 0, xPos, 0, 1,
+            false);
+    scalePanel.mousePressed(mouse);
+    scalePanel.mouseDragged(mouse);
+    xPos += cw;
+    mouse = new MouseEvent(scalePanel, 0, 1, 0, xPos, 0, 1, false);
+    scalePanel.mouseReleased(mouse);
+
+    SequenceGroup sg = scalePanel.av.getSelectionGroup();
+    assertEquals(sg.getStartRes(), 29);
+    assertEquals(sg.getEndRes(), 30);
+  }
+
+  @BeforeClass(alwaysRun = true)
+  public static void setUpBeforeClass() throws Exception
+  {
+    /*
+     * use read-only test properties file
+     */
+    Cache.loadProperties("test/jalview/io/testProps.jvprops");
+    Jalview.main(new String[] { "-nonews" });
   }
 
 }
index 5298680..73aeb79 100644 (file)
@@ -29,10 +29,10 @@ import jalview.io.FileLoader;
 import java.awt.Font;
 import java.awt.FontMetrics;
 
-import junit.extensions.PA;
-
 import org.testng.annotations.Test;
 
+import junit.extensions.PA;
+
 public class SeqCanvasTest
 {
   /**
@@ -97,8 +97,8 @@ public class SeqCanvasTest
     assertEquals(PA.getValue(testee, "wrappedVisibleWidths"), 3);
 
     /*
-     * reduce canvas height by 1 pixel - should not be enough height
-     * to draw 3 widths
+     * reduce canvas height by 1 pixel 
+     * - should not be enough height to draw 3 widths
      */
     canvasHeight -= 1;
     testee.calculateWrappedGeometry(canvasWidth, canvasHeight);
@@ -170,11 +170,11 @@ public class SeqCanvasTest
     canvasWidth += 8;
     wrappedWidth = testee.calculateWrappedGeometry(canvasWidth,
             canvasHeight);
-    assertEquals(wrappedWidth, 27);
+    assertEquals(wrappedWidth, 27); // 8px not enough
     canvasWidth += 1;
     wrappedWidth = testee.calculateWrappedGeometry(canvasWidth,
             canvasHeight);
-    assertEquals(wrappedWidth, 28);
+    assertEquals(wrappedWidth, 28); // 9px is enough
 
     /*
      * now West but not East scale - lose 39 pixels or 4 columns
@@ -190,11 +190,11 @@ public class SeqCanvasTest
     canvasWidth += 2;
     wrappedWidth = testee.calculateWrappedGeometry(canvasWidth,
             canvasHeight);
-    assertEquals(wrappedWidth, 24);
+    assertEquals(wrappedWidth, 24); // 2px not enough
     canvasWidth += 1;
     wrappedWidth = testee.calculateWrappedGeometry(canvasWidth,
             canvasHeight);
-    assertEquals(wrappedWidth, 25);
+    assertEquals(wrappedWidth, 25); // 3px is enough
 
     /*
      * turn off scales left and right, make width exactly 157 columns
@@ -256,15 +256,16 @@ public class SeqCanvasTest
             2 * charHeight);
     int repeatingHeight = (int) PA.getValue(testee, "wrappedRepeatHeightPx");
     assertEquals(repeatingHeight, charHeight * (2 + al.getHeight())
-            + annotationHeight);
+            + SeqCanvas.SEQS_ANNOTATION_GAP + annotationHeight);
     assertEquals(PA.getValue(testee, "wrappedVisibleWidths"), 1);
   
     /*
-     * repeat height is 17 * (2 + 15) = 289 + annotationHeight = 507
-     * make canvas height 2 * 289 + 3 * charHeight so just enough to
-     * draw 2 widths and the first sequence of a third
+     * repeat height is 17 * (2 + 15) = 289 + 3 + annotationHeight = 510
+     * make canvas height 2 of these plus 3 charHeights 
+     * so just enough to draw 2 widths, gap + scale + the first sequence of a third
      */
-    canvasHeight = charHeight * (17 * 2 + 3) + 2 * annotationHeight;
+    canvasHeight = charHeight * (17 * 2 + 3)
+            + 2 * (annotationHeight + SeqCanvas.SEQS_ANNOTATION_GAP);
     testee.calculateWrappedGeometry(canvasWidth, canvasHeight);
     assertEquals(PA.getValue(testee, "wrappedVisibleWidths"), 3);
   
@@ -287,7 +288,8 @@ public class SeqCanvasTest
      * reduce height to enough for 2 widths and not quite a third
      * i.e. two repeating heights + spacer + sequence - 1 pixel
      */
-    canvasHeight = charHeight * (16 * 2 + 2) + 2 * annotationHeight - 1;
+    canvasHeight = charHeight * (16 * 2 + 2)
+            + 2 * (annotationHeight + SeqCanvas.SEQS_ANNOTATION_GAP) - 1;
     testee.calculateWrappedGeometry(canvasWidth, canvasHeight);
     assertEquals(PA.getValue(testee, "wrappedVisibleWidths"), 2);
 
index a5d244d..6783514 100644 (file)
 package jalview.gui;
 
 import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNull;
+import static org.testng.Assert.assertTrue;
 
+import jalview.api.AlignViewportI;
+import jalview.bin.Cache;
+import jalview.bin.Jalview;
+import jalview.commands.EditCommand;
+import jalview.commands.EditCommand.Action;
+import jalview.commands.EditCommand.Edit;
 import jalview.datamodel.Alignment;
+import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.Sequence;
 import jalview.datamodel.SequenceI;
+import jalview.gui.SeqPanel.MousePos;
+import jalview.io.DataSourceType;
+import jalview.io.FileLoader;
+import jalview.util.MessageManager;
 
+import java.awt.Event;
+import java.awt.EventQueue;
+import java.awt.event.MouseEvent;
+import java.lang.reflect.InvocationTargetException;
+
+import javax.swing.JLabel;
+
+import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
+import junit.extensions.PA;
+
 public class SeqPanelTest
 {
   AlignFrame af;
@@ -54,22 +77,24 @@ public class SeqPanelTest
     assertEquals(
             alignFrame.alignPanel.getSeqPanel().setStatusMessage(
                     visAl.getSequenceAt(1), 1, 1), 2);
-    assertEquals(alignFrame.statusBar.getText(),
+    assertEquals(((JLabel) PA.getValue(alignFrame, "statusBar")).getText(),
             "Sequence 2 ID: Seq2 Residue: ALA (2)");
     assertEquals(
             alignFrame.alignPanel.getSeqPanel().setStatusMessage(
                     visAl.getSequenceAt(1), 4, 1), 3);
-    assertEquals(alignFrame.statusBar.getText(),
+    assertEquals(((JLabel) PA.getValue(alignFrame, "statusBar")).getText(),
             "Sequence 2 ID: Seq2 Residue: GLU (3)");
     // no status message at a gap, returns next residue position to the right
     assertEquals(
             alignFrame.alignPanel.getSeqPanel().setStatusMessage(
                     visAl.getSequenceAt(1), 2, 1), 3);
-    assertEquals(alignFrame.statusBar.getText(), "Sequence 2 ID: Seq2");
+    assertEquals(((JLabel) PA.getValue(alignFrame, "statusBar")).getText(),
+            "Sequence 2 ID: Seq2");
     assertEquals(
             alignFrame.alignPanel.getSeqPanel().setStatusMessage(
                     visAl.getSequenceAt(1), 3, 1), 3);
-    assertEquals(alignFrame.statusBar.getText(), "Sequence 2 ID: Seq2");
+    assertEquals(((JLabel) PA.getValue(alignFrame, "statusBar")).getText(),
+            "Sequence 2 ID: Seq2");
   }
 
   @Test(groups = "Functional")
@@ -85,7 +110,788 @@ public class SeqPanelTest
     assertEquals(
             alignFrame.alignPanel.getSeqPanel().setStatusMessage(
                     visAl.getSequenceAt(1), 1, 1), 2);
-    assertEquals(alignFrame.statusBar.getText(),
+    assertEquals(((JLabel) PA.getValue(alignFrame, "statusBar")).getText(),
             "Sequence 2 ID: Seq2 Residue: B (2)");
   }
+
+  @Test(groups = "Functional")
+  public void testGetEditStatusMessage()
+  {
+    assertNull(SeqPanel.getEditStatusMessage(null));
+
+    EditCommand edit = new EditCommand(); // empty
+    assertNull(SeqPanel.getEditStatusMessage(edit));
+
+    SequenceI[] seqs = new SequenceI[] { new Sequence("a", "b") };
+    
+    // 1 gap
+    edit.addEdit(edit.new Edit(Action.INSERT_GAP, seqs, 1, 1, '-'));
+    String expected = MessageManager.formatMessage("label.insert_gap", "1");
+    assertEquals(SeqPanel.getEditStatusMessage(edit), expected);
+
+    // 3 more gaps makes +4
+    edit.addEdit(edit.new Edit(Action.INSERT_GAP, seqs, 1, 3, '-'));
+    expected = MessageManager.formatMessage("label.insert_gaps", "4");
+    assertEquals(SeqPanel.getEditStatusMessage(edit), expected);
+
+    // 2 deletes makes + 2
+    edit.addEdit(edit.new Edit(Action.DELETE_GAP, seqs, 1, 2, '-'));
+    expected = MessageManager.formatMessage("label.insert_gaps", "2");
+    assertEquals(SeqPanel.getEditStatusMessage(edit), expected);
+
+    // 2 more deletes makes 0 - no text
+    edit.addEdit(edit.new Edit(Action.DELETE_GAP, seqs, 1, 2, '-'));
+    assertNull(SeqPanel.getEditStatusMessage(edit));
+
+    // 1 more delete makes 1 delete
+    edit.addEdit(edit.new Edit(Action.DELETE_GAP, seqs, 1, 1, '-'));
+    expected = MessageManager.formatMessage("label.delete_gap", "1");
+    assertEquals(SeqPanel.getEditStatusMessage(edit), expected);
+
+    // 1 more delete makes 2 deletes
+    edit.addEdit(edit.new Edit(Action.DELETE_GAP, seqs, 1, 1, '-'));
+    expected = MessageManager.formatMessage("label.delete_gaps", "2");
+    assertEquals(SeqPanel.getEditStatusMessage(edit), expected);
+  }
+
+  /**
+   * Tests that simulate 'locked editing', where an inserted gap is balanced by
+   * a gap deletion in the selection group, and vice versa
+   */
+  @Test(groups = "Functional")
+  public void testGetEditStatusMessage_lockedEditing()
+  {
+    EditCommand edit = new EditCommand(); // empty
+    SequenceI[] seqs = new SequenceI[] { new Sequence("a", "b") };
+    
+    // 1 gap inserted, balanced by 1 delete
+    Edit e1 = edit.new Edit(Action.INSERT_GAP, seqs, 1, 1, '-');
+    edit.addEdit(e1);
+    Edit e2 = edit.new Edit(Action.DELETE_GAP, seqs, 5, 1, '-');
+    e2.setSystemGenerated(true);
+    edit.addEdit(e2);
+    String expected = MessageManager.formatMessage("label.insert_gap", "1");
+    assertEquals(SeqPanel.getEditStatusMessage(edit), expected);
+  
+    // 2 more gaps makes +3
+    Edit e3 = edit.new Edit(Action.INSERT_GAP, seqs, 1, 2, '-');
+    edit.addEdit(e3);
+    Edit e4 = edit.new Edit(Action.DELETE_GAP, seqs, 5, 2, '-');
+    e4.setSystemGenerated(true);
+    edit.addEdit(e4);
+    expected = MessageManager.formatMessage("label.insert_gaps", "3");
+    assertEquals(SeqPanel.getEditStatusMessage(edit), expected);
+  
+    // 2 deletes makes + 1
+    Edit e5 = edit.new Edit(Action.DELETE_GAP, seqs, 1, 2, '-');
+    edit.addEdit(e5);
+    Edit e6 = edit.new Edit(Action.INSERT_GAP, seqs, 5, 2, '-');
+    e6.setSystemGenerated(true);
+    edit.addEdit(e6);
+    expected = MessageManager.formatMessage("label.insert_gap", "1");
+    assertEquals(SeqPanel.getEditStatusMessage(edit), expected);
+  
+    // 1 more delete makes 0 - no text
+    Edit e7 = edit.new Edit(Action.DELETE_GAP, seqs, 1, 1, '-');
+    edit.addEdit(e7);
+    Edit e8 = edit.new Edit(Action.INSERT_GAP, seqs, 5, 1, '-');
+    e8.setSystemGenerated(true);
+    edit.addEdit(e8);
+    expected = MessageManager.formatMessage("label.insert_gaps", "2");
+    assertNull(SeqPanel.getEditStatusMessage(edit));
+  
+    // 1 more delete makes 1 delete
+    Edit e9 = edit.new Edit(Action.DELETE_GAP, seqs, 1, 1, '-');
+    edit.addEdit(e9);
+    Edit e10 = edit.new Edit(Action.INSERT_GAP, seqs, 5, 1, '-');
+    e10.setSystemGenerated(true);
+    edit.addEdit(e10);
+    expected = MessageManager.formatMessage("label.delete_gap", "1");
+    assertEquals(SeqPanel.getEditStatusMessage(edit), expected);
+  
+    // 2 more deletes makes 3 deletes
+    Edit e11 = edit.new Edit(Action.DELETE_GAP, seqs, 1, 2, '-');
+    edit.addEdit(e11);
+    Edit e12 = edit.new Edit(Action.INSERT_GAP, seqs, 5, 2, '-');
+    e12.setSystemGenerated(true);
+    edit.addEdit(e12);
+    expected = MessageManager.formatMessage("label.delete_gaps", "3");
+    assertEquals(SeqPanel.getEditStatusMessage(edit), expected);
+  }
+
+  public void testFindMousePosition_unwrapped()
+  {
+    String seqData = ">Seq1\nAACDE\n>Seq2\nAA--E\n";
+    AlignFrame alignFrame = new FileLoader().LoadFileWaitTillLoaded(seqData,
+            DataSourceType.PASTE);
+    AlignViewportI av = alignFrame.getViewport();
+    av.setShowAnnotation(true);
+    av.setWrapAlignment(false);
+    final int charHeight = av.getCharHeight();
+    final int charWidth = av.getCharWidth();
+    // sanity checks:
+    assertTrue(charHeight > 0);
+    assertTrue(charWidth > 0);
+    assertTrue(alignFrame.alignPanel.getSeqPanel().getWidth() > 0);
+
+    SeqPanel testee = alignFrame.alignPanel.getSeqPanel();
+    int x = 0;
+    int y = 0;
+
+    /*
+     * mouse at top left of unwrapped panel
+     */
+    MouseEvent evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y,
+            0, 0, 0, false, 0);
+    MousePos pos = testee.findMousePosition(evt);
+    assertEquals(pos.column, 0);
+    assertEquals(pos.seqIndex, 0);
+    assertEquals(pos.annotationIndex, -1);
+  }
+
+  @AfterMethod(alwaysRun = true)
+  public void tearDown()
+  {
+    Desktop.instance.closeAll_actionPerformed(null);
+  }
+
+  @Test(groups = "Functional")
+  public void testFindMousePosition_wrapped_annotations()
+  {
+    Cache.applicationProperties.setProperty("SHOW_ANNOTATIONS", "true");
+    Cache.applicationProperties.setProperty("WRAP_ALIGNMENT", "true");
+    AlignFrame alignFrame = new FileLoader().LoadFileWaitTillLoaded(
+            "examples/uniref50.fa", DataSourceType.FILE);
+    AlignViewportI av = alignFrame.getViewport();
+    av.setScaleAboveWrapped(false);
+    av.setScaleLeftWrapped(false);
+    av.setScaleRightWrapped(false);
+
+    alignFrame.alignPanel.updateLayout();
+
+    final int charHeight = av.getCharHeight();
+    final int charWidth = av.getCharWidth();
+    final int alignmentHeight = av.getAlignment().getHeight();
+    
+    // sanity checks:
+    assertTrue(charHeight > 0);
+    assertTrue(charWidth > 0);
+    assertTrue(alignFrame.alignPanel.getSeqPanel().getWidth() > 0);
+  
+    SeqPanel testee = alignFrame.alignPanel.getSeqPanel();
+    int x = 0;
+    int y = 0;
+  
+    /*
+     * mouse at top left of wrapped panel; there is a gap of charHeight
+     * above the alignment
+     */
+    MouseEvent evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y,
+            0, 0, 0, false, 0);
+    MousePos pos = testee.findMousePosition(evt);
+    assertEquals(pos.column, 0);
+    assertEquals(pos.seqIndex, -1); // above sequences
+    assertEquals(pos.annotationIndex, -1);
+
+    /*
+     * cursor at bottom of gap above
+     */
+    y = charHeight - 1;
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+            false, 0);
+    pos = testee.findMousePosition(evt);
+    assertEquals(pos.seqIndex, -1);
+    assertEquals(pos.annotationIndex, -1);
+
+    /*
+     * cursor over top of first sequence
+     */
+    y = charHeight;
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+            false, 0);
+    pos = testee.findMousePosition(evt);
+    assertEquals(pos.seqIndex, 0);
+    assertEquals(pos.annotationIndex, -1);
+
+    /*
+     * cursor at bottom of first sequence
+     */
+    y = 2 * charHeight - 1;
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+            false, 0);
+    pos = testee.findMousePosition(evt);
+    assertEquals(pos.seqIndex, 0);
+    assertEquals(pos.annotationIndex, -1);
+
+    /*
+     * cursor at top of second sequence
+     */
+    y = 2 * charHeight;
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+            false, 0);
+    pos = testee.findMousePosition(evt);
+    assertEquals(pos.seqIndex, 1);
+    assertEquals(pos.annotationIndex, -1);
+
+    /*
+     * cursor at bottom of second sequence
+     */
+    y = 3 * charHeight - 1;
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+            false, 0);
+    pos = testee.findMousePosition(evt);
+    assertEquals(pos.seqIndex, 1);
+    assertEquals(pos.annotationIndex, -1);
+
+    /*
+     * cursor at bottom of last sequence
+     */
+    y = charHeight * (1 + alignmentHeight) - 1;
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+            false, 0);
+    pos = testee.findMousePosition(evt);
+    assertEquals(pos.seqIndex, alignmentHeight - 1);
+    assertEquals(pos.annotationIndex, -1);
+
+    /*
+     * cursor below sequences, in 3-pixel gap above annotations
+     * method reports index of nearest sequence above
+     */
+    y += 1;
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+            false, 0);
+    pos = testee.findMousePosition(evt);
+    assertEquals(pos.seqIndex, alignmentHeight - 1);
+    assertEquals(pos.annotationIndex, -1);
+
+    /*
+     * cursor still in the gap above annotations, now at the bottom of it
+     */
+    y += SeqCanvas.SEQS_ANNOTATION_GAP - 1; // 3-1 = 2
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+            false, 0);
+    pos = testee.findMousePosition(evt);
+    assertEquals(pos.seqIndex, alignmentHeight - 1);
+    assertEquals(pos.annotationIndex, -1);
+
+    AlignmentAnnotation[] annotationRows = av.getAlignment()
+            .getAlignmentAnnotation();
+    for (int n = 0; n < annotationRows.length; n++)
+    {
+      /*
+       * cursor at the top of the n'th annotation  
+       */
+      y += 1;
+      evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+              false, 0);
+      pos = testee.findMousePosition(evt);
+      assertEquals(pos.seqIndex, alignmentHeight - 1);
+      assertEquals(pos.annotationIndex, n); // over n'th annotation
+
+      /*
+       * cursor at the bottom of the n'th annotation  
+       */
+      y += annotationRows[n].height - 1;
+      evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+              false, 0);
+      pos = testee.findMousePosition(evt);
+      assertEquals(pos.seqIndex, alignmentHeight - 1);
+      assertEquals(pos.annotationIndex, n);
+    }
+
+    /*
+     * cursor in gap between wrapped widths  
+     */
+    y += 1;
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+            false, 0);
+    pos = testee.findMousePosition(evt);
+    assertEquals(pos.seqIndex, -1);
+    assertEquals(pos.annotationIndex, -1);
+
+    /*
+     * cursor at bottom of gap between wrapped widths  
+     */
+    y += charHeight - 1;
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+            false, 0);
+    pos = testee.findMousePosition(evt);
+    assertEquals(pos.seqIndex, -1);
+    assertEquals(pos.annotationIndex, -1);
+
+    /*
+     * cursor at top of first sequence, second wrapped width  
+     */
+    y += 1;
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+            false, 0);
+    pos = testee.findMousePosition(evt);
+    assertEquals(pos.seqIndex, 0);
+    assertEquals(pos.annotationIndex, -1);
+  }
+
+  @Test(groups = "Functional")
+  public void testFindMousePosition_wrapped_scaleAbove()
+  {
+    Cache.applicationProperties.setProperty("SHOW_ANNOTATIONS", "true");
+    Cache.applicationProperties.setProperty("WRAP_ALIGNMENT", "true");
+    AlignFrame alignFrame = new FileLoader().LoadFileWaitTillLoaded(
+            "examples/uniref50.fa", DataSourceType.FILE);
+    AlignViewportI av = alignFrame.getViewport();
+    av.setScaleAboveWrapped(true);
+    av.setScaleLeftWrapped(false);
+    av.setScaleRightWrapped(false);
+    alignFrame.alignPanel.updateLayout();
+
+    final int charHeight = av.getCharHeight();
+    final int charWidth = av.getCharWidth();
+    final int alignmentHeight = av.getAlignment().getHeight();
+    
+    // sanity checks:
+    assertTrue(charHeight > 0);
+    assertTrue(charWidth > 0);
+    assertTrue(alignFrame.alignPanel.getSeqPanel().getWidth() > 0);
+  
+    SeqPanel testee = alignFrame.alignPanel.getSeqPanel();
+    int x = 0;
+    int y = 0;
+  
+    /*
+     * mouse at top left of wrapped panel; there is a gap of charHeight
+     * above the alignment
+     */
+    MouseEvent evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y,
+            0, 0, 0, false, 0);
+    MousePos pos = testee.findMousePosition(evt);
+    assertEquals(pos.column, 0);
+    assertEquals(pos.seqIndex, -1); // above sequences
+    assertEquals(pos.annotationIndex, -1);
+  
+    /*
+     * cursor at bottom of gap above
+     * two charHeights including scale panel
+     */
+    y = 2 * charHeight - 1;
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+            false, 0);
+    pos = testee.findMousePosition(evt);
+    assertEquals(pos.seqIndex, -1);
+    assertEquals(pos.annotationIndex, -1);
+  
+    /*
+     * cursor over top of first sequence
+     */
+    y += 1;
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+            false, 0);
+    pos = testee.findMousePosition(evt);
+    assertEquals(pos.seqIndex, 0);
+    assertEquals(pos.annotationIndex, -1);
+  
+    /*
+     * cursor at bottom of first sequence
+     */
+    y += charHeight - 1;
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+            false, 0);
+    pos = testee.findMousePosition(evt);
+    assertEquals(pos.seqIndex, 0);
+    assertEquals(pos.annotationIndex, -1);
+  
+    /*
+     * cursor at top of second sequence
+     */
+    y += 1;
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+            false, 0);
+    pos = testee.findMousePosition(evt);
+    assertEquals(pos.seqIndex, 1);
+    assertEquals(pos.annotationIndex, -1);
+  
+    /*
+     * cursor at bottom of second sequence
+     */
+    y += charHeight - 1;
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+            false, 0);
+    pos = testee.findMousePosition(evt);
+    assertEquals(pos.seqIndex, 1);
+    assertEquals(pos.annotationIndex, -1);
+  
+    /*
+     * cursor at bottom of last sequence
+     * (scale + gap + sequences)
+     */
+    y = charHeight * (2 + alignmentHeight) - 1;
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+            false, 0);
+    pos = testee.findMousePosition(evt);
+    assertEquals(pos.seqIndex, alignmentHeight - 1);
+    assertEquals(pos.annotationIndex, -1);
+  
+    /*
+     * cursor below sequences, in 3-pixel gap above annotations
+     */
+    y += 1;
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+            false, 0);
+    pos = testee.findMousePosition(evt);
+    assertEquals(pos.seqIndex, alignmentHeight - 1);
+    assertEquals(pos.annotationIndex, -1);
+  
+    /*
+     * cursor still in the gap above annotations, now at the bottom of it
+     * method reports index of nearest sequence above  
+     */
+    y += SeqCanvas.SEQS_ANNOTATION_GAP - 1; // 3-1 = 2
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+            false, 0);
+    pos = testee.findMousePosition(evt);
+    assertEquals(pos.seqIndex, alignmentHeight - 1);
+    assertEquals(pos.annotationIndex, -1);
+  
+    AlignmentAnnotation[] annotationRows = av.getAlignment().getAlignmentAnnotation();
+    for (int n = 0; n < annotationRows.length; n++)
+    {
+      /*
+       * cursor at the top of the n'th annotation  
+       */
+      y += 1;
+      evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+              false, 0);
+      pos = testee.findMousePosition(evt);
+      assertEquals(pos.seqIndex, alignmentHeight - 1);
+      assertEquals(pos.annotationIndex, n); // over n'th annotation
+
+      /*
+       * cursor at the bottom of the n'th annotation  
+       */
+      y += annotationRows[n].height - 1;
+      evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+              false, 0);
+      pos = testee.findMousePosition(evt);
+      assertEquals(pos.seqIndex, alignmentHeight - 1);
+      assertEquals(pos.annotationIndex, n);
+    }
+  
+    /*
+     * cursor in gap between wrapped widths  
+     */
+    y += 1;
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+            false, 0);
+    pos = testee.findMousePosition(evt);
+    assertEquals(pos.seqIndex, -1);
+    assertEquals(pos.annotationIndex, -1);
+  
+    /*
+     * cursor at bottom of gap between wrapped widths  
+     */
+    y += charHeight - 1;
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+            false, 0);
+    pos = testee.findMousePosition(evt);
+    assertEquals(pos.seqIndex, -1);
+    assertEquals(pos.annotationIndex, -1);
+  
+    /*
+     * cursor at top of scale, second wrapped width  
+     */
+    y += 1;
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+            false, 0);
+    pos = testee.findMousePosition(evt);
+    assertEquals(pos.seqIndex, -1);
+    assertEquals(pos.annotationIndex, -1);
+
+    /*
+     * cursor at bottom of scale, second wrapped width  
+     */
+    y += charHeight - 1;
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+            false, 0);
+    pos = testee.findMousePosition(evt);
+    assertEquals(pos.seqIndex, -1);
+    assertEquals(pos.annotationIndex, -1);
+
+    /*
+     * cursor at top of first sequence, second wrapped width  
+     */
+    y += 1;
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+            false, 0);
+    pos = testee.findMousePosition(evt);
+    assertEquals(pos.seqIndex, 0);
+    assertEquals(pos.annotationIndex, -1);
+  }
+
+  @Test(groups = "Functional")
+  public void testFindMousePosition_wrapped_noAnnotations()
+  {
+    Cache.applicationProperties.setProperty("SHOW_ANNOTATIONS", "false");
+    Cache.applicationProperties.setProperty("WRAP_ALIGNMENT", "true");
+    AlignFrame alignFrame = new FileLoader().LoadFileWaitTillLoaded(
+            "examples/uniref50.fa", DataSourceType.FILE);
+    AlignViewportI av = alignFrame.getViewport();
+    av.setScaleAboveWrapped(false);
+    av.setScaleLeftWrapped(false);
+    av.setScaleRightWrapped(false);
+    alignFrame.alignPanel.updateLayout();
+
+    final int charHeight = av.getCharHeight();
+    final int charWidth = av.getCharWidth();
+    final int alignmentHeight = av.getAlignment().getHeight();
+    
+    // sanity checks:
+    assertTrue(charHeight > 0);
+    assertTrue(charWidth > 0);
+    assertTrue(alignFrame.alignPanel.getSeqPanel().getWidth() > 0);
+  
+    SeqPanel testee = alignFrame.alignPanel.getSeqPanel();
+    int x = 0;
+    int y = 0;
+  
+    /*
+     * mouse at top left of wrapped panel; there is a gap of charHeight
+     * above the alignment
+     */
+    MouseEvent evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y,
+            0, 0, 0, false, 0);
+    MousePos pos = testee.findMousePosition(evt);
+    assertEquals(pos.column, 0);
+    assertEquals(pos.seqIndex, -1); // above sequences
+    assertEquals(pos.annotationIndex, -1);
+  
+    /*
+     * cursor over top of first sequence
+     */
+    y = charHeight;
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+            false, 0);
+    pos = testee.findMousePosition(evt);
+    assertEquals(pos.seqIndex, 0);
+    assertEquals(pos.annotationIndex, -1);
+
+    /*
+     * cursor at bottom of last sequence
+     */
+    y = charHeight * (1 + alignmentHeight) - 1;
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+            false, 0);
+    pos = testee.findMousePosition(evt);
+    assertEquals(pos.seqIndex, alignmentHeight - 1);
+    assertEquals(pos.annotationIndex, -1);
+  
+    /*
+     * cursor below sequences, at top of charHeight gap between widths
+     */
+    y += 1;
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+            false, 0);
+    pos = testee.findMousePosition(evt);
+    assertEquals(pos.seqIndex, -1);
+    assertEquals(pos.annotationIndex, -1);
+  
+    /*
+     * cursor below sequences, at top of charHeight gap between widths
+     */
+    y += charHeight - 1;
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+            false, 0);
+    pos = testee.findMousePosition(evt);
+    assertEquals(pos.seqIndex, -1);
+    assertEquals(pos.annotationIndex, -1);
+  
+    /*
+     * cursor at the top of the first sequence, second width  
+     */
+    y += 1;
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+            false, 0);
+    pos = testee.findMousePosition(evt);
+    assertEquals(pos.seqIndex, 0);
+    assertEquals(pos.annotationIndex, -1);
+  }
+
+  @Test(groups = "Functional")
+  public void testFindColumn_unwrapped()
+  {
+    Cache.applicationProperties.setProperty("WRAP_ALIGNMENT", "false");
+    AlignFrame alignFrame = new FileLoader().LoadFileWaitTillLoaded(
+            "examples/uniref50.fa", DataSourceType.FILE);
+    SeqPanel testee = alignFrame.alignPanel.getSeqPanel();
+    int x = 0;
+    final int charWidth = alignFrame.getViewport().getCharWidth();
+    assertTrue(charWidth > 0); // sanity check
+    assertEquals(alignFrame.getViewport().getRanges().getStartRes(), 0);
+
+    /*
+     * mouse at top left of unwrapped panel
+     */
+    MouseEvent evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, 0,
+            0, 0, 0, false, 0);
+    assertEquals(testee.findColumn(evt), 0);
+    
+    /*
+     * not quite one charWidth across
+     */
+    x = charWidth-1;
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, 0,
+            0, 0, 0, false, 0);
+    assertEquals(testee.findColumn(evt), 0);
+
+    /*
+     * one charWidth across
+     */
+    x = charWidth;
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, 0, 0, 0, 0,
+            false, 0);
+    assertEquals(testee.findColumn(evt), 1);
+
+    /*
+     * two charWidths across
+     */
+    x = 2 * charWidth;
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, 0, 0, 0, 0,
+            false, 0);
+    assertEquals(testee.findColumn(evt), 2);
+
+    /*
+     * limited to last column of seqcanvas
+     */
+    x = 20000;
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, 0, 0, 0, 0,
+            false, 0);
+    SeqCanvas seqCanvas = alignFrame.alignPanel.getSeqPanel().seqCanvas;
+    int w = seqCanvas.getWidth();
+    // limited to number of whole columns, base 0
+    int expected = w / charWidth - 1;
+    assertEquals(testee.findColumn(evt), expected);
+
+    /*
+     * hide columns 5-10 (base 1)
+     */
+    alignFrame.getViewport().hideColumns(4, 9);
+    x = 5 * charWidth + 2;
+    // x is in 6th visible column, absolute column 12, or 11 base 0
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, 0, 0, 0, 0,
+            false, 0);
+    assertEquals(testee.findColumn(evt), 11);
+  }
+
+  @Test(groups = "Functional")
+  public void testFindColumn_wrapped()
+  {
+    Cache.applicationProperties.setProperty("WRAP_ALIGNMENT", "true");
+    AlignFrame alignFrame = new FileLoader().LoadFileWaitTillLoaded(
+            "examples/uniref50.fa", DataSourceType.FILE);
+    AlignViewport av = alignFrame.getViewport();
+    av.setScaleAboveWrapped(false);
+    av.setScaleLeftWrapped(false);
+    av.setScaleRightWrapped(false);
+    alignFrame.alignPanel.updateLayout();
+    SeqPanel testee = alignFrame.alignPanel.getSeqPanel();
+    int x = 0;
+    final int charWidth = av.getCharWidth();
+    assertTrue(charWidth > 0); // sanity check
+    assertEquals(av.getRanges().getStartRes(), 0);
+  
+    /*
+     * mouse at top left of wrapped panel, no West (left) scale
+     */
+    MouseEvent evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, 0,
+            0, 0, 0, false, 0);
+    assertEquals(testee.findColumn(evt), 0);
+    
+    /*
+     * not quite one charWidth across
+     */
+    x = charWidth-1;
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, 0,
+            0, 0, 0, false, 0);
+    assertEquals(testee.findColumn(evt), 0);
+  
+    /*
+     * one charWidth across
+     */
+    x = charWidth;
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, 0, 0, 0, 0,
+            false, 0);
+    assertEquals(testee.findColumn(evt), 1);
+
+    /*
+     * x over scale left (before drawn columns) results in -1
+     */
+    av.setScaleLeftWrapped(true);
+    alignFrame.alignPanel.updateLayout();
+    SeqCanvas seqCanvas = testee.seqCanvas;
+    int labelWidth = (int) PA.getValue(seqCanvas, "labelWidthWest");
+    assertTrue(labelWidth > 0);
+    x = labelWidth - 1;
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, 0, 0, 0, 0,
+            false, 0);
+    assertEquals(testee.findColumn(evt), -1);
+
+    x = labelWidth;
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, 0, 0, 0, 0,
+            false, 0);
+    assertEquals(testee.findColumn(evt), 0);
+
+    /*
+     * x over right edge of last residue (including scale left)
+     */
+    int residuesWide = av.getRanges().getViewportWidth();
+    assertTrue(residuesWide > 0);
+    x = labelWidth + charWidth * residuesWide - 1;
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, 0, 0, 0, 0,
+            false, 0);
+    assertEquals(testee.findColumn(evt), residuesWide - 1);
+
+    /*
+     * x over scale right (beyond drawn columns) results in -1
+     */
+    av.setScaleRightWrapped(true);
+    alignFrame.alignPanel.updateLayout();
+    labelWidth = (int) PA.getValue(seqCanvas, "labelWidthEast");
+    assertTrue(labelWidth > 0);
+    int residuesWide2 = av.getRanges().getViewportWidth();
+    assertTrue(residuesWide2 > 0);
+    assertTrue(residuesWide2 < residuesWide); // available width reduced
+    x += 1; // just over left edge of scale right
+    evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, 0, 0, 0, 0,
+            false, 0);
+    assertEquals(testee.findColumn(evt), -1);
+    
+    // todo add startRes offset, hidden columns
+
+  }
+  @BeforeClass(alwaysRun = true)
+  public static void setUpBeforeClass() throws Exception
+  {
+    /*
+     * use read-only test properties file
+     */
+    Cache.loadProperties("test/jalview/io/testProps.jvprops");
+    Jalview.main(new String[] { "-nonews" });
+  }
+
+  /**
+   * waits for Swing event dispatch queue to empty
+   */
+  synchronized void waitForSwing()
+  {
+    try
+    {
+      EventQueue.invokeAndWait(new Runnable()
+      {
+        @Override
+        public void run()
+        {
+        }
+      });
+    } catch (InterruptedException | InvocationTargetException e)
+    {
+      e.printStackTrace();
+    }
+  }
 }
index 6a00cde..05ce22d 100644 (file)
@@ -70,7 +70,7 @@ public class AnnotationFileIOTest
     }
   }
 
-  AlignmentI readAlignmentFile(File f)
+  protected AlignmentI readAlignmentFile(File f)
   {
     System.out.println("Reading file: " + f);
     String ff = f.getPath();
diff --git a/test/jalview/io/BackupFilesTest.java b/test/jalview/io/BackupFilesTest.java
new file mode 100644 (file)
index 0000000..723279d
--- /dev/null
@@ -0,0 +1,414 @@
+package jalview.io;
+
+import jalview.bin.Cache;
+import jalview.datamodel.AlignmentI;
+import jalview.datamodel.Sequence;
+import jalview.datamodel.SequenceI;
+import jalview.gui.AlignFrame;
+import jalview.gui.JvOptionPane;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.List;
+import java.util.TreeMap;
+
+import org.testng.Assert;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+public class BackupFilesTest
+{
+  @BeforeClass(alwaysRun = true)
+  public void setUpJvOptionPane()
+  {
+    JvOptionPane.setInteractiveMode(false);
+    JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
+  }
+
+  private static boolean actuallyDeleteTmpFiles = true;
+  private static String testDir = "examples";
+
+  private static String testBasename = "backupfilestest";
+
+  private static String testExt = ".fa";
+
+  private static String testFilename = testBasename + testExt;
+
+
+  private static String testFile = testDir + File.separatorChar
+          + testFilename;
+
+  private static String newBasename = testBasename + "Temp";
+
+  private static String newFilename = newBasename + testExt;
+
+  private static String newFile = testDir + File.separatorChar
+          + newFilename;
+
+  private static String sequenceName = "BACKUP_FILES";
+
+  private static String sequenceDescription = "backupfiles";
+
+  private static String sequenceData = "AAAARG";
+
+  private static String suffix = "_BACKUPTEST-%n";
+
+  private static int digits = 8;
+
+  private static int rollMax = 2;
+
+  private AlignFrame af;
+
+  // read and save with backupfiles disabled
+  @Test(groups = { "Functional" })
+  public void noBackupsEnabledTest() throws Exception
+  {
+    // set BACKUPFILES_ENABLED to false (i.e. turn off BackupFiles feature -- no
+    // backup files to be made when saving)
+    setBackupFilesOptions(false, true, true);
+
+    // init the newFile and backups (i.e. make sure newFile exists on its own
+    // and has no backups
+    initNewFileForTesting();
+
+    // now save again
+    save();
+
+    // check no backup files
+    File[] backupFiles = getBackupFiles();
+    Assert.assertTrue(backupFiles.length == 0);
+  }
+
+  // save keeping all backup files
+  @Test(groups = { "Functional" })
+  public void backupsEnabledNoRollMaxTest() throws Exception
+  {
+    // Enable BackupFiles and set noMax so all backupfiles get kept
+    setBackupFilesOptions(true, false, true);
+
+    // init the newFile and backups (i.e. make sure newFile exists on its own
+    // and has no backups)
+    initNewFileForTesting();
+
+    // now save a few times again. No rollMax so should have more than two
+    // backup files
+    int numSaves = 10;
+    for (int i = 0; i < numSaves; i++)
+    {
+      save();
+    }
+
+    // check 10 backup files
+    HashMap correctindexmap = new HashMap();
+    correctindexmap.put(1, "backupfilestestTemp.fa_BACKUPTEST-00000001");
+    correctindexmap.put(2, "backupfilestestTemp.fa_BACKUPTEST-00000002");
+    correctindexmap.put(3, "backupfilestestTemp.fa_BACKUPTEST-00000003");
+    correctindexmap.put(4, "backupfilestestTemp.fa_BACKUPTEST-00000004");
+    correctindexmap.put(5, "backupfilestestTemp.fa_BACKUPTEST-00000005");
+    correctindexmap.put(6, "backupfilestestTemp.fa_BACKUPTEST-00000006");
+    correctindexmap.put(7, "backupfilestestTemp.fa_BACKUPTEST-00000007");
+    correctindexmap.put(8, "backupfilestestTemp.fa_BACKUPTEST-00000008");
+    correctindexmap.put(9, "backupfilestestTemp.fa_BACKUPTEST-00000009");
+    correctindexmap.put(10, "backupfilestestTemp.fa_BACKUPTEST-00000010");
+    HashMap wrongindexmap = new HashMap();
+    wrongindexmap.put(1, "backupfilestestTemp.fa_BACKUPTEST-1");
+    wrongindexmap.put(2, "backupfilestestTemp.fa_BACKUPTEST-00000002");
+    wrongindexmap.put(3, "backupfilestestTemp.fa_BACKUPTEST-00000003");
+    wrongindexmap.put(4, "backupfilestestTemp.fa_BACKUPTEST-00000004");
+    wrongindexmap.put(5, "backupfilestestTemp.fa_BACKUPTEST-00000005");
+    wrongindexmap.put(6, "backupfilestestTemp.fa_BACKUPTEST-00000006");
+    wrongindexmap.put(7, "backupfilestestTemp.fa_BACKUPTEST-00000007");
+    wrongindexmap.put(8, "backupfilestestTemp.fa_BACKUPTEST-00000008");
+    wrongindexmap.put(9, "backupfilestestTemp.fa_BACKUPTEST-00000009");
+    wrongindexmap.put(10, "backupfilestestTemp.fa_BACKUPTEST-00000010");
+    int[] indexes2 = { 3, 4, 5, 6, 7, 8, 9, 10 };
+    int[] indexes3 = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
+    Assert.assertTrue(checkBackupFiles(correctindexmap));
+    Assert.assertFalse(checkBackupFiles(wrongindexmap));
+    Assert.assertFalse(checkBackupFiles(indexes2));
+    Assert.assertFalse(checkBackupFiles(indexes3));
+  }
+
+  // save keeping only the last rollMax (2) backup files
+  @Test(groups = { "Functional" })
+  public void backupsEnabledRollMaxTest() throws Exception
+  {
+    // Enable BackupFiles and set noMax so all backupfiles get kept
+    setBackupFilesOptions(true, false, false);
+
+    // init the newFile and backups (i.e. make sure newFile exists on its own
+    // and has no backups)
+    initNewFileForTesting();
+
+    // now save a few times again. No rollMax so should have more than two
+    // backup files
+    int numSaves = 10;
+    for (int i = 0; i < numSaves; i++)
+    {
+      save();
+    }
+
+    // check there are "rollMax" backup files and they are all saved correctly
+    // check 10 backup files
+    HashMap correctindexmap = new HashMap();
+    correctindexmap.put(9, "backupfilestestTemp.fa_BACKUPTEST-00000009");
+    correctindexmap.put(10, "backupfilestestTemp.fa_BACKUPTEST-00000010");
+    int[] indexes2 = { 10 };
+    int[] indexes3 = { 8, 9, 10 };
+    Assert.assertTrue(checkBackupFiles(correctindexmap));
+    Assert.assertFalse(checkBackupFiles(indexes2));
+    Assert.assertFalse(checkBackupFiles(indexes3));
+  }
+
+  // save keeping only the last rollMax (2) backup files
+  @Test(groups = { "Functional" })
+  public void backupsEnabledReverseRollMaxTest() throws Exception
+  {
+    // Enable BackupFiles and set noMax so all backupfiles get kept
+    setBackupFilesOptions(true, true, false);
+
+    // init the newFile and backups (i.e. make sure newFile exists on its own
+    // and has no backups)
+    initNewFileForTesting();
+
+    // now save a few times again. No rollMax so should have more than two
+    // backup files
+    int numSaves = 10;
+    for (int i = 0; i < numSaves; i++)
+    {
+      save();
+    }
+
+    // check there are "rollMax" backup files and they are all saved correctly
+    // check 10 backup files
+    HashMap correctindexmap = new HashMap();
+    correctindexmap.put(1, "backupfilestestTemp.fa_BACKUPTEST-00000001");
+    correctindexmap.put(2, "backupfilestestTemp.fa_BACKUPTEST-00000002");
+    int[] indexes2 = { 1 };
+    int[] indexes3 = { 1, 2, 3 };
+    Assert.assertTrue(checkBackupFiles(correctindexmap));
+    Assert.assertFalse(checkBackupFiles(indexes2));
+    Assert.assertFalse(checkBackupFiles(indexes3));
+  }
+
+  private void setBackupFilesOptions()
+  {
+    setBackupFilesOptions(true, false, false);
+  }
+
+  private void setBackupFilesOptions(boolean enabled, boolean reverse,
+          boolean noMax)
+  {
+    Cache.loadProperties("test/jalview/io/testProps.jvprops");
+
+    Cache.applicationProperties.setProperty(BackupFiles.ENABLED,
+            Boolean.toString(enabled));
+    Cache.applicationProperties.setProperty(BackupFiles.SUFFIX, suffix);
+    Cache.applicationProperties.setProperty(BackupFiles.SUFFIX_DIGITS,
+            Integer.toString(digits));
+    Cache.applicationProperties.setProperty(BackupFiles.REVERSE_ORDER,
+            Boolean.toString(reverse));
+    Cache.applicationProperties.setProperty(BackupFiles.NO_MAX,
+            Boolean.toString(noMax));
+    Cache.applicationProperties.setProperty(BackupFiles.ROLL_MAX,
+            Integer.toString(rollMax));
+    Cache.applicationProperties.setProperty(BackupFiles.CONFIRM_DELETE_OLD,
+            "false");
+  }
+
+  private void save()
+  {
+    if (af != null)
+    {
+    af.saveAlignment(newFile, jalview.io.FileFormat.Fasta);
+    }
+  }
+
+  // this runs cleanTmpFiles and then writes the newFile once as a starting
+  // point for all tests
+  private void initNewFileForTesting() throws Exception
+  {
+    cleanupTmpFiles();
+
+    AppletFormatAdapter afa = new AppletFormatAdapter();
+    AlignmentI al = afa.readFile(testFile, DataSourceType.FILE,
+            jalview.io.FileFormat.Fasta);
+    List<SequenceI> l = al.getSequences();
+
+    // check this is right
+    if (l.size() != 1)
+    {
+      throw new Exception("single sequence from '" + testFile
+              + "' not read in correctly (should be a single short sequence). List<SequenceI> size is wrong.");
+    }
+    SequenceI s = l.get(0);
+    Sequence ref = new Sequence(sequenceName, sequenceData);
+    ref.setDescription(sequenceDescription);
+    if (!sequencesEqual(s, ref))
+    {
+      throw new Exception("single sequence from '" + testFile
+              + "' not read in correctly (should be a single short sequence). SequenceI name, description or data is wrong.");
+    }
+    // save alignment file to new filename -- this doesn't test backups disabled
+    // yet as this file shouldn't already exist
+    af = new AlignFrame(al, 0, 0);
+    af.saveAlignment(newFile, jalview.io.FileFormat.Fasta);
+  }
+
+  // this deletes the newFile (if it exists) and any saved backup file for it
+  @AfterClass(alwaysRun = true)
+  private void cleanupTmpFiles()
+  {
+    File newfile = new File(newFile);
+    if (newfile.exists())
+    {
+      newfile.delete();
+    }
+    File[] tmpFiles = getBackupFiles(newFile, suffix, digits);
+    for (int i = 0; i < tmpFiles.length; i++)
+    {
+      if (actuallyDeleteTmpFiles)
+      {
+        tmpFiles[i].delete();
+      }
+      else
+      {
+        System.out.println("Pretending to delete " + tmpFiles[i].getPath());
+      }
+    }
+  }
+
+  private static File[] getBackupFiles(String f, String s, int i)
+  {
+    TreeMap<Integer, File> bfTreeMap = BackupFiles.getBackupFilesAsTreeMap(f,
+            s, i);
+    File[] backupFiles = new File[bfTreeMap.size()];
+    bfTreeMap.values().toArray(backupFiles);
+    return backupFiles;
+  }
+
+  private static File[] getBackupFiles()
+  {
+    return getBackupFiles(newFile, suffix, digits);
+  }
+
+  private static boolean checkBackupFiles(HashMap<Integer, String> indexmap)
+          throws IOException
+  {
+    TreeMap<Integer, File> map = BackupFiles.getBackupFilesAsTreeMap(newFile,
+            suffix, digits);
+    Enumeration<Integer> indexesenum = Collections
+            .enumeration(indexmap.keySet());
+    while (indexesenum.hasMoreElements())
+    {
+      int i = indexesenum.nextElement();
+      String indexfilename = indexmap.get(i);
+      if (!map.containsKey(i))
+      {
+        return false;
+      }
+      File f = map.get(i);
+      if (!filesContentEqual(newFile, f.getPath()))
+      {
+        return false;
+      }
+      map.remove(i);
+      if (f == null)
+      {
+        return false;
+      }
+      if (!f.getName().equals(indexfilename))
+      {
+        return false;
+      }
+    }
+    // should be nothing left in map
+    if (map.size() > 0)
+    {
+      return false;
+    }
+
+    return true;
+  }
+
+  private static boolean checkBackupFiles(int[] indexes) throws IOException
+  {
+    TreeMap<Integer, File> map = BackupFiles.getBackupFilesAsTreeMap(newFile,
+            suffix, digits);
+    for (int m = 0; m < indexes.length; m++)
+    {
+      int i = indexes[m];
+      if (!map.containsKey(i))
+      {
+        return false;
+      }
+      File f = map.get(i);
+      if (!filesContentEqual(newFile, f.getPath()))
+      {
+        return false;
+      }
+      map.remove(i);
+      if (f == null)
+      {
+        return false;
+      }
+      // check the filename -- although this uses the same code to forumulate the filename so not much of a test!
+      String filename = BackupFilenameParts.getBackupFilename(i,
+              newBasename + testExt, suffix, digits);
+      if (!filename.equals(f.getName()))
+      {
+        System.out.println("Supposed filename '" + filename
+                + "' not equal to actual filename '" + f.getName() + "'");
+        return false;
+      }
+    }
+    // should be nothing left in map
+    if (map.size() > 0)
+    {
+      return false;
+    }
+
+    return true;
+  }
+
+  private static String[] getBackupFilesAsStrings()
+  {
+    File[] files = getBackupFiles(newFile, suffix, digits);
+    String[] filenames = new String[files.length];
+    for (int i = 0; i < files.length; i++)
+    {
+      filenames[i] = files[i].getPath();
+    }
+    return filenames;
+  }
+
+  public static boolean sequencesEqual(SequenceI s1, SequenceI s2) {
+    if (s1 == null && s2 == null) {
+      return true;
+    } else if (s1 == null || s2 == null) {
+      return false;
+    }
+    return (s1.getName().equals(s2.getName())
+            && s1.getDescription().equals(s2.getDescription())
+            && Arrays.equals(s1.getSequence(), s2.getSequence()));
+  }
+
+  public static boolean filesContentEqual(String fileName1,
+          String fileName2) throws IOException
+  {
+    Path file1 = Paths.get(fileName1);
+    Path file2 = Paths.get(fileName2);
+    byte[] bytes1 = Files.readAllBytes(file1);
+    byte[] bytes2 = Files.readAllBytes(file2);
+    return Arrays.equals(bytes1, bytes2);
+  }
+
+}
index 2b8a62f..53a0acb 100644 (file)
@@ -29,8 +29,8 @@ import jalview.datamodel.SequenceI;
 import jalview.gui.AlignFrame;
 import jalview.gui.CrossRefAction;
 import jalview.gui.Desktop;
-import jalview.gui.Jalview2XML;
 import jalview.gui.JvOptionPane;
+import jalview.project.Jalview2XML;
 import jalview.util.DBRefUtils;
 
 import java.io.File;
@@ -41,13 +41,13 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import junit.extensions.PA;
-
 import org.testng.Assert;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
+import junit.extensions.PA;
+
 @Test(singleThreaded = true)
 public class CrossRef2xmlTests extends Jalview2xmlBase
 {
index 32ca841..77c18db 100644 (file)
@@ -45,12 +45,12 @@ import jalview.gui.JvOptionPane;
 import jalview.schemes.FeatureColour;
 import jalview.structure.StructureSelectionManager;
 import jalview.util.matcher.Condition;
+import jalview.viewmodel.seqfeatures.FeatureRendererModel;
+import jalview.viewmodel.seqfeatures.FeatureRendererModel.FeatureSettingsBean;
 
 import java.awt.Color;
 import java.io.File;
 import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
@@ -475,24 +475,22 @@ public class FeaturesFileTest
      * first with no features displayed, exclude non-positional features
      */
     FeatureRenderer fr = af.alignPanel.getFeatureRenderer();
-    Map<String, FeatureColourI> visible = fr.getDisplayedFeatureCols();
-    List<String> visibleGroups = new ArrayList<>(
-            Arrays.asList(new String[] {}));
-    String exported = featuresFile.printJalviewFormat(
-            al.getSequencesArray(), visible, null, visibleGroups, false);
+    String exported = featuresFile
+            .printJalviewFormat(al.getSequencesArray(), fr, false);
     String expected = "No Features Visible";
     assertEquals(expected, exported);
 
     /*
-     * include non-positional features
+     * include non-positional features, but still no positional features
      */
-    visibleGroups.add("uniprot");
-    exported = featuresFile.printJalviewFormat(al.getSequencesArray(),
-            visible, null, visibleGroups, true);
-    expected = "Cath\tFER_CAPAA\t-1\t0\t0\tDomain\t0.0\n"
-            + "desc1\tFER_CAPAN\t-1\t0\t0\tPfam\t1.3\n"
-            + "desc3\tFER1_SOLLC\t-1\t0\t0\tPfam\n" // NaN is not output
-            + "\nSTARTGROUP\tuniprot\nENDGROUP\tuniprot\n";
+    fr.setGroupVisibility("uniprot", true);
+    exported = featuresFile.printJalviewFormat(al.getSequencesArray(), fr,
+            true);
+    expected = "\nSTARTGROUP\tuniprot\n"
+            + "Cath\tFER_CAPAA\t-1\t0\t0\tDomain\t0.0\n"
+            + "ENDGROUP\tuniprot\n\n"
+            + "desc1\tFER_CAPAN\t-1\t0\t0\tPfam\t1.3\n\n"
+            + "desc3\tFER1_SOLLC\t-1\t0\t0\tPfam\n"; // NaN is not output
     assertEquals(expected, exported);
 
     /*
@@ -500,9 +498,8 @@ public class FeaturesFileTest
      */
     fr.setVisible("METAL");
     fr.setVisible("GAMMA-TURN");
-    visible = fr.getDisplayedFeatureCols();
-    exported = featuresFile.printJalviewFormat(al.getSequencesArray(),
-            visible, null, visibleGroups, false);
+    exported = featuresFile.printJalviewFormat(al.getSequencesArray(), fr,
+            false);
     expected = "METAL\tcc9900\n"
             + "GAMMA-TURN\tscore|ff0000|00ffff|noValueMin|20.0|95.0|below|66.0\n"
             + "\nSTARTGROUP\tuniprot\n"
@@ -515,11 +512,10 @@ public class FeaturesFileTest
      * now set Pfam visible
      */
     fr.setVisible("Pfam");
-    visible = fr.getDisplayedFeatureCols();
-    exported = featuresFile.printJalviewFormat(al.getSequencesArray(),
-            visible, null, visibleGroups, false);
+    exported = featuresFile.printJalviewFormat(al.getSequencesArray(), fr,
+            false);
     /*
-     * features are output within group, ordered by sequence and by type
+     * features are output within group, ordered by sequence and type
      */
     expected = "METAL\tcc9900\n"
             + "Pfam\tff0000\n"
@@ -529,9 +525,36 @@ public class FeaturesFileTest
             + "Iron\tFER_CAPAA\t-1\t39\t39\tMETAL\t0.0\n"
             + "<html>Pfam domain<a href=\"http://pfam.xfam.org/family/PF00111\">Pfam_3_4</a></html>\tFER_CAPAA\t-1\t20\t20\tPfam\t0.0\n"
             + "ENDGROUP\tuniprot\n"
-            // null / empty group features output after features in named
-            // groups:
+            // null / empty group features are output after named groups
+            + "\ndesc2\tFER_CAPAN\t-1\t4\t9\tPfam\n"
+            + "\ndesc4\tFER1_SOLLC\t-1\t5\t8\tPfam\t-2.6\n";
+    assertEquals(expected, exported);
+
+    /*
+     * hide uniprot group
+     */
+    fr.setGroupVisibility("uniprot", false);
+    expected = "METAL\tcc9900\n" + "Pfam\tff0000\n"
+            + "GAMMA-TURN\tscore|ff0000|00ffff|noValueMin|20.0|95.0|below|66.0\n"
+            + "\ndesc2\tFER_CAPAN\t-1\t4\t9\tPfam\n"
+            + "\ndesc4\tFER1_SOLLC\t-1\t5\t8\tPfam\t-2.6\n";
+    exported = featuresFile.printJalviewFormat(al.getSequencesArray(), fr,
+            false);
+    assertEquals(expected, exported);
+
+    /*
+     * include non-positional (overrides group not shown)
+     */
+    exported = featuresFile.printJalviewFormat(al.getSequencesArray(), fr,
+            true);
+    expected = "METAL\tcc9900\n" + "Pfam\tff0000\n"
+            + "GAMMA-TURN\tscore|ff0000|00ffff|noValueMin|20.0|95.0|below|66.0\n"
+            + "\nSTARTGROUP\tuniprot\n"
+            + "Cath\tFER_CAPAA\t-1\t0\t0\tDomain\t0.0\n"
+            + "ENDGROUP\tuniprot\n"
+            + "\ndesc1\tFER_CAPAN\t-1\t0\t0\tPfam\t1.3\n"
             + "desc2\tFER_CAPAN\t-1\t4\t9\tPfam\n"
+            + "\ndesc3\tFER1_SOLLC\t-1\t0\t0\tPfam\n"
             + "desc4\tFER1_SOLLC\t-1\t5\t8\tPfam\t-2.6\n";
     assertEquals(expected, exported);
   }
@@ -547,16 +570,14 @@ public class FeaturesFileTest
      * no features
      */
     FeaturesFile featuresFile = new FeaturesFile();
-    FeatureRenderer fr = af.alignPanel.getFeatureRenderer();
-    Map<String, FeatureColourI> visible = new HashMap<>();
-    List<String> visibleGroups = new ArrayList<>(
-            Arrays.asList(new String[] {}));
+    FeatureRendererModel fr = (FeatureRendererModel) af.alignPanel
+            .getFeatureRenderer();
     String exported = featuresFile.printGffFormat(al.getSequencesArray(),
-            visible, visibleGroups, false);
+            fr, false);
     String gffHeader = "##gff-version 2\n";
     assertEquals(gffHeader, exported);
-    exported = featuresFile.printGffFormat(al.getSequencesArray(), visible,
-            visibleGroups, true);
+    exported = featuresFile.printGffFormat(al.getSequencesArray(), fr,
+            true);
     assertEquals(gffHeader, exported);
 
     /*
@@ -578,18 +599,31 @@ public class FeaturesFileTest
     al.getSequenceAt(1).addSequenceFeature(sf);
 
     /*
+     * 'discover' features then hide all feature types
+     */
+    fr.findAllFeatures(true);
+    FeatureSettingsBean[] data = new FeatureSettingsBean[4];
+    FeatureColourI fc = new FeatureColour(Color.PINK);
+    data[0] = new FeatureSettingsBean("Domain", fc, null, false);
+    data[1] = new FeatureSettingsBean("METAL", fc, null, false);
+    data[2] = new FeatureSettingsBean("GAMMA-TURN", fc, null, false);
+    data[3] = new FeatureSettingsBean("Pfam", fc, null, false);
+    fr.setFeaturePriority(data);
+
+    /*
      * with no features displayed, exclude non-positional features
      */
-    exported = featuresFile.printGffFormat(al.getSequencesArray(), visible,
-            visibleGroups, false);
+    exported = featuresFile.printGffFormat(al.getSequencesArray(), fr,
+            false);
     assertEquals(gffHeader, exported);
 
     /*
      * include non-positional features
      */
-    visibleGroups.add("Uniprot");
-    exported = featuresFile.printGffFormat(al.getSequencesArray(), visible,
-            visibleGroups, true);
+    fr.setGroupVisibility("Uniprot", true);
+    fr.setGroupVisibility("s3dm", false);
+    exported = featuresFile.printGffFormat(al.getSequencesArray(), fr,
+            true);
     String expected = gffHeader
             + "FER_CAPAA\tUniprot\tDomain\t0\t0\t0.0\t.\t.\n";
     assertEquals(expected, exported);
@@ -600,9 +634,8 @@ public class FeaturesFileTest
      */
     fr.setVisible("METAL");
     fr.setVisible("GAMMA-TURN");
-    visible = fr.getDisplayedFeatureCols();
-    exported = featuresFile.printGffFormat(al.getSequencesArray(), visible,
-            visibleGroups, false);
+    exported = featuresFile.printGffFormat(al.getSequencesArray(), fr,
+            false);
     // METAL feature has null group: description used for column 2
     expected = gffHeader + "FER_CAPAA\tCath\tMETAL\t39\t39\t1.2\t.\t.\n";
     assertEquals(expected, exported);
@@ -610,9 +643,9 @@ public class FeaturesFileTest
     /*
      * set s3dm group visible
      */
-    visibleGroups.add("s3dm");
-    exported = featuresFile.printGffFormat(al.getSequencesArray(), visible,
-            visibleGroups, false);
+    fr.setGroupVisibility("s3dm", true);
+    exported = featuresFile.printGffFormat(al.getSequencesArray(), fr,
+            false);
     // METAL feature has null group: description used for column 2
     expected = gffHeader + "FER_CAPAA\tCath\tMETAL\t39\t39\t1.2\t.\t.\n"
             + "FER_CAPAN\ts3dm\tGAMMA-TURN\t36\t38\t2.1\t.\t.\n";
@@ -622,9 +655,8 @@ public class FeaturesFileTest
      * now set Pfam visible
      */
     fr.setVisible("Pfam");
-    visible = fr.getDisplayedFeatureCols();
-    exported = featuresFile.printGffFormat(al.getSequencesArray(), visible,
-            visibleGroups, false);
+    exported = featuresFile.printGffFormat(al.getSequencesArray(), fr,
+            false);
     // Pfam feature columns include strand(+), phase(2), attributes
     expected = gffHeader
             + "FER_CAPAA\tCath\tMETAL\t39\t39\t1.2\t.\t.\n"
@@ -704,7 +736,167 @@ public class FeaturesFileTest
     featureFilters.put("pfam", filter2);
     visible.put("foobar", new FeatureColour(Color.blue));
     ff.outputFeatureFilters(sb, visible, featureFilters);
-    String expected = "\nSTARTFILTERS\nfoobar\tLabel Present\npfam\t(CSQ:PolyPhen Present) AND (Score LE -2.4)\nENDFILTERS\n\n";
+    String expected = "\nSTARTFILTERS\nfoobar\tLabel Present\npfam\t(CSQ:PolyPhen Present) AND (Score LE -2.4)\nENDFILTERS\n";
     assertEquals(expected, sb.toString());
   }
+
+  /**
+   * Output as GFF should not include features which are not visible due to
+   * colour threshold or feature filter settings
+   * 
+   * @throws Exception
+   */
+  @Test(groups = { "Functional" })
+  public void testPrintGffFormat_withFilters() throws Exception
+  {
+    File f = new File("examples/uniref50.fa");
+    AlignmentI al = readAlignmentFile(f);
+    AlignFrame af = new AlignFrame(al, 500, 500);
+    SequenceFeature sf1 = new SequenceFeature("METAL", "Cath", 39, 39, 1.2f,
+            null);
+    sf1.setValue("clin_sig", "Likely Pathogenic");
+    sf1.setValue("AF", "24");
+    al.getSequenceAt(0).addSequenceFeature(sf1);
+    SequenceFeature sf2 = new SequenceFeature("METAL", "Cath", 41, 41, 0.6f,
+            null);
+    sf2.setValue("clin_sig", "Benign");
+    sf2.setValue("AF", "46");
+    al.getSequenceAt(0).addSequenceFeature(sf2);
+  
+    FeaturesFile featuresFile = new FeaturesFile();
+    FeatureRenderer fr = af.alignPanel.getFeatureRenderer();
+    final String gffHeader = "##gff-version 2\n";
+
+    fr.setVisible("METAL");
+    fr.setColour("METAL", new FeatureColour(Color.PINK));
+    String exported = featuresFile.printGffFormat(al.getSequencesArray(),
+            fr, false);
+    String expected = gffHeader
+            + "FER_CAPAA\tCath\tMETAL\t39\t39\t1.2\t.\t.\n"
+            + "FER_CAPAA\tCath\tMETAL\t41\t41\t0.6\t.\t.\n";
+    assertEquals(expected, exported);
+
+    /*
+     * now threshold to Score > 1.1 - should exclude sf2
+     */
+    FeatureColourI fc = new FeatureColour(null, Color.white, Color.BLACK,
+            Color.white, 0f, 2f);
+    fc.setAboveThreshold(true);
+    fc.setThreshold(1.1f);
+    fr.setColour("METAL", fc);
+    exported = featuresFile.printGffFormat(al.getSequencesArray(), fr,
+            false);
+    expected = gffHeader + "FER_CAPAA\tCath\tMETAL\t39\t39\t1.2\t.\t.\n";
+    assertEquals(expected, exported);
+
+    /*
+     * remove threshold and check sf2 is exported
+     */
+    fc.setAboveThreshold(false);
+    exported = featuresFile.printGffFormat(al.getSequencesArray(), fr,
+            false);
+    expected = gffHeader + "FER_CAPAA\tCath\tMETAL\t39\t39\t1.2\t.\t.\n"
+            + "FER_CAPAA\tCath\tMETAL\t41\t41\t0.6\t.\t.\n";
+    assertEquals(expected, exported);
+
+    /*
+     * filter on (clin_sig contains Benign) - should include sf2 and exclude sf1
+     */
+    FeatureMatcherSetI filter = new FeatureMatcherSet();
+    filter.and(FeatureMatcher.byAttribute(Condition.Contains, "benign",
+            "clin_sig"));
+    fr.setFeatureFilter("METAL", filter);
+    exported = featuresFile.printGffFormat(al.getSequencesArray(), fr,
+            false);
+    expected = gffHeader + "FER_CAPAA\tCath\tMETAL\t41\t41\t0.6\t.\t.\n";
+    assertEquals(expected, exported);
+  }
+
+  /**
+   * Output as Jalview should not include features which are not visible due to
+   * colour threshold or feature filter settings
+   * 
+   * @throws Exception
+   */
+  @Test(groups = { "Functional" })
+  public void testPrintJalviewFormat_withFilters() throws Exception
+  {
+    File f = new File("examples/uniref50.fa");
+    AlignmentI al = readAlignmentFile(f);
+    AlignFrame af = new AlignFrame(al, 500, 500);
+    SequenceFeature sf1 = new SequenceFeature("METAL", "Cath", 39, 39, 1.2f,
+            "grp1");
+    sf1.setValue("clin_sig", "Likely Pathogenic");
+    sf1.setValue("AF", "24");
+    al.getSequenceAt(0).addSequenceFeature(sf1);
+    SequenceFeature sf2 = new SequenceFeature("METAL", "Cath", 41, 41, 0.6f,
+            "grp2");
+    sf2.setValue("clin_sig", "Benign");
+    sf2.setValue("AF", "46");
+    al.getSequenceAt(0).addSequenceFeature(sf2);
+  
+    FeaturesFile featuresFile = new FeaturesFile();
+    FeatureRenderer fr = af.alignPanel.getFeatureRenderer();
+    fr.findAllFeatures(true);
+  
+    fr.setVisible("METAL");
+    fr.setColour("METAL", new FeatureColour(Color.PINK));
+    String exported = featuresFile.printJalviewFormat(
+            al.getSequencesArray(),
+            fr, false);
+    String expected = "METAL\tffafaf\n\nSTARTGROUP\tgrp1\n"
+            + "Cath\tFER_CAPAA\t-1\t39\t39\tMETAL\t1.2\n"
+            + "ENDGROUP\tgrp1\n\nSTARTGROUP\tgrp2\n"
+            + "Cath\tFER_CAPAA\t-1\t41\t41\tMETAL\t0.6\n"
+            + "ENDGROUP\tgrp2\n";
+    assertEquals(expected, exported);
+  
+    /*
+     * now threshold to Score > 1.1 - should exclude sf2
+     * (and there should be no empty STARTGROUP/ENDGROUP output)
+     */
+    FeatureColourI fc = new FeatureColour(null, Color.white, Color.BLACK,
+            Color.white, 0f, 2f);
+    fc.setAboveThreshold(true);
+    fc.setThreshold(1.1f);
+    fr.setColour("METAL", fc);
+    exported = featuresFile.printJalviewFormat(al.getSequencesArray(), fr,
+            false);
+    expected = "METAL\tscore|ffffff|000000|noValueMin|abso|0.0|2.0|above|1.1\n\n"
+            + "STARTGROUP\tgrp1\n"
+            + "Cath\tFER_CAPAA\t-1\t39\t39\tMETAL\t1.2\n"
+            + "ENDGROUP\tgrp1\n";
+    assertEquals(expected, exported);
+  
+    /*
+     * remove threshold and check sf2 is exported
+     */
+    fc.setAboveThreshold(false);
+    exported = featuresFile.printJalviewFormat(al.getSequencesArray(), fr,
+            false);
+    expected = "METAL\tscore|ffffff|000000|noValueMin|abso|0.0|2.0|none\n\n"
+            + "STARTGROUP\tgrp1\n"
+            + "Cath\tFER_CAPAA\t-1\t39\t39\tMETAL\t1.2\n"
+            + "ENDGROUP\tgrp1\n\nSTARTGROUP\tgrp2\n"
+            + "Cath\tFER_CAPAA\t-1\t41\t41\tMETAL\t0.6\n"
+            + "ENDGROUP\tgrp2\n";
+    assertEquals(expected, exported);
+  
+    /*
+     * filter on (clin_sig contains Benign) - should include sf2 and exclude sf1
+     */
+    FeatureMatcherSetI filter = new FeatureMatcherSet();
+    filter.and(FeatureMatcher.byAttribute(Condition.Contains, "benign",
+            "clin_sig"));
+    fr.setFeatureFilter("METAL", filter);
+    exported = featuresFile.printJalviewFormat(al.getSequencesArray(), fr,
+            false);
+    expected = "FER_CAPAA\tCath\tMETAL\t41\t41\t0.6\t.\t.\n";
+    expected = "METAL\tscore|ffffff|000000|noValueMin|abso|0.0|2.0|none\n\n"
+            + "STARTFILTERS\nMETAL\tclin_sig Contains benign\nENDFILTERS\n\n"
+            + "STARTGROUP\tgrp2\n"
+            + "Cath\tFER_CAPAA\t-1\t41\t41\tMETAL\t0.6\n"
+            + "ENDGROUP\tgrp2\n";
+    assertEquals(expected, exported);
+  }
 }
index 97349b5..254feaa 100644 (file)
@@ -13,11 +13,18 @@ import jalview.analysis.scoremodels.ScoreModels;
 import java.io.IOException;
 import java.net.MalformedURLException;
 
+import org.testng.annotations.AfterMethod;
 import org.testng.annotations.Test;
 
 public class ScoreMatrixFileTest
 {
 
+  @AfterMethod(alwaysRun=true)
+  public void tearDownAfterTest()
+  {
+    ScoreModels.getInstance().reset();
+  }
+
   /**
    * Test a successful parse of a (small) score matrix file
    * 
index 87e35c7..cf3c7e5 100644 (file)
@@ -37,11 +37,11 @@ import jalview.viewmodel.seqfeatures.FeatureRendererModel;
 import java.awt.Color;
 import java.util.Map;
 
-import junit.extensions.PA;
-
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
+import junit.extensions.PA;
+
 public class SequenceAnnotationReportTest
 {
 
@@ -158,7 +158,8 @@ public class SequenceAnnotationReportTest
     /*
      * then with colour by an attribute the feature lacks
      */
-    FeatureColourI fc = new FeatureColour(Color.white, Color.black, 5, 10);
+    FeatureColourI fc = new FeatureColour(null, Color.white, Color.black,
+            null, 5, 10);
     fc.setAttributeName("Pfam");
     fr.setColour("METAL", fc);
     sb.setLength(0);
@@ -187,7 +188,8 @@ public class SequenceAnnotationReportTest
 
     FeatureRendererModel fr = new FeatureRenderer(null);
     Map<String, float[][]> minmax = fr.getMinMax();
-    FeatureColourI fc = new FeatureColour(Color.white, Color.blue, 12, 22);
+    FeatureColourI fc = new FeatureColour(null, Color.white, Color.blue,
+            null, 12, 22);
     fc.setAttributeName("clinical_significance");
     fr.setColour("METAL", fc);
     minmax.put("METAL", new float[][] { { 0f, 1f }, null });
@@ -328,7 +330,8 @@ public class SequenceAnnotationReportTest
 
     // with showDbRefs = true, colour Variant features by clinical_significance
     sb.setLength(0);
-    FeatureColourI fc = new FeatureColour(Color.green, Color.pink, 2, 3);
+    FeatureColourI fc = new FeatureColour(null, Color.green, Color.pink,
+            null, 2, 3);
     fc.setAttributeName("clinical_significance");
     fr.setColour("Variant", fc);
     sar.createSequenceAnnotationReport(sb, seq, true, true, fr);
index 96364e4..f180395 100644 (file)
@@ -1,5 +1,13 @@
 #---JalviewX Properties File---
 #Fri Apr 25 09:54:25 BST 2014
+#
+BACKUPFILES_ROLL_MAX=2
+BACKUPFILES_REVERSE_ORDER=false
+BACKUPFILES_SUFFIX=_BACKUPFILESTESTTMP%n
+BACKUPFILES_CONFIRM_DELETE_OLD=false
+BACKUPFILES_NO_MAX=false
+BACKUPFILES_ENABLED=true
+BACKUPFILES_SUFFIX_DIGITS=8
 SCREEN_Y=768
 SCREEN_X=936
 SHOW_WSDISCOVERY_ERRORS=true
index 7e3c0b4..9e0efe6 100644 (file)
@@ -66,7 +66,7 @@ public class VCFLoaderTest
       // insertion G/GA is transferred to nucleotide but not to peptide
       "17\t45051613\t.\tG\tGA,C\t1666.64\tRF\tAC=15;AF=3.0e-03,2.0e-03" };
 
-  @BeforeClass
+  @BeforeClass(alwaysRun = true)
   public void setUp()
   {
     /*
@@ -103,7 +103,9 @@ public class VCFLoaderTest
     assertEquals(sf.getFeatureGroup(), "VCF");
     assertEquals(sf.getBegin(), 2);
     assertEquals(sf.getEnd(), 2);
-    assertEquals(sf.getScore(), 4.0e-03, DELTA);
+    assertEquals(sf.getScore(), 0f);
+    assertEquals(Float.parseFloat((String) sf.getValue("AF")), 4.0e-03,
+            DELTA);
     assertEquals(sf.getValue(Gff3Helper.ALLELES), "A,C");
     assertEquals(sf.getType(), SequenceOntologyI.SEQUENCE_VARIANT);
     sf = geneFeatures.get(1);
@@ -111,7 +113,9 @@ public class VCFLoaderTest
     assertEquals(sf.getBegin(), 2);
     assertEquals(sf.getEnd(), 2);
     assertEquals(sf.getType(), SequenceOntologyI.SEQUENCE_VARIANT);
-    assertEquals(sf.getScore(), 5.0e-03, DELTA);
+    assertEquals(sf.getScore(), 0f);
+    assertEquals(Float.parseFloat((String) sf.getValue("AF")), 5.0e-03,
+            DELTA);
     assertEquals(sf.getValue(Gff3Helper.ALLELES), "A,T");
 
     sf = geneFeatures.get(2);
@@ -119,7 +123,9 @@ public class VCFLoaderTest
     assertEquals(sf.getBegin(), 4);
     assertEquals(sf.getEnd(), 4);
     assertEquals(sf.getType(), SequenceOntologyI.SEQUENCE_VARIANT);
-    assertEquals(sf.getScore(), 2.0e-03, DELTA);
+    assertEquals(sf.getScore(), 0f);
+    assertEquals(Float.parseFloat((String) sf.getValue("AF")), 2.0e-03,
+            DELTA);
     assertEquals(sf.getValue(Gff3Helper.ALLELES), "G,C");
 
     sf = geneFeatures.get(3);
@@ -127,7 +133,9 @@ public class VCFLoaderTest
     assertEquals(sf.getBegin(), 4);
     assertEquals(sf.getEnd(), 4);
     assertEquals(sf.getType(), SequenceOntologyI.SEQUENCE_VARIANT);
-    assertEquals(sf.getScore(), 3.0e-03, DELTA);
+    assertEquals(sf.getScore(), 0f);
+    assertEquals(Float.parseFloat((String) sf.getValue("AF")), 3.0e-03,
+            DELTA);
     assertEquals(sf.getValue(Gff3Helper.ALLELES), "G,GA");
 
     /*
@@ -141,14 +149,18 @@ public class VCFLoaderTest
     assertEquals(sf.getBegin(), 2);
     assertEquals(sf.getEnd(), 2);
     assertEquals(sf.getType(), SequenceOntologyI.SEQUENCE_VARIANT);
-    assertEquals(sf.getScore(), 2.0e-03, DELTA);
+    assertEquals(sf.getScore(), 0f);
+    assertEquals(Float.parseFloat((String) sf.getValue("AF")), 2.0e-03,
+            DELTA);
     assertEquals(sf.getValue(Gff3Helper.ALLELES), "G,C");
     sf = transcriptFeatures.get(1);
     assertEquals(sf.getFeatureGroup(), "VCF");
     assertEquals(sf.getBegin(), 2);
     assertEquals(sf.getEnd(), 2);
     assertEquals(sf.getType(), SequenceOntologyI.SEQUENCE_VARIANT);
-    assertEquals(sf.getScore(), 3.0e-03, DELTA);
+    assertEquals(sf.getScore(), 0f);
+    assertEquals(Float.parseFloat((String) sf.getValue("AF")), 3.0e-03,
+            DELTA);
     assertEquals(sf.getValue(Gff3Helper.ALLELES), "G,GA");
 
     /*
@@ -337,7 +349,9 @@ public class VCFLoaderTest
     assertEquals(sf.getBegin(), 24);
     assertEquals(sf.getEnd(), 24);
     assertEquals(sf.getType(), SequenceOntologyI.SEQUENCE_VARIANT);
-    assertEquals(sf.getScore(), 5.0e-03, DELTA);
+    assertEquals(sf.getScore(), 0f);
+    assertEquals(Float.parseFloat((String) sf.getValue("AF")), 5.0e-03,
+            DELTA);
     assertEquals(sf.getValue(Gff3Helper.ALLELES), "T,A");
 
     /*
@@ -348,7 +362,9 @@ public class VCFLoaderTest
     assertEquals(sf.getBegin(), 24);
     assertEquals(sf.getEnd(), 24);
     assertEquals(sf.getType(), SequenceOntologyI.SEQUENCE_VARIANT);
-    assertEquals(sf.getScore(), 4.0e-03, DELTA);
+    assertEquals(sf.getScore(), 0f);
+    assertEquals(Float.parseFloat((String) sf.getValue("AF")), 4.0e-03,
+            DELTA);
     assertEquals(sf.getValue(Gff3Helper.ALLELES), "T,G");
 
     /*
@@ -359,7 +375,9 @@ public class VCFLoaderTest
     assertEquals(sf.getBegin(), 22);
     assertEquals(sf.getEnd(), 22);
     assertEquals(sf.getType(), SequenceOntologyI.SEQUENCE_VARIANT);
-    assertEquals(sf.getScore(), 2.0e-03, DELTA);
+    assertEquals(sf.getScore(), 0f);
+    assertEquals(Float.parseFloat((String) sf.getValue("AF")), 2.0e-03,
+            DELTA);
     assertEquals(sf.getValue(Gff3Helper.ALLELES), "C,G");
 
     /*
@@ -374,7 +392,9 @@ public class VCFLoaderTest
     assertEquals(sf.getBegin(), 21);
     assertEquals(sf.getEnd(), 21);
     assertEquals(sf.getType(), SequenceOntologyI.SEQUENCE_VARIANT);
-    assertEquals(sf.getScore(), 3.0e-03, DELTA);
+    assertEquals(sf.getScore(), 0f);
+    assertEquals(Float.parseFloat((String) sf.getValue("AF")), 3.0e-03,
+            DELTA);
     assertEquals(sf.getValue(Gff3Helper.ALLELES), "G,GT");
 
     /*
@@ -392,7 +412,9 @@ public class VCFLoaderTest
     assertEquals(sf.getBegin(), 16);
     assertEquals(sf.getEnd(), 16);
     assertEquals(sf.getType(), SequenceOntologyI.SEQUENCE_VARIANT);
-    assertEquals(sf.getScore(), 3.0e-03, DELTA);
+    assertEquals(sf.getScore(), 0f);
+    assertEquals(Float.parseFloat((String) sf.getValue("AF")), 3.0e-03,
+            DELTA);
     assertEquals(sf.getValue(Gff3Helper.ALLELES), "G,GT");
 
     /*
@@ -403,7 +425,9 @@ public class VCFLoaderTest
     assertEquals(sf.getBegin(), 17);
     assertEquals(sf.getEnd(), 17);
     assertEquals(sf.getType(), SequenceOntologyI.SEQUENCE_VARIANT);
-    assertEquals(sf.getScore(), 2.0e-03, DELTA);
+    assertEquals(sf.getScore(), 0f);
+    assertEquals(Float.parseFloat((String) sf.getValue("AF")), 2.0e-03,
+            DELTA);
     assertEquals(sf.getValue(Gff3Helper.ALLELES), "C,G");
 
     /*
@@ -463,7 +487,8 @@ public class VCFLoaderTest
     SequenceFeature sf = geneFeatures.get(0);
     assertEquals(sf.getBegin(), 1);
     assertEquals(sf.getEnd(), 1);
-    assertEquals(sf.getScore(), 0.1f, DELTA);
+    assertEquals(sf.getScore(), 0f);
+    assertEquals(Float.parseFloat((String) sf.getValue("AF")), 0.1f, DELTA);
     assertEquals(sf.getValue("alleles"), "C,A");
     // gene features include Consequence for all transcripts
     Map map = (Map) sf.getValue("CSQ");
@@ -472,7 +497,8 @@ public class VCFLoaderTest
     sf = geneFeatures.get(1);
     assertEquals(sf.getBegin(), 5);
     assertEquals(sf.getEnd(), 5);
-    assertEquals(sf.getScore(), 0.2f, DELTA);
+    assertEquals(sf.getScore(), 0f);
+    assertEquals(Float.parseFloat((String) sf.getValue("AF")), 0.2f, DELTA);
     assertEquals(sf.getValue("alleles"), "C,T");
     map = (Map) sf.getValue("CSQ");
     assertEquals(map.size(), 9);
@@ -480,7 +506,8 @@ public class VCFLoaderTest
     sf = geneFeatures.get(2);
     assertEquals(sf.getBegin(), 9);
     assertEquals(sf.getEnd(), 11); // deletion over 3 positions
-    assertEquals(sf.getScore(), 0.3f, DELTA);
+    assertEquals(sf.getScore(), 0f);
+    assertEquals(Float.parseFloat((String) sf.getValue("AF")), 0.3f, DELTA);
     assertEquals(sf.getValue("alleles"), "CGG,C");
     map = (Map) sf.getValue("CSQ");
     assertEquals(map.size(), 9);
@@ -488,7 +515,8 @@ public class VCFLoaderTest
     sf = geneFeatures.get(3);
     assertEquals(sf.getBegin(), 13);
     assertEquals(sf.getEnd(), 13);
-    assertEquals(sf.getScore(), 0.5f, DELTA);
+    assertEquals(sf.getScore(), 0f);
+    assertEquals(Float.parseFloat((String) sf.getValue("AF")), 0.5f, DELTA);
     assertEquals(sf.getValue("alleles"), "C,T");
     map = (Map) sf.getValue("CSQ");
     assertEquals(map.size(), 9);
@@ -496,7 +524,8 @@ public class VCFLoaderTest
     sf = geneFeatures.get(4);
     assertEquals(sf.getBegin(), 13);
     assertEquals(sf.getEnd(), 13);
-    assertEquals(sf.getScore(), 0.4f, DELTA);
+    assertEquals(sf.getScore(), 0f);
+    assertEquals(Float.parseFloat((String) sf.getValue("AF")), 0.4f, DELTA);
     assertEquals(sf.getValue("alleles"), "C,G");
     map = (Map) sf.getValue("CSQ");
     assertEquals(map.size(), 9);
@@ -504,7 +533,8 @@ public class VCFLoaderTest
     sf = geneFeatures.get(5);
     assertEquals(sf.getBegin(), 17);
     assertEquals(sf.getEnd(), 17);
-    assertEquals(sf.getScore(), 0.7f, DELTA);
+    assertEquals(sf.getScore(), 0f);
+    assertEquals(Float.parseFloat((String) sf.getValue("AF")), 0.7f, DELTA);
     assertEquals(sf.getValue("alleles"), "A,G");
     map = (Map) sf.getValue("CSQ");
     assertEquals(map.size(), 9);
@@ -512,7 +542,8 @@ public class VCFLoaderTest
     sf = geneFeatures.get(6);
     assertEquals(sf.getBegin(), 17);
     assertEquals(sf.getEnd(), 17); // insertion
-    assertEquals(sf.getScore(), 0.6f, DELTA);
+    assertEquals(sf.getScore(), 0f);
+    assertEquals(Float.parseFloat((String) sf.getValue("AF")), 0.6f, DELTA);
     assertEquals(sf.getValue("alleles"), "A,AC");
     map = (Map) sf.getValue("CSQ");
     assertEquals(map.size(), 9);
@@ -530,7 +561,8 @@ public class VCFLoaderTest
     sf = transcriptFeatures.get(0);
     assertEquals(sf.getBegin(), 3);
     assertEquals(sf.getEnd(), 3);
-    assertEquals(sf.getScore(), 0.2f, DELTA);
+    assertEquals(sf.getScore(), 0f);
+    assertEquals(Float.parseFloat((String) sf.getValue("AF")), 0.2f, DELTA);
     assertEquals(sf.getValue("alleles"), "C,T");
     // transcript features only have Consequence for that transcripts
     map = (Map) sf.getValue("CSQ");
@@ -540,7 +572,8 @@ public class VCFLoaderTest
     sf = transcriptFeatures.get(1);
     assertEquals(sf.getBegin(), 11);
     assertEquals(sf.getEnd(), 11);
-    assertEquals(sf.getScore(), 0.7f, DELTA);
+    assertEquals(sf.getScore(), 0f);
+    assertEquals(Float.parseFloat((String) sf.getValue("AF")), 0.7f, DELTA);
     assertEquals(sf.getValue("alleles"), "A,G");
     assertEquals(map.size(), 9);
     assertEquals(sf.getValueAsString("CSQ", "Feature"), "transcript3");
@@ -548,7 +581,8 @@ public class VCFLoaderTest
     sf = transcriptFeatures.get(2);
     assertEquals(sf.getBegin(), 11);
     assertEquals(sf.getEnd(), 11);
-    assertEquals(sf.getScore(), 0.6f, DELTA);
+    assertEquals(sf.getScore(), 0f);
+    assertEquals(Float.parseFloat((String) sf.getValue("AF")), 0.6f, DELTA);
     assertEquals(sf.getValue("alleles"), "A,AC");
     assertEquals(map.size(), 9);
     assertEquals(sf.getValueAsString("CSQ", "Feature"), "transcript3");
@@ -595,7 +629,8 @@ public class VCFLoaderTest
     sf = transcriptFeatures.get(0);
     assertEquals(sf.getBegin(), 7);
     assertEquals(sf.getEnd(), 7);
-    assertEquals(sf.getScore(), 0.5f, DELTA);
+    assertEquals(sf.getScore(), 0f);
+    assertEquals(Float.parseFloat((String) sf.getValue("AF")), 0.5f, DELTA);
     assertEquals(sf.getValue("alleles"), "C,T");
     assertEquals(map.size(), 9);
     assertEquals(sf.getValueAsString("CSQ", "Feature"), "transcript4");
@@ -603,7 +638,8 @@ public class VCFLoaderTest
     sf = transcriptFeatures.get(1);
     assertEquals(sf.getBegin(), 7);
     assertEquals(sf.getEnd(), 7);
-    assertEquals(sf.getScore(), 0.4f, DELTA);
+    assertEquals(sf.getScore(), 0f);
+    assertEquals(Float.parseFloat((String) sf.getValue("AF")), 0.4f, DELTA);
     assertEquals(sf.getValue("alleles"), "C,G");
     assertEquals(map.size(), 9);
     assertEquals(sf.getValueAsString("CSQ", "Feature"), "transcript4");
@@ -611,7 +647,8 @@ public class VCFLoaderTest
     sf = transcriptFeatures.get(2);
     assertEquals(sf.getBegin(), 11);
     assertEquals(sf.getEnd(), 11);
-    assertEquals(sf.getScore(), 0.7f, DELTA);
+    assertEquals(sf.getScore(), 0f);
+    assertEquals(Float.parseFloat((String) sf.getValue("AF")), 0.7f, DELTA);
     assertEquals(sf.getValue("alleles"), "A,G");
     assertEquals(map.size(), 9);
     assertEquals(sf.getValueAsString("CSQ", "Feature"), "transcript4");
@@ -619,7 +656,8 @@ public class VCFLoaderTest
     sf = transcriptFeatures.get(3);
     assertEquals(sf.getBegin(), 11);
     assertEquals(sf.getEnd(), 11);
-    assertEquals(sf.getScore(), 0.6f, DELTA);
+    assertEquals(sf.getScore(), 0f);
+    assertEquals(Float.parseFloat((String) sf.getValue("AF")), 0.6f, DELTA);
     assertEquals(sf.getValue("alleles"), "A,AC");
     assertEquals(map.size(), 9);
     assertEquals(sf.getValueAsString("CSQ", "Feature"), "transcript4");
index 97ded5a..7dc3b9e 100644 (file)
@@ -1,6 +1,7 @@
 package jalview.math;
 
 import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
 import static org.testng.Assert.assertNotSame;
 import static org.testng.Assert.assertNull;
 import static org.testng.Assert.assertTrue;
@@ -188,9 +189,23 @@ public class MatrixTest
       }
     }
     Matrix m1 = new Matrix(in);
+
     Matrix m2 = (Matrix) m1.copy();
     assertNotSame(m1, m2);
     assertTrue(matrixEquals(m1, m2));
+    assertNull(m2.d);
+    assertNull(m2.e);
+
+    /*
+     * now add d and e vectors and recopy
+     */
+    m1.d = Arrays.copyOf(in[2], in[2].length);
+    m1.e = Arrays.copyOf(in[4], in[4].length);
+    m2 = (Matrix) m1.copy();
+    assertNotSame(m2.d, m1.d);
+    assertNotSame(m2.e, m1.e);
+    assertEquals(m2.d, m1.d);
+    assertEquals(m2.e, m1.e);
   }
 
   /**
@@ -356,7 +371,7 @@ public class MatrixTest
     assertMatricesMatch(m1, m2);
   }
 
-  private void assertMatricesMatch(MatrixI m1, MatrixI m2)
+  public static void assertMatricesMatch(MatrixI m1, MatrixI m2)
   {
     if (m1.height() != m2.height())
     {
@@ -378,8 +393,10 @@ public class MatrixTest
         }
       }
     }
-    ArrayAsserts.assertArrayEquals(m1.getD(), m2.getD(), 0.00001d);
-    ArrayAsserts.assertArrayEquals(m1.getE(), m2.getE(), 0.00001d);
+    ArrayAsserts.assertArrayEquals("D vector", m1.getD(), m2.getD(),
+            0.00001d);
+    ArrayAsserts.assertArrayEquals("E vector", m1.getE(), m2.getE(),
+            0.00001d);
   }
 
   @Test(groups = "Functional")
@@ -531,4 +548,30 @@ public class MatrixTest
     values[0][0] = -1d;
     assertEquals(m.getValue(0, 0), 1d, DELTA); // unchanged
   }
+
+  @Test(groups = "Functional")
+  public void testEquals()
+  {
+    double[][] values = new double[][] { { 1, 2, 3 }, { 4, 5, 6 } };
+    Matrix m1 = new Matrix(values);
+    double[][] values2 = new double[][] { { 1, 2, 3 }, { 4, 5, 6 } };
+    Matrix m2 = new Matrix(values2);
+
+    double delta = 0.0001d;
+    assertTrue(m1.equals(m1, delta));
+    assertTrue(m1.equals(m2, delta));
+    assertTrue(m2.equals(m1, delta));
+
+    double[][] values3 = new double[][] { { 1, 2, 3 }, { 4, 5, 7 } };
+    m2 = new Matrix(values3);
+    assertFalse(m1.equals(m2, delta));
+    assertFalse(m2.equals(m1, delta));
+
+    // must be same shape
+    values2 = new double[][] { { 1, 2, 3 } };
+    m2 = new Matrix(values2);
+    assertFalse(m2.equals(m1, delta));
+
+    assertFalse(m1.equals(null, delta));
+  }
 }
diff --git a/test/jalview/math/RotatableMatrixTest.java b/test/jalview/math/RotatableMatrixTest.java
new file mode 100644 (file)
index 0000000..06982d5
--- /dev/null
@@ -0,0 +1,157 @@
+package jalview.math;
+
+import static org.testng.Assert.assertEquals;
+
+import jalview.math.RotatableMatrix.Axis;
+
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+public class RotatableMatrixTest
+{
+  private RotatableMatrix rm;
+
+  @BeforeMethod(alwaysRun = true)
+  public void setUp()
+  {
+    rm = new RotatableMatrix();
+
+    /*
+     * 0.5 1.0 1.5
+     * 1.0 2.0 3.0
+     * 1.5 3.0 4.5
+     */
+    for (int i = 1; i <= 3; i++)
+    {
+      for (int j = 1; j <= 3; j++)
+      {
+        rm.setValue(i - 1, j - 1, i * j / 2f);
+      }
+    }
+  }
+
+  @Test(groups = "Functional")
+  public void testPreMultiply()
+  {
+    float[][] pre = new float[3][3];
+    int i = 1;
+    for (int j = 0; j < 3; j++)
+    {
+      for (int k = 0; k < 3; k++)
+      {
+        pre[j][k] = i++;
+      }
+    }
+
+    rm.preMultiply(pre);
+
+    /*
+     * check rm[i, j] is now the product of the i'th row of pre
+     * and the j'th column of (original) rm
+     */
+    for (int j = 0; j < 3; j++)
+    {
+      for (int k = 0; k < 3; k++)
+      {
+        float expected = 0f;
+        for (int l = 0; l < 3; l++)
+        {
+          float rm_l_k = (l + 1) * (k + 1) / 2f;
+          expected += pre[j][l] * rm_l_k;
+        }
+        assertEquals(rm.getValue(j, k), expected,
+                String.format("[%d, %d]", j, k));
+      }
+    }
+  }
+
+  @Test(groups = "Functional")
+  public void testVectorMultiply()
+  {
+    float[] result = rm.vectorMultiply(new float[] { 2f, 3f, 4.5f });
+
+    // vector times first column of matrix
+    assertEquals(result[0], 2f * 0.5f + 3f * 1f + 4.5f * 1.5f);
+
+    // vector times second column of matrix
+    assertEquals(result[1], 2f * 1.0f + 3f * 2f + 4.5f * 3f);
+
+    // vector times third column of matrix
+    assertEquals(result[2], 2f * 1.5f + 3f * 3f + 4.5f * 4.5f);
+  }
+
+  @Test(groups = "Functional")
+  public void testGetRotation()
+  {
+    float theta = 60f;
+    double cosTheta = Math.cos((theta * Math.PI / 180f));
+    double sinTheta = Math.sin((theta * Math.PI / 180f));
+
+    /*
+     * sanity check that sin(60) = sqrt(3) / 2, cos(60) = 1/2
+     */
+    double delta = 0.0001d;
+    assertEquals(cosTheta, 0.5f, delta);
+    assertEquals(sinTheta, Math.sqrt(3d) / 2d, delta);
+
+    /*
+     * so far so good, now verify rotations
+     * @see https://en.wikipedia.org/wiki/Rotation_matrix#Basic_rotations
+     */
+
+    /*
+     * 60 degrees about X axis should be
+     *  1   0   0 
+     *  0  cos -sin
+     *  0  sin cos
+     *  but code applies the negative of this
+     *  nb cos(-x) = cos(x), sin(-x) = -sin(x)
+     */
+    float[][] rot = RotatableMatrix.getRotation(theta, Axis.X);
+    assertEquals(rot[0][0], 1f, delta);
+    assertEquals(rot[0][1], 0f, delta);
+    assertEquals(rot[0][2], 0f, delta);
+    assertEquals(rot[1][0], 0f, delta);
+    assertEquals(rot[1][1], cosTheta, delta);
+    assertEquals(rot[1][2], sinTheta, delta);
+    assertEquals(rot[2][0], 0f, delta);
+    assertEquals(rot[2][1], -sinTheta, delta);
+    assertEquals(rot[2][2], cosTheta, delta);
+
+    /*
+     * 60 degrees about Y axis should be
+     *   cos 0 sin
+     *    0  1  0
+     *  -sin 0 cos
+     *  but code applies the negative of this
+     */
+    rot = RotatableMatrix.getRotation(theta, Axis.Y);
+    assertEquals(rot[0][0], cosTheta, delta);
+    assertEquals(rot[0][1], 0f, delta);
+    assertEquals(rot[0][2], -sinTheta, delta);
+    assertEquals(rot[1][0], 0f, delta);
+    assertEquals(rot[1][1], 1f, delta);
+    assertEquals(rot[1][2], 0f, delta);
+    assertEquals(rot[2][0], sinTheta, delta);
+    assertEquals(rot[2][1], 0f, delta);
+    assertEquals(rot[2][2], cosTheta, delta);
+
+    /*
+     * 60 degrees about Z axis should be
+     *  cos -sin 0
+     *  sin  cos 0
+     *   0    0  1
+     * - and it is!
+     */
+    rot = RotatableMatrix.getRotation(theta, Axis.Z);
+    assertEquals(rot[0][0], cosTheta, delta);
+    assertEquals(rot[0][1], -sinTheta, delta);
+    assertEquals(rot[0][2], 0f, delta);
+    assertEquals(rot[1][0], sinTheta, delta);
+    assertEquals(rot[1][1], cosTheta, delta);
+    assertEquals(rot[1][2], 0f, delta);
+    assertEquals(rot[2][0], 0f, delta);
+    assertEquals(rot[2][1], 0f, delta);
+    assertEquals(rot[2][2], 1f, delta);
+  }
+}
similarity index 80%
rename from test/jalview/io/Jalview2xmlTests.java
rename to test/jalview/project/Jalview2xmlTests.java
index 53bb0e7..d902fa2 100644 (file)
@@ -18,7 +18,7 @@
  * along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
  */
-package jalview.io;
+package jalview.project;
 
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertFalse;
@@ -27,6 +27,7 @@ import static org.testng.Assert.assertNull;
 import static org.testng.Assert.assertSame;
 import static org.testng.Assert.assertTrue;
 
+import jalview.analysis.scoremodels.SimilarityParams;
 import jalview.api.AlignViewportI;
 import jalview.api.AlignmentViewPanel;
 import jalview.api.FeatureColourI;
@@ -48,10 +49,14 @@ import jalview.gui.AlignViewport;
 import jalview.gui.AlignmentPanel;
 import jalview.gui.Desktop;
 import jalview.gui.FeatureRenderer;
-import jalview.gui.Jalview2XML;
 import jalview.gui.JvOptionPane;
+import jalview.gui.PCAPanel;
 import jalview.gui.PopupMenu;
 import jalview.gui.SliderPanel;
+import jalview.io.DataSourceType;
+import jalview.io.FileFormat;
+import jalview.io.FileLoader;
+import jalview.io.Jalview2xmlBase;
 import jalview.renderer.ResidueShaderI;
 import jalview.schemes.AnnotationColourGradient;
 import jalview.schemes.BuriedColourScheme;
@@ -74,6 +79,8 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import javax.swing.JInternalFrame;
+
 import org.testng.Assert;
 import org.testng.AssertJUnit;
 import org.testng.annotations.BeforeClass;
@@ -102,65 +109,73 @@ public class Jalview2xmlTests extends Jalview2xmlBase
     assertNotNull(af, "Didn't read input file " + inFile);
     int olddsann = countDsAnn(af.getViewport());
     assertTrue(olddsann > 0, "Didn't find any dataset annotations");
-    af.changeColour_actionPerformed(JalviewColourScheme.RNAHelices
-            .toString());
+    af.changeColour_actionPerformed(
+            JalviewColourScheme.RNAHelices.toString());
     assertTrue(
-            af.getViewport().getGlobalColourScheme() instanceof RNAHelicesColour,
+            af.getViewport()
+                    .getGlobalColourScheme() instanceof RNAHelicesColour,
             "Couldn't apply RNA helices colourscheme");
     assertTrue(af.saveAlignment(tfile, FileFormat.Jalview),
             "Failed to store as a project.");
     af.closeMenuItem_actionPerformed(true);
     af = null;
-    af = new FileLoader()
-            .LoadFileWaitTillLoaded(tfile, DataSourceType.FILE);
+    af = new FileLoader().LoadFileWaitTillLoaded(tfile,
+            DataSourceType.FILE);
     assertNotNull(af, "Failed to import new project");
     int newdsann = countDsAnn(af.getViewport());
     assertEquals(olddsann, newdsann,
             "Differing numbers of dataset sequence annotation\nOriginally "
                     + olddsann + " and now " + newdsann);
-    System.out
-            .println("Read in same number of annotations as originally present ("
+    System.out.println(
+            "Read in same number of annotations as originally present ("
                     + olddsann + ")");
     assertTrue(
 
-    af.getViewport().getGlobalColourScheme() instanceof RNAHelicesColour,
+            af.getViewport()
+                    .getGlobalColourScheme() instanceof RNAHelicesColour,
             "RNA helices colourscheme was not applied on import.");
   }
 
   @Test(groups = { "Functional" })
   public void testTCoffeeScores() throws Exception
   {
-    String inFile = "examples/uniref50.fa", inAnnot = "examples/uniref50.score_ascii";
+    String inFile = "examples/uniref50.fa",
+            inAnnot = "examples/uniref50.score_ascii";
     String tfile = File.createTempFile("JalviewTest", ".jvp")
             .getAbsolutePath();
     AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(inFile,
             DataSourceType.FILE);
     assertNotNull(af, "Didn't read input file " + inFile);
     af.loadJalviewDataFile(inAnnot, DataSourceType.FILE, null, null);
-    assertSame(af.getViewport().getGlobalColourScheme().getClass(),
+    AlignViewport viewport = af.getViewport();
+    assertSame(viewport.getGlobalColourScheme().getClass(),
             TCoffeeColourScheme.class, "Didn't set T-coffee colourscheme");
-    assertNotNull(ColourSchemeProperty.getColourScheme(af.getViewport()
-            .getAlignment(), af.getViewport().getGlobalColourScheme()
-            .getSchemeName()), "Recognise T-Coffee score from string");
+    assertNotNull(
+            ColourSchemeProperty.getColourScheme(viewport,
+                    viewport.getAlignment(),
+                    viewport.getGlobalColourScheme()
+                            .getSchemeName()),
+            "Recognise T-Coffee score from string");
 
     assertTrue(af.saveAlignment(tfile, FileFormat.Jalview),
             "Failed to store as a project.");
     af.closeMenuItem_actionPerformed(true);
     af = null;
-    af = new FileLoader()
-            .LoadFileWaitTillLoaded(tfile, DataSourceType.FILE);
+    af = new FileLoader().LoadFileWaitTillLoaded(tfile,
+            DataSourceType.FILE);
     assertNotNull(af, "Failed to import new project");
     assertSame(af.getViewport().getGlobalColourScheme().getClass(),
             TCoffeeColourScheme.class,
             "Didn't set T-coffee colourscheme for imported project.");
-    System.out
-            .println("T-Coffee score shading successfully recovered from project.");
+    System.out.println(
+            "T-Coffee score shading successfully recovered from project.");
   }
 
   @Test(groups = { "Functional" })
   public void testColourByAnnotScores() throws Exception
   {
-    String inFile = "examples/uniref50.fa", inAnnot = "examples/testdata/uniref50_iupred.jva";
+    String inFile = "examples/uniref50.fa",
+            inAnnot = "examples/testdata/uniref50_iupred.jva";
     String tfile = File.createTempFile("JalviewTest", ".jvp")
             .getAbsolutePath();
     AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(inFile,
@@ -171,12 +186,12 @@ public class Jalview2xmlTests extends Jalview2xmlBase
             .getSequenceAt(0).getAnnotation("IUPredWS (Short)");
     assertTrue(
 
-    aa != null && aa.length > 0,
+            aa != null && aa.length > 0,
             "Didn't find any IUPred annotation to use to shade alignment.");
     AnnotationColourGradient cs = new AnnotationColourGradient(aa[0], null,
             AnnotationColourGradient.ABOVE_THRESHOLD);
-    AnnotationColourGradient gcs = new AnnotationColourGradient(aa[0],
-            null, AnnotationColourGradient.BELOW_THRESHOLD);
+    AnnotationColourGradient gcs = new AnnotationColourGradient(aa[0], null,
+            AnnotationColourGradient.BELOW_THRESHOLD);
     cs.setSeqAssociated(true);
     gcs.setSeqAssociated(true);
     af.changeColour(cs);
@@ -192,15 +207,15 @@ public class Jalview2xmlTests extends Jalview2xmlBase
             "Failed to store as a project.");
     af.closeMenuItem_actionPerformed(true);
     af = null;
-    af = new FileLoader()
-            .LoadFileWaitTillLoaded(tfile, DataSourceType.FILE);
+    af = new FileLoader().LoadFileWaitTillLoaded(tfile,
+            DataSourceType.FILE);
     assertNotNull(af, "Failed to import new project");
 
     // check for group and alignment colourschemes
 
     ColourSchemeI _rcs = af.getViewport().getGlobalColourScheme();
-    ColourSchemeI _rgcs = af.getViewport().getAlignment().getGroups()
-            .get(0).getColourScheme();
+    ColourSchemeI _rgcs = af.getViewport().getAlignment().getGroups().get(0)
+            .getColourScheme();
     assertNotNull(_rcs, "Didn't recover global colourscheme");
     assertTrue(_rcs instanceof AnnotationColourGradient,
             "Didn't recover annotation colour global scheme");
@@ -210,8 +225,8 @@ public class Jalview2xmlTests extends Jalview2xmlBase
 
     boolean diffseqcols = false, diffgseqcols = false;
     SequenceI[] sqs = af.getViewport().getAlignment().getSequencesArray();
-    for (int p = 0, pSize = af.getViewport().getAlignment().getWidth(); p < pSize
-            && (!diffseqcols || !diffgseqcols); p++)
+    for (int p = 0, pSize = af.getViewport().getAlignment()
+            .getWidth(); p < pSize && (!diffseqcols || !diffgseqcols); p++)
     {
       if (_rcs.findColour(sqs[0].getCharAt(p), p, sqs[0], null, 0f) != _rcs
               .findColour(sqs[5].getCharAt(p), p, sqs[5], null, 0f))
@@ -220,8 +235,8 @@ public class Jalview2xmlTests extends Jalview2xmlBase
       }
     }
     assertTrue(diffseqcols, "Got Different sequence colours");
-    System.out
-            .println("Per sequence colourscheme (Background) successfully applied and recovered.");
+    System.out.println(
+            "Per sequence colourscheme (Background) successfully applied and recovered.");
 
     assertNotNull(_rgcs, "Didn't recover group colourscheme");
     assertTrue(_rgcs instanceof AnnotationColourGradient,
@@ -230,25 +245,26 @@ public class Jalview2xmlTests extends Jalview2xmlBase
     assertTrue(__rcs.isSeqAssociated(),
             "Group Annotation colourscheme wasn't sequence associated");
 
-    for (int p = 0, pSize = af.getViewport().getAlignment().getWidth(); p < pSize
-            && (!diffseqcols || !diffgseqcols); p++)
+    for (int p = 0, pSize = af.getViewport().getAlignment()
+            .getWidth(); p < pSize && (!diffseqcols || !diffgseqcols); p++)
     {
-      if (_rgcs.findColour(sqs[1].getCharAt(p), p, sqs[1], null, 0f) != _rgcs
-              .findColour(sqs[2].getCharAt(p), p, sqs[2], null, 0f))
+      if (_rgcs.findColour(sqs[1].getCharAt(p), p, sqs[1], null,
+              0f) != _rgcs.findColour(sqs[2].getCharAt(p), p, sqs[2], null,
+                      0f))
       {
         diffgseqcols = true;
       }
     }
     assertTrue(diffgseqcols, "Got Different group sequence colours");
-    System.out
-            .println("Per sequence (Group) colourscheme successfully applied and recovered.");
+    System.out.println(
+            "Per sequence (Group) colourscheme successfully applied and recovered.");
   }
 
   @Test(groups = { "Functional" })
   public void gatherViewsHere() throws Exception
   {
-    int origCount = Desktop.getAlignFrames() == null ? 0 : Desktop
-            .getAlignFrames().length;
+    int origCount = Desktop.getAlignFrames() == null ? 0
+            : Desktop.getAlignFrames().length;
     AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(
             "examples/exampleFile_2_7.jar", DataSourceType.FILE);
     assertNotNull(af, "Didn't read in the example file correctly.");
@@ -329,14 +345,14 @@ public class Jalview2xmlTests extends Jalview2xmlBase
           sq.findPosition(p);
           try
           {
-            assertTrue(
-                    (alaa.annotations[p] == null && refan.annotations[p] == null)
-                            || alaa.annotations[p].value == refan.annotations[p].value,
+            assertTrue((alaa.annotations[p] == null
+                    && refan.annotations[p] == null)
+                    || alaa.annotations[p].value == refan.annotations[p].value,
                     "Mismatch at alignment position " + p);
           } catch (NullPointerException q)
           {
-            Assert.fail("Mismatch of alignment annotations at position "
-                    + p + " Ref seq ann: " + refan.annotations[p]
+            Assert.fail("Mismatch of alignment annotations at position " + p
+                    + " Ref seq ann: " + refan.annotations[p]
                     + " alignment " + alaa.annotations[p]);
           }
         }
@@ -371,10 +387,10 @@ public class Jalview2xmlTests extends Jalview2xmlBase
     AssertJUnit.assertFalse(structureStyle.sameStyle(groupStyle));
 
     groups.getAlignViewport().setViewStyle(structureStyle);
-    AssertJUnit.assertFalse(groupStyle.sameStyle(groups.getAlignViewport()
-            .getViewStyle()));
-    Assert.assertTrue(structureStyle.sameStyle(groups.getAlignViewport()
-            .getViewStyle()));
+    AssertJUnit.assertFalse(
+            groupStyle.sameStyle(groups.getAlignViewport().getViewStyle()));
+    Assert.assertTrue(structureStyle
+            .sameStyle(groups.getAlignViewport().getViewStyle()));
 
   }
 
@@ -395,9 +411,7 @@ public class Jalview2xmlTests extends Jalview2xmlBase
 
     // check FileLoader returned a reference to the one alignFrame that is
     // actually on the Desktop
-    assertSame(
-            af,
-            Desktop.getAlignFrameFor(af.getViewport()),
+    assertSame(af, Desktop.getAlignFrameFor(af.getViewport()),
             "Jalview2XML.loadAlignFrame() didn't return correct AlignFrame reference for multiple view window");
 
     Desktop.explodeViews(af);
@@ -424,11 +438,12 @@ public class Jalview2xmlTests extends Jalview2xmlBase
     af = new FileLoader().LoadFileWaitTillLoaded(tfile.getAbsolutePath(),
             DataSourceType.FILE);
     Assert.assertNotNull(af);
+    Assert.assertEquals(Desktop.getAlignFrames().length,
+            Desktop.getAlignmentPanels(
+                    af.getViewport().getSequenceSetId()).length);
     Assert.assertEquals(
-            Desktop.getAlignFrames().length,
-            Desktop.getAlignmentPanels(af.getViewport().getSequenceSetId()).length);
-    Assert.assertEquals(
-            Desktop.getAlignmentPanels(af.getViewport().getSequenceSetId()).length,
+            Desktop.getAlignmentPanels(
+                    af.getViewport().getSequenceSetId()).length,
             oldviews);
   }
 
@@ -530,8 +545,8 @@ public class Jalview2xmlTests extends Jalview2xmlBase
     assertTrue(Jalview2XML.isVersionStringLaterThan(null, "Test"));
     assertTrue(Jalview2XML.isVersionStringLaterThan(null, "TEST"));
     assertTrue(Jalview2XML.isVersionStringLaterThan("2.8.3", "Test"));
-    assertTrue(Jalview2XML
-            .isVersionStringLaterThan(null, "Automated Build"));
+    assertTrue(
+            Jalview2XML.isVersionStringLaterThan(null, "Automated Build"));
     assertTrue(Jalview2XML.isVersionStringLaterThan("2.8.3",
             "Automated Build"));
     assertTrue(Jalview2XML.isVersionStringLaterThan("2.8.3",
@@ -640,8 +655,8 @@ public class Jalview2xmlTests extends Jalview2xmlBase
 
       n++;
     }
-    File tfile = File
-            .createTempFile("testStoreAndRecoverGroupReps", ".jvp");
+    File tfile = File.createTempFile("testStoreAndRecoverGroupReps",
+            ".jvp");
     try
     {
       new Jalview2XML(false).saveState(tfile);
@@ -680,9 +695,7 @@ public class Jalview2xmlTests extends Jalview2xmlBase
        */
       List<String> hidden = hiddenSeqNames.get(ap.getViewName());
       HiddenSequences hs = alignment.getHiddenSequences();
-      assertEquals(
-              hidden.size(),
-              hs.getSize(),
+      assertEquals(hidden.size(), hs.getSize(),
               "wrong number of restored hidden sequences in "
                       + ap.getViewName());
     }
@@ -724,14 +737,18 @@ public class Jalview2xmlTests extends Jalview2xmlBase
     pdbEntries[1] = new PDBEntry("3W5V", "B", Type.PDB, testFile);
     pdbEntries[2] = new PDBEntry("3W5V", "C", Type.PDB, testFile);
     pdbEntries[3] = new PDBEntry("3W5V", "D", Type.PDB, testFile);
-    Assert.assertEquals(seqs[0].getDatasetSequence().getAllPDBEntries()
-            .get(0), pdbEntries[0]);
-    Assert.assertEquals(seqs[1].getDatasetSequence().getAllPDBEntries()
-            .get(0), pdbEntries[1]);
-    Assert.assertEquals(seqs[2].getDatasetSequence().getAllPDBEntries()
-            .get(0), pdbEntries[2]);
-    Assert.assertEquals(seqs[3].getDatasetSequence().getAllPDBEntries()
-            .get(0), pdbEntries[3]);
+    Assert.assertEquals(
+            seqs[0].getDatasetSequence().getAllPDBEntries().get(0),
+            pdbEntries[0]);
+    Assert.assertEquals(
+            seqs[1].getDatasetSequence().getAllPDBEntries().get(0),
+            pdbEntries[1]);
+    Assert.assertEquals(
+            seqs[2].getDatasetSequence().getAllPDBEntries().get(0),
+            pdbEntries[2]);
+    Assert.assertEquals(
+            seqs[3].getDatasetSequence().getAllPDBEntries().get(0),
+            pdbEntries[3]);
 
     File tfile = File.createTempFile("testStoreAndRecoverPDBEntry", ".jvp");
     try
@@ -802,6 +819,7 @@ public class Jalview2xmlTests extends Jalview2xmlBase
     /*
      * Colour alignment by Buried Index, Above 10% PID, By Conservation 20%
      */
+    av.setColourAppliesToAllGroups(false);
     af.changeColour_actionPerformed(JalviewColourScheme.Buried.toString());
     assertTrue(av.getGlobalColourScheme() instanceof BuriedColourScheme);
     af.abovePIDThreshold_actionPerformed(true);
@@ -827,8 +845,8 @@ public class Jalview2xmlTests extends Jalview2xmlBase
     sg.setEndRes(25);
     av.setSelectionGroup(sg);
     PopupMenu popupMenu = new PopupMenu(af.alignPanel, null, null);
-    popupMenu.changeColour_actionPerformed(JalviewColourScheme.Strand
-            .toString());
+    popupMenu.changeColour_actionPerformed(
+            JalviewColourScheme.Strand.toString());
     assertTrue(sg.getColourScheme() instanceof StrandColourScheme);
     assertEquals(al.getGroups().size(), 1);
     assertSame(al.getGroups().get(0), sg);
@@ -914,8 +932,8 @@ public class Jalview2xmlTests extends Jalview2xmlBase
     fr.setColour("type2", byLabel);
 
     // type3: by score above threshold
-    FeatureColourI byScore = new FeatureColour(Color.BLACK, Color.BLUE, 1,
-            10);
+    FeatureColourI byScore = new FeatureColour(null, Color.BLACK,
+            Color.BLUE, null, 1, 10);
     byScore.setAboveThreshold(true);
     byScore.setThreshold(2f);
     fr.setColour("type3", byScore);
@@ -927,8 +945,8 @@ public class Jalview2xmlTests extends Jalview2xmlBase
     fr.setColour("type4", byAF);
 
     // type5: by attribute CSQ:PolyPhen below threshold
-    FeatureColourI byPolyPhen = new FeatureColour(Color.BLACK, Color.BLUE,
-            1, 10);
+    FeatureColourI byPolyPhen = new FeatureColour(null, Color.BLACK,
+            Color.BLUE, null, 1, 10);
     byPolyPhen.setBelowThreshold(true);
     byPolyPhen.setThreshold(3f);
     byPolyPhen.setAttributeName("CSQ", "PolyPhen");
@@ -971,8 +989,8 @@ public class Jalview2xmlTests extends Jalview2xmlBase
      */
     af.closeMenuItem_actionPerformed(true);
     af = null;
-    af = new FileLoader()
-            .LoadFileWaitTillLoaded(filePath, DataSourceType.FILE);
+    af = new FileLoader().LoadFileWaitTillLoaded(filePath,
+            DataSourceType.FILE);
     assertNotNull(af, "Failed to import new project");
 
     /*
@@ -1035,4 +1053,130 @@ public class Jalview2xmlTests extends Jalview2xmlBase
     addFeature(seq, featureType, score++);
     addFeature(seq, featureType, score);
   }
+
+  /**
+   * pre 2.11 - jalview 2.10 erroneously created new dataset entries for each
+   * view (JAL-3171) this test ensures we can import and merge those views
+   */
+  @Test(groups = { "Functional" })
+  public void testMergeDatasetsforViews() throws IOException
+  {
+    // simple project - two views on one alignment
+    AlignFrame af = new FileLoader(false).LoadFileWaitTillLoaded(
+            "examples/testdata/projects/twoViews.jvp", DataSourceType.FILE);
+    assertNotNull(af);
+    assertTrue(af.getAlignPanels().size() > 1);
+    verifyDs(af);
+  }
+
+  /**
+   * pre 2.11 - jalview 2.10 erroneously created new dataset entries for each
+   * view (JAL-3171) this test ensures we can import and merge those views This
+   * is a more complex project
+   */
+  @Test(groups = { "Functional" })
+  public void testMergeDatasetsforManyViews() throws IOException
+  {
+    Desktop.instance.closeAll_actionPerformed(null);
+
+    // complex project - one dataset, several views on several alignments
+    AlignFrame af = new FileLoader(false).LoadFileWaitTillLoaded(
+            "examples/testdata/projects/manyViews.jvp",
+            DataSourceType.FILE);
+    assertNotNull(af);
+
+    AlignmentI ds = null;
+    for (AlignFrame alignFrame : Desktop.getAlignFrames())
+    {
+      if (ds == null)
+      {
+        ds = verifyDs(alignFrame);
+      }
+      else
+      {
+        // check that this frame's dataset matches the last
+        assertTrue(ds == verifyDs(alignFrame));
+      }
+    }
+  }
+
+  private AlignmentI verifyDs(AlignFrame af)
+  {
+    AlignmentI ds = null;
+    for (AlignmentViewPanel ap : af.getAlignPanels())
+    {
+      if (ds == null)
+      {
+        ds = ap.getAlignment().getDataset();
+      }
+      else
+      {
+        assertTrue(ap.getAlignment().getDataset() == ds,
+                "Dataset was not the same for imported 2.10.5 project with several alignment views");
+      }
+    }
+    return ds;
+  }
+
+  @Test(groups = "Functional")
+  public void testPcaViewAssociation() throws IOException
+  {
+    Desktop.instance.closeAll_actionPerformed(null);
+    final String PCAVIEWNAME = "With PCA";
+    // create a new tempfile
+    File tempfile = File.createTempFile("jvPCAviewAssoc", "jvp");
+
+    {
+      String exampleFile = "examples/uniref50.fa";
+      AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(exampleFile,
+              DataSourceType.FILE);
+      assertNotNull(af, "Didn't read in the example file correctly.");
+      AlignmentPanel origView = (AlignmentPanel) af.getAlignPanels().get(0);
+      AlignmentPanel newview = af.newView(PCAVIEWNAME, true);
+      // create another for good measure
+      af.newView("Not the PCA View", true);
+      PCAPanel pcaPanel = new PCAPanel(origView, "BLOSUM62",
+              new SimilarityParams(true, true, true, false));
+      // we're in the test exec thread, so we can just run synchronously here
+      pcaPanel.run();
+
+      // now switch the linked view
+      pcaPanel.selectAssociatedView(newview);
+
+      assertTrue(pcaPanel.getAlignViewport() == newview.getAlignViewport(),
+              "PCA should be associated with 'With PCA' view: test is broken");
+
+      // now save and reload project
+      Jalview2XML jv2xml = new jalview.project.Jalview2XML(false);
+      tempfile.delete();
+      jv2xml.saveState(tempfile);
+      assertTrue(jv2xml.errorMessage == null,
+              "Failed to save dummy project with PCA: test broken");
+    }
+
+    // load again.
+    Desktop.instance.closeAll_actionPerformed(null);
+    AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(
+            tempfile.getCanonicalPath(), DataSourceType.FILE);
+    JInternalFrame[] frames = Desktop.instance.getAllFrames();
+    // PCA and the tabbed alignment view should be the only two windows on the
+    // desktop
+    assertEquals(frames.length, 2,
+            "PCA and the tabbed alignment view should be the only two windows on the desktop");
+    PCAPanel pcaPanel = (PCAPanel) frames[frames[0] == af ? 1 : 0];
+
+    AlignmentViewPanel restoredNewView = null;
+    for (AlignmentViewPanel alignpanel : Desktop.getAlignmentPanels(null))
+    {
+      if (alignpanel.getAlignViewport() == pcaPanel.getAlignViewport())
+      {
+        restoredNewView = alignpanel;
+      }
+    }
+    assertEquals(restoredNewView.getViewName(), PCAVIEWNAME);
+    assertTrue(
+            restoredNewView.getAlignViewport() == pcaPanel
+                    .getAlignViewport(),
+            "Didn't restore correct view association for the PCA view");
+  }
 }
index d8b905e..af7c2ed 100644 (file)
@@ -323,7 +323,7 @@ public class FeatureColourFinderTest
      */
     Color min = new Color(100, 50, 150);
     Color max = new Color(200, 0, 100);
-    FeatureColourI fc = new FeatureColour(min, max, 0, 10);
+    FeatureColourI fc = new FeatureColour(null, min, max, null, 0, 10);
     fr.setColour("kd", fc);
     fr.featuresAdded();
     av.setShowSequenceFeatures(true);
@@ -493,7 +493,7 @@ public class FeatureColourFinderTest
      */
     Color min = new Color(100, 50, 150);
     Color max = new Color(200, 0, 100);
-    FeatureColourI fc = new FeatureColour(min, max, 0, 10);
+    FeatureColourI fc = new FeatureColour(null, min, max, null, 0, 10);
     fc.setAboveThreshold(true);
     fc.setThreshold(5f);
     fr.setColour(kdFeature, fc);
index 11b129e..723f3b8 100644 (file)
@@ -285,8 +285,8 @@ public class FeatureRendererTest
      * give "Type3" features a graduated colour scheme
      * - first with no threshold
      */
-    FeatureColourI gc = new FeatureColour(Color.yellow, Color.red, null, 0f,
-            10f);
+    FeatureColourI gc = new FeatureColour(Color.green, Color.yellow,
+            Color.red, null, 0f, 10f);
     fr.getFeatureColours().put("Type3", gc);
     features = fr.findFeaturesAtColumn(seq, 8);
     assertTrue(features.contains(sf4));
@@ -328,18 +328,18 @@ public class FeatureRendererTest
     SequenceI seq = av.getAlignment().getSequenceAt(0);
     SequenceFeature sf1 = new SequenceFeature("Cath", "", 6, 8, Float.NaN,
             "group1");
-    seq.addSequenceFeature(sf1);
     SequenceFeature sf2 = new SequenceFeature("Cath", "", 5, 11, 2f,
             "group2");
-    seq.addSequenceFeature(sf2);
     SequenceFeature sf3 = new SequenceFeature("Cath", "", 5, 11, 3f,
             "group3");
-    seq.addSequenceFeature(sf3);
     SequenceFeature sf4 = new SequenceFeature("Cath", "", 6, 8, 4f,
             "group4");
-    seq.addSequenceFeature(sf4);
     SequenceFeature sf5 = new SequenceFeature("Cath", "", 6, 9, 5f,
             "group4");
+    seq.addSequenceFeature(sf1);
+    seq.addSequenceFeature(sf2);
+    seq.addSequenceFeature(sf3);
+    seq.addSequenceFeature(sf4);
     seq.addSequenceFeature(sf5);
 
     fr.findAllFeatures(true);
@@ -365,17 +365,17 @@ public class FeatureRendererTest
     assertTrue(features.contains(sf5));
 
     /*
-     * hide groups 2 and 3 makes no difference to this method
+     * features in hidden groups are removed
      */
     fr.setGroupVisibility("group2", false);
     fr.setGroupVisibility("group3", false);
     features = seq.getSequenceFeatures();
     fr.filterFeaturesForDisplay(features);
-    assertEquals(features.size(), 3);
+    assertEquals(features.size(), 2);
     assertTrue(features.contains(sf1) || features.contains(sf4));
     assertFalse(features.contains(sf1) && features.contains(sf4));
-    assertTrue(features.contains(sf2) || features.contains(sf3));
-    assertFalse(features.contains(sf2) && features.contains(sf3));
+    assertFalse(features.contains(sf2));
+    assertFalse(features.contains(sf3));
     assertTrue(features.contains(sf5));
 
     /*
@@ -428,8 +428,8 @@ public class FeatureRendererTest
      * graduated colour by score, no threshold, no score
      * 
      */
-    FeatureColourI gc = new FeatureColour(Color.yellow, Color.red,
-            Color.green, 1f, 11f);
+    FeatureColourI gc = new FeatureColour(Color.red, Color.yellow,
+            Color.red, Color.green, 1f, 11f);
     fr.getFeatureColours().put("Cath", gc);
     assertEquals(fr.getColour(sf1), Color.green);
 
@@ -453,7 +453,8 @@ public class FeatureRendererTest
      * threshold is min-max; now score 6 is 1/6 of the way from 5 to 11
      * or from yellow(255, 255, 0) to red(255, 0, 0)
      */
-    gc = new FeatureColour(Color.yellow, Color.red, Color.green, 5f, 11f);
+    gc = new FeatureColour(Color.red, Color.yellow, Color.red, Color.green,
+            5f, 11f);
     fr.getFeatureColours().put("Cath", gc);
     gc.setAutoScaled(false); // this does little other than save a checkbox setting!
     assertEquals(fr.getColour(sf2), new Color(255, 213, 0));
@@ -476,7 +477,8 @@ public class FeatureRendererTest
      * colour by feature attribute value
      * first with no value held
      */
-    gc = new FeatureColour(Color.yellow, Color.red, Color.green, 1f, 11f);
+    gc = new FeatureColour(Color.red, Color.yellow, Color.red, Color.green,
+            1f, 11f);
     fr.getFeatureColours().put("Cath", gc);
     gc.setAttributeName("AF");
     assertEquals(fr.getColour(sf2), Color.green);
@@ -535,4 +537,71 @@ public class FeatureRendererTest
     csqData.put("Feature", "ENST01234");
     assertEquals(fr.getColour(sf2), expected);
   }
+
+  @Test(groups = "Functional")
+  public void testIsVisible()
+  {
+    String seqData = ">s1\nMLQGIFPRS\n";
+    AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(seqData,
+            DataSourceType.PASTE);
+    AlignViewportI av = af.getViewport();
+    FeatureRenderer fr = new FeatureRenderer(av);
+    SequenceI seq = av.getAlignment().getSequenceAt(0);
+    SequenceFeature sf = new SequenceFeature("METAL", "Desc", 10, 10, 1f,
+            "Group");
+    sf.setValue("AC", "11");
+    sf.setValue("CLIN_SIG", "Likely Pathogenic");
+    seq.addSequenceFeature(sf);
+
+    assertFalse(fr.isVisible(null));
+
+    /*
+     * initial state FeatureRenderer hasn't 'found' feature
+     * and so its feature type has not yet been set visible
+     */
+    assertFalse(fr.getDisplayedFeatureCols().containsKey("METAL"));
+    assertFalse(fr.isVisible(sf));
+
+    fr.findAllFeatures(true);
+    assertTrue(fr.isVisible(sf));
+
+    /*
+     * feature group not visible
+     */
+    fr.setGroupVisibility("Group", false);
+    assertFalse(fr.isVisible(sf));
+    fr.setGroupVisibility("Group", true);
+    assertTrue(fr.isVisible(sf));
+
+    /*
+     * feature score outwith colour threshold (score > 2)
+     */
+    FeatureColourI fc = new FeatureColour(null, Color.white, Color.black,
+            Color.white, 0, 10);
+    fc.setAboveThreshold(true);
+    fc.setThreshold(2f);
+    fr.setColour("METAL", fc);
+    assertFalse(fr.isVisible(sf)); // score 1 is not above threshold 2
+    fc.setBelowThreshold(true);
+    assertTrue(fr.isVisible(sf)); // score 1 is below threshold 2
+
+    /*
+     * colour with threshold on attribute AC (value is 11)
+     */
+    fc.setAttributeName("AC");
+    assertFalse(fr.isVisible(sf)); // value 11 is not below threshold 2
+    fc.setAboveThreshold(true);
+    assertTrue(fr.isVisible(sf)); // value 11 is above threshold 2
+
+    fc.setAttributeName("AF"); // attribute AF is absent in sf
+    assertTrue(fr.isVisible(sf)); // feature is not excluded by threshold
+
+    FeatureMatcherSetI filter = new FeatureMatcherSet();
+    filter.and(FeatureMatcher.byAttribute(Condition.Contains, "pathogenic",
+            "CLIN_SIG"));
+    fr.setFeatureFilter("METAL", filter);
+    assertTrue(fr.isVisible(sf)); // feature matches filter
+    filter.and(FeatureMatcher.byScore(Condition.LE, "0.4"));
+    assertFalse(fr.isVisible(sf)); // feature doesn't match filter
+  }
 }
index b7a5164..c56da59 100644 (file)
@@ -124,6 +124,18 @@ public class AnnotationColourGradientTest
       Color result = testee.shadeCalculation(ann, col);
       assertEquals(result, expected, "for column " + col);
     }
+
+    /*
+     * test for boundary case threshold == graphMax (JAL-3206)
+     */
+    float thresh = ann.threshold.value;
+    ann.threshold.value = ann.graphMax;
+    Color result = testee.shadeCalculation(ann, WIDTH - 1);
+    assertEquals(result, maxColour);
+    testee.setThresholdIsMinMax(false);
+    result = testee.shadeCalculation(ann, WIDTH - 1);
+    assertEquals(result, maxColour);
+    ann.threshold.value = thresh; // reset
   }
 
   /**
@@ -174,6 +186,18 @@ public class AnnotationColourGradientTest
       Color result = testee.shadeCalculation(ann, col);
       assertEquals(result, expected, "for column " + col);
     }
+
+    /*
+     * test for boundary case threshold == graphMin (JAL-3206)
+     */
+    float thresh = ann.threshold.value;
+    ann.threshold.value = ann.graphMin;
+    Color result = testee.shadeCalculation(ann, 0);
+    assertEquals(result, minColour);
+    testee.setThresholdIsMinMax(false);
+    result = testee.shadeCalculation(ann, 0);
+    assertEquals(result, minColour);
+    ann.threshold.value = thresh; // reset
   }
 
   /**
@@ -184,15 +208,16 @@ public class AnnotationColourGradientTest
   {
     AnnotationColourGradient testee = new AnnotationColourGradient(ann,
             minColour, maxColour, AnnotationColourGradient.ABOVE_THRESHOLD);
-    testee = (AnnotationColourGradient) testee.getInstance(al, null);
+    testee = (AnnotationColourGradient) testee.getInstance(null, al);
 
     for (int col = 0; col < WIDTH; col++)
     {
       Color result = testee.findColour('a', col, seq);
       /*
-       * expect white below threshold of 5
+       * expect white at or below threshold of 5
        */
-      Color expected = col < 5 ? Color.white : new Color(50 + 10 * col,
+      Color expected = col <= 5 ? Color.white
+              : new Color(50 + 10 * col,
               200 - 10 * col,
               150 + 10 * col);
       assertEquals(result, expected, "for column " + col);
@@ -206,11 +231,12 @@ public class AnnotationColourGradientTest
     for (int col = 0; col < WIDTH; col++)
     {
       /*
-       * colours for values >= threshold are graduated
+       * colours for values > threshold are graduated
        * range is 6-10 so steps of 100/5 = 20
        */
       int factor = col - THRESHOLD_FIVE;
-      Color expected = col < 5 ? Color.white : new Color(50 + 20 * factor,
+      Color expected = col <= 5 ? Color.white
+              : new Color(50 + 20 * factor,
               200 - 20 * factor,
               150 + 20 * factor);
       Color result = testee.findColour('a', col, seq);
@@ -226,12 +252,13 @@ public class AnnotationColourGradientTest
   {
     AnnotationColourGradient testee = new AnnotationColourGradient(ann,
             minColour, maxColour, AnnotationColourGradient.BELOW_THRESHOLD);
-    testee = (AnnotationColourGradient) testee.getInstance(al, null);
+    testee = (AnnotationColourGradient) testee.getInstance(null, al);
   
     for (int col = 0; col < WIDTH; col++)
     {
       Color result = testee.findColour('a', col, seq);
-      Color expected = col > 5 ? Color.white : new Color(50 + 10 * col,
+      Color expected = col >= 5 ? Color.white
+              : new Color(50 + 10 * col,
               200 - 10 * col, 150 + 10 * col);
       assertEquals(result, expected, "for column " + col);
     }
@@ -244,10 +271,11 @@ public class AnnotationColourGradientTest
     for (int col = 0; col < WIDTH; col++)
     {
       /*
-       * colours for values <= threshold are graduated
+       * colours for values < threshold are graduated
        * range is 0-5 so steps of 100/5 = 20
        */
-      Color expected = col > 5 ? Color.white : new Color(50 + 20 * col,
+      Color expected = col >= 5 ? Color.white
+              : new Color(50 + 20 * col,
               200 - 20 * col, 150 + 20 * col);
       Color result = testee.findColour('a', col, seq);
       assertEquals(result, expected, "for column " + col);
@@ -259,7 +287,7 @@ public class AnnotationColourGradientTest
   {
     AnnotationColourGradient testee = new AnnotationColourGradient(ann,
             minColour, maxColour, AnnotationColourGradient.NO_THRESHOLD);
-    testee = (AnnotationColourGradient) testee.getInstance(al, null);
+    testee = (AnnotationColourGradient) testee.getInstance(null, al);
 
     for (int col = 0; col < WIDTH; col++)
     {
@@ -278,7 +306,7 @@ public class AnnotationColourGradientTest
   {
     AnnotationColourGradient testee = new AnnotationColourGradient(ann,
             minColour, maxColour, AnnotationColourGradient.NO_THRESHOLD);
-    testee = (AnnotationColourGradient) testee.getInstance(al, null);
+    testee = (AnnotationColourGradient) testee.getInstance(null, al);
 
     /*
      * flag corresponding to 'use original colours' checkbox
index 11562b8..f71d647 100644 (file)
@@ -76,51 +76,54 @@ public class ColourSchemePropertyTest
     SequenceI seq = new Sequence("Seq1", "abcd");
     AlignmentI al = new Alignment(new SequenceI[] { seq });
     // the strings here correspond to JalviewColourScheme.toString() values
-    ColourSchemeI cs = ColourSchemeProperty.getColourScheme(al, "Clustal");
+    ColourSchemeI cs = ColourSchemeProperty.getColourScheme(null, al,
+            "Clustal");
     assertTrue(cs instanceof ClustalxColourScheme);
     // not case-sensitive
-    cs = ColourSchemeProperty.getColourScheme(al, "CLUSTAL");
+    cs = ColourSchemeProperty.getColourScheme(null, al, "CLUSTAL");
     assertTrue(cs instanceof ClustalxColourScheme);
-    cs = ColourSchemeProperty.getColourScheme(al, "clustal");
+    cs = ColourSchemeProperty.getColourScheme(null, al, "clustal");
     assertTrue(cs instanceof ClustalxColourScheme);
-    cs = ColourSchemeProperty.getColourScheme(al, "Blosum62");
+    cs = ColourSchemeProperty.getColourScheme(null, al, "Blosum62");
     assertTrue(cs instanceof Blosum62ColourScheme);
-    cs = ColourSchemeProperty.getColourScheme(al, "% Identity");
+    cs = ColourSchemeProperty.getColourScheme(null, al, "% Identity");
     assertTrue(cs instanceof PIDColourScheme);
-    cs = ColourSchemeProperty.getColourScheme(al, "Zappo");
+    cs = ColourSchemeProperty.getColourScheme(null, al, "Zappo");
     assertTrue(cs instanceof ZappoColourScheme);
-    cs = ColourSchemeProperty.getColourScheme(al, "Taylor");
+    cs = ColourSchemeProperty.getColourScheme(null, al, "Taylor");
     assertTrue(cs instanceof TaylorColourScheme);
-    cs = ColourSchemeProperty.getColourScheme(al, "Hydrophobic");
+    cs = ColourSchemeProperty.getColourScheme(null, al, "Hydrophobic");
     assertTrue(cs instanceof HydrophobicColourScheme);
-    cs = ColourSchemeProperty.getColourScheme(al, "Helix Propensity");
+    cs = ColourSchemeProperty.getColourScheme(null, al, "Helix Propensity");
     assertTrue(cs instanceof HelixColourScheme);
-    cs = ColourSchemeProperty.getColourScheme(al, "Strand Propensity");
+    cs = ColourSchemeProperty.getColourScheme(null, al,
+            "Strand Propensity");
     assertTrue(cs instanceof StrandColourScheme);
-    cs = ColourSchemeProperty.getColourScheme(al, "Turn Propensity");
+    cs = ColourSchemeProperty.getColourScheme(null, al, "Turn Propensity");
     assertTrue(cs instanceof TurnColourScheme);
-    cs = ColourSchemeProperty.getColourScheme(al, "Buried Index");
+    cs = ColourSchemeProperty.getColourScheme(null, al, "Buried Index");
     assertTrue(cs instanceof BuriedColourScheme);
-    cs = ColourSchemeProperty.getColourScheme(al, "Nucleotide");
+    cs = ColourSchemeProperty.getColourScheme(null, al, "Nucleotide");
     assertTrue(cs instanceof NucleotideColourScheme);
-    cs = ColourSchemeProperty.getColourScheme(al, "Purine/Pyrimidine");
+    cs = ColourSchemeProperty.getColourScheme(null, al,
+            "Purine/Pyrimidine");
     assertTrue(cs instanceof PurinePyrimidineColourScheme);
-    cs = ColourSchemeProperty.getColourScheme(al, "T-Coffee Scores");
+    cs = ColourSchemeProperty.getColourScheme(null, al, "T-Coffee Scores");
     assertTrue(cs instanceof TCoffeeColourScheme);
-    cs = ColourSchemeProperty.getColourScheme(al, "RNA Helices");
+    cs = ColourSchemeProperty.getColourScheme(null, al, "RNA Helices");
     assertTrue(cs instanceof RNAHelicesColour);
     // 'None' is a special value
-    assertNull(ColourSchemeProperty.getColourScheme(al, "None"));
-    assertNull(ColourSchemeProperty.getColourScheme(al, "none"));
+    assertNull(ColourSchemeProperty.getColourScheme(null, al, "None"));
+    assertNull(ColourSchemeProperty.getColourScheme(null, al, "none"));
     // default is to convert the name into a fixed colour
-    cs = ColourSchemeProperty.getColourScheme(al, "elephants");
+    cs = ColourSchemeProperty.getColourScheme(null, al, "elephants");
     assertTrue(cs instanceof UserColourScheme);
 
     /*
      * explicit aa colours
      */
     UserColourScheme ucs = (UserColourScheme) ColourSchemeProperty
-            .getColourScheme(al,
+            .getColourScheme(null, al,
             "R,G=red;C=blue;c=green;Q=10,20,30;S,T=11ffdd");
     assertEquals(ucs.findColour('H'), Color.white);
     assertEquals(ucs.findColour('R'), Color.red);
index 0aaa38c..5db3743 100644 (file)
@@ -5,6 +5,7 @@ import static org.testng.Assert.assertFalse;
 import static org.testng.Assert.assertSame;
 import static org.testng.Assert.assertTrue;
 
+import jalview.api.AlignViewportI;
 import jalview.bin.Cache;
 import jalview.bin.Jalview;
 import jalview.datamodel.AnnotatedCollectionI;
@@ -54,8 +55,8 @@ public class ColourSchemesTest
     }
 
     @Override
-    public ColourSchemeI getInstance(AnnotatedCollectionI sg,
-            Map<SequenceI, SequenceCollectionI> hiddenRepSequences)
+    public ColourSchemeI getInstance(AlignViewportI view,
+            AnnotatedCollectionI sg)
     {
       final ColourSchemeI cs1 = ColourSchemes.getInstance()
               .getColourScheme(JalviewColourScheme.Taylor.toString(),
@@ -144,10 +145,10 @@ public class ColourSchemesTest
     }
 
     @Override
-    public ColourSchemeI getInstance(AnnotatedCollectionI sg,
-            Map<SequenceI, SequenceCollectionI> hiddenRepSequences)
+    public ColourSchemeI getInstance(AlignViewportI view,
+            AnnotatedCollectionI sg)
     {
-      return new MyClustal(sg,              hiddenRepSequences);
+      return new MyClustal(sg, view.getHiddenRepSequences());
     }
 
     @Override
diff --git a/test/jalview/schemes/DnaCodonTests.java b/test/jalview/schemes/DnaCodonTests.java
deleted file mode 100644 (file)
index 908d07b..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * 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.schemes;
-
-import static org.testng.AssertJUnit.assertTrue;
-
-import jalview.gui.JvOptionPane;
-
-import java.util.Map;
-
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-public class DnaCodonTests
-{
-
-  @BeforeClass(alwaysRun = true)
-  public void setUpJvOptionPane()
-  {
-    JvOptionPane.setInteractiveMode(false);
-    JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
-  }
-
-  @Test(groups = { "Functional" })
-  public void testAmbiguityCodeGeneration()
-  {
-    assertTrue(ResidueProperties.ambiguityCodes.size() > 0);
-  }
-
-  @Test(groups = { "Functional" })
-  public void testAmbiguityCodon()
-  {
-    for (String ac : ResidueProperties.ambiguityCodes.keySet())
-    {
-      assertTrue("Couldn't resolve GGN as glycine codon",
-              ResidueProperties.codonHash2.get("GG" + ac).equals("G"));
-    }
-  }
-
-  @Test(groups = { "Functional" })
-  public void regenerateCodonTable()
-  {
-    for (Map.Entry<String, String> codon : ResidueProperties.codonHash2
-            .entrySet())
-    {
-      System.out.println("ResidueProperties.codonHash2.set(\""
-              + codon.getKey() + "\", \"" + codon.getValue() + "\");");
-    }
-  }
-}
index a96caec..52ca360 100644 (file)
@@ -38,8 +38,6 @@ import java.awt.Color;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
-import junit.extensions.PA;
-
 public class FeatureColourTest
 {
 
@@ -51,6 +49,30 @@ public class FeatureColourTest
   }
 
   @Test(groups = { "Functional" })
+  public void testConstructors()
+  {
+    FeatureColourI fc = new FeatureColour();
+    assertNull(fc.getColour());
+    assertTrue(fc.isSimpleColour());
+    assertFalse(fc.isColourByLabel());
+    assertFalse(fc.isGraduatedColour());
+    assertFalse(fc.isColourByAttribute());
+    assertEquals(Color.white, fc.getMinColour());
+    assertEquals(Color.black, fc.getMaxColour());
+
+    fc = new FeatureColour(Color.RED);
+    assertEquals(Color.red, fc.getColour());
+    assertTrue(fc.isSimpleColour());
+    assertFalse(fc.isColourByLabel());
+    assertFalse(fc.isGraduatedColour());
+    assertFalse(fc.isColourByAttribute());
+    assertEquals(ColorUtils.bleachColour(Color.RED, 0.9f),
+            fc.getMinColour());
+    assertEquals(Color.RED, fc.getMaxColour());
+
+  }
+
+  @Test(groups = { "Functional" })
   public void testCopyConstructor()
   {
     /*
@@ -67,7 +89,8 @@ public class FeatureColourTest
     /*
      * min-max colour
      */
-    fc = new FeatureColour(Color.gray, Color.black, 10f, 20f);
+    fc = new FeatureColour(null, Color.gray, Color.black, Color.gray, 10f,
+            20f);
     fc.setAboveThreshold(true);
     fc.setThreshold(12f);
     fc1 = new FeatureColour(fc);
@@ -86,12 +109,14 @@ public class FeatureColourTest
     /*
      * min-max-noValue colour
      */
-    fc = new FeatureColour(Color.gray, Color.black, Color.green, 10f, 20f);
+    fc = new FeatureColour(Color.red, Color.gray, Color.black, Color.green,
+            10f, 20f);
     fc.setAboveThreshold(true);
     fc.setThreshold(12f);
     fc1 = new FeatureColour(fc);
     assertTrue(fc1.isGraduatedColour());
     assertFalse(fc1.isColourByLabel());
+    assertFalse(fc1.isSimpleColour());
     assertFalse(fc1.isColourByAttribute());
     assertNull(fc1.getAttributeName());
     assertTrue(fc1.isAboveThreshold());
@@ -99,6 +124,7 @@ public class FeatureColourTest
     assertEquals(Color.gray, fc1.getMinColour());
     assertEquals(Color.black, fc1.getMaxColour());
     assertEquals(Color.green, fc1.getNoColour());
+    assertEquals(Color.red, fc1.getColour());
     assertEquals(10f, fc1.getMin());
     assertEquals(20f, fc1.getMax());
 
@@ -128,7 +154,8 @@ public class FeatureColourTest
     /*
      * colour by attribute (value)
      */
-    fc = new FeatureColour(Color.gray, Color.black, Color.green, 10f, 20f);
+    fc = new FeatureColour(Color.yellow, Color.gray, Color.black,
+            Color.green, 10f, 20f);
     fc.setAboveThreshold(true);
     fc.setThreshold(12f);
     fc.setAttributeName("AF");
@@ -136,104 +163,19 @@ public class FeatureColourTest
     assertTrue(fc1.isGraduatedColour());
     assertFalse(fc1.isColourByLabel());
     assertTrue(fc1.isColourByAttribute());
+    assertFalse(fc1.isSimpleColour());
     assertArrayEquals(new String[] { "AF" }, fc1.getAttributeName());
     assertTrue(fc1.isAboveThreshold());
     assertEquals(12f, fc1.getThreshold());
     assertEquals(Color.gray, fc1.getMinColour());
     assertEquals(Color.black, fc1.getMaxColour());
     assertEquals(Color.green, fc1.getNoColour());
+    assertEquals(Color.yellow, fc1.getColour());
     assertEquals(10f, fc1.getMin());
     assertEquals(20f, fc1.getMax());
   }
 
   @Test(groups = { "Functional" })
-  public void testCopyConstructor_minMax()
-  {
-    /*
-     * graduated colour
-     */
-    FeatureColour fc = new FeatureColour(Color.BLUE, Color.RED, 1f, 5f);
-    assertTrue(fc.isGraduatedColour());
-    assertFalse(fc.isColourByLabel());
-    assertFalse(fc.isColourByAttribute());
-    assertNull(fc.getAttributeName());
-    assertEquals(1f, fc.getMin());
-    assertEquals(5f, fc.getMax());
-
-    /*
-     * update min-max bounds
-     */
-    FeatureColour fc1 = new FeatureColour(fc, 2f, 6f);
-    assertTrue(fc1.isGraduatedColour());
-    assertFalse(fc1.isColourByLabel());
-    assertFalse(fc1.isColourByAttribute());
-    assertNull(fc1.getAttributeName());
-    assertEquals(2f, fc1.getMin());
-    assertEquals(6f, fc1.getMax());
-    assertFalse((boolean) PA.getValue(fc1, "isHighToLow"));
-
-    /*
-     * update min-max bounds - high to low
-     */
-    fc1 = new FeatureColour(fc, 23f, 16f);
-    assertTrue(fc1.isGraduatedColour());
-    assertFalse(fc1.isColourByLabel());
-    assertFalse(fc1.isColourByAttribute());
-    assertNull(fc1.getAttributeName());
-    assertEquals(23f, fc1.getMin());
-    assertEquals(16f, fc1.getMax());
-    assertTrue((boolean) PA.getValue(fc1, "isHighToLow"));
-
-    /*
-     * graduated colour by attribute
-     */
-    fc1.setAttributeName("AF");
-    fc1 = new FeatureColour(fc1, 13f, 36f);
-    assertTrue(fc1.isGraduatedColour());
-    assertFalse(fc1.isColourByLabel());
-    assertTrue(fc1.isColourByAttribute());
-    assertArrayEquals(new String[] { "AF" }, fc1.getAttributeName());
-    assertEquals(13f, fc1.getMin());
-    assertEquals(36f, fc1.getMax());
-    assertFalse((boolean) PA.getValue(fc1, "isHighToLow"));
-
-    /*
-     * colour by label
-     */
-    fc = new FeatureColour(Color.BLUE, Color.RED, 1f, 5f);
-    fc.setColourByLabel(true);
-    assertFalse(fc.isGraduatedColour());
-    assertTrue(fc.isColourByLabel());
-    assertFalse(fc.isColourByAttribute());
-    assertNull(fc.getAttributeName());
-    assertEquals(1f, fc.getMin());
-    assertEquals(5f, fc.getMax());
-
-    /*
-     * update min-max bounds
-     */
-    fc1 = new FeatureColour(fc, 2f, 6f);
-    assertFalse(fc1.isGraduatedColour());
-    assertTrue(fc1.isColourByLabel());
-    assertFalse(fc1.isColourByAttribute());
-    assertNull(fc1.getAttributeName());
-    assertEquals(2f, fc1.getMin());
-    assertEquals(6f, fc1.getMax());
-
-    /*
-     * colour by attribute text
-     */
-    fc1.setAttributeName("AC");
-    fc1 = new FeatureColour(fc1, 13f, 36f);
-    assertFalse(fc1.isGraduatedColour());
-    assertTrue(fc1.isColourByLabel());
-    assertTrue(fc1.isColourByAttribute());
-    assertArrayEquals(new String[] { "AC" }, fc1.getAttributeName());
-    assertEquals(13f, fc1.getMin());
-    assertEquals(36f, fc1.getMax());
-  }
-
-  @Test(groups = { "Functional" })
   public void testGetColor_simpleColour()
   {
     FeatureColour fc = new FeatureColour(Color.RED);
@@ -260,7 +202,8 @@ public class FeatureColourTest
      * score 0 to 100
      * gray(128, 128, 128) to red(255, 0, 0)
      */
-    FeatureColour fc = new FeatureColour(Color.GRAY, Color.RED, 0f, 100f);
+    FeatureColour fc = new FeatureColour(null, Color.GRAY, Color.RED, null,
+            0f, 100f);
     // feature score is 75 which is 3/4 of the way from GRAY to RED
     SequenceFeature sf = new SequenceFeature("type", "desc", 0, 20, 75f,
             null);
@@ -276,8 +219,8 @@ public class FeatureColourTest
   public void testGetColor_aboveBelowThreshold()
   {
     // gradient from [50, 150] from WHITE(255, 255, 255) to BLACK(0, 0, 0)
-    FeatureColour fc = new FeatureColour(Color.WHITE, Color.BLACK, 50f,
-            150f);
+    FeatureColour fc = new FeatureColour(null, Color.WHITE, Color.BLACK,
+            Color.white, 50f, 150f);
     SequenceFeature sf = new SequenceFeature("type", "desc", 0, 20, 70f,
             null);
 
@@ -371,7 +314,8 @@ public class FeatureColourTest
      * graduated colour by score, no threshold
      * - default constructor sets noValueColor = minColor
      */
-    fc = new FeatureColour(Color.GREEN, Color.RED, 12f, 25f);
+    fc = new FeatureColour(null, Color.GREEN, Color.RED, Color.GREEN, 12f,
+            25f);
     String greenHex = Format.getHexString(Color.GREEN);
     String expected = String.format(
             "domain\tscore|%s|%s|noValueMin|abso|12.0|25.0|none", greenHex,
@@ -381,7 +325,8 @@ public class FeatureColourTest
     /*
      * graduated colour by score, no threshold, no value gets min colour
      */
-    fc = new FeatureColour(Color.GREEN, Color.RED, Color.GREEN, 12f, 25f);
+    fc = new FeatureColour(Color.RED, Color.GREEN, Color.RED, Color.GREEN,
+            12f, 25f);
     expected = String.format(
             "domain\tscore|%s|%s|noValueMin|abso|12.0|25.0|none", greenHex,
             redHex);
@@ -390,7 +335,8 @@ public class FeatureColourTest
     /*
      * graduated colour by score, no threshold, no value gets max colour
      */
-    fc = new FeatureColour(Color.GREEN, Color.RED, Color.RED, 12f, 25f);
+    fc = new FeatureColour(Color.RED, Color.GREEN, Color.RED, Color.RED,
+            12f, 25f);
     expected = String.format(
             "domain\tscore|%s|%s|noValueMax|abso|12.0|25.0|none", greenHex,
             redHex);
@@ -687,8 +633,9 @@ public class FeatureColourTest
      * graduated colour based on attribute value for AF
      * given a min-max range of 0-100
      */
-    FeatureColour fc = new FeatureColour(new Color(50, 100, 150),
-            new Color(150, 200, 250), Color.yellow, 0f, 100f);
+    FeatureColour fc = new FeatureColour(Color.white,
+            new Color(50, 100, 150), new Color(150, 200, 250), Color.yellow,
+            0f, 100f);
     String attName = "AF";
     fc.setAttributeName(attName);
 
@@ -712,4 +659,142 @@ public class FeatureColourTest
     Color expected = new Color(70, 120, 170);
     assertEquals(expected, fc.getColor(sf));
   }
+
+  @Test(groups = { "Functional" })
+  public void testIsOutwithThreshold()
+  {
+    FeatureColourI fc = new FeatureColour(Color.red);
+    SequenceFeature sf = new SequenceFeature("METAL", "desc", 10, 12, 1.2f, "grp");
+    assertFalse(fc.isOutwithThreshold(null));
+    assertFalse(fc.isOutwithThreshold(sf));
+
+    fc = new FeatureColour(null, Color.white, Color.black, Color.green, 0f,
+            10f);
+    assertFalse(fc.isOutwithThreshold(sf)); // no threshold
+
+    fc.setAboveThreshold(true);
+    fc.setThreshold(1f);
+    assertFalse(fc.isOutwithThreshold(sf)); // feature score 1.2 is above 1
+
+    fc.setThreshold(2f);
+    assertTrue(fc.isOutwithThreshold(sf)); // feature score 1.2 is not above 2
+
+    fc.setBelowThreshold(true);
+    assertFalse(fc.isOutwithThreshold(sf)); // feature score 1.2 is below 2
+
+    fc.setThreshold(1f);
+    assertTrue(fc.isOutwithThreshold(sf)); // feature score 1.2 is not below 1
+
+    /*
+     * with attribute value threshold
+     */
+    fc.setAttributeName("AC");
+    assertFalse(fc.isOutwithThreshold(sf)); // missing attribute AC is ignored
+
+    sf.setValue("AC", "-1");
+    assertFalse(fc.isOutwithThreshold(sf)); // value -1 is below 1
+
+    sf.setValue("AC", "1");
+    assertTrue(fc.isOutwithThreshold(sf)); // value 1 is not below 1
+
+    sf.setValue("AC", "junk");
+    assertFalse(fc.isOutwithThreshold(sf)); // bad value is ignored
+  }
+
+  /**
+   * Test description of feature colour suitable for a tooltip
+   */
+  @Test(groups = { "Functional" })
+  public void testGetDescription()
+  {
+    /*
+     * plain colour
+     */
+    FeatureColour fc = new FeatureColour(Color.RED);
+    assertEquals(
+            String.format("r=%d,g=%d,b=%d", Color.RED.getRed(),
+                    Color.red.getGreen(), Color.red.getBlue()),
+            fc.getDescription());
+  
+    /*
+     * colour by label (no threshold)
+     */
+    fc = new FeatureColour();
+    fc.setColourByLabel(true);
+    assertEquals("By Label", fc.getDescription());
+  
+    /*
+     * colour by attribute text (no threshold)
+     */
+    fc = new FeatureColour();
+    fc.setColourByLabel(true);
+    fc.setAttributeName("CLIN_SIG");
+    assertEquals("By CLIN_SIG", fc.getDescription());
+  
+    /*
+     * colour by label (above score threshold) 
+     */
+    fc = new FeatureColour();
+    fc.setColourByLabel(true);
+    fc.setAutoScaled(false);
+    fc.setThreshold(12.5f);
+    fc.setAboveThreshold(true);
+    assertEquals("By Label (Score > 12.5)",
+            fc.getDescription());
+  
+    /*
+     * colour by label (below score threshold)
+     */
+    fc.setBelowThreshold(true);
+    assertEquals("By Label (Score < 12.5)",
+            fc.getDescription());
+  
+    /*
+     * colour by attributes text (below score threshold)
+     */
+    fc.setBelowThreshold(true);
+    fc.setAttributeName("CSQ", "Consequence");
+    assertEquals(
+            "By CSQ:Consequence (Score < 12.5)",
+            fc.getDescription());
+  
+    /*
+     * graduated colour by score, no threshold
+     */
+    fc = new FeatureColour(null, Color.GREEN, Color.RED, null, 12f, 25f);
+    assertEquals("By Score", fc.getDescription());
+  
+    /*
+     * graduated colour by score, below threshold
+     */
+    fc.setThreshold(12.5f);
+    fc.setBelowThreshold(true);
+    assertEquals("By Score (< 12.5)",
+            fc.getDescription());
+  
+    /*
+     * graduated colour by score, above threshold
+     */
+    fc.setThreshold(12.5f);
+    fc.setAboveThreshold(true);
+    fc.setAutoScaled(false);
+    assertEquals("By Score (> 12.5)",
+            fc.getDescription());
+
+    /*
+     * graduated colour by attribute, no threshold
+     */
+    fc.setAttributeName("CSQ", "AF");
+    fc.setAboveThreshold(false);
+    fc.setAutoScaled(false);
+    assertEquals("By CSQ:AF", fc.getDescription());
+  
+    /*
+     * graduated colour by attribute, above threshold
+     */
+    fc.setAboveThreshold(true);
+    fc.setAutoScaled(false);
+    assertEquals("By CSQ:AF (> 12.5)",
+            fc.getDescription());
+  }
 }
index d9403d2..e8a70e4 100644 (file)
@@ -24,6 +24,8 @@ public class JalviewColourSchemeTest
     assertTrue(JalviewColourScheme.PurinePyrimidine.getSchemeClass() == PurinePyrimidineColourScheme.class);
     assertTrue(JalviewColourScheme.TCoffee.getSchemeClass() == TCoffeeColourScheme.class);
     assertTrue(JalviewColourScheme.RNAHelices.getSchemeClass() == RNAHelicesColour.class);
+    assertTrue(JalviewColourScheme.IdColour
+            .getSchemeClass() == IdColourScheme.class);
   }
 
   @Test(groups = "Functional")
@@ -44,5 +46,6 @@ public class JalviewColourSchemeTest
             "Purine/Pyrimidine");
     assertEquals(JalviewColourScheme.TCoffee.toString(), "T-Coffee Scores");
     assertEquals(JalviewColourScheme.RNAHelices.toString(), "RNA Helices");
+    assertEquals(JalviewColourScheme.IdColour.toString(), "Sequence ID");
   }
 }
index 7fbad50..180deaf 100644 (file)
@@ -1569,6 +1569,16 @@ public class ResiduePropertiesTest
   }
 
   @Test(groups = { "Functional" })
+  public void testGetDssp3State()
+  {
+    assertNull(ResidueProperties.getDssp3state(null));
+    assertEquals("", ResidueProperties.getDssp3state(""));
+    String foo = "0123 []<>abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
+    String bar = "                                    E  E HHH                 ";
+    assertEquals(bar, ResidueProperties.getDssp3state(foo));
+  }
+
+  @Test(groups = { "Functional" })
   public void testPhysicoChemicalProperties()
   {
     checkProperty("aromatic", "FYWH-*");
index 0ef3c25..0368d1e 100644 (file)
@@ -21,7 +21,6 @@
 package jalview.util;
 
 import static org.testng.AssertJUnit.assertEquals;
-import static org.testng.AssertJUnit.assertFalse;
 import static org.testng.AssertJUnit.assertNull;
 import static org.testng.AssertJUnit.assertSame;
 import static org.testng.AssertJUnit.assertTrue;
@@ -121,38 +120,6 @@ public class DBRefUtilsTest
     assertEquals("pfam", DBRefUtils.getCanonicalName("pfam"));
 
   }
-
-  @Test(groups = { "Functional" })
-  public void testIsDasCoordinateSystem()
-  {
-    assertFalse(DBRefUtils.isDasCoordinateSystem(null, null));
-    assertFalse(DBRefUtils.isDasCoordinateSystem("pdbresnum", null));
-    assertFalse(DBRefUtils.isDasCoordinateSystem(null, new DBRefEntry(
-            "PDB", "v1", "a1")));
-
-    assertTrue(DBRefUtils.isDasCoordinateSystem("pdbresnum",
-            new DBRefEntry("PDB", "v1", "a1")));
-    assertTrue(DBRefUtils.isDasCoordinateSystem("PDBRESNUM",
-            new DBRefEntry("PDB", "v1", "a1")));
-    // "pdb" is converted to upper-case in DBRefEntry constructor
-    assertTrue(DBRefUtils.isDasCoordinateSystem("pdbresnum",
-            new DBRefEntry("pdb", "v1", "a1")));
-    assertFalse(DBRefUtils.isDasCoordinateSystem("pdb", new DBRefEntry(
-            "pdb", "v1", "a1")));
-
-    assertTrue(DBRefUtils.isDasCoordinateSystem("UNIPROT", new DBRefEntry(
-            "Uniprot", "v1", "a1")));
-    assertTrue(DBRefUtils.isDasCoordinateSystem("Uniprot", new DBRefEntry(
-            "UNIPROT", "v1", "a1")));
-    assertFalse(DBRefUtils.isDasCoordinateSystem("UNIPROTKB",
-            new DBRefEntry("pdb", "v1", "a1")));
-
-    assertTrue(DBRefUtils.isDasCoordinateSystem("EMBL", new DBRefEntry(
-            "EMBL", "v1", "a1")));
-    assertTrue(DBRefUtils.isDasCoordinateSystem("embl", new DBRefEntry(
-            "embl", "v1", "a1")));
-  }
-
   /**
    * Test 'parsing' a DBRef - non PDB case
    */
diff --git a/test/jalview/util/JSONUtilsTest.java b/test/jalview/util/JSONUtilsTest.java
new file mode 100644 (file)
index 0000000..45f1c48
--- /dev/null
@@ -0,0 +1,26 @@
+package jalview.util;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNull;
+
+import org.json.JSONException;
+import org.json.simple.JSONArray;
+import org.testng.annotations.Test;
+
+public class JSONUtilsTest
+{
+  @Test(groups = "Functional")
+  public void testArrayToList() throws JSONException
+  {
+    assertNull(JSONUtils.arrayToList(null));
+
+    JSONArray ja = new JSONArray();
+    assertNull(JSONUtils.arrayToList(null));
+
+    ja.add("hello");
+    assertEquals(JSONUtils.arrayToList(ja), "hello");
+
+    ja.add("world");
+    assertEquals(JSONUtils.arrayToList(ja), "hello,world");
+  }
+}
diff --git a/test/jalview/ws/dbsources/EmblSourceTest.java b/test/jalview/ws/dbsources/EmblSourceTest.java
new file mode 100644 (file)
index 0000000..d450495
--- /dev/null
@@ -0,0 +1,463 @@
+/*
+ * 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.ws.dbsources;
+
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertNotNull;
+import static org.testng.AssertJUnit.assertNull;
+import static org.testng.AssertJUnit.assertSame;
+import static org.testng.AssertJUnit.assertTrue;
+
+import jalview.datamodel.DBRefEntry;
+import jalview.datamodel.DBRefSource;
+import jalview.datamodel.SequenceI;
+import jalview.util.MapList;
+import jalview.xml.binding.embl.EntryType;
+import jalview.xml.binding.embl.EntryType.Feature;
+import jalview.xml.binding.embl.EntryType.Feature.Qualifier;
+import jalview.xml.binding.embl.XrefType;
+
+import java.io.ByteArrayInputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.testng.annotations.Test;
+
+public class EmblSourceTest
+{
+
+  // adapted from http://www.ebi.ac.uk/ena/data/view/X07547&display=xml
+  // dna and translations truncated for convenience
+  static final String TESTDATA = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>"
+          + "<ROOT>"
+          + "<entry accession=\"X07547\" version=\"1\" entryVersion=\"8\""
+          + " dataClass=\"STD\" taxonomicDivision=\"PRO\""
+          + " moleculeType=\"genomic DNA\" sequenceLength=\"7499\" topology=\"linear\""
+          + " firstPublic=\"1988-11-10\" firstPublicRelease=\"18\""
+          + " lastUpdated=\"1999-02-10\" lastUpdatedRelease=\"58\">"
+          + "<secondaryAccession>X07574</secondaryAccession>"
+          + "<description>C. trachomatis plasmid</description>"
+          + "<keyword>plasmid</keyword><keyword>unidentified reading frame</keyword>"
+          + "<xref db=\"EuropePMC\" id=\"PMC107176\" secondaryId=\"9573186\" />"
+          + "<xref db=\"MD5\" id=\"ac73317\" />"
+          /*
+           * first CDS (range and translation changed to keep test data manageable)
+           */
+          + "<feature name=\"CDS\" location=\"complement(46..57)\">"
+          // test the case of >1 cross-ref to the same database (JAL-2029)
+          + "<xref db=\"UniProtKB/Swiss-Prot\" id=\"B0BCM4\" secondaryId=\"2.1\" />"
+          + "<xref db=\"UniProtKB/Swiss-Prot\" id=\"P0CE20\" />"
+          + "<qualifier name=\"note\"><value>ORF 8 (AA 1-330)</value></qualifier>"
+          + "<qualifier name=\"protein_id\"><value>CAA30420.1</value></qualifier>"
+          + "<qualifier name=\"translation\"><value>MLCF</value></qualifier>"
+          + "</feature>"
+          /*
+           * second CDS (range and translation changed to keep test data manageable)
+           */
+          + "<feature name=\"CDS\" location=\"4..15\">"
+          + "<xref db=\"UniProtKB/Swiss-Prot\" id=\"B0BCM3\" />"
+          + "<qualifier name=\"protein_id\"><value>CAA30421.1</value></qualifier>"
+          + "<qualifier name=\"translation\"><value>MSSS</value></qualifier>"
+          + "</feature>"
+          /*
+           * third CDS is made up - has no xref - code should synthesize 
+           * one to an assumed EMBLCDSPROTEIN accession
+           */
+          + "<feature name=\"CDS\" location=\"join(4..6,10..15)\">"
+          + "<qualifier name=\"protein_id\"><value>CAA12345.6</value></qualifier>"
+          + "<qualifier name=\"translation\"><value>MSS</value></qualifier>"
+          + "</feature>"
+          /*
+           * sequence (modified for test purposes)
+           * emulates EMBL XML 1.2 which splits sequence data every 60 characters
+           * see EmblSequence.setSequence
+           */
+          + "<sequence>GGTATGTCCTCTAGTACAAAC\n"
+          + "ACCCCCAATATTGTGATATAATTAAAAACATAGCAT"
+          + "</sequence></entry></ROOT>";
+
+  @Test(groups = "Functional")
+  public void testGetCdsRanges()
+  {
+    EmblSource testee = new EmblSource();
+
+    /*
+     * Make a (CDS) Feature with 5 locations
+     */
+    Feature cds = new Feature();
+    cds.setLocation("join(10..20,complement(30..40),50..60,70..80,complement(110..120))");
+
+    int[] exons = testee.getCdsRanges("EMBL", cds);
+    assertEquals("[10, 20, 40, 30, 50, 60, 70, 80, 120, 110]",
+            Arrays.toString(exons));
+  }
+
+  @Test(groups = "Functional")
+  public void testGetSequence()
+  {
+    // not the whole sequence but enough for this test...
+    List<SequenceI> peptides = new ArrayList<>();
+    List<EntryType> entries = EmblSourceTest.getEmblEntries();
+    assertEquals(1, entries.size());
+    EntryType entry = entries.get(0);
+    EmblSource testee = new EmblSource();
+    String sourceDb = "EMBL";
+    SequenceI dna = testee.getSequence(sourceDb, entry, peptides);
+
+    /*
+     * newline has been removed from sequence
+     */
+    String seq = dna.getSequenceAsString();
+    assertEquals(
+            "GGTATGTCCTCTAGTACAAACACCCCCAATATTGTGATATAATTAAAAACATAGCAT",
+            seq);
+
+    /*
+     * peptides should now have five entries:
+     * EMBL product and two Uniprot accessions for the first CDS / translation
+     * EMBL product and one Uniprot accession for the second CDS / "
+     * EMBL product only for the third
+     */
+    assertEquals(6, peptides.size());
+    assertEquals("CAA30420.1", peptides.get(0).getName());
+    assertEquals("MLCF", peptides.get(0).getSequenceAsString());
+    assertEquals("UNIPROT|B0BCM4", peptides.get(1).getName());
+    assertEquals("MLCF", peptides.get(1).getSequenceAsString());
+    assertEquals("UNIPROT|P0CE20", peptides.get(2).getName());
+    assertEquals("MLCF", peptides.get(2).getSequenceAsString());
+    assertEquals("CAA30421.1", peptides.get(3).getName());
+    assertEquals("MSSS", peptides.get(3).getSequenceAsString());
+    assertEquals("UNIPROT|B0BCM3", peptides.get(4).getName());
+    assertEquals("MSSS", peptides.get(4).getSequenceAsString());
+    assertEquals("CAA12345.6", peptides.get(5).getName());
+    assertEquals("MSS", peptides.get(5).getSequenceAsString());
+
+    /*
+     * verify dna sequence has dbrefs
+     * - to 'self' (synthesized dbref)
+     * - to EuropePMC
+     * - to MD5 (with null version as "0") 
+     * - with CDS mappings to the peptide 'products'
+     */
+    MapList mapToSelf = new MapList(new int[] { 1, 57 },
+            new int[]
+            { 1, 57 }, 1, 1);
+    MapList cds1Map = new MapList(new int[] { 57, 46 }, new int[] { 1, 4 },
+            3, 1);
+    MapList cds2Map = new MapList(new int[] { 4, 15 }, new int[] { 1, 4 },
+            3, 1);
+    MapList cds3Map = new MapList(new int[] { 4, 6, 10, 15 }, new int[] {
+        1, 3 }, 3, 1);
+
+    DBRefEntry[] dbrefs = dna.getDBRefs();
+    assertEquals(7, dbrefs.length);
+
+    DBRefEntry dbRefEntry = dbrefs[0];
+    assertEquals("EMBL", dbRefEntry.getSource());
+    assertEquals("X07547", dbRefEntry.getAccessionId());
+    assertEquals("1", dbRefEntry.getVersion());
+    assertNotNull(dbRefEntry.getMap());
+    assertNull(dbRefEntry.getMap().getTo());
+    assertEquals(mapToSelf, dbRefEntry.getMap().getMap());
+
+    dbRefEntry = dbrefs[1];
+    // DBRefEntry constructor puts dbSource in upper case
+    assertEquals("EUROPEPMC", dbRefEntry.getSource());
+    assertEquals("PMC107176", dbRefEntry.getAccessionId());
+    assertEquals("9573186", dbRefEntry.getVersion());
+    assertNull(dbRefEntry.getMap());
+
+    dbRefEntry = dbrefs[2];
+    assertEquals("MD5", dbRefEntry.getSource());
+    assertEquals("ac73317", dbRefEntry.getAccessionId());
+    assertEquals("0", dbRefEntry.getVersion());
+    assertNull(dbRefEntry.getMap());
+
+    dbRefEntry = dbrefs[3];
+    assertEquals("UNIPROT", dbRefEntry.getSource());
+    assertEquals("B0BCM4", dbRefEntry.getAccessionId());
+    assertSame(peptides.get(1), dbRefEntry.getMap().getTo());
+    assertEquals(cds1Map, dbRefEntry.getMap().getMap());
+
+    dbRefEntry = dbrefs[4];
+    assertEquals("UNIPROT", dbRefEntry.getSource());
+    assertEquals("P0CE20", dbRefEntry.getAccessionId());
+    assertSame(peptides.get(2), dbRefEntry.getMap().getTo());
+    assertEquals(cds1Map, dbRefEntry.getMap().getMap());
+
+    dbRefEntry = dbrefs[5];
+    assertEquals("UNIPROT", dbRefEntry.getSource());
+    assertEquals("B0BCM3", dbRefEntry.getAccessionId());
+    assertSame(peptides.get(4), dbRefEntry.getMap().getTo());
+    assertEquals(cds2Map, dbRefEntry.getMap().getMap());
+
+    dbRefEntry = dbrefs[6];
+    assertEquals("EMBLCDSPROTEIN", dbRefEntry.getSource());
+    assertEquals("CAA12345.6", dbRefEntry.getAccessionId());
+    assertSame(peptides.get(5), dbRefEntry.getMap().getTo());
+    assertEquals(cds3Map, dbRefEntry.getMap().getMap());
+
+    /*
+     * verify peptides have dbrefs
+     * - to EMBL sequence (with inverse 1:3 cds mapping)
+     * - to EMBLCDS (with 1:3 mapping)
+     * - direct (no mapping) to other protein accessions
+     */
+    MapList proteinToCdsMap1 = new MapList(new int[] { 1, 4 }, new int[] {
+        1, 12 }, 1, 3);
+    MapList proteinToCdsMap2 = new MapList(new int[] { 1, 3 }, new int[] {
+        1, 9 }, 1, 3);
+
+    // dbrefs for first CDS EMBL product CAA30420.1
+    dbrefs = peptides.get(0).getDBRefs();
+    assertEquals(5, dbrefs.length);
+    assertEquals(DBRefSource.EMBL, dbrefs[0].getSource());
+    assertEquals("CAA30420.1", dbrefs[0].getAccessionId());
+    // TODO: verify getPrimaryDBRefs() for peptide products
+    assertEquals(cds1Map.getInverse(), dbrefs[0].getMap().getMap());
+    assertEquals(DBRefSource.EMBLCDS, dbrefs[1].getSource());
+    assertEquals("CAA30420.1", dbrefs[1].getAccessionId());
+    assertEquals(proteinToCdsMap1, dbrefs[1].getMap().getMap());
+    assertEquals(DBRefSource.EMBLCDSProduct, dbrefs[2].getSource());
+    assertEquals("CAA30420.1", dbrefs[2].getAccessionId());
+    assertNull(dbrefs[2].getMap());
+    assertEquals(new DBRefEntry(DBRefSource.UNIPROT, "2.1", "B0BCM4"),
+            dbrefs[3]);
+    assertNull(dbrefs[3].getMap());
+    assertEquals(new DBRefEntry(DBRefSource.UNIPROT, "0", "P0CE20"),
+            dbrefs[4]);
+    assertNull(dbrefs[4].getMap());
+
+    // dbrefs for first CDS first Uniprot xref
+    dbrefs = peptides.get(1).getDBRefs();
+    assertEquals(2, dbrefs.length);
+    assertEquals(new DBRefEntry(DBRefSource.UNIPROT, "2.1", "B0BCM4"),
+            dbrefs[0]);
+    assertNull(dbrefs[0].getMap());
+    assertEquals(DBRefSource.EMBL, dbrefs[1].getSource());
+    assertEquals("X07547", dbrefs[1].getAccessionId());
+    assertEquals(cds1Map.getInverse(), dbrefs[1].getMap().getMap());
+
+    // dbrefs for first CDS second Uniprot xref
+    dbrefs = peptides.get(2).getDBRefs();
+    assertEquals(2, dbrefs.length);
+    assertEquals(new DBRefEntry(DBRefSource.UNIPROT, "0", "P0CE20"),
+            dbrefs[0]);
+    assertNull(dbrefs[0].getMap());
+    assertEquals(DBRefSource.EMBL, dbrefs[1].getSource());
+    assertEquals("X07547", dbrefs[1].getAccessionId());
+    assertEquals(cds1Map.getInverse(), dbrefs[1].getMap().getMap());
+
+    // dbrefs for second CDS EMBL product CAA30421.1
+    dbrefs = peptides.get(3).getDBRefs();
+    assertEquals(4, dbrefs.length);
+    assertEquals(DBRefSource.EMBL, dbrefs[0].getSource());
+    assertEquals("CAA30421.1", dbrefs[0].getAccessionId());
+    assertEquals(cds2Map.getInverse(), dbrefs[0].getMap().getMap());
+    assertEquals(DBRefSource.EMBLCDS, dbrefs[1].getSource());
+    assertEquals("CAA30421.1", dbrefs[1].getAccessionId());
+    assertEquals(proteinToCdsMap1, dbrefs[1].getMap().getMap());
+    assertEquals(DBRefSource.EMBLCDSProduct, dbrefs[2].getSource());
+    assertEquals("CAA30421.1", dbrefs[2].getAccessionId());
+    assertNull(dbrefs[2].getMap());
+    assertEquals(new DBRefEntry(DBRefSource.UNIPROT, "0", "B0BCM3"),
+            dbrefs[3]);
+    assertNull(dbrefs[3].getMap());
+
+    // dbrefs for second CDS second Uniprot xref
+    dbrefs = peptides.get(4).getDBRefs();
+    assertEquals(2, dbrefs.length);
+    assertEquals(new DBRefEntry(DBRefSource.UNIPROT, "0", "B0BCM3"),
+            dbrefs[0]);
+    assertNull(dbrefs[0].getMap());
+    assertEquals(DBRefSource.EMBL, dbrefs[1].getSource());
+    assertEquals("X07547", dbrefs[1].getAccessionId());
+    assertEquals(cds2Map.getInverse(), dbrefs[1].getMap().getMap());
+
+    // dbrefs for third CDS inferred EMBL product CAA12345.6
+    dbrefs = peptides.get(5).getDBRefs();
+    assertEquals(3, dbrefs.length);
+    assertEquals(DBRefSource.EMBL, dbrefs[0].getSource());
+    assertEquals("CAA12345.6", dbrefs[0].getAccessionId());
+    assertEquals(cds3Map.getInverse(), dbrefs[0].getMap().getMap());
+    assertEquals(DBRefSource.EMBLCDS, dbrefs[1].getSource());
+    assertEquals("CAA12345.6", dbrefs[1].getAccessionId());
+    assertEquals(proteinToCdsMap2, dbrefs[1].getMap().getMap());
+    assertEquals(DBRefSource.EMBLCDSProduct, dbrefs[2].getSource());
+    assertEquals("CAA12345.6", dbrefs[2].getAccessionId());
+    assertNull(dbrefs[2].getMap());
+  }
+
+  @Test(groups = "Functional")
+  public void testAdjustForProteinLength()
+  {
+    int[] exons = new int[] { 11, 15, 21, 25, 31, 38 }; // 18 bp
+
+    // exact length match:
+    assertSame(exons, EmblXmlSource.adjustForProteinLength(6, exons));
+
+    // match if we assume exons include stop codon not in protein:
+    assertSame(exons, EmblXmlSource.adjustForProteinLength(5, exons));
+
+    // truncate last exon by 6bp
+    int[] truncated = EmblXmlSource.adjustForProteinLength(4, exons);
+    assertEquals("[11, 15, 21, 25, 31, 32]", Arrays.toString(truncated));
+
+    // remove last exon and truncate preceding by 1bp
+    truncated = EmblXmlSource.adjustForProteinLength(3, exons);
+    assertEquals("[11, 15, 21, 24]", Arrays.toString(truncated));
+
+    // exact removal of exon case:
+    exons = new int[] { 11, 15, 21, 27, 33, 38 }; // 18 bp
+    truncated = EmblXmlSource.adjustForProteinLength(4, exons);
+    assertEquals("[11, 15, 21, 27]", Arrays.toString(truncated));
+
+    // what if exons are too short for protein?
+    truncated = EmblXmlSource.adjustForProteinLength(7, exons);
+    assertSame(exons, truncated);
+  }
+
+  @Test(groups = { "Functional" })
+  public void testGetEmblEntries()
+  {
+    List<EntryType> entries = EmblSourceTest.getEmblEntries();
+    assertEquals(1, entries.size());
+    EntryType entry = entries.get(0);
+  
+    assertEquals("X07547", entry.getAccession());
+    assertEquals("C. trachomatis plasmid", entry.getDescription());
+    assertEquals("STD", entry.getDataClass());
+    assertEquals("PRO", entry.getTaxonomicDivision());
+    assertEquals("1999-02-10", entry.getLastUpdated().toString());
+    assertEquals(58, entry.getLastUpdatedRelease().intValue());
+    assertEquals("1988-11-10", entry.getFirstPublic().toString());
+    assertEquals(18, entry.getFirstPublicRelease().intValue());
+    assertEquals("genomic DNA", entry.getMoleculeType());
+    assertEquals(1, entry.getVersion().intValue());
+    assertEquals(8, entry.getEntryVersion().intValue());
+    assertEquals("linear", entry.getTopology());
+    assertEquals(7499, entry.getSequenceLength().intValue());
+    assertEquals(2, entry.getKeyword().size());
+    assertEquals("plasmid", entry.getKeyword().get(0));
+    assertEquals("unidentified reading frame", entry.getKeyword().get(1));
+  
+    /*
+     * dbrefs
+     */
+    assertEquals(2, entry.getXref().size());
+    XrefType dbref = entry.getXref().get(0);
+    assertEquals("EuropePMC", dbref.getDb());
+    assertEquals("PMC107176", dbref.getId());
+    assertEquals("9573186", dbref.getSecondaryId());
+    dbref = entry.getXref().get(1);
+    assertEquals("MD5", dbref.getDb());
+    assertEquals("ac73317", dbref.getId());
+    assertNull(dbref.getSecondaryId());
+  
+    /*
+     * three sequence features for CDS
+     */
+    assertEquals(3, entry.getFeature().size());
+    /*
+     * first CDS
+     */
+    Feature ef = entry.getFeature().get(0);
+    assertEquals("CDS", ef.getName());
+    assertEquals("complement(46..57)", ef.getLocation());
+    assertEquals(2, ef.getXref().size());
+    dbref = ef.getXref().get(0);
+    assertEquals("UniProtKB/Swiss-Prot", dbref.getDb());
+    assertEquals("B0BCM4", dbref.getId());
+    assertEquals("2.1", dbref.getSecondaryId());
+    dbref = ef.getXref().get(1);
+    assertEquals("UniProtKB/Swiss-Prot", dbref.getDb());
+    assertEquals("P0CE20", dbref.getId());
+    assertNull(dbref.getSecondaryId());
+    // CDS feature qualifiers
+    assertEquals(3, ef.getQualifier().size());
+    Qualifier q = ef.getQualifier().get(0);
+    assertEquals("note", q.getName());
+    assertEquals("ORF 8 (AA 1-330)", q.getValue());
+    q = ef.getQualifier().get(1);
+    assertEquals("protein_id", q.getName());
+    assertEquals("CAA30420.1", q.getValue());
+    q = ef.getQualifier().get(2);
+    assertEquals("translation", q.getName());
+    assertEquals("MLCF", q.getValue());
+  
+    /*
+     * second CDS
+     */
+    ef = entry.getFeature().get(1);
+    assertEquals("CDS", ef.getName());
+    assertEquals("4..15", ef.getLocation());
+    assertEquals(1, ef.getXref().size());
+    dbref = ef.getXref().get(0);
+    assertEquals("UniProtKB/Swiss-Prot", dbref.getDb());
+    assertEquals("B0BCM3", dbref.getId());
+    assertNull(dbref.getSecondaryId());
+    assertEquals(2, ef.getQualifier().size());
+    q = ef.getQualifier().get(0);
+    assertEquals("protein_id", q.getName());
+    assertEquals("CAA30421.1", q.getValue());
+    q = ef.getQualifier().get(1);
+    assertEquals("translation", q.getName());
+    assertEquals("MSSS", q.getValue());
+  
+    /*
+     * third CDS
+     */
+    ef = entry.getFeature().get(2);
+    assertEquals("CDS", ef.getName());
+    assertEquals("join(4..6,10..15)", ef.getLocation());
+    assertNotNull(ef.getXref());
+    assertTrue(ef.getXref().isEmpty());
+    assertEquals(2, ef.getQualifier().size());
+    q = ef.getQualifier().get(0);
+    assertEquals("protein_id", q.getName());
+    assertEquals("CAA12345.6", q.getValue());
+    q = ef.getQualifier().get(1);
+    assertEquals("translation", q.getName());
+    assertEquals("MSS", q.getValue());
+  
+    /*
+     * Sequence - raw data before removal of newlines
+     */
+    String seq = entry.getSequence();
+    assertEquals(
+            "GGTATGTCCTCTAGTACAAAC\n"
+                    + "ACCCCCAATATTGTGATATAATTAAAAACATAGCAT",
+            seq);
+  
+    /*
+     * getSequence() converts empty DBRefEntry.version to "0"
+     */
+    assertNull(entry.getXref().get(1).getSecondaryId());
+    assertNull(entry.getFeature().get(0).getXref().get(1).getSecondaryId());
+  }
+
+  static List<EntryType> getEmblEntries()
+  {
+    return new EmblSource()
+            .getEmblEntries(new ByteArrayInputStream(TESTDATA.getBytes()));
+  }
+}
index 060c303..86f5602 100644 (file)
 package jalview.ws.dbsources;
 
 import static org.testng.AssertJUnit.assertEquals;
-import static org.testng.AssertJUnit.assertFalse;
 import static org.testng.AssertJUnit.assertNotNull;
 import static org.testng.AssertJUnit.assertNull;
+import static org.testng.AssertJUnit.assertTrue;
 
-import jalview.datamodel.PDBEntry;
 import jalview.datamodel.SequenceI;
-import jalview.datamodel.xdb.uniprot.UniprotEntry;
-import jalview.datamodel.xdb.uniprot.UniprotFeature;
 import jalview.gui.JvOptionPane;
-
-import java.io.Reader;
-import java.io.StringReader;
-import java.util.Vector;
+import jalview.xml.binding.uniprot.DbReferenceType;
+import jalview.xml.binding.uniprot.Entry;
+import jalview.xml.binding.uniprot.FeatureType;
+import jalview.xml.binding.uniprot.LocationType;
+import jalview.xml.binding.uniprot.PositionType;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+import java.math.BigInteger;
+import java.util.List;
 
 import org.testng.Assert;
 import org.testng.annotations.BeforeClass;
@@ -51,13 +55,13 @@ public class UniprotTest
 
   // adapted from http://www.uniprot.org/uniprot/A9CKP4.xml
   private static final String UNIPROT_XML = "<?xml version='1.0' encoding='UTF-8'?>"
-          + "<uniprot>"
+          + "<uniprot xmlns=\"http://uniprot.org/uniprot\">"
           + "<entry dataset=\"TrEMBL\" created=\"2008-01-15\" modified=\"2015-03-04\" version=\"38\">"
           + "<accession>A9CKP4</accession>"
           + "<accession>A9CKP5</accession>"
           + "<name>A9CKP4_AGRT5</name>"
           + "<name>A9CKP4_AGRT6</name>"
-          + "<protein><recommendedName><fullName>Mitogen-activated protein kinase 13</fullName><fullName>Henry</fullName></recommendedName></protein>"
+          + "<protein><recommendedName><fullName>Mitogen-activated protein kinase 13</fullName></recommendedName></protein>"
           + "<dbReference type=\"PDB\" id=\"2FSQ\"><property type=\"method\" value=\"X-ray\"/><property type=\"resolution\" value=\"1.40\"/></dbReference>"
           + "<dbReference type=\"PDBsum\" id=\"2FSR\"/>"
           + "<dbReference type=\"EMBL\" id=\"AE007869\"><property type=\"protein sequence ID\" value=\"AAK85932.1\"/><property type=\"molecule type\" value=\"Genomic_DNA\"/></dbReference>"
@@ -75,15 +79,17 @@ public class UniprotTest
 
   /**
    * Test the method that unmarshals XML to a Uniprot model
+   * 
+   * @throws UnsupportedEncodingException
    */
   @Test(groups = { "Functional" })
-  public void testGetUniprotEntries()
+  public void testGetUniprotEntries() throws UnsupportedEncodingException
   {
     Uniprot u = new Uniprot();
-    Reader reader = new StringReader(UNIPROT_XML);
-    Vector<UniprotEntry> entries = u.getUniprotEntries(reader);
+    InputStream is = new ByteArrayInputStream(UNIPROT_XML.getBytes());
+    List<Entry> entries = u.getUniprotEntries(is);
     assertEquals(1, entries.size());
-    UniprotEntry entry = entries.get(0);
+    Entry entry = entries.get(0);
     assertEquals(2, entry.getName().size());
     assertEquals("A9CKP4_AGRT5", entry.getName().get(0));
     assertEquals("A9CKP4_AGRT6", entry.getName().get(1));
@@ -91,82 +97,84 @@ public class UniprotTest
     assertEquals("A9CKP4", entry.getAccession().get(0));
     assertEquals("A9CKP5", entry.getAccession().get(1));
 
-    /*
-     * UniprotSequence drops any space characters
-     */
-    assertEquals("MHAPLVSKDL", entry.getUniprotSequence().getContent());
+    assertEquals("MHAPL VSKDL", entry.getSequence().getValue());
 
-    assertEquals(2, entry.getProtein().getName().size());
     assertEquals("Mitogen-activated protein kinase 13", entry.getProtein()
-            .getName().get(0));
-    assertEquals("Henry", entry.getProtein().getName().get(1));
+            .getRecommendedName().getFullName().getValue());
 
     /*
      * Check sequence features
      */
-    Vector<UniprotFeature> features = entry.getFeature();
+    List<FeatureType> features = entry.getFeature();
     assertEquals(9, features.size());
-    UniprotFeature sf = features.get(0);
+    FeatureType sf = features.get(0);
     assertEquals("signal peptide", sf.getType());
     assertNull(sf.getDescription());
     assertNull(sf.getStatus());
-    assertEquals(1, sf.getBegin());
-    assertEquals(18, sf.getEnd());
+    assertNull(sf.getLocation().getPosition());
+    assertEquals(1, sf.getLocation().getBegin().getPosition().intValue());
+    assertEquals(18, sf.getLocation().getEnd().getPosition().intValue());
     sf = features.get(1);
     assertEquals("propeptide", sf.getType());
     assertEquals("Activation peptide", sf.getDescription());
-    assertEquals(19, sf.getPosition());
-    assertEquals(19, sf.getBegin());
-    assertEquals(20, sf.getEnd());
+    assertNull(sf.getLocation().getPosition());
+    assertEquals(19, sf.getLocation().getBegin().getPosition().intValue());
+    assertEquals(20, sf.getLocation().getEnd().getPosition().intValue());
     sf = features.get(2);
     assertEquals("chain", sf.getType());
     assertEquals("Granzyme B", sf.getDescription());
-    assertEquals(21, sf.getPosition());
-    assertEquals(21, sf.getBegin());
-    assertEquals(247, sf.getEnd());
+    assertNull(sf.getLocation().getPosition());
+    assertEquals(21, sf.getLocation().getBegin().getPosition().intValue());
+    assertEquals(247, sf.getLocation().getEnd().getPosition().intValue());
 
     sf = features.get(3);
     assertEquals("sequence variant", sf.getType());
     assertNull(sf.getDescription());
-    assertEquals(41, sf.getPosition());
-    assertEquals(41, sf.getBegin());
-    assertEquals(41, sf.getEnd());
+    assertEquals(41,
+            sf.getLocation().getPosition().getPosition().intValue());
+    assertNull(sf.getLocation().getBegin());
+    assertNull(sf.getLocation().getEnd());
 
     sf = features.get(4);
     assertEquals("sequence variant", sf.getType());
     assertEquals("Pathogenic", sf.getDescription());
-    assertEquals(41, sf.getPosition());
-    assertEquals(41, sf.getBegin());
-    assertEquals(41, sf.getEnd());
+    assertEquals(41,
+            sf.getLocation().getPosition().getPosition().intValue());
+    assertNull(sf.getLocation().getBegin());
+    assertNull(sf.getLocation().getEnd());
 
     sf = features.get(5);
     assertEquals("sequence variant", sf.getType());
     assertEquals("Pathogenic", sf.getDescription());
-    assertEquals(41, sf.getPosition());
-    assertEquals(41, sf.getBegin());
-    assertEquals(41, sf.getEnd());
+    assertEquals(41,
+            sf.getLocation().getPosition().getPosition().intValue());
+    assertNull(sf.getLocation().getBegin());
+    assertNull(sf.getLocation().getEnd());
 
     sf = features.get(6);
     assertEquals("sequence variant", sf.getType());
     assertEquals("Foo",
             sf.getDescription());
-    assertEquals(42, sf.getPosition());
-    assertEquals(42, sf.getBegin());
-    assertEquals(42, sf.getEnd());
+    assertEquals(42,
+            sf.getLocation().getPosition().getPosition().intValue());
+    assertNull(sf.getLocation().getBegin());
+    assertNull(sf.getLocation().getEnd());
     Assert.assertEquals(Uniprot.getDescription(sf),
             "<html>p.Met42Leu" + "<br/>&nbsp;&nbsp;"
                     + "p.Met42LeuMetVal Foo</html>");
 
     sf = features.get(7);
-    assertEquals(42, sf.getBegin());
-    assertEquals(43, sf.getEnd());
+    assertNull(sf.getLocation().getPosition());
+    assertEquals(42, sf.getLocation().getBegin().getPosition().intValue());
+    assertEquals(43, sf.getLocation().getEnd().getPosition().intValue());
     Assert.assertEquals(Uniprot.getDescription(sf),
             "<html>p.MetLeu42LeuLeu" + "<br/>&nbsp;&nbsp;"
                     + "p.MetLeu42LeuMetVal Foo</html>");
 
     sf = features.get(8);
-    assertEquals(42, sf.getBegin());
-    assertEquals(45, sf.getEnd());
+    assertNull(sf.getLocation().getPosition());
+    assertEquals(42, sf.getLocation().getBegin().getPosition().intValue());
+    assertEquals(45, sf.getLocation().getEnd().getPosition().intValue());
     Assert.assertEquals(Uniprot.getDescription(sf),
             "<html>p.MLML42LeuLeu" + "<br/>&nbsp;&nbsp;"
                     + "p.MLML42LMVK Foo Too</html>");
@@ -174,46 +182,55 @@ public class UniprotTest
     /*
      * Check cross-references
      */
-    Vector<PDBEntry> xrefs = entry.getDbReference();
+    List<DbReferenceType> xrefs = entry.getDbReference();
     assertEquals(3, xrefs.size());
 
-    PDBEntry xref = xrefs.get(0);
+    DbReferenceType xref = xrefs.get(0);
     assertEquals("2FSQ", xref.getId());
     assertEquals("PDB", xref.getType());
-    assertEquals("X-ray", xref.getProperty("method"));
-    assertEquals("1.40", xref.getProperty("resolution"));
+    assertEquals("X-ray",
+            Uniprot.getProperty(xref.getProperty(), "method"));
+    assertEquals("1.40",
+            Uniprot.getProperty(xref.getProperty(), "resolution"));
 
     xref = xrefs.get(1);
     assertEquals("2FSR", xref.getId());
     assertEquals("PDBsum", xref.getType());
-    assertFalse(xref.getProperties().hasMoreElements());
+    assertTrue(xref.getProperty().isEmpty());
 
     xref = xrefs.get(2);
     assertEquals("AE007869", xref.getId());
     assertEquals("EMBL", xref.getType());
-    assertEquals("AAK85932.1", xref.getProperty("protein sequence ID"));
-    assertEquals("Genomic_DNA", xref.getProperty("molecule type"));
+    assertEquals("AAK85932.1",
+            Uniprot.getProperty(xref.getProperty(), "protein sequence ID"));
+    assertEquals("Genomic_DNA",
+            Uniprot.getProperty(xref.getProperty(), "molecule type"));
   }
 
   @Test(groups = { "Functional" })
-  public void testGetUniprotSequence()
+  public void testGetUniprotSequence() throws UnsupportedEncodingException
   {
-    UniprotEntry entry = new Uniprot().getUniprotEntries(
-            new StringReader(UNIPROT_XML)).get(0);
-    SequenceI seq = new Uniprot().uniprotEntryToSequenceI(entry);
+    InputStream is = new ByteArrayInputStream(UNIPROT_XML.getBytes());
+    Entry entry = new Uniprot().getUniprotEntries(
+            is).get(0);
+    SequenceI seq = new Uniprot().uniprotEntryToSequence(entry);
     assertNotNull(seq);
     assertEquals(6, seq.getDBRefs().length); // 2*Uniprot, PDB, PDBsum, 2*EMBL
+    assertEquals(seq.getSequenceAsString(),
+            seq.createDatasetSequence().getSequenceAsString());
 
   }
 
   /**
    * Test the method that formats the sequence id
+   * 
+   * @throws UnsupportedEncodingException
    */
   @Test(groups = { "Functional" })
-  public void testGetUniprotEntryId()
+  public void testGetUniprotEntryId() throws UnsupportedEncodingException
   {
-    UniprotEntry entry = new Uniprot().getUniprotEntries(
-            new StringReader(UNIPROT_XML)).get(0);
+    InputStream is = new ByteArrayInputStream(UNIPROT_XML.getBytes());
+    Entry entry = new Uniprot().getUniprotEntries(is).get(0);
 
     /*
      * name formatted with Uniprot Entry name
@@ -225,67 +242,66 @@ public class UniprotTest
 
   /**
    * Test the method that formats the sequence description
+   * 
+   * @throws UnsupportedEncodingException
    */
   @Test(groups = { "Functional" })
   public void testGetUniprotEntryDescription()
+          throws UnsupportedEncodingException
   {
-    UniprotEntry entry = new Uniprot().getUniprotEntries(
-            new StringReader(UNIPROT_XML)).get(0);
+    InputStream is = new ByteArrayInputStream(UNIPROT_XML.getBytes());
+    Entry entry = new Uniprot().getUniprotEntries(is).get(0);
 
-    /*
-     * recommended names concatenated with space separator
-     */
-    String expectedDescription = "Mitogen-activated protein kinase 13 Henry";
-    assertEquals(expectedDescription,
+    assertEquals("Mitogen-activated protein kinase 13",
             Uniprot.getUniprotEntryDescription(entry));
   }
 
   @Test(groups = { "Functional" })
   public void testGetDescription()
   {
-    UniprotFeature uf = new UniprotFeature();
-    assertEquals("", Uniprot.getDescription(uf));
+    FeatureType ft = new FeatureType();
+    assertEquals("", Uniprot.getDescription(ft));
 
-    uf.setDescription("Hello");
-    assertEquals("Hello", Uniprot.getDescription(uf));
+    ft.setDescription("Hello");
+    assertEquals("Hello", Uniprot.getDescription(ft));
 
-    uf.setPosition(23);
-    uf.setOriginal("K");
-    Vector<String> vars = new Vector<>();
-    vars.add("y");
-    uf.setVariation(vars);
-    assertEquals("p.Lys23Tyr Hello", Uniprot.getDescription(uf));
+    ft.setLocation(new LocationType());
+    ft.getLocation().setPosition(new PositionType());
+    ft.getLocation().getPosition().setPosition(BigInteger.valueOf(23));
+    ft.setOriginal("K");
+    ft.getVariation().add("y");
+    assertEquals("p.Lys23Tyr Hello", Uniprot.getDescription(ft));
 
     // multiple variants generate an html description over more than one line
-    vars.add("W");
+    ft.getVariation().add("W");
     assertEquals("<html>p.Lys23Tyr<br/>&nbsp;&nbsp;p.Lys23Trp Hello</html>",
-            Uniprot.getDescription(uf));
+            Uniprot.getDescription(ft));
 
     /*
      * indel cases
      * up to 3 bases (original or variant) are shown using 3 letter code
      */
-    vars.clear();
-    vars.add("KWE");
-    uf.setOriginal("KLS");
+    ft.getVariation().clear();
+    ft.getVariation().add("KWE");
+    ft.setOriginal("KLS");
     assertEquals("p.LysLeuSer23LysTrpGlu Hello",
-            Uniprot.getDescription(uf));
+            Uniprot.getDescription(ft));
 
     // adding a fourth original base switches to single letter code
-    uf.setOriginal("KLST");
-    assertEquals("p.KLST23LysTrpGlu Hello", Uniprot.getDescription(uf));
+    ft.setOriginal("KLST");
+    assertEquals("p.KLST23LysTrpGlu Hello", Uniprot.getDescription(ft));
 
     // adding a fourth variant switches to single letter code
-    vars.clear();
-    vars.add("KWES");
-    assertEquals("p.KLST23KWES Hello", Uniprot.getDescription(uf));
+    ft.getVariation().clear();
+    ft.getVariation().add("KWES");
+    assertEquals("p.KLST23KWES Hello", Uniprot.getDescription(ft));
 
-    vars.clear();
-    vars.add("z"); // unknown variant - fails gracefully
-    uf.setOriginal("K");
-    assertEquals("p.Lys23z Hello", Uniprot.getDescription(uf));
+    ft.getVariation().clear();
+    ft.getVariation().add("z"); // unknown variant - fails gracefully
+    ft.setOriginal("K");
+    assertEquals("p.Lys23z Hello", Uniprot.getDescription(ft));
 
-    uf.setVariation(null); // variant missing - is ignored
-    assertEquals("Hello", Uniprot.getDescription(uf));
+    ft.getVariation().clear(); // variant missing - is ignored
+    assertEquals("Hello", Uniprot.getDescription(ft));
   }
 }
index 089c29f..889c003 100644 (file)
@@ -26,13 +26,13 @@ import static org.testng.AssertJUnit.assertTrue;
 import jalview.bin.Cache;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
-import jalview.gui.Jalview2XML;
 import jalview.gui.JvOptionPane;
 import jalview.io.AnnotationFile;
 import jalview.io.DataSourceType;
 import jalview.io.FileFormat;
 import jalview.io.FormatAdapter;
 import jalview.io.StockholmFileTest;
+import jalview.project.Jalview2XML;
 import jalview.ws.jws2.Jws2Discoverer;
 import jalview.ws.jws2.RNAalifoldClient;
 import jalview.ws.jws2.SequenceAnnotationWSClient;
@@ -118,7 +118,7 @@ public class RNAStructExportImport
     assertNotNull("Couldn't load test data ('" + testseqs + "')", af);
 
     // remove any existing annotation
-    List<AlignmentAnnotation> aal = new ArrayList<AlignmentAnnotation>();
+    List<AlignmentAnnotation> aal = new ArrayList<>();
     for (AlignmentAnnotation rna : af.getViewport().getAlignment()
             .getAlignmentAnnotation())
     {
@@ -259,7 +259,7 @@ public class RNAStructExportImport
   @Test(groups = { "Network" })
   public void testRnaalifoldSettingsRecovery()
   {
-    List<Argument> opts = new ArrayList<Argument>();
+    List<Argument> opts = new ArrayList<>();
     for (Argument rg : (List<Argument>) rnaalifoldws.getRunnerConfig()
             .getArguments())
     {
diff --git a/utils/castor-1.1-cycle-codegen-anttask.jar b/utils/castor-1.1-cycle-codegen-anttask.jar
deleted file mode 100644 (file)
index 5c59416..0000000
Binary files a/utils/castor-1.1-cycle-codegen-anttask.jar and /dev/null differ
diff --git a/utils/castor-1.1-cycle-codegen.jar b/utils/castor-1.1-cycle-codegen.jar
deleted file mode 100644 (file)
index 74ad927..0000000
Binary files a/utils/castor-1.1-cycle-codegen.jar and /dev/null differ
index 01973d2..360a700 100755 (executable)
@@ -7,10 +7,14 @@
 
 <taskdef resource="net/sf/antcontrib/antcontrib.properties">
   <classpath>
-    <pathelement location="${basedir}/utils/ant-contrib-0.3.jar"/>
+    <pathelement location="${basedir}/utils/ant-contrib-1.0b3.jar"/>
+  </classpath>
+</taskdef>
+<taskdef resource="net/sf/antcontrib/antlib.xml">
+  <classpath>
+    <pathelement location="${basedir}/utils/ant-contrib-1.0b3.jar"/>
   </classpath>
 </taskdef>
-<taskdef resource="net/sf/antcontrib/antlib.xml"/>
  
 <target name="checkLang" description="Reports missing entries in language bundles compared to Message.properties">
        <!-- adapted from http://stackoverflow.com/questions/14381660/ant-task-to-compare-two-properties-files -->