From d423f22792e47dbc800ae220a58677f988971d06 Mon Sep 17 00:00:00 2001 From: jprocter Date: Fri, 30 Apr 2010 09:30:38 +0000 Subject: [PATCH] jalview 2.5 release banner --- LICENSE | 961 ++-- build.xml | 25 +- doc/AddingGroovySupport.html | 17 + doc/building.html | 17 + doc/developing.html | 65 +- doc/index.html | 19 +- doc/newdmobj.html | 19 +- help/helpTOC.xml | 31 +- help/html/calculations/consensus.html | 17 + help/html/calculations/conservation.html | 71 +- help/html/calculations/pairwise.html | 57 +- help/html/calculations/pca.html | 26 +- help/html/calculations/quality.html | 81 +- help/html/calculations/recoverInputdata.html | 43 +- help/html/calculations/redundancy.html | 17 + help/html/calculations/sorting.html | 17 + help/html/calculations/tree.html | 17 + help/html/calculations/treeviewer.html | 17 + help/html/colourSchemes/abovePID.html | 57 +- help/html/colourSchemes/annotationColouring.html | 76 +- help/html/colourSchemes/blosum.html | 57 +- help/html/colourSchemes/buried.html | 121 +- help/html/colourSchemes/clustal.html | 61 +- help/html/colourSchemes/conservation.html | 71 +- help/html/colourSchemes/helix.html | 121 +- help/html/colourSchemes/hydrophobic.html | 127 +- help/html/colourSchemes/index.html | 17 + help/html/colourSchemes/nucleotide.html | 67 +- help/html/colourSchemes/pid.html | 83 +- help/html/colourSchemes/strand.html | 121 +- help/html/colourSchemes/taylor.html | 119 +- help/html/colourSchemes/textcolour.html | 17 + help/html/colourSchemes/turn.html | 121 +- help/html/colourSchemes/user.html | 61 +- help/html/colourSchemes/zappo.html | 117 +- help/html/editing/index.html | 17 + help/html/features/annotation.html | 17 + help/html/features/annotationsFormat.html | 18 +- help/html/features/clarguments.html | 17 + help/html/features/codingfeatures.html | 33 +- help/html/features/commandline.html | 87 +- help/html/features/creatinFeatures.html | 19 +- help/html/features/cursorMode.html | 17 + help/html/features/dasfeatures.html | 18 +- help/html/features/dassettings.html | 22 +- help/html/features/editingFeatures.html | 17 + help/html/features/featuresFormat.html | 18 +- help/html/features/featureschemes.html | 18 +- help/html/features/featuresettings.html | 17 + help/html/features/groovy.html | 17 + help/html/features/hiddenRegions.html | 17 + help/html/features/jalarchive.html | 59 +- help/html/features/jmol.html | 17 + help/html/features/multipleViews.html | 17 + help/html/features/newkeystrokes.html | 17 + help/html/features/overview.html | 41 +- help/html/features/pdbviewer.html | 17 + help/html/features/preferences.html | 18 +- help/html/features/search.html | 17 + help/html/features/seqfeatures.html | 17 + help/html/features/seqfetch.html | 17 + help/html/features/seqmappings.html | 19 +- help/html/features/viewingpdbs.html | 17 + help/html/features/wrap.html | 654 +-- help/html/index.html | 17 + help/html/io/export.html | 97 +- help/html/io/fileformats.html | 17 + help/html/io/index.html | 17 + help/html/io/modellerpir.html | 17 + help/html/jalviewjnlp.html | 17 + help/html/keys.html | 17 + help/html/memory.html | 17 + help/html/menus/alignmentMenu.html | 17 + help/html/menus/alwannotations.html | 17 + help/html/menus/alwcalculate.html | 17 + help/html/menus/alwcolour.html | 17 + help/html/menus/alwedit.html | 17 + help/html/menus/alwfile.html | 17 + help/html/menus/alwformat.html | 17 + help/html/menus/alwselect.html | 17 + help/html/menus/alwview.html | 17 + help/html/menus/desktopMenu.html | 17 + help/html/menus/index.html | 17 + help/html/menus/popupMenu.html | 17 + help/html/menus/wsmenu.html | 17 + help/html/misc/aaproperties.html | 79 +- help/html/misc/aminoAcids.html | 599 +-- help/html/misc/geneticCode.html | 167 +- help/html/privacy.html | 19 +- help/html/releases.html | 17 + help/html/vamsas/index.html | 255 +- help/html/webServices/clustalw.html | 73 +- help/html/webServices/dbreffetcher.html | 19 +- help/html/webServices/index.html | 17 + help/html/webServices/jnet.html | 17 + help/html/webServices/mafft.html | 53 +- help/html/webServices/msaclient.html | 93 +- help/html/webServices/muscle.html | 45 +- help/html/webServices/urllinks.html | 19 +- help/html/whatsNew.html | 17 + jalview-jalopy.xml | 787 ++-- resources/embl_mapping.xml | 25 +- resources/uniprot_mapping.xml | 25 +- src/MCview/AppletPDBCanvas.java | 25 +- src/MCview/AppletPDBViewer.java | 25 +- src/MCview/Atom.java | 25 +- src/MCview/Bond.java | 29 +- src/MCview/MCMatrix.java | 25 +- src/MCview/PDBCanvas.java | 25 +- src/MCview/PDBChain.java | 61 +- src/MCview/PDBViewer.java | 29 +- src/MCview/PDBfile.java | 74 +- src/MCview/Residue.java | 25 +- src/MCview/Zsort.java | 25 +- src/ext/vamsas/IRegistry.java | 25 +- src/ext/vamsas/IRegistryService.java | 25 +- src/ext/vamsas/IRegistryServiceLocator.java | 25 +- src/ext/vamsas/Jpred.java | 25 +- src/ext/vamsas/JpredService.java | 25 +- src/ext/vamsas/JpredServiceLocator.java | 25 +- src/ext/vamsas/JpredSoapBindingStub.java | 25 +- src/ext/vamsas/MuscleWS.java | 25 +- src/ext/vamsas/MuscleWSService.java | 25 +- src/ext/vamsas/MuscleWSServiceLocator.java | 25 +- src/ext/vamsas/MuscleWSSoapBindingStub.java | 25 +- src/ext/vamsas/RegistryServiceSoapBindingStub.java | 25 +- src/ext/vamsas/SeqSearchI.java | 25 +- src/ext/vamsas/SeqSearchServiceLocator.java | 25 +- src/ext/vamsas/SeqSearchServiceService.java | 25 +- .../vamsas/SeqSearchServiceSoapBindingStub.java | 25 +- src/ext/vamsas/ServiceHandle.java | 25 +- src/ext/vamsas/ServiceHandles.java | 25 +- src/jalview/analysis/AAFrequency.java | 33 +- src/jalview/analysis/AlignSeq.java | 94 +- src/jalview/analysis/AlignmentSorter.java | 363 +- src/jalview/analysis/Conservation.java | 88 +- src/jalview/analysis/CrossRef.java | 60 +- src/jalview/analysis/Dna.java | 95 +- src/jalview/analysis/Finder.java | 66 +- src/jalview/analysis/Grouping.java | 348 +- src/jalview/analysis/NJTree.java | 155 +- src/jalview/analysis/PCA.java | 46 +- src/jalview/analysis/ParseProperties.java | 39 +- src/jalview/analysis/SeqsetUtils.java | 53 +- src/jalview/analysis/SequenceIdMatcher.java | 43 +- src/jalview/appletgui/APopupMenu.java | 42 +- src/jalview/appletgui/AlignFrame.java | 154 +- src/jalview/appletgui/AlignViewport.java | 185 +- src/jalview/appletgui/AlignmentPanel.java | 43 +- src/jalview/appletgui/AnnotationColourChooser.java | 25 +- src/jalview/appletgui/AnnotationLabels.java | 27 +- src/jalview/appletgui/AnnotationPanel.java | 207 +- src/jalview/appletgui/AppletJmol.java | 44 +- src/jalview/appletgui/CutAndPasteTransfer.java | 25 +- src/jalview/appletgui/EditNameDialog.java | 25 +- src/jalview/appletgui/EmbmenuFrame.java | 51 +- src/jalview/appletgui/FeatureColourChooser.java | 186 +- src/jalview/appletgui/FeatureRenderer.java | 158 +- src/jalview/appletgui/FeatureSettings.java | 25 +- src/jalview/appletgui/Finder.java | 53 +- src/jalview/appletgui/FontChooser.java | 25 +- src/jalview/appletgui/IdCanvas.java | 25 +- src/jalview/appletgui/IdPanel.java | 107 +- src/jalview/appletgui/IdwidthAdjuster.java | 25 +- src/jalview/appletgui/JVDialog.java | 25 +- src/jalview/appletgui/OverviewPanel.java | 25 +- src/jalview/appletgui/PCAPanel.java | 25 +- src/jalview/appletgui/PaintRefresher.java | 29 +- src/jalview/appletgui/PairwiseAlignPanel.java | 25 +- src/jalview/appletgui/RedundancyPanel.java | 29 +- src/jalview/appletgui/RotatableCanvas.java | 25 +- src/jalview/appletgui/ScalePanel.java | 25 +- src/jalview/appletgui/SeqCanvas.java | 25 +- src/jalview/appletgui/SeqPanel.java | 33 +- src/jalview/appletgui/SequenceRenderer.java | 49 +- src/jalview/appletgui/SliderPanel.java | 25 +- src/jalview/appletgui/Tooltip.java | 25 +- src/jalview/appletgui/TreeCanvas.java | 33 +- src/jalview/appletgui/TreePanel.java | 61 +- src/jalview/appletgui/UserDefinedColours.java | 25 +- src/jalview/bin/Cache.java | 117 +- src/jalview/bin/Jalview.java | 137 +- src/jalview/bin/JalviewLite.java | 36 +- src/jalview/bin/JalviewLiteURLRetrieve.java | 144 + src/jalview/binding/Alignment.java | 330 +- src/jalview/binding/Annotation.java | 862 ++-- src/jalview/binding/AnnotationElement.java | 571 +-- src/jalview/binding/Colour.java | 964 ++-- src/jalview/binding/Feature.java | 569 +-- src/jalview/binding/FeatureSettings.java | 489 +- src/jalview/binding/Features.java | 203 +- src/jalview/binding/JGroup.java | 1482 +++--- src/jalview/binding/JSeq.java | 1251 ++--- src/jalview/binding/JalviewModel.java | 434 +- src/jalview/binding/JalviewModelSequence.java | 1860 ++++---- src/jalview/binding/JalviewUserColours.java | 643 +-- src/jalview/binding/Pdbentry.java | 639 +-- src/jalview/binding/PdbentryItem.java | 369 +- src/jalview/binding/Pdbids.java | 203 +- src/jalview/binding/Property.java | 330 +- src/jalview/binding/Sequence.java | 203 +- src/jalview/binding/SequenceSet.java | 1035 +++-- src/jalview/binding/SequenceType.java | 381 +- src/jalview/binding/Setting.java | 487 +- src/jalview/binding/Tree.java | 1646 +++---- src/jalview/binding/UserColourScheme.java | 204 +- src/jalview/binding/UserColours.java | 331 +- src/jalview/binding/VAMSAS.java | 1166 ++--- src/jalview/binding/VamsasModel.java | 202 +- src/jalview/binding/Viewport.java | 2818 ++++++------ src/jalview/commands/ChangeCaseCommand.java | 25 +- src/jalview/commands/CommandI.java | 25 +- src/jalview/commands/EditCommand.java | 25 +- src/jalview/commands/OrderCommand.java | 25 +- src/jalview/commands/RemoveGapColCommand.java | 25 +- src/jalview/commands/RemoveGapsCommand.java | 25 +- src/jalview/commands/SlideSequencesCommand.java | 25 +- src/jalview/commands/TrimRegionCommand.java | 25 +- src/jalview/datamodel/AlignedCodonFrame.java | 35 +- src/jalview/datamodel/Alignment.java | 46 +- src/jalview/datamodel/AlignmentAnnotation.java | 101 +- src/jalview/datamodel/AlignmentI.java | 115 +- src/jalview/datamodel/AlignmentOrder.java | 63 +- src/jalview/datamodel/AlignmentView.java | 41 +- src/jalview/datamodel/Annotation.java | 47 +- src/jalview/datamodel/BinaryNode.java | 43 +- src/jalview/datamodel/BinarySequence.java | 27 +- src/jalview/datamodel/CigarArray.java | 39 +- src/jalview/datamodel/CigarBase.java | 139 +- src/jalview/datamodel/CigarCigar.java | 29 +- src/jalview/datamodel/CigarSimple.java | 33 +- src/jalview/datamodel/ColumnSelection.java | 49 +- src/jalview/datamodel/DBRefEntry.java | 43 +- src/jalview/datamodel/DBRefSource.java | 25 +- src/jalview/datamodel/FeatureProperties.java | 25 +- src/jalview/datamodel/GraphLine.java | 25 +- src/jalview/datamodel/HiddenSequences.java | 25 +- src/jalview/datamodel/Mapping.java | 41 +- src/jalview/datamodel/NodeTransformI.java | 27 +- src/jalview/datamodel/PDBEntry.java | 25 +- src/jalview/datamodel/Provenance.java | 25 +- src/jalview/datamodel/ProvenanceEntry.java | 25 +- src/jalview/datamodel/SearchResults.java | 46 +- src/jalview/datamodel/SeqCigar.java | 93 +- src/jalview/datamodel/Sequence.java | 85 +- src/jalview/datamodel/SequenceFeature.java | 31 +- src/jalview/datamodel/SequenceGroup.java | 340 +- src/jalview/datamodel/SequenceI.java | 69 +- src/jalview/datamodel/SequenceNode.java | 52 +- src/jalview/datamodel/SequencePoint.java | 25 +- src/jalview/datamodel/UniprotEntry.java | 25 +- src/jalview/datamodel/UniprotFile.java | 25 +- src/jalview/datamodel/UniprotProteinName.java | 25 +- src/jalview/datamodel/UniprotSequence.java | 25 +- src/jalview/datamodel/xdb/embl/BasePosition.java | 29 +- src/jalview/datamodel/xdb/embl/EmblEntry.java | 81 +- src/jalview/datamodel/xdb/embl/EmblError.java | 27 +- src/jalview/datamodel/xdb/embl/EmblFeature.java | 33 +- .../datamodel/xdb/embl/EmblFeatureLocElement.java | 35 +- .../datamodel/xdb/embl/EmblFeatureLocations.java | 35 +- src/jalview/datamodel/xdb/embl/EmblFile.java | 29 +- src/jalview/datamodel/xdb/embl/EmblSequence.java | 31 +- src/jalview/datamodel/xdb/embl/Qualifier.java | 31 +- src/jalview/gui/AlignFrame.java | 155 +- src/jalview/gui/AlignViewport.java | 413 +- src/jalview/gui/AlignmentPanel.java | 32 +- src/jalview/gui/AnnotationColourChooser.java | 25 +- src/jalview/gui/AnnotationExporter.java | 40 +- src/jalview/gui/AnnotationLabels.java | 121 +- src/jalview/gui/AnnotationPanel.java | 245 +- src/jalview/gui/AppJmol.java | 37 +- src/jalview/gui/ConservationThread.java | 26 +- src/jalview/gui/Console.java | 27 +- src/jalview/gui/CutAndPasteTransfer.java | 35 +- src/jalview/gui/DasSourceBrowser.java | 90 +- src/jalview/gui/Desktop.java | 109 +- src/jalview/gui/EPSOptions.java | 25 +- src/jalview/gui/EditNameDialog.java | 25 +- src/jalview/gui/FeatureColourChooser.java | 222 +- src/jalview/gui/FeatureRenderer.java | 307 +- src/jalview/gui/FeatureSettings.java | 108 +- src/jalview/gui/Finder.java | 66 +- src/jalview/gui/FontChooser.java | 41 +- src/jalview/gui/IProgressIndicator.java | 39 +- src/jalview/gui/IProgressIndicatorHandler.java | 29 +- src/jalview/gui/IdCanvas.java | 47 +- src/jalview/gui/IdPanel.java | 91 +- src/jalview/gui/IdwidthAdjuster.java | 43 +- src/jalview/gui/Jalview2XML.java | 166 +- src/jalview/gui/Jalview2XML_V1.java | 29 +- src/jalview/gui/JalviewAppender.java | 75 +- src/jalview/gui/OOMWarning.java | 40 +- src/jalview/gui/OverviewPanel.java | 32 +- src/jalview/gui/PCAPanel.java | 42 +- src/jalview/gui/PaintRefresher.java | 29 +- src/jalview/gui/PairwiseAlignPanel.java | 29 +- src/jalview/gui/PopupMenu.java | 344 +- src/jalview/gui/Preferences.java | 143 +- src/jalview/gui/PromptUserConfig.java | 235 +- src/jalview/gui/RedundancyPanel.java | 39 +- src/jalview/gui/RotatableCanvas.java | 65 +- src/jalview/gui/ScalePanel.java | 25 +- src/jalview/gui/ScriptWindow.java | 39 +- src/jalview/gui/SeqCanvas.java | 88 +- src/jalview/gui/SeqPanel.java | 141 +- src/jalview/gui/SequenceFetcher.java | 114 +- src/jalview/gui/SequenceRenderer.java | 119 +- src/jalview/gui/SliderPanel.java | 53 +- src/jalview/gui/SplashScreen.java | 41 +- src/jalview/gui/TextColourChooser.java | 25 +- src/jalview/gui/TreeCanvas.java | 109 +- src/jalview/gui/TreePanel.java | 90 +- src/jalview/gui/UserDefinedColours.java | 51 +- src/jalview/gui/UserQuestionnaireCheck.java | 27 +- src/jalview/gui/VamsasApplication.java | 95 +- src/jalview/gui/WebserviceInfo.java | 65 +- src/jalview/io/.cvsignore | 3 +- src/jalview/io/AMSAFile.java | 31 +- src/jalview/io/AlignFile.java | 39 +- src/jalview/io/AnnotationFile.java | 46 +- src/jalview/io/AppletFormatAdapter.java | 83 +- src/jalview/io/BLCFile.java | 35 +- src/jalview/io/ClansFile.java | 25 +- src/jalview/io/ClustalFile.java | 25 +- src/jalview/io/DBRefFile.java | 31 +- src/jalview/io/FastaFile.java | 41 +- src/jalview/io/FeaturesFile.java | 126 +- src/jalview/io/FileLoader.java | 46 +- src/jalview/io/FileParse.java | 55 +- src/jalview/io/FormatAdapter.java | 56 +- src/jalview/io/HTMLOutput.java | 25 +- src/jalview/io/IdentifyFile.java | 64 +- src/jalview/io/JPredFile.java | 59 +- src/jalview/io/JalviewFileChooser.java | 25 +- src/jalview/io/JalviewFileFilter.java | 25 +- src/jalview/io/JalviewFileView.java | 25 +- src/jalview/io/JnetAnnotationMaker.java | 39 +- src/jalview/io/MSFfile.java | 39 +- src/jalview/io/MatrixFile.java | 29 +- src/jalview/io/ModellerDescription.java | 31 +- src/jalview/io/NewickFile.java | 97 +- src/jalview/io/PIRFile.java | 25 +- src/jalview/io/PfamFile.java | 28 +- src/jalview/io/PileUpfile.java | 31 +- src/jalview/io/SimpleBlastFile.java | 63 +- src/jalview/io/StockholmFile.java | 41 +- src/jalview/io/VamsasAppDatastore.java | 239 +- src/jalview/io/WSWUBlastClient.java | 33 +- src/jalview/io/vamsas/Datasetsequence.java | 148 +- src/jalview/io/vamsas/DatastoreItem.java | 172 +- src/jalview/io/vamsas/DatastoreRegistry.java | 17 + src/jalview/io/vamsas/Dbref.java | 27 +- src/jalview/io/vamsas/LocalDocSyncObject.java | 46 +- src/jalview/io/vamsas/Rangetype.java | 55 +- src/jalview/io/vamsas/Sequencefeature.java | 106 +- src/jalview/io/vamsas/Sequencemapping.java | 78 +- src/jalview/io/vamsas/Tree.java | 87 +- src/jalview/jbgui/GAlignFrame.java | 192 +- src/jalview/jbgui/GAlignmentPanel.java | 25 +- src/jalview/jbgui/GCutAndPasteTransfer.java | 37 +- src/jalview/jbgui/GDasSourceBrowser.java | 25 +- src/jalview/jbgui/GDesktop.java | 51 +- src/jalview/jbgui/GFinder.java | 25 +- src/jalview/jbgui/GFontChooser.java | 39 +- src/jalview/jbgui/GPCAPanel.java | 25 +- src/jalview/jbgui/GPairwiseAlignPanel.java | 29 +- src/jalview/jbgui/GPreferences.java | 113 +- src/jalview/jbgui/GSequenceLink.java | 25 +- src/jalview/jbgui/GSliderPanel.java | 35 +- src/jalview/jbgui/GStructureViewer.java | 25 +- src/jalview/jbgui/GTreePanel.java | 25 +- src/jalview/jbgui/GUserDefinedColours.java | 37 +- src/jalview/jbgui/GWebserviceInfo.java | 29 +- src/jalview/math/Matrix.java | 51 +- src/jalview/math/RotatableMatrix.java | 47 +- src/jalview/schemabinding/version2/AlcodMap.java | 357 +- src/jalview/schemabinding/version2/Alcodon.java | 509 ++- .../schemabinding/version2/AlcodonFrame.java | 853 ++-- src/jalview/schemabinding/version2/Annotation.java | 2087 ++++----- .../schemabinding/version2/AnnotationColours.java | 721 +-- .../schemabinding/version2/AnnotationElement.java | 677 +-- src/jalview/schemabinding/version2/Colour.java | 965 ++-- src/jalview/schemabinding/version2/DBRef.java | 433 +- src/jalview/schemabinding/version2/Feature.java | 1050 ++--- .../schemabinding/version2/FeatureSettings.java | 849 ++-- src/jalview/schemabinding/version2/Features.java | 203 +- src/jalview/schemabinding/version2/Group.java | 394 +- .../schemabinding/version2/HiddenColumns.java | 424 +- src/jalview/schemabinding/version2/JGroup.java | 2307 +++++----- src/jalview/schemabinding/version2/JSeq.java | 1662 +++---- .../schemabinding/version2/JalviewModel.java | 437 +- .../version2/JalviewModelSequence.java | 1894 ++++---- .../schemabinding/version2/JalviewUserColours.java | 646 +-- .../schemabinding/version2/MapListFrom.java | 424 +- src/jalview/schemabinding/version2/MapListTo.java | 424 +- .../schemabinding/version2/MapListType.java | 1160 ++--- src/jalview/schemabinding/version2/Mapping.java | 315 +- .../schemabinding/version2/MappingChoice.java | 333 +- src/jalview/schemabinding/version2/OtherData.java | 332 +- src/jalview/schemabinding/version2/Pdbentry.java | 696 +-- .../schemabinding/version2/PdbentryItem.java | 377 +- src/jalview/schemabinding/version2/Pdbids.java | 506 +- src/jalview/schemabinding/version2/Property.java | 332 +- src/jalview/schemabinding/version2/Sequence.java | 556 +-- .../schemabinding/version2/SequenceSet.java | 1662 +++---- .../version2/SequenceSetProperties.java | 334 +- .../schemabinding/version2/SequenceType.java | 434 +- src/jalview/schemabinding/version2/Setting.java | 1329 +++--- .../schemabinding/version2/StructureState.java | 882 ++-- .../schemabinding/version2/ThresholdLine.java | 423 +- src/jalview/schemabinding/version2/Tree.java | 1710 +++---- .../schemabinding/version2/UserColourScheme.java | 207 +- .../schemabinding/version2/UserColours.java | 333 +- src/jalview/schemabinding/version2/VAMSAS.java | 838 ++-- .../schemabinding/version2/VamsasModel.java | 203 +- src/jalview/schemabinding/version2/Viewport.java | 4816 ++++++++++---------- .../version2/descriptors/AlcodMapDescriptor.java | 440 +- .../version2/descriptors/AlcodonDescriptor.java | 530 ++- .../descriptors/AlcodonFrameDescriptor.java | 469 +- .../descriptors/AnnotationColoursDescriptor.java | 814 ++-- .../version2/descriptors/AnnotationDescriptor.java | 1886 ++++---- .../descriptors/AnnotationElementDescriptor.java | 814 ++-- .../version2/descriptors/ColourDescriptor.java | 1067 +++-- .../version2/descriptors/DBRefDescriptor.java | 592 +-- .../version2/descriptors/FeatureDescriptor.java | 989 ++-- .../descriptors/FeatureSettingsDescriptor.java | 468 +- .../version2/descriptors/FeaturesDescriptor.java | 284 +- .../version2/descriptors/GroupDescriptor.java | 451 +- .../descriptors/HiddenColumnsDescriptor.java | 464 +- .../version2/descriptors/JGroupDescriptor.java | 2076 +++++---- .../version2/descriptors/JSeqDescriptor.java | 1048 +++-- .../descriptors/JalviewModelDescriptor.java | 613 +-- .../JalviewModelSequenceDescriptor.java | 828 ++-- .../descriptors/JalviewUserColoursDescriptor.java | 531 ++- .../descriptors/MapListFromDescriptor.java | 466 +- .../version2/descriptors/MapListToDescriptor.java | 466 +- .../descriptors/MapListTypeDescriptor.java | 662 +-- .../descriptors/MappingChoiceDescriptor.java | 449 +- .../version2/descriptors/MappingDescriptor.java | 381 +- .../version2/descriptors/OtherDataDescriptor.java | 442 +- .../version2/descriptors/PdbentryDescriptor.java | 615 +-- .../descriptors/PdbentryItemDescriptor.java | 396 +- .../version2/descriptors/PdbidsDescriptor.java | 399 +- .../version2/descriptors/PropertyDescriptor.java | 442 +- .../version2/descriptors/SequenceDescriptor.java | 457 +- .../descriptors/SequenceSetDescriptor.java | 827 ++-- .../SequenceSetPropertiesDescriptor.java | 448 +- .../descriptors/SequenceTypeDescriptor.java | 602 +-- .../version2/descriptors/SettingDescriptor.java | 1304 +++--- .../descriptors/StructureStateDescriptor.java | 903 ++-- .../descriptors/ThresholdLineDescriptor.java | 526 ++- .../version2/descriptors/TreeDescriptor.java | 1729 +++---- .../descriptors/UserColourSchemeDescriptor.java | 285 +- .../descriptors/UserColoursDescriptor.java | 438 +- .../version2/descriptors/VAMSASDescriptor.java | 462 +- .../descriptors/VamsasModelDescriptor.java | 284 +- .../version2/descriptors/ViewportDescriptor.java | 4412 ++++++++++-------- src/jalview/schemes/AnnotationColourGradient.java | 31 +- src/jalview/schemes/Blosum62ColourScheme.java | 25 +- src/jalview/schemes/BuriedColourScheme.java | 27 +- src/jalview/schemes/ClustalxColourScheme.java | 33 +- src/jalview/schemes/ColourSchemeI.java | 25 +- src/jalview/schemes/ColourSchemeProperty.java | 25 +- src/jalview/schemes/Consensus.java | 25 +- src/jalview/schemes/GraduatedColor.java | 194 +- src/jalview/schemes/HelixColourScheme.java | 25 +- src/jalview/schemes/HydrophobicColourScheme.java | 27 +- src/jalview/schemes/NucleotideColourScheme.java | 31 +- src/jalview/schemes/PIDColourScheme.java | 25 +- src/jalview/schemes/ResidueColourScheme.java | 46 +- src/jalview/schemes/ResidueProperties.java | 84 +- src/jalview/schemes/ScoreColourScheme.java | 37 +- src/jalview/schemes/ScoreMatrix.java | 25 +- src/jalview/schemes/StrandColourScheme.java | 27 +- src/jalview/schemes/TaylorColourScheme.java | 25 +- src/jalview/schemes/TurnColourScheme.java | 27 +- src/jalview/schemes/UserColourScheme.java | 25 +- src/jalview/schemes/ZappoColourScheme.java | 25 +- src/jalview/structure/SelectionListener.java | 45 +- src/jalview/structure/SelectionSource.java | 32 +- src/jalview/structure/SequenceListener.java | 25 +- src/jalview/structure/StructureListener.java | 25 +- src/jalview/structure/StructureMapping.java | 25 +- .../structure/StructureSelectionManager.java | 63 +- src/jalview/structure/VamsasListener.java | 25 +- src/jalview/util/AWTConsole.java | 249 + src/jalview/util/BrowserLauncher.java | 37 +- src/jalview/util/Comparison.java | 43 +- src/jalview/util/DBRefUtils.java | 49 +- src/jalview/util/Format.java | 93 +- src/jalview/util/GroupUrlLink.java | 1685 +++---- src/jalview/util/ImageMaker.java | 25 +- src/jalview/util/MapList.java | 79 +- src/jalview/util/Platform.java | 33 +- src/jalview/util/QuickSort.java | 29 +- src/jalview/util/ShiftList.java | 35 +- src/jalview/util/TableSorter.java | 60 +- src/jalview/util/UrlLink.java | 61 +- src/jalview/util/jarInputStreamProvider.java | 42 +- src/jalview/ws/DBRefFetcher.java | 109 +- src/jalview/ws/DasSequenceFeatureFetcher.java | 135 +- src/jalview/ws/Discoverer.java | 52 +- src/jalview/ws/EnfinEnvision2OneWay.java | 487 +- src/jalview/ws/JPredClient.java | 47 +- src/jalview/ws/JPredThread.java | 42 +- src/jalview/ws/MsaWSClient.java | 37 +- src/jalview/ws/MsaWSThread.java | 47 +- src/jalview/ws/SeqSearchWSClient.java | 43 +- src/jalview/ws/SeqSearchWSThread.java | 55 +- src/jalview/ws/SequenceFetcher.java | 134 +- src/jalview/ws/WSClient.java | 41 +- src/jalview/ws/WSClientI.java | 25 +- src/jalview/ws/WSMenuEntryProviderI.java | 17 + src/jalview/ws/WSThread.java | 59 +- src/jalview/ws/dbsources/DasSequenceSource.java | 37 +- .../ws/dbsources/EbiFileRetrievedProxy.java | 25 +- src/jalview/ws/dbsources/EmblCdsSouce.java | 30 +- src/jalview/ws/dbsources/EmblSource.java | 34 +- src/jalview/ws/dbsources/EmblXmlSource.java | 55 +- src/jalview/ws/dbsources/GeneDbSource.java | 64 +- src/jalview/ws/dbsources/Pdb.java | 29 +- src/jalview/ws/dbsources/Pfam.java | 35 +- src/jalview/ws/dbsources/PfamFull.java | 25 +- src/jalview/ws/dbsources/PfamSeed.java | 25 +- src/jalview/ws/dbsources/Uniprot.java | 39 +- src/jalview/ws/dbsources/UnprotName.java | 25 +- .../dbsources/das/DasSequenceSourceListener.java | 33 +- src/jalview/ws/ebi/EBIFetchClient.java | 37 +- src/jalview/ws/seqfetcher/ASequenceFetcher.java | 45 +- src/jalview/ws/seqfetcher/DbSourceProxy.java | 27 +- src/jalview/ws/seqfetcher/DbSourceProxyImpl.java | 27 +- src/uk/ac/ebi/picr/model/CrossReference.java | 25 +- .../ac/ebi/picr/model/CrossReference_Helper.java | 25 +- src/uk/ac/ebi/picr/model/UPEntry.java | 25 +- src/uk/ac/ebi/picr/model/UPEntry_Helper.java | 25 +- src/uk/ac/ebi/www/Data.java | 25 +- src/uk/ac/ebi/www/InputParams.java | 25 +- src/uk/ac/ebi/www/WSFile.java | 25 +- src/uk/ac/ebi/www/WSWUBlast.java | 25 +- src/uk/ac/ebi/www/WSWUBlastService.java | 25 +- src/uk/ac/ebi/www/WSWUBlastServiceLocator.java | 25 +- src/uk/ac/ebi/www/WSWUBlastSoapBindingStub.java | 25 +- .../AccessionMapperBindingStub.java | 25 +- .../AccessionMapperInterface.java | 25 +- .../AccessionMapperService.java | 25 +- .../AccessionMapperServiceLocator.java | 25 +- src/vamsas/IMsaWS.java | 25 +- src/vamsas/objects/simple/Alignment.java | 25 +- src/vamsas/objects/simple/Alignment_Helper.java | 25 +- src/vamsas/objects/simple/JpredResult.java | 25 +- src/vamsas/objects/simple/JpredResult_Helper.java | 25 +- src/vamsas/objects/simple/MsaResult.java | 25 +- src/vamsas/objects/simple/MsaResult_Helper.java | 25 +- src/vamsas/objects/simple/Msfalignment.java | 25 +- src/vamsas/objects/simple/Msfalignment_Helper.java | 25 +- src/vamsas/objects/simple/Object.java | 25 +- src/vamsas/objects/simple/Object_Helper.java | 25 +- src/vamsas/objects/simple/Result.java | 25 +- src/vamsas/objects/simple/Result_Helper.java | 25 +- src/vamsas/objects/simple/Secstructpred.java | 25 +- .../objects/simple/Secstructpred_Helper.java | 25 +- src/vamsas/objects/simple/SeqSearchResult.java | 25 +- .../objects/simple/SeqSearchResult_Helper.java | 25 +- src/vamsas/objects/simple/Sequence.java | 25 +- src/vamsas/objects/simple/SequenceSet.java | 25 +- src/vamsas/objects/simple/SequenceSet_Helper.java | 25 +- src/vamsas/objects/simple/Sequence_Helper.java | 25 +- src/vamsas/objects/simple/WsJobId.java | 25 +- src/vamsas/objects/simple/WsJobId_Helper.java | 25 +- utils/InstallAnywhere/jalview_buildinstaller.xml | 25 +- utils/eclipse/JalviewCodeStyle.xml | 17 + utils/getJavaVersion.java | 25 +- utils/help2Website.java | 25 +- utils/jalopy/docs/acknowledge.html | 19 +- utils/jalopy/docs/bi01.html | 19 +- utils/jalopy/docs/build.html | 19 +- utils/jalopy/docs/comments.html | 19 +- utils/jalopy/docs/contact.html | 19 +- utils/jalopy/docs/contributors.html | 19 +- utils/jalopy/docs/dedication.html | 19 +- utils/jalopy/docs/dependencies.html | 19 +- utils/jalopy/docs/docs.html | 19 +- utils/jalopy/docs/download.html | 19 +- utils/jalopy/docs/environment.html | 19 +- utils/jalopy/docs/faq.html | 19 +- utils/jalopy/docs/features.html | 19 +- utils/jalopy/docs/footer.html | 19 +- utils/jalopy/docs/header.html | 19 +- utils/jalopy/docs/history.html | 19 +- utils/jalopy/docs/imports.html | 19 +- utils/jalopy/docs/indentation.html | 19 +- utils/jalopy/docs/index.html | 19 +- utils/jalopy/docs/inspector-naming.html | 19 +- utils/jalopy/docs/inspector.html | 19 +- utils/jalopy/docs/installation.html | 19 +- utils/jalopy/docs/introduction.html | 19 +- utils/jalopy/docs/ix01.html | 19 +- utils/jalopy/docs/javadoc.html | 19 +- utils/jalopy/docs/license-antlr.html | 19 +- utils/jalopy/docs/license-apache.html | 19 +- utils/jalopy/docs/license-bsd.html | 19 +- utils/jalopy/docs/license-common-public.html | 19 +- utils/jalopy/docs/license-gnu-doc.html | 19 +- utils/jalopy/docs/license-gnu.html | 19 +- utils/jalopy/docs/license-sun-public.html | 19 +- utils/jalopy/docs/links.html | 19 +- utils/jalopy/docs/manual.html | 19 +- utils/jalopy/docs/messages.html | 19 +- utils/jalopy/docs/misc.html | 19 +- utils/jalopy/docs/part-core.html | 19 +- utils/jalopy/docs/part-plugins.html | 19 +- utils/jalopy/docs/plugin-ant-config.html | 19 +- utils/jalopy/docs/plugin-ant-license.html | 19 +- utils/jalopy/docs/plugin-ant-usage.html | 19 +- utils/jalopy/docs/plugin-ant.html | 19 +- utils/jalopy/docs/plugin-console-license.html | 19 +- utils/jalopy/docs/plugin-console-usage.html | 19 +- utils/jalopy/docs/plugin-console.html | 19 +- utils/jalopy/docs/plugin-eclipse-integration.html | 19 +- utils/jalopy/docs/plugin-eclipse-license.html | 19 +- utils/jalopy/docs/plugin-eclipse.html | 19 +- utils/jalopy/docs/plugin-jbuilder-integration.html | 19 +- utils/jalopy/docs/plugin-jbuilder-license.html | 19 +- utils/jalopy/docs/plugin-jbuilder.html | 19 +- utils/jalopy/docs/plugin-jdev-integration.html | 19 +- utils/jalopy/docs/plugin-jdev-license.html | 19 +- utils/jalopy/docs/plugin-jdev.html | 19 +- utils/jalopy/docs/plugin-jedit-integration.html | 19 +- utils/jalopy/docs/plugin-jedit-license.html | 19 +- utils/jalopy/docs/plugin-jedit.html | 19 +- utils/jalopy/docs/plugin-netbeans-integration.html | 19 +- utils/jalopy/docs/plugin-netbeans-license.html | 19 +- utils/jalopy/docs/plugin-netbeans.html | 19 +- utils/jalopy/docs/plugins.html | 19 +- utils/jalopy/docs/printer.html | 19 +- utils/jalopy/docs/project.html | 19 +- utils/jalopy/docs/separation.html | 19 +- utils/jalopy/docs/settings.html | 19 +- utils/jalopy/docs/sorting.html | 19 +- utils/jalopy/docs/usage.html | 19 +- utils/jalopy/docs/whitespace.html | 19 +- utils/jalopy/docs/wrapping.html | 19 +- utils/jalopy/readme.html | 19 +- 643 files changed, 62310 insertions(+), 54068 deletions(-) create mode 100644 src/jalview/bin/JalviewLiteURLRetrieve.java create mode 100644 src/jalview/util/AWTConsole.java diff --git a/LICENSE b/LICENSE index f640985..94a0453 100755 --- a/LICENSE +++ b/LICENSE @@ -1,340 +1,621 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS diff --git a/build.xml b/build.xml index caef5be..b73c910 100755 --- a/build.xml +++ b/build.xml @@ -1,21 +1,20 @@ diff --git a/doc/AddingGroovySupport.html b/doc/AddingGroovySupport.html index 966c9b4..664b1e6 100644 --- a/doc/AddingGroovySupport.html +++ b/doc/AddingGroovySupport.html @@ -1,4 +1,21 @@ + Adding Groovy Support to Jalview diff --git a/doc/building.html b/doc/building.html index df33b12..43f81b3 100755 --- a/doc/building.html +++ b/doc/building.html @@ -1,4 +1,21 @@ + Building Jalview from Source diff --git a/doc/developing.html b/doc/developing.html index f466a21..b081e86 100644 --- a/doc/developing.html +++ b/doc/developing.html @@ -1,24 +1,41 @@ - - - Developing Jalview - -

Developing Jalview

-

-
    -
  • Basic Source Structure Guidelines
  • -
  • The Applet and The Application - whats the difference ?
  • -
  • Package Architecture
    -
  • -
  • Specific Development Guidelines -
      -
    • Adding new datamodel objects to Jalview
    • -
    • Adding new IO capabilities to Jalview
    • -
    • Adding new database types to Jalview
    • -
    • Working with the Jalview DAS annotation fetcher
    • -
    • Adding new analysis methods to jalview
    • -
    • Adding new web service functionality to jalview
    • -
    -
  • -
- - \ No newline at end of file + + + + Developing Jalview + +

Developing Jalview

+

+
    +
  • Basic Source Structure Guidelines
  • +
  • The Applet and The Application - whats the difference ?
  • +
  • Package Architecture
    +
  • +
  • Specific Development Guidelines +
      +
    • Adding new datamodel objects to Jalview
    • +
    • Adding new IO capabilities to Jalview
    • +
    • Adding new database types to Jalview
    • +
    • Working with the Jalview DAS annotation fetcher
    • +
    • Adding new analysis methods to jalview
    • +
    • Adding new web service functionality to jalview
    • +
    +
  • +
+ + diff --git a/doc/index.html b/doc/index.html index ab12d5e..228f3e3 100644 --- a/doc/index.html +++ b/doc/index.html @@ -1,4 +1,21 @@ + Jalview Source Documentation @@ -129,4 +146,4 @@ Jalview Source Documentation - \ No newline at end of file + diff --git a/doc/newdmobj.html b/doc/newdmobj.html index 8ad264a..c2db9f7 100644 --- a/doc/newdmobj.html +++ b/doc/newdmobj.html @@ -1,4 +1,21 @@ + Adding New Datamodel Objects To Jalview @@ -16,4 +33,4 @@ The jalview cut and paste mechanism relies on copy constructors and a 'pseudo-co
  • - \ No newline at end of file + diff --git a/help/helpTOC.xml b/help/helpTOC.xml index 8490970..feafc0f 100755 --- a/help/helpTOC.xml +++ b/help/helpTOC.xml @@ -1,21 +1,20 @@ diff --git a/help/html/calculations/consensus.html b/help/html/calculations/consensus.html index 71a1719..1f14352 100644 --- a/help/html/calculations/consensus.html +++ b/help/html/calculations/consensus.html @@ -1,4 +1,21 @@ + Alignment Consensus Annotation

    Alignment Consensus Annotation

    diff --git a/help/html/calculations/conservation.html b/help/html/calculations/conservation.html index 4cfc825..9c8f0c5 100755 --- a/help/html/calculations/conservation.html +++ b/help/html/calculations/conservation.html @@ -1,27 +1,44 @@ - -Alignment Conservation Annotation -

    Alignment Conservation Annotation

    -

    This is an automatically calculated quantitative alignment -annotation which measures the number of conserved physico-chemical -properties conserved for each column of the alignment. Its calculation -is based on the one used in - the AMAS method of multiple sequence alignment analysis :
    -

      Livingstone - C.D. and Barton G.J. (1993), Protein Sequence Alignments: A Strategy - for the Hierarchical Analysis of Residue Conservation.CABIOS Vol. 9 - No. 6 (745-756)). -
    -

    -

    Conservation is measured as a numerical index reflecting the conservation of - physico-chemical - properties in the alignment: Identities score highest, and the next most - conserved group contain substitutions to amino acids lying in the same physico-chemical - class.

    - -

    Colouring an alignment by conservation
    -Conservation scores can be used to colour an alignment. This is -explained further in the help page for conservation colouring. -

    - - + + +Alignment Conservation Annotation +

    Alignment Conservation Annotation

    +

    This is an automatically calculated quantitative alignment +annotation which measures the number of conserved physico-chemical +properties conserved for each column of the alignment. Its calculation +is based on the one used in + the AMAS method of multiple sequence alignment analysis :
    +

      Livingstone + C.D. and Barton G.J. (1993), Protein Sequence Alignments: A Strategy + for the Hierarchical Analysis of Residue Conservation.CABIOS Vol. 9 + No. 6 (745-756)). +
    +

    +

    Conservation is measured as a numerical index reflecting the conservation of + physico-chemical + properties in the alignment: Identities score highest, and the next most + conserved group contain substitutions to amino acids lying in the same physico-chemical + class.

    + +

    Colouring an alignment by conservation
    +Conservation scores can be used to colour an alignment. This is +explained further in the help page for conservation colouring. +

    + + diff --git a/help/html/calculations/pairwise.html b/help/html/calculations/pairwise.html index 36c00b1..051122e 100755 --- a/help/html/calculations/pairwise.html +++ b/help/html/calculations/pairwise.html @@ -1,20 +1,37 @@ - -Pairwise Alignment - -

    Pairwise alignment (Proteins only)

    -

    This calculation is performed on the selected sequences only. Java is not the - fastest language in the world and aligning more than a handful of sequences - will take a fair amount of time.
    - For each pair of sequences the best global alignment is found using BLOSUM62 - as the scoring matrix. The scores reported are the raw scores. The sequences - are aligned using a dynamic programming technique and using the following gap - penalties :

    -

    Gap open : 12
    - Gap extend : 2

    -

    When you select the pairwise alignment option a new window will come up which - will display the alignments in a text format as they are calculated. Also displayed - is information about the alignment such as alignment score, length and percentage - identity between the sequences.

    -

     

    - - + + +Pairwise Alignment + +

    Pairwise alignment (Proteins only)

    +

    This calculation is performed on the selected sequences only. Java is not the + fastest language in the world and aligning more than a handful of sequences + will take a fair amount of time.
    + For each pair of sequences the best global alignment is found using BLOSUM62 + as the scoring matrix. The scores reported are the raw scores. The sequences + are aligned using a dynamic programming technique and using the following gap + penalties :

    +

    Gap open : 12
    + Gap extend : 2

    +

    When you select the pairwise alignment option a new window will come up which + will display the alignments in a text format as they are calculated. Also displayed + is information about the alignment such as alignment score, length and percentage + identity between the sequences.

    +

     

    + + diff --git a/help/html/calculations/pca.html b/help/html/calculations/pca.html index acf9665..9805947 100755 --- a/help/html/calculations/pca.html +++ b/help/html/calculations/pca.html @@ -1,4 +1,21 @@ + Principal Component Analysis @@ -23,9 +40,12 @@ of variation in the data set.

    In this case, the components are generated by an eigenvector decomposition of the matrix formed from the sum of BLOSUM scores at each -aligned position between each pair of sequences. The basic method is -described in the paper by G. Casari, C. Sander and A. Valencia. -Structural Biology volume 2, no. 2, February 1995 (pubmed) and implemented at the SeqSpace server at the EBI.

    diff --git a/help/html/calculations/quality.html b/help/html/calculations/quality.html index fcd97f9..dae2a2e 100755 --- a/help/html/calculations/quality.html +++ b/help/html/calculations/quality.html @@ -1,32 +1,49 @@ - -Alignment Quality Annotation - -

    Alignment Quality Annotation

    -

    Alignment Quality is one of the automatically calculated -quantitative alignment -annotations displayed below the columns of a multiple sequence -alignment (and can be used to shade the alignment). It is an ad-hoc -measure of the likelihood of observing the mutations (if any) in a -particular column of the alignment.

    -

    -More precisely, the quality score is inversely proportional to the -average cost of all pairs of mutations oberved in a particular column -of the alignment - a high alignment quality score for a column would -suggest that there are no mutations, or most mutations observed are -favourable. -

    - -

    The Algorithm
    -The quality score is calculated for each column in an alignment by -summing, for all mutations, the ratio of the two BLOSUM 62 scores for -a mutation pair and each residue's conservered BLOSUM62 score (which -is higher). This valueis normalised for each column, and then plotted -on a scale from 0 to 1. -

    -

    -Multiple alignment algorithms using the BLOSUM 62 substition matrices -should, in theory, maximise alignment quality for an un-gapped -alignment, and locally maximise quality for gapped alignments. -

    - - + + +Alignment Quality Annotation + +

    Alignment Quality Annotation

    +

    Alignment Quality is one of the automatically calculated +quantitative alignment +annotations displayed below the columns of a multiple sequence +alignment (and can be used to shade the alignment). It is an ad-hoc +measure of the likelihood of observing the mutations (if any) in a +particular column of the alignment.

    +

    +More precisely, the quality score is inversely proportional to the +average cost of all pairs of mutations oberved in a particular column +of the alignment - a high alignment quality score for a column would +suggest that there are no mutations, or most mutations observed are +favourable. +

    + +

    The Algorithm
    +The quality score is calculated for each column in an alignment by +summing, for all mutations, the ratio of the two BLOSUM 62 scores for +a mutation pair and each residue's conservered BLOSUM62 score (which +is higher). This valueis normalised for each column, and then plotted +on a scale from 0 to 1. +

    +

    +Multiple alignment algorithms using the BLOSUM 62 substition matrices +should, in theory, maximise alignment quality for an un-gapped +alignment, and locally maximise quality for gapped alignments. +

    + + diff --git a/help/html/calculations/recoverInputdata.html b/help/html/calculations/recoverInputdata.html index b582952..23073fa 100644 --- a/help/html/calculations/recoverInputdata.html +++ b/help/html/calculations/recoverInputdata.html @@ -1,13 +1,30 @@ - -Viewing Input Data to PCA and Tree calculations - - -

    Viewing Input Data to PCA and Tree calculations

    -

    It is always possible to retrieve the input data used to calculate - a tree or PCA plot by using the analysis window's - "File - -> Input Data..." menu item. The Input Data will be - shown in a new alignment window, with any hidden columns - preserved.

    - - + + +Viewing Input Data to PCA and Tree calculations + + +

    Viewing Input Data to PCA and Tree calculations

    +

    It is always possible to retrieve the input data used to calculate + a tree or PCA plot by using the analysis window's + "File + -> Input Data..." menu item. The Input Data will be + shown in a new alignment window, with any hidden columns + preserved.

    + + diff --git a/help/html/calculations/redundancy.html b/help/html/calculations/redundancy.html index 4b42238..873d354 100755 --- a/help/html/calculations/redundancy.html +++ b/help/html/calculations/redundancy.html @@ -1,4 +1,21 @@ + Removing Redundancy diff --git a/help/html/calculations/sorting.html b/help/html/calculations/sorting.html index 1c15890..ab7dba3 100755 --- a/help/html/calculations/sorting.html +++ b/help/html/calculations/sorting.html @@ -1,4 +1,21 @@ + Sorting Sequences diff --git a/help/html/calculations/tree.html b/help/html/calculations/tree.html index c425a83..1f3eecb 100755 --- a/help/html/calculations/tree.html +++ b/help/html/calculations/tree.html @@ -1,4 +1,21 @@ + Tree Calculation

    Calculation of trees from alignments

    diff --git a/help/html/calculations/treeviewer.html b/help/html/calculations/treeviewer.html index f98ea5d..435b3b7 100755 --- a/help/html/calculations/treeviewer.html +++ b/help/html/calculations/treeviewer.html @@ -1,4 +1,21 @@ + The Tree Viewing Window diff --git a/help/html/colourSchemes/abovePID.html b/help/html/colourSchemes/abovePID.html index 65e0e19..38f964c 100755 --- a/help/html/colourSchemes/abovePID.html +++ b/help/html/colourSchemes/abovePID.html @@ -1,20 +1,37 @@ - -Above PID Colours - - - - -

    Colouring above a percentage identity threshold

    -

    Selecting this option causes the colour scheme to be applied to only those - residues that occur in that column more than a certain percentage of the time. - For instance selecting the threshold to be 100 will only colour those columns - with 100 % identity. This threshold option can be applied to the Zappo, Taylor, - Hydrophobicity and User colour schemes.

    - - + + +Above PID Colours + + + + +

    Colouring above a percentage identity threshold

    +

    Selecting this option causes the colour scheme to be applied to only those + residues that occur in that column more than a certain percentage of the time. + For instance selecting the threshold to be 100 will only colour those columns + with 100 % identity. This threshold option can be applied to the Zappo, Taylor, + Hydrophobicity and User colour schemes.

    + + diff --git a/help/html/colourSchemes/annotationColouring.html b/help/html/colourSchemes/annotationColouring.html index ec01fa9..e891a9f 100755 --- a/help/html/colourSchemes/annotationColouring.html +++ b/help/html/colourSchemes/annotationColouring.html @@ -1,30 +1,46 @@ - - -Annotation Colouring - - -

    Annotation Colouring

    -

    Jalview 2.08 allows an alignment to be coloured on a per-column basis based - on any numerical annotation added to that alignment.

    -Select "Colour" ".. - by Annotation" to bring up the Colour by Annotation settings window.
    -
    -
    -
      -
    • Select which annotation to base the colouring scheme on using the top left - selection box.
    • -
    • If the "Use Original Colours" box is selected, the colouring - scheme will use the colouring scheme present on the alignment before the Annotation - Colour Settings window was displayed.
    • -
    • The colour scheme can display a colour gradient from a colour representing - the minimum value in the selected annotation to a colour representing the - maximum value in the selected annotation. Use the "Min Colour" and - "Max Colour" to set the colour gradient range.
    • -
    • Select whether to colour the alignment above or below an adjustable threshold - with the selection box center left of the window.
    • -
    • Change the threshold value with the slider, or enter the exact value in - the text box.
    • -
    -

    - - + + +Annotation Colouring + + +

    Annotation Colouring

    +

    Jalview 2.08 allows an alignment to be coloured on a per-column basis based + on any numerical annotation added to that alignment.

    +Select "Colour" ".. + by Annotation" to bring up the Colour by Annotation settings window.
    +
    +
    +
      +
    • Select which annotation to base the colouring scheme on using the top left + selection box.
    • +
    • If the "Use Original Colours" box is selected, the colouring + scheme will use the colouring scheme present on the alignment before the Annotation + Colour Settings window was displayed.
    • +
    • The colour scheme can display a colour gradient from a colour representing + the minimum value in the selected annotation to a colour representing the + maximum value in the selected annotation. Use the "Min Colour" and + "Max Colour" to set the colour gradient range.
    • +
    • Select whether to colour the alignment above or below an adjustable threshold + with the selection box center left of the window.
    • +
    • Change the threshold value with the slider, or enter the exact value in + the text box.
    • +
    +

    + + diff --git a/help/html/colourSchemes/blosum.html b/help/html/colourSchemes/blosum.html index 7af6f14..2c93ebc 100755 --- a/help/html/colourSchemes/blosum.html +++ b/help/html/colourSchemes/blosum.html @@ -1,20 +1,37 @@ - -Blosum Colour Scheme - - - - - -

    Blosum62

    -

    Gaps are coloured white. If a residue matches the consensus sequence residue - at that position it is coloured dark blue. If it does not match the consensus - residue but the 2 residues have a positive Blosum62 score, it is coloured light - blue.

    - - + + +Blosum Colour Scheme + + + + + +

    Blosum62

    +

    Gaps are coloured white. If a residue matches the consensus sequence residue + at that position it is coloured dark blue. If it does not match the consensus + residue but the 2 residues have a positive Blosum62 score, it is coloured light + blue.

    + + diff --git a/help/html/colourSchemes/buried.html b/help/html/colourSchemes/buried.html index bb541fb..7df2546 100755 --- a/help/html/colourSchemes/buried.html +++ b/help/html/colourSchemes/buried.html @@ -1,52 +1,69 @@ - -Buried Colour Scheme - - - - -

    Buried index

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    CIVLF
    MGAWX
    SHTPY
    NBDQZ
    ERK
    -
    - - + + +Buried Colour Scheme + + + + +

    Buried index

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    CIVLF
    MGAWX
    SHTPY
    NBDQZ
    ERK
    +
    + + diff --git a/help/html/colourSchemes/clustal.html b/help/html/colourSchemes/clustal.html index dd436c8..efc6bec 100755 --- a/help/html/colourSchemes/clustal.html +++ b/help/html/colourSchemes/clustal.html @@ -1,28 +1,45 @@ - -Clustal Colour Scheme - - - - -

    Clustal X Colour Scheme

    + + +Clustal Colour Scheme + + + + +

    Clustal X Colour Scheme

    This is an emulation of the default colourscheme used for alignments in - Clustal X, a graphical interface for the ClustalW multiple sequence alignment + Clustal X, a graphical interface for the ClustalW multiple sequence alignment program. Each residue in the alignment is assigned a colour if the amino acid profile of the alignment at that position meets some minimum criteria specific for the residue type.

    The table below gives these criteria as clauses: {+X%,xx,y}, - where X is the minimum percentage presence for any of the xx (or y) residue types.

    -
    -

     

    + where X is the minimum percentage presence for any of the xx (or y) residue types.

    +
    +

     

    - -
    Clustal X Default Colouring
    + +
    @@ -38,8 +55,8 @@ td { -
    Residue at positionApplied Colour{ Threshhold, Residue group }
    A,I,L,M,F,W,VBLUE{+60%, WLVIMAFCHP}
    R,KRED{+60%,KR},{+80%, K,R,Q}
    H,YCYAN{+60%, WLVIMAFCHP}, {+85%, W,Y,A,C,P,Q,F,H,I,L,M,V}
    PYELLOW{+0%, P}
    S,TGREEN{+60%, WLVIMAFCHP}, {+50%, TS}, {+85%,S,T}
    +
    - - + + diff --git a/help/html/colourSchemes/conservation.html b/help/html/colourSchemes/conservation.html index 59b3929..ae26be0 100755 --- a/help/html/colourSchemes/conservation.html +++ b/help/html/colourSchemes/conservation.html @@ -1,27 +1,44 @@ - -Colouring by Conservation - -

    Colouring by Conservation

    -

    This is an approach to alignment colouring which highlights - regions of an alignment where physicochemical properties are - conserved. It is based on the one used in - the AMAS method of multiple sequence alignment analysis (Livingstone - C.D. and Barton G.J. (1993), Protein Sequence Alignments: A Strategy - for the Hierarchical Analysis of Residue Conservation.CABIOS Vol. 9 - No. 6 (745-756)). See the conservation calculation help page for - a more thorough explanation of the calculation. -

    -

    For an already coloured alignment, the conservation index at each - alignment position is used to modify the shading intensity of the - colour at that position. This means that the most conserved columns - in each group have the most intense colours, and the least conserved - are the palest. The slider controls the contrast between these - extremes.

    -

    Conservation can be calculated over all sequences in an alignment, or just - within specific groups (such as those defined by - phylogenetic tree partitioning). - The option 'apply to all groups' controls whether the contrast - slider value will be applied to the indices for the currently - selected group, or all groups defined over the alignment.

    - - + + +Colouring by Conservation + +

    Colouring by Conservation

    +

    This is an approach to alignment colouring which highlights + regions of an alignment where physicochemical properties are + conserved. It is based on the one used in + the AMAS method of multiple sequence alignment analysis (Livingstone + C.D. and Barton G.J. (1993), Protein Sequence Alignments: A Strategy + for the Hierarchical Analysis of Residue Conservation.CABIOS Vol. 9 + No. 6 (745-756)). See the conservation calculation help page for + a more thorough explanation of the calculation. +

    +

    For an already coloured alignment, the conservation index at each + alignment position is used to modify the shading intensity of the + colour at that position. This means that the most conserved columns + in each group have the most intense colours, and the least conserved + are the palest. The slider controls the contrast between these + extremes.

    +

    Conservation can be calculated over all sequences in an alignment, or just + within specific groups (such as those defined by + phylogenetic tree partitioning). + The option 'apply to all groups' controls whether the contrast + slider value will be applied to the indices for the currently + selected group, or all groups defined over the alignment.

    + + diff --git a/help/html/colourSchemes/helix.html b/help/html/colourSchemes/helix.html index f264c55..59ee10b 100755 --- a/help/html/colourSchemes/helix.html +++ b/help/html/colourSchemes/helix.html @@ -1,52 +1,69 @@ - -Helix Colour Scheme - - - - -

    Helix Propensity

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    EMAZL
    KFQIW
    VDXHR
    BTSCY
    NGP
    -
    - - + + +Helix Colour Scheme + + + + +

    Helix Propensity

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    EMAZL
    KFQIW
    VDXHR
    BTSCY
    NGP
    +
    + + diff --git a/help/html/colourSchemes/hydrophobic.html b/help/html/colourSchemes/hydrophobic.html index 068dc06..0329d04 100755 --- a/help/html/colourSchemes/hydrophobic.html +++ b/help/html/colourSchemes/hydrophobic.html @@ -1,55 +1,72 @@ - -Hydrophobic Colour Scheme - - - - -

    Hydrophobicity

    -

    According to the hydrophobicity table of Kyte, J., and Doolittle, R.F., J. - Mol. Biol. 1157, 105-132, 1982. The most hydrophobic residues according to this - table are coloured red and the most hydrophilic ones are coloured blue.

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    IVLFC
    MAGXT
    SWYPH
    EZQDB
    NKR
    -
    - - + + +Hydrophobic Colour Scheme + + + + +

    Hydrophobicity

    +

    According to the hydrophobicity table of Kyte, J., and Doolittle, R.F., J. + Mol. Biol. 1157, 105-132, 1982. The most hydrophobic residues according to this + table are coloured red and the most hydrophilic ones are coloured blue.

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    IVLFC
    MAGXT
    SWYPH
    EZQDB
    NKR
    +
    + + diff --git a/help/html/colourSchemes/index.html b/help/html/colourSchemes/index.html index fc5e098..0257099 100755 --- a/help/html/colourSchemes/index.html +++ b/help/html/colourSchemes/index.html @@ -1,4 +1,21 @@ + Colour Schemes - - - -

    Nucleotide Colours

    -
    - - - - - - - -
    ACGT
    -
    - - + + +Nucleotide Colour Scheme + + + + +

    Nucleotide Colours

    +
    + + + + + + + +
    ACGT
    +
    + + diff --git a/help/html/colourSchemes/pid.html b/help/html/colourSchemes/pid.html index fc35b7f..605b4f8 100755 --- a/help/html/colourSchemes/pid.html +++ b/help/html/colourSchemes/pid.html @@ -1,33 +1,50 @@ - -Percentage Identity Colour Scheme - - - - -

    PID Colours
    -
    - The PID option colours the residues (boxes and/or text) according to the percentage - of the residues in each column that agree with the consensus sequence. Only - the residues that agree with the consensus residue for each column are coloured.

    - - - - - - - - - - - - - -
    > 80 %
    > 60 %
    > 40%
    < 40%
    - - + + +Percentage Identity Colour Scheme + + + + +

    PID Colours
    +
    + The PID option colours the residues (boxes and/or text) according to the percentage + of the residues in each column that agree with the consensus sequence. Only + the residues that agree with the consensus residue for each column are coloured.

    + + + + + + + + + + + + + +
    > 80 %
    > 60 %
    > 40%
    < 40%
    + + diff --git a/help/html/colourSchemes/strand.html b/help/html/colourSchemes/strand.html index 8e6fa24..9d2f2f4 100755 --- a/help/html/colourSchemes/strand.html +++ b/help/html/colourSchemes/strand.html @@ -1,52 +1,69 @@ - -Strand Colour Scheme - - - - -

    Strand propensity

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    VIYFW
    LTCQM
    XRNHA
    SGZKB
    PDE
    -
    - - + + +Strand Colour Scheme + + + + +

    Strand propensity

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    VIYFW
    LTCQM
    XRNHA
    SGZKB
    PDE
    +
    + + diff --git a/help/html/colourSchemes/taylor.html b/help/html/colourSchemes/taylor.html index 39cbd6c..b487a10 100755 --- a/help/html/colourSchemes/taylor.html +++ b/help/html/colourSchemes/taylor.html @@ -1,51 +1,68 @@ - -Taylor Colour Scheme - - - - -

    Taylor

    -

    These colours were invented by Willie Taylor and an entertaining description - of their birth can be found in Protein Engineering, Vol 10 , 743-746 (1997)

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    AVIL
    MFYW
    HRKN
    QEDS
    TGPC
    -
    - - + + +Taylor Colour Scheme + + + + +

    Taylor

    +

    These colours were invented by Willie Taylor and an entertaining description + of their birth can be found in Protein Engineering, Vol 10 , 743-746 (1997)

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    AVIL
    MFYW
    HRKN
    QEDS
    TGPC
    +
    + + diff --git a/help/html/colourSchemes/textcolour.html b/help/html/colourSchemes/textcolour.html index f40116a..79739ac 100644 --- a/help/html/colourSchemes/textcolour.html +++ b/help/html/colourSchemes/textcolour.html @@ -1,4 +1,21 @@ + Background Dependent Text Colour diff --git a/help/html/colourSchemes/turn.html b/help/html/colourSchemes/turn.html index 0060e25..43bcd9b 100755 --- a/help/html/colourSchemes/turn.html +++ b/help/html/colourSchemes/turn.html @@ -1,52 +1,69 @@ - -Turn Colour Scheme - - - - -

    Turn propensity

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NGPBD
    SCYKX
    QWTRH
    ZEAFM
    LVI
    -
    - - + + +Turn Colour Scheme + + + + +

    Turn propensity

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NGPBD
    SCYKX
    QWTRH
    ZEAFM
    LVI
    +
    + + diff --git a/help/html/colourSchemes/user.html b/help/html/colourSchemes/user.html index 315cc94..461a2ac 100755 --- a/help/html/colourSchemes/user.html +++ b/help/html/colourSchemes/user.html @@ -1,22 +1,39 @@ - -User Defined Colours - -

    User Defined Colours

    -

    -

    You may define any number of new colour schemes, each with a unique name.
    -
    - Each of the residues in a new colour scheme may be assigned a new user defined - colour.
    -
    - Click "Apply" or "OK" to set your new colours on the active - alignment window.

    -

    Click "Cancel" to undo your changes if you pressed the "Apply" - button.
    -
    - If you save your colour scheme with a unique name the colour scheme name will - be added to the "Colour" menu on each new alignment window.
    -
    - Any saved colour schemes will be automatically loaded the next time you use - Jalview.

    - - + + +User Defined Colours + +

    User Defined Colours

    +

    +

    You may define any number of new colour schemes, each with a unique name.
    +
    + Each of the residues in a new colour scheme may be assigned a new user defined + colour.
    +
    + Click "Apply" or "OK" to set your new colours on the active + alignment window.

    +

    Click "Cancel" to undo your changes if you pressed the "Apply" + button.
    +
    + If you save your colour scheme with a unique name the colour scheme name will + be added to the "Colour" menu on each new alignment window.
    +
    + Any saved colour schemes will be automatically loaded the next time you use + Jalview.

    + + diff --git a/help/html/colourSchemes/zappo.html b/help/html/colourSchemes/zappo.html index 7770c43..45af26e 100755 --- a/help/html/colourSchemes/zappo.html +++ b/help/html/colourSchemes/zappo.html @@ -1,50 +1,67 @@ - -Zappo Colour Scheme - - - - -

    Zappo Colours
    -
    - The residues are coloured according to their physicochemical properties as - follows:

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Aliphatic/hydrophobicILVAM
    AromaticFWY
    PositiveKRH
    NegativeDE
    HydrophilicSTNQ
    conformationally specialPG
    CysteineC
    -
    - - + + +Zappo Colour Scheme + + + + +

    Zappo Colours
    +
    + The residues are coloured according to their physicochemical properties as + follows:

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Aliphatic/hydrophobicILVAM
    AromaticFWY
    PositiveKRH
    NegativeDE
    HydrophilicSTNQ
    conformationally specialPG
    CysteineC
    +
    + + diff --git a/help/html/editing/index.html b/help/html/editing/index.html index f71271a..20c1634 100755 --- a/help/html/editing/index.html +++ b/help/html/editing/index.html @@ -1,4 +1,21 @@ + Editing

    Editing

    diff --git a/help/html/features/annotation.html b/help/html/features/annotation.html index 8459e27..d252d9c 100755 --- a/help/html/features/annotation.html +++ b/help/html/features/annotation.html @@ -1,4 +1,21 @@ + Alignment Annotation

    Alignment Annotation

    diff --git a/help/html/features/annotationsFormat.html b/help/html/features/annotationsFormat.html index 2eeb155..4cc1730 100755 --- a/help/html/features/annotationsFormat.html +++ b/help/html/features/annotationsFormat.html @@ -1,5 +1,21 @@ - + The Alignment Annotations File diff --git a/help/html/features/clarguments.html b/help/html/features/clarguments.html index e571b12..277b1f6 100644 --- a/help/html/features/clarguments.html +++ b/help/html/features/clarguments.html @@ -1,4 +1,21 @@ + Jalview Command Line Arguments diff --git a/help/html/features/codingfeatures.html b/help/html/features/codingfeatures.html index a828545..0dc8398 100644 --- a/help/html/features/codingfeatures.html +++ b/help/html/features/codingfeatures.html @@ -1,9 +1,26 @@ - - -DNA Sequence Coding Region Definition - - -

    DNA Sequence Coding Region Definition

    + + + +DNA Sequence Coding Region Definition + + +

    DNA Sequence Coding Region Definition

    Jalview includes the standard DNA codon translation table in order to be able to dynamically translate cDNA to its expressed protein sequence. DNA Sequence Coding Regions are sequence @@ -12,5 +29,5 @@ mark stretches of cDNA that will be concatenated to form the series of codons that are translated by the " Calculate→Translate cDNA" menu function.

    - - \ No newline at end of file + + diff --git a/help/html/features/commandline.html b/help/html/features/commandline.html index fadddce..9927e4c 100644 --- a/help/html/features/commandline.html +++ b/help/html/features/commandline.html @@ -1,35 +1,52 @@ - -Running Jalview from the command line - -

    Running Jalview from the command line

    -

    Jalview is most easily run from the command line if you have built - it from source, or via the 'Jalview' executable created from the - InstallAnywhere jalview installation. Both of these mechanisms allow - true command line execution of jalview - allowing you to provide - additional options.

    -The Java Webstart version of - jalview can be executed from the command line using something like - : -

    javaws http://www.jalview.org/webstart/jalview.jnlp -open
    - yourFileName
    - But, this is not guaranteed to work on all versions of webstart on all - operating systems, and doesn't let you execute Jalview with any - additional parameters. -

    Running jalview from the InstallAnywhere - installation

    -

    If you install with InstallAnywhere you can use several more commands. - However, if you call the application with the link provided by InstallAnywhere - any output from the application will be sent to output.txt, not standard - out.
    - The jalview application also requires a number of additional - libraries on the class path. The command line below adds the Jalview - installation's 'lib' directory to the list of directories that are - searched for jars to be added to the classpath:

    -
    java -Djava.ext.dirs=$INSTALL_DIR$/lib -cp $INSTALL_DIR$/jalview.jar jalview.bin.Jalview -open [FILE] 
    -

    Use '-help' to get more information on the command line arguments that Jalview - accepts.

    -

     

    -

     

    - - + + +Running Jalview from the command line + +

    Running Jalview from the command line

    +

    Jalview is most easily run from the command line if you have built + it from source, or via the 'Jalview' executable created from the + InstallAnywhere jalview installation. Both of these mechanisms allow + true command line execution of jalview - allowing you to provide + additional options.

    +The Java Webstart version of + jalview can be executed from the command line using something like + : +

    javaws http://www.jalview.org/webstart/jalview.jnlp -open
    + yourFileName
    + But, this is not guaranteed to work on all versions of webstart on all + operating systems, and doesn't let you execute Jalview with any + additional parameters. +

    Running jalview from the InstallAnywhere + installation

    +

    If you install with InstallAnywhere you can use several more commands. + However, if you call the application with the link provided by InstallAnywhere + any output from the application will be sent to output.txt, not standard + out.
    + The jalview application also requires a number of additional + libraries on the class path. The command line below adds the Jalview + installation's 'lib' directory to the list of directories that are + searched for jars to be added to the classpath:

    +
    java -Djava.ext.dirs=$INSTALL_DIR$/lib -cp $INSTALL_DIR$/jalview.jar jalview.bin.Jalview -open [FILE] 
    +

    Use '-help' to get more information on the command line arguments that Jalview + accepts.

    +

     

    +

     

    + + diff --git a/help/html/features/creatinFeatures.html b/help/html/features/creatinFeatures.html index 0ebb52f..7c9c2a5 100644 --- a/help/html/features/creatinFeatures.html +++ b/help/html/features/creatinFeatures.html @@ -1,4 +1,21 @@ + Creating Sequence Features @@ -35,4 +52,4 @@ and then press OK to create the new features.

    Sequence Feature Creation was introduced in Jalview Version 2.2

    - \ No newline at end of file + diff --git a/help/html/features/cursorMode.html b/help/html/features/cursorMode.html index 579d886..091b364 100755 --- a/help/html/features/cursorMode.html +++ b/help/html/features/cursorMode.html @@ -1,4 +1,21 @@ + Cursor Mode diff --git a/help/html/features/dasfeatures.html b/help/html/features/dasfeatures.html index 853f6ef..9ef7e84 100644 --- a/help/html/features/dasfeatures.html +++ b/help/html/features/dasfeatures.html @@ -1,5 +1,21 @@ - + DAS Features diff --git a/help/html/features/dassettings.html b/help/html/features/dassettings.html index 2ca2b08..2b8e3af 100644 --- a/help/html/features/dassettings.html +++ b/help/html/features/dassettings.html @@ -1,13 +1,29 @@ - + DAS Settings

    DAS Settings

    -

    Jalview can retrieve sequences or features from many DAS sources at once. The DAS sources that +

    Jalview can retrieve sequences and features from many DAS sources. The DAS sources that it uses are discovered and selected via the DAS settings panel, opened either from the View→Feature Settings dialog box from the alignment window's menu bar, or the + Amending or Deleting Sequence Features diff --git a/help/html/features/featuresFormat.html b/help/html/features/featuresFormat.html index b7ddab5..27f9b17 100755 --- a/help/html/features/featuresFormat.html +++ b/help/html/features/featuresFormat.html @@ -1,5 +1,21 @@ - + Sequence Features File diff --git a/help/html/features/featureschemes.html b/help/html/features/featureschemes.html index 7e4e5d8..2cebf12 100644 --- a/help/html/features/featureschemes.html +++ b/help/html/features/featureschemes.html @@ -1,5 +1,21 @@ - + Sequence feature colour schemes diff --git a/help/html/features/featuresettings.html b/help/html/features/featuresettings.html index 6a89009..02d73d2 100755 --- a/help/html/features/featuresettings.html +++ b/help/html/features/featuresettings.html @@ -1,4 +1,21 @@ + Sequence Feature Settings Dialog Box diff --git a/help/html/features/groovy.html b/help/html/features/groovy.html index 3e7b0f4..30f3bb6 100644 --- a/help/html/features/groovy.html +++ b/help/html/features/groovy.html @@ -1,4 +1,21 @@ + Groovy Shell

    The Groovy Shell

    diff --git a/help/html/features/hiddenRegions.html b/help/html/features/hiddenRegions.html index aae73e8..0be7fa1 100644 --- a/help/html/features/hiddenRegions.html +++ b/help/html/features/hiddenRegions.html @@ -1,4 +1,21 @@ + Hidden Regions diff --git a/help/html/features/jalarchive.html b/help/html/features/jalarchive.html index 513f00d..2416916 100755 --- a/help/html/features/jalarchive.html +++ b/help/html/features/jalarchive.html @@ -1,21 +1,38 @@ - - -Jalview Archives - - - -

    Jalview Project Archives -

    - -

    These are java archives of an XML file containing alignments, trees and Jalview - display information. A data exchange standard is currently being developed, - so there is no stable schema yet, but Jalview web services will soon make use - of the same interchange format.

    -

    For those who want to know...
    - Jalview uses java classes automatically created using
    Castor. - Jalview 2.08 uses descriptor classes which significantly increase the speed - of marshalling / unmarshalling java objects into XML. Files created prior to - Jalview 2.08 can still be read in, but they will be saved in the new format. -

    - - + + + +Jalview Archives + + + +

    Jalview Project Archives +

    + +

    These are java archives of an XML file containing alignments, trees and Jalview + display information. A data exchange standard is currently being developed, + so there is no stable schema yet, but Jalview web services will soon make use + of the same interchange format.

    +

    For those who want to know...
    + Jalview uses java classes automatically created using Castor. + Jalview 2.08 uses descriptor classes which significantly increase the speed + of marshalling / unmarshalling java objects into XML. Files created prior to + Jalview 2.08 can still be read in, but they will be saved in the new format. +

    + + diff --git a/help/html/features/jmol.html b/help/html/features/jmol.html index c8335ff..48f6f02 100644 --- a/help/html/features/jmol.html +++ b/help/html/features/jmol.html @@ -1,4 +1,21 @@ + The Jmol PDB Viewer diff --git a/help/html/features/multipleViews.html b/help/html/features/multipleViews.html index a5dd959..33becc0 100644 --- a/help/html/features/multipleViews.html +++ b/help/html/features/multipleViews.html @@ -1,4 +1,21 @@ + Multiple Alignment Views diff --git a/help/html/features/newkeystrokes.html b/help/html/features/newkeystrokes.html index 12ea967..965059e 100644 --- a/help/html/features/newkeystrokes.html +++ b/help/html/features/newkeystrokes.html @@ -1,4 +1,21 @@ + New Key Strokes and Menus New Key Strokes and Menus diff --git a/help/html/features/overview.html b/help/html/features/overview.html index 56a26d8..ccd32de 100755 --- a/help/html/features/overview.html +++ b/help/html/features/overview.html @@ -1,12 +1,29 @@ - -Overview Window - -

    View→Overview window

    -

    Select the overview window menu item to get a navigable image of the whole alignment. -

    -

    The red box indicates the currently viewed region of the alignment, this - may be moved by clicking and dragging with the mouse.

    -

    -

     

    - - + + +Overview Window + +

    View→Overview window

    +

    Select the overview window menu item to get a navigable image of the whole alignment. +

    +

    The red box indicates the currently viewed region of the alignment, this + may be moved by clicking and dragging with the mouse.

    +

    +

     

    + + diff --git a/help/html/features/pdbviewer.html b/help/html/features/pdbviewer.html index fc69f9b..3e37920 100755 --- a/help/html/features/pdbviewer.html +++ b/help/html/features/pdbviewer.html @@ -1,4 +1,21 @@ + PDB Viewer diff --git a/help/html/features/preferences.html b/help/html/features/preferences.html index caa951e..fc1c30a 100755 --- a/help/html/features/preferences.html +++ b/help/html/features/preferences.html @@ -1,5 +1,21 @@ - + Preferences diff --git a/help/html/features/search.html b/help/html/features/search.html index 037c938..5b83b43 100755 --- a/help/html/features/search.html +++ b/help/html/features/search.html @@ -1,4 +1,21 @@ + Search - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    AAlaAlaninealiphatic
    - hydrophobic
    - neutral
    GCT
    - GCC
    - GCA
    - GCG
    B either aspartic acid or asparagine   
    CCysCysteinepolar
    - hydrophobic
    - neutral
    TGT
    - TGC
    DAspAspartic Acidpolar
    - hydrophilic
    - charged (-)
    GAT
    - GAC
    EGluGlutamic Acidpolar
    - hydrophilic
    - charged (-)
    GAA
    - GAG
    FPhePhenylalaninearomatic
    - hydrophobic
    - neutral
    TTT
    - TTC
    GGlyGlycine GGT
    - GGC
    - GGA
    - GGG
    HHisHistidinearomatic
    - polar
    - hydrophilic
    - charged (+)
    CAT
    - CAC
    IIleIsoleucinealiphatic
    - hydrophobic
    - neutral
    ATT
    - ATC
    - ATA
    KLysLysine AAA
    - AAG
    LLeuLeucinealiphatic
    - hydrophobic
    - neutral
    TTG
    - TTA
    - CTT
    - CTC
    - CTA
    - CTG
    MMetMethioninehydrophobic
    - neutral
    ATG
    NAsnAsparaginepolar
    - hydrophilic
    - neutral
    AAT
    - AAC
    PProProlinehydrophobic
    - neutral
    CCT
    - CCC
    - CCA
    - CCG
    QGlnGlutaminepolar
    - hydrophilic
    - neutral
    CAA
    - CAG
    RArgArgininepolar
    - hydrophilic
    - charged (+)
    CGT
    - CGC
    - CGA
    - CGG
    - AGA
    - AGG
    SSerSerinepolar
    - hydrophilic
    - neutral
    TCT
    - TCC
    - TCA
    - TCG
    - AGT
    - AGC
    TThrThreoninepolar
    - hydrophilic
    - neutral
    ACT
    - ACC
    - ACA
    - ACG
    VValValinealiphatic
    - hydrophobic
    - neutral
    GTT
    - GTC
    - GTA
    - GTG
    WTrpTryptophanaromatic
    - hydrophobic
    - neutral
    TGG
    X UNKNOWN   
    YTyrTyrosinearomatic
    - polar
    - hydrophobic
    TAT
    - TAC
    Z either glutamic acid or glutamine   
     EndTerminator TAA
    - TAG
    - TGA
     
    -
    - - + + +Amino Acids + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    AAlaAlaninealiphatic
    + hydrophobic
    + neutral
    GCT
    + GCC
    + GCA
    + GCG
    B either aspartic acid or asparagine   
    CCysCysteinepolar
    + hydrophobic
    + neutral
    TGT
    + TGC
    DAspAspartic Acidpolar
    + hydrophilic
    + charged (-)
    GAT
    + GAC
    EGluGlutamic Acidpolar
    + hydrophilic
    + charged (-)
    GAA
    + GAG
    FPhePhenylalaninearomatic
    + hydrophobic
    + neutral
    TTT
    + TTC
    GGlyGlycine GGT
    + GGC
    + GGA
    + GGG
    HHisHistidinearomatic
    + polar
    + hydrophilic
    + charged (+)
    CAT
    + CAC
    IIleIsoleucinealiphatic
    + hydrophobic
    + neutral
    ATT
    + ATC
    + ATA
    KLysLysine AAA
    + AAG
    LLeuLeucinealiphatic
    + hydrophobic
    + neutral
    TTG
    + TTA
    + CTT
    + CTC
    + CTA
    + CTG
    MMetMethioninehydrophobic
    + neutral
    ATG
    NAsnAsparaginepolar
    + hydrophilic
    + neutral
    AAT
    + AAC
    PProProlinehydrophobic
    + neutral
    CCT
    + CCC
    + CCA
    + CCG
    QGlnGlutaminepolar
    + hydrophilic
    + neutral
    CAA
    + CAG
    RArgArgininepolar
    + hydrophilic
    + charged (+)
    CGT
    + CGC
    + CGA
    + CGG
    + AGA
    + AGG
    SSerSerinepolar
    + hydrophilic
    + neutral
    TCT
    + TCC
    + TCA
    + TCG
    + AGT
    + AGC
    TThrThreoninepolar
    + hydrophilic
    + neutral
    ACT
    + ACC
    + ACA
    + ACG
    VValValinealiphatic
    + hydrophobic
    + neutral
    GTT
    + GTC
    + GTA
    + GTG
    WTrpTryptophanaromatic
    + hydrophobic
    + neutral
    TGG
    X UNKNOWN   
    YTyrTyrosinearomatic
    + polar
    + hydrophobic
    TAT
    + TAC
    Z either glutamic acid or glutamine   
     EndTerminator TAA
    + TAG
    + TGA
     
    +
    + + diff --git a/help/html/misc/geneticCode.html b/help/html/misc/geneticCode.html index cb7f797..8e0a35b 100755 --- a/help/html/misc/geneticCode.html +++ b/help/html/misc/geneticCode.html @@ -1,75 +1,92 @@ - -Genetic Code - - - - - - -
    -

    The Genetic Code

    - - - - - - - - - - - -
     2nd Position 

    1st Position

    -

    (5' end)

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    U

    C

    A

    G

    U

    Phe
    Phe
    Leu
    Leu
    Ser
    Ser
    Ser
    Ser
    Tyr
    Tyr
    STOP
    STOP
    Cys
    Cys
    STOP
    Trp
    U
    C
    A
    G

    C

    Leu
    Leu
    Leu
    Leu
    Pro
    Pro
    Pro
    Pro
    His
    His
    Gln
    Gln
    Arg
    Arg
    Arg
    Arg
    U
    C
    A
    G

    A

    Ile
    Ile
    Ile
    Met
    Thr
    Thr
    Thr
    Thr
    Asn
    Asn
    Lys
    Lys
    Ser
    Ser
    Arg
    Arg
    U
    C
    A
    G

    G

    Val
    Val
    Val
    Val
    Ala
    Ala
    Ala
    Ala
    Asp
    Asp
    Glu
    Glu
    Gly
    Gly
    Gly
    Gly
    U
    C
    A
    G

    3rd Position

    -

    (3'end)

    -
    - - + + +Genetic Code + + + + + + +
    +

    The Genetic Code

    + + + + + + + + + + + +
     2nd Position 

    1st Position

    +

    (5' end)

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    U

    C

    A

    G

    U

    Phe
    Phe
    Leu
    Leu
    Ser
    Ser
    Ser
    Ser
    Tyr
    Tyr
    STOP
    STOP
    Cys
    Cys
    STOP
    Trp
    U
    C
    A
    G

    C

    Leu
    Leu
    Leu
    Leu
    Pro
    Pro
    Pro
    Pro
    His
    His
    Gln
    Gln
    Arg
    Arg
    Arg
    Arg
    U
    C
    A
    G

    A

    Ile
    Ile
    Ile
    Met
    Thr
    Thr
    Thr
    Thr
    Asn
    Asn
    Lys
    Lys
    Ser
    Ser
    Arg
    Arg
    U
    C
    A
    G

    G

    Val
    Val
    Val
    Val
    Ala
    Ala
    Ala
    Ala
    Asp
    Asp
    Glu
    Glu
    Gly
    Gly
    Gly
    Gly
    U
    C
    A
    G

    3rd Position

    +

    (3'end)

    +
    + + diff --git a/help/html/privacy.html b/help/html/privacy.html index 11728a5..e6ee74d 100644 --- a/help/html/privacy.html +++ b/help/html/privacy.html @@ -1,4 +1,21 @@ + Jalview Privacy Statement @@ -56,4 +73,4 @@ web-based bioinformatics resources. However, we can't take any responsibility for the integrity of any external services you might access via the program. Sorry!

    - \ No newline at end of file + diff --git a/help/html/releases.html b/help/html/releases.html index 6ee6480..724996d 100755 --- a/help/html/releases.html +++ b/help/html/releases.html @@ -1,4 +1,21 @@ + Release History diff --git a/help/html/vamsas/index.html b/help/html/vamsas/index.html index d9b5cb8..fa94436 100644 --- a/help/html/vamsas/index.html +++ b/help/html/vamsas/index.html @@ -1,119 +1,136 @@ - - -VAMSAS Interoperation - - -

    VAMSAS Interoperation

    -

    Jalview can interact with other applications using "the VAMSAS -Interoperation framework" which is an experimental model for -interoperation between bioinformatics applications (Visualization -and Analysis of Molecular Sequences, -Alignements and Structures). -Currently, the only other VAMSAS enabled application is TOPALi - a user friendly program for -phylogenetics and evolutionary analysis. -

    VAMSAS enabled applications access a shared bioinformatics -dataset containing sequences, alignments, annotation and trees, which -can be represented by an XML document analogous to a Jalview Project Archive.

    -
    -Connecting to a VAMSAS session
    -The VAMSAS functionality in Jalview is accessed through the Desktop's Vamsas -menu. The options available in this menu depend on whether the -application is currently interacting with a VAMSAS dataset in a VAMSAS -session. When the application is not connected to a session is active, -the menu options are as follows:
    -
      -
    • Connect to an existing session
      - If visible, this submenu contains a list of existing sessions that the - VAMSAS framework has discovered on your computer.
      - Choose one to connect to it.
    • -
    • New VAMSAS Session
      - This option will create a new session on your computer.
    • -
    • Load VAMSAS Session...
      - This option will open a file browser window allowing you to select a - VAMSAS session archive from which a new session will be created.
      - New in 2.5:Sessions created from an imported document inherit - the file or URL for the document.
    • - -
    -
    -VAMSAS and Firewalls: VAMSAS uses sockets to -communicate between different programs. This means that after starting a -session, your firewall software may ask you whether to allow the java -executable access to the internet (port 53782). If you do not allow -this, messages will not be exchanged with other VAMSAS applications.
    -
    -Once you have successfully connected to a VAMSAS session, any data made -available by other VAMSAS applications will be automatically imported -into Jalview. However, in order to share the data in Jalview with other -VAMSAS applications, you must manually select the Vamsas→"Session -Update" entry that is visible when a session is active. Selecting -this option will update the VAMSAS session document, with the data -loaded into Jalview. Any new alignments, trees and annotation will be -written to the session, in addition to any edits you have made to data -originally stored in the document.
    -Saving the current session
    -You can save the current session as a VAMSAS Session archive using the Vamsas→"Session -Update". The file contains a snapshot of the current VAMSAS -session, including data from any other applications connected to the -session. Leaving a VAMSAS session
    -A session can be disconnected from at any time using the Vamsas→"Stop -Session" option. Selecting this option will only disconnect Jalview -from the session - any other applications will remain connected to the -session. If Jalview is the only application connected to the session and -you have not yet saved the VAMSAS session then you will be prompted with -an optional 'Save VAMSAS session...' dialog box, allowing the session to -be saved and returned to at a later date.
    -VAMSAS Session Persistence
    -VAMSAS sessions are persistent - this means that they exist -independently of any VAMSAS applications that are connected to them. -This means that if something goes wrong with a VAMSAS application and it -crashes or otherwise fails, the VAMSAS session it is connected to will -(hopefully) be unaffected. For instance, if Jalview is killed or crashes -whilst it is still connected to a session, that session can be recovered -in a new Jalview instance using the Vamsas→"Existing -session" sub menu.

    -A quick Demo -
    -Jalview can talk to itself through VAMSAS. Simply start two copies of -the application, create a new vamsas session in one, and connect to the -new session in the other. Then load your data into one of the -applications, and use the -Vamsas→"Session Update" -menu entry to try to propagate the data to the other application. -
    - - - - - - - - - - - - - - - - - - - - - -
    Data Sharing CapabilityJalview Version
    Alignments, sequences and annotation, trees, database - references, cDNA/protein mappings.2.4
    Mouseover location across linked DNA, protein and structure - positions.2.4
    Jalview project settings (Multiple views, groups, tree - partitions, colouring, window positions)2.5
    Sequence region and column selections2.5
    -
    -

    Version 0.2 of the VAMSAS client library is used in Jalview -2.5. For further details about the VAMSAS framework, please check the -VAMSAS website. The VAMSAS -framework is implemented as a Java 1.4 Library and depends on a number -of other open source projects. Its source is released under the -LGPL license.  

    - - + + + +VAMSAS Interoperation + + +

    VAMSAS Interoperation

    +

    Jalview can interact with other applications using "the VAMSAS +Interoperation framework" which is an experimental model for +interoperation between bioinformatics applications (Visualization +and Analysis of Molecular Sequences, +Alignements and Structures). +Currently, the only other VAMSAS enabled application is TOPALi - a user friendly program for +phylogenetics and evolutionary analysis. +

    VAMSAS enabled applications access a shared bioinformatics +dataset containing sequences, alignments, annotation and trees, which +can be represented by an XML document analogous to a Jalview Project Archive.

    +
    +Connecting to a VAMSAS session
    +The VAMSAS functionality in Jalview is accessed through the Desktop's Vamsas +menu. The options available in this menu depend on whether the +application is currently interacting with a VAMSAS dataset in a VAMSAS +session. When the application is not connected to a session is active, +the menu options are as follows:
    +
      +
    • Connect to an existing session
      + If visible, this submenu contains a list of existing sessions that the + VAMSAS framework has discovered on your computer.
      + Choose one to connect to it.
    • +
    • New VAMSAS Session
      + This option will create a new session on your computer.
    • +
    • Load VAMSAS Session...
      + This option will open a file browser window allowing you to select a + VAMSAS session archive from which a new session will be created.
      + New in 2.5:Sessions created from an imported document inherit + the file or URL for the document.
    • + +
    +
    +VAMSAS and Firewalls: VAMSAS uses sockets to +communicate between different programs. This means that after starting a +session, your firewall software may ask you whether to allow the java +executable access to the internet (port 53782). If you do not allow +this, messages will not be exchanged with other VAMSAS applications.
    +
    +Once you have successfully connected to a VAMSAS session, any data made +available by other VAMSAS applications will be automatically imported +into Jalview. However, in order to share the data in Jalview with other +VAMSAS applications, you must manually select the Vamsas→"Session +Update" entry that is visible when a session is active. Selecting +this option will update the VAMSAS session document, with the data +loaded into Jalview. Any new alignments, trees and annotation will be +written to the session, in addition to any edits you have made to data +originally stored in the document.
    +Saving the current session
    +You can save the current session as a VAMSAS Session archive using the Vamsas→"Session +Update". The file contains a snapshot of the current VAMSAS +session, including data from any other applications connected to the +session. Leaving a VAMSAS session
    +A session can be disconnected from at any time using the Vamsas→"Stop +Session" option. Selecting this option will only disconnect Jalview +from the session - any other applications will remain connected to the +session. If Jalview is the only application connected to the session and +you have not yet saved the VAMSAS session then you will be prompted with +an optional 'Save VAMSAS session...' dialog box, allowing the session to +be saved and returned to at a later date.
    +VAMSAS Session Persistence
    +VAMSAS sessions are persistent - this means that they exist +independently of any VAMSAS applications that are connected to them. +This means that if something goes wrong with a VAMSAS application and it +crashes or otherwise fails, the VAMSAS session it is connected to will +(hopefully) be unaffected. For instance, if Jalview is killed or crashes +whilst it is still connected to a session, that session can be recovered +in a new Jalview instance using the Vamsas→"Existing +session" sub menu.

    +A quick Demo +
    +Jalview can talk to itself through VAMSAS. Simply start two copies of +the application, create a new vamsas session in one, and connect to the +new session in the other. Then load your data into one of the +applications, and use the +Vamsas→"Session Update" +menu entry to try to propagate the data to the other application. +
    + + + + + + + + + + + + + + + + + + + + + +
    Data Sharing CapabilityJalview Version
    Alignments, sequences and annotation, trees, database + references, cDNA/protein mappings.2.4
    Mouseover location across linked DNA, protein and structure + positions.2.4
    Jalview project settings (Multiple views, groups, tree + partitions, colouring, window positions)2.5
    Sequence region and column selections2.5
    +
    +

    Version 0.2 of the VAMSAS client library is used in Jalview +2.5. For further details about the VAMSAS framework, please check the +VAMSAS website. The VAMSAS +framework is implemented as a Java 1.4 Library and depends on a number +of other open source projects. Its source is released under the +LGPL license.  

    + + diff --git a/help/html/webServices/clustalw.html b/help/html/webServices/clustalw.html index 96b45b7..73cf971 100755 --- a/help/html/webServices/clustalw.html +++ b/help/html/webServices/clustalw.html @@ -1,28 +1,45 @@ - -ClustalW Alignment - -

    ClustalW Alignments

    -

    ClustalW is a program for multiple sequence alignment. It works -with both DNA and protein sequences, and can also perform profile -profile alignments to align two or more multiple sequence -alignments.

    -

    -Thompson, J.D., Higgins, D.G. and Gibson, T.J. (1994)
    -CLUSTAL W: improving the sensitivity of progressive multiple -sequence alignment through sequence weighting, position specific gap -penalties and weight matrix choice.
    -Nucleic Acids Research 22 4673-4680 -

    -

    There are two versions of this alignment function, which will operate -on the selected region, if any, or the whole sequence set:

    -
      -
    • Web Service→Alignment→ClustalW Multiple Sequence Alignment
      - Aligns using the clustalW program, ignoring any gaps in the submitted sequence - set.
    • -
    • Web Service→Alignment→ClustalW Mulitple Sequence Alignment - Realign
      - Submits the sequences with existing gaps to clustalW, which will preserve - existing gaps and re-align those regions which are not optimal.
    • -
    - - + + +ClustalW Alignment + +

    ClustalW Alignments

    +

    ClustalW is a program for multiple sequence alignment. It works +with both DNA and protein sequences, and can also perform profile +profile alignments to align two or more multiple sequence +alignments.

    +

    +Thompson, J.D., Higgins, D.G. and Gibson, T.J. (1994)
    +CLUSTAL W: improving the sensitivity of progressive multiple +sequence alignment through sequence weighting, position specific gap +penalties and weight matrix choice.
    +Nucleic Acids Research 22 4673-4680 +

    +

    There are two versions of this alignment function, which will operate +on the selected region, if any, or the whole sequence set:

    +
      +
    • Web Service→Alignment→ClustalW Multiple Sequence Alignment
      + Aligns using the clustalW program, ignoring any gaps in the submitted sequence + set.
    • +
    • Web Service→Alignment→ClustalW Mulitple Sequence Alignment + Realign
      + Submits the sequences with existing gaps to clustalW, which will preserve + existing gaps and re-align those regions which are not optimal.
    • +
    + + diff --git a/help/html/webServices/dbreffetcher.html b/help/html/webServices/dbreffetcher.html index 7f7ec10..3b799f8 100644 --- a/help/html/webServices/dbreffetcher.html +++ b/help/html/webServices/dbreffetcher.html @@ -1,4 +1,21 @@ + Database Reference Fetching @@ -57,4 +74,4 @@ Name). retrieval process.
  • - \ No newline at end of file + diff --git a/help/html/webServices/index.html b/help/html/webServices/index.html index 815448b..c5d6028 100755 --- a/help/html/webServices/index.html +++ b/help/html/webServices/index.html @@ -1,4 +1,21 @@ + Web Services diff --git a/help/html/webServices/jnet.html b/help/html/webServices/jnet.html index 114fc33..bfb1183 100755 --- a/help/html/webServices/jnet.html +++ b/help/html/webServices/jnet.html @@ -1,4 +1,21 @@ + JNet Secondary Structure Prediction diff --git a/help/html/webServices/mafft.html b/help/html/webServices/mafft.html index 4ee0237..d379e03 100644 --- a/help/html/webServices/mafft.html +++ b/help/html/webServices/mafft.html @@ -1,18 +1,35 @@ - -MAFFT Multiple Sequence Alignments - -

    MAFFT Multiple Sequence Alignments

    -

    Katoh, K., K. Kuma, K., Toh, H., and Miyata, T. (2005) "MAFFT version - 5: improvement in accuracy of multiple sequence alignment." Nucleic Acids - Research, 33 511-518

    -

    MAFFT is a program for the multiple alignment of nucleic acid or protein -sequences, and is available from the Web -Service→Alignment→MAFFT Multiple Sequence -Alignment entry in the web services menu.

    -

    MAFFT utilizes algorithms for spectral correlation to identify -homologous regions in a fast-fourier transform representation of each -sequence. The Jalview web service runs MAFFT using the -'--auto' option which picks optimal parameters -for the set of sequences to be aligned.

    - - + + +MAFFT Multiple Sequence Alignments + +

    MAFFT Multiple Sequence Alignments

    +

    Katoh, K., K. Kuma, K., Toh, H., and Miyata, T. (2005) "MAFFT version + 5: improvement in accuracy of multiple sequence alignment." Nucleic Acids + Research, 33 511-518

    +

    MAFFT is a program for the multiple alignment of nucleic acid or protein +sequences, and is available from the Web +Service→Alignment→MAFFT Multiple Sequence +Alignment entry in the web services menu.

    +

    MAFFT utilizes algorithms for spectral correlation to identify +homologous regions in a fast-fourier transform representation of each +sequence. The Jalview web service runs MAFFT using the +'--auto' option which picks optimal parameters +for the set of sequences to be aligned.

    + + diff --git a/help/html/webServices/msaclient.html b/help/html/webServices/msaclient.html index 6fea43e..246bfcc 100644 --- a/help/html/webServices/msaclient.html +++ b/help/html/webServices/msaclient.html @@ -1,38 +1,55 @@ - - -Multiple Sequence Alignment Web Service - - -Multiple Sequence Alignment Web Services -

    -Multiple sequence alignment services are accessed from the Web -Service→Alignment menu. When an entry from this menu is -selected, either the currently selected residues, or the whole -sequence set (if there is no selection or only one sequence is -selected) will be submitted for multiple sequence alignment. -

    -

    There are two kinds of multiple sequence alignment operations -available:

      -
    • alignment - where a new alignment is constructed from the input -
    • -
    • realignment - -where any existing alignments in the input are passed to the service -for profile based alignment. -
    • -
    -

    -

    -Multiple Alignments of Sequences with hidden columns
    -Multiple alignment services are 'column separable' analysis -operations. If the input contains hidden columns then each -visible segment of the input sequence set will be submitted for -alignment separately, and the results concatenated (with the hidden -regions preserved) once all alignment functions have completed. Each -sub-job's state is reported in its own tab: -

    Multiple Multiple Sequence Alignment sub jobs running at -once

    -
    -

    - - + + + +Multiple Sequence Alignment Web Service + + +Multiple Sequence Alignment Web Services +

    +Multiple sequence alignment services are accessed from the Web +Service→Alignment menu. When an entry from this menu is +selected, either the currently selected residues, or the whole +sequence set (if there is no selection or only one sequence is +selected) will be submitted for multiple sequence alignment. +

    +

    There are two kinds of multiple sequence alignment operations +available:

      +
    • alignment - where a new alignment is constructed from the input +
    • +
    • realignment - +where any existing alignments in the input are passed to the service +for profile based alignment. +
    • +
    +

    +

    +Multiple Alignments of Sequences with hidden columns
    +Multiple alignment services are 'column separable' analysis +operations. If the input contains hidden columns then each +visible segment of the input sequence set will be submitted for +alignment separately, and the results concatenated (with the hidden +regions preserved) once all alignment functions have completed. Each +sub-job's state is reported in its own tab: +

    Multiple Multiple Sequence Alignment sub jobs running at +once

    +
    +

    + + diff --git a/help/html/webServices/muscle.html b/help/html/webServices/muscle.html index 2745899..ba7f762 100755 --- a/help/html/webServices/muscle.html +++ b/help/html/webServices/muscle.html @@ -1,14 +1,31 @@ - -Muscle Alignment - -

    Muscle Alignments

    -

    Muscle is a program for the alignment of many protein sequences.

    -

    -Edgar, Robert C. (2004), MUSCLE: multiple sequence alignment with high -accuracy and high throughput
    -Nucleic Acids Research 32(5), 1792-97.

    -

    This alignment method is applied to the selected region, if any, or the whole - sequence set when the Web Service→Alignment→Muscle - Protein Sequence Alignment menu item is selected.

    - - + + +Muscle Alignment + +

    Muscle Alignments

    +

    Muscle is a program for the alignment of many protein sequences.

    +

    +Edgar, Robert C. (2004), MUSCLE: multiple sequence alignment with high +accuracy and high throughput
    +Nucleic Acids Research 32(5), 1792-97.

    +

    This alignment method is applied to the selected region, if any, or the whole + sequence set when the Web Service→Alignment→Muscle + Protein Sequence Alignment menu item is selected.

    + + diff --git a/help/html/webServices/urllinks.html b/help/html/webServices/urllinks.html index e4fdac7..6344449 100644 --- a/help/html/webServices/urllinks.html +++ b/help/html/webServices/urllinks.html @@ -1,4 +1,21 @@ + Opening URLs from Jalview @@ -69,4 +86,4 @@ of the regular expression will be used to generate the URL:

    - \ No newline at end of file + diff --git a/help/html/whatsNew.html b/help/html/whatsNew.html index a090673..e2c6cdb 100755 --- a/help/html/whatsNew.html +++ b/help/html/whatsNew.html @@ -1,4 +1,21 @@ + What's new ? diff --git a/jalview-jalopy.xml b/jalview-jalopy.xml index 7008872..9ee240f 100755 --- a/jalview-jalopy.xml +++ b/jalview-jalopy.xml @@ -1,376 +1,411 @@ - - - - - 14 - - - - - true - - - [A-Z][a-zA-Z0-9]+ - [A-Z][a-zA-Z0-9]+ - - - [a-z][\w]+ - [a-z][\w]+ - [a-zA-Z][\w]+ - [a-z][\w]+ - [a-z][\w]+ - [a-zA-Z][\w]+ - [a-z][\w]+ - [a-z][\w]+ - [a-zA-Z][\w]+ - [a-z][\w]+ - [a-z][\w]+ - [a-zA-Z][\w]+ - - [A-Z][a-zA-Z0-9]+ - \w+ - - [a-z][\w]+ - [a-z][\w]+ - [a-z][\w]+ - [a-z][\w]+ - [a-z][\w]+ - [a-z][\w]+ - [a-z][\w]+ - [a-z][\w]+ - [a-z][\w]+ - [a-z][\w]+ - [a-z][\w]+ - [a-z][\w]+ - - [a-z]+(?:\.[a-z]+)* - - [a-z][\w]+ - [a-z][\w]+ - - [a-z][\w]* - - - false - false - false - false - false - false - false - false - false - false - false - false - false - false - false - false - false - false - - - - 6 - - - - 30000 - 30000 - 30000 - 30000 - 30000 - 30000 - - true - - - 1 - - - - true - false - true - false - false - - - bak - 1 - - - - 1 - 0 - 1 - 0 -
    1
    -
    0
    - 1 - 2 - 1 - 1 -
    - - 1 - 0 - 1 - - 1 - 1 - 1 - - 1 - 1 -
    0
    -
    0
    -
    - 1 -
    - - - false - false - - - false - false - true - false - - - true - false - false - false - false - - - false - false - - - - true - true - - - - false - - - - true - true - true - - true - - 5 - 5 - 5 - 5 - - false - - - - - - - */ - * @throws $exceptionType$ TODO: DOCUMENT ME! - * @param $paramType$ TODO: DOCUMENT ME! - * @return TODO: DOCUMENT ME! - /**| * TODO: DOCUMENT ME! - - - - - false - false - false - - - - - false - false - - Inner Classes - Constructors - Instance fields - Instance initializers - Inner Interfaces - Methods - Static fields/initializers - - - - -
    - - 0 - false -
    -
    - - 0 - false -
    - - disabled - - - - 3 - *:0|gnu:2|java:2|javax:2 - - disabled - true - - - true - - true - false - - true - - - false - - - 1 - 1 - 0 - 1 - 4 - 55 - -1 - 4 - -1 - 0 - 8 - -1 - 1 - - - false - false - - - - false - false - true - false - true - false - - - - false - false - false - false - false - static|field|initializer|constructor|method|interface|class - false - - - false - public|protected|private|abstract|static|final|synchronized|transient|volatile|native|strictfp - - - - - true - true - true - - - true - false - false - false - - false - - - false - false - true - - - - true - false - - true - true - true - true - true - true - - false - false - - - - - - 0 - false - false - false - - false - - false - false - - false - - - false - false - false - false - - - false - false - false - - - - true - true - 80 - - - - false - false - false - - false - false - false - - - - false - - false - - -
    -
    - + + Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) + Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA +-------------------------------------------------------------------------------> + + + + + 14 + + + + + true + + + [A-Z][a-zA-Z0-9]+ + [A-Z][a-zA-Z0-9]+ + + + [a-z][\w]+ + [a-z][\w]+ + [a-zA-Z][\w]+ + [a-z][\w]+ + [a-z][\w]+ + [a-zA-Z][\w]+ + [a-z][\w]+ + [a-z][\w]+ + [a-zA-Z][\w]+ + [a-z][\w]+ + [a-z][\w]+ + [a-zA-Z][\w]+ + + [A-Z][a-zA-Z0-9]+ + \w+ + + [a-z][\w]+ + [a-z][\w]+ + [a-z][\w]+ + [a-z][\w]+ + [a-z][\w]+ + [a-z][\w]+ + [a-z][\w]+ + [a-z][\w]+ + [a-z][\w]+ + [a-z][\w]+ + [a-z][\w]+ + [a-z][\w]+ + + [a-z]+(?:\.[a-z]+)* + + [a-z][\w]+ + [a-z][\w]+ + + [a-z][\w]* + + + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 6 + + + + 30000 + 30000 + 30000 + 30000 + 30000 + 30000 + + true + + + 1 + + + + true + false + true + false + false + + + bak + 1 + + + + 1 + 0 + 1 + 0 +
    1
    +
    0
    + 1 + 2 + 1 + 1 +
    + + 1 + 0 + 1 + + 1 + 1 + 1 + + 1 + 1 +
    0
    +
    0
    +
    + 1 +
    + + + false + false + + + false + false + true + false + + + true + false + false + false + false + + + false + false + + + + true + true + + + + false + + + + true + true + true + + true + + 5 + 5 + 5 + 5 + + false + + + + + + + */ + * @throws $exceptionType$ TODO: DOCUMENT ME! + * @param $paramType$ TODO: DOCUMENT ME! + * @return TODO: DOCUMENT ME! + /**| * TODO: DOCUMENT ME! + + + + + false + false + false + + + - + false + false + + Inner Classes + Constructors + Instance fields + Instance initializers + Inner Interfaces + Methods + Static fields/initializers + + + + +
    + + 0 + false +
    +
    + + 0 + false +
    + + disabled + + + + 3 + *:0|gnu:2|java:2|javax:2 + + disabled + true + + + true + + true + false + + true + + + false + + + 1 + 1 + 0 + 1 + 4 + 55 + -1 + 4 + -1 + 0 + 8 + -1 + 1 + + + false + false + + + + false + false + true + false + true + false + + + + false + false + false + false + false + static|field|initializer|constructor|method|interface|class + false + + + false + public|protected|private|abstract|static|final|synchronized|transient|volatile|native|strictfp + + + + + true + true + true + + + true + false + false + false + + false + + + false + false + true + + + + true + false + + true + true + true + true + true + true + + false + false + + + + + + 0 + false + false + false + + false + + false + false + + false + + + false + false + false + false + + + false + false + false + + + + true + true + 80 + + + + false + false + false + + false + false + false + + + + false + + false + + +
    +
    + diff --git a/resources/embl_mapping.xml b/resources/embl_mapping.xml index c203c71..68fc065 100644 --- a/resources/embl_mapping.xml +++ b/resources/embl_mapping.xml @@ -1,21 +1,20 @@ diff --git a/resources/uniprot_mapping.xml b/resources/uniprot_mapping.xml index 5664440..2bf79ab 100755 --- a/resources/uniprot_mapping.xml +++ b/resources/uniprot_mapping.xml @@ -1,21 +1,20 @@ diff --git a/src/MCview/AppletPDBCanvas.java b/src/MCview/AppletPDBCanvas.java index fa33c6c..6be8dd5 100755 --- a/src/MCview/AppletPDBCanvas.java +++ b/src/MCview/AppletPDBCanvas.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package MCview; diff --git a/src/MCview/AppletPDBViewer.java b/src/MCview/AppletPDBViewer.java index 8be34b7..29d1e01 100755 --- a/src/MCview/AppletPDBViewer.java +++ b/src/MCview/AppletPDBViewer.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package MCview; diff --git a/src/MCview/Atom.java b/src/MCview/Atom.java index 08b237b..8e5cc4d 100755 --- a/src/MCview/Atom.java +++ b/src/MCview/Atom.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package MCview; diff --git a/src/MCview/Bond.java b/src/MCview/Bond.java index 32727f3..a71ca0e 100755 --- a/src/MCview/Bond.java +++ b/src/MCview/Bond.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package MCview; @@ -47,8 +46,8 @@ public class Bond /* * public Bond(Bond bond) { this.start = new float[3]; * - * this.start[0] = bond.start[0]; this.start[1] = bond.start[1]; this.start[2] = - * bond.start[2]; + * this.start[0] = bond.start[0]; this.start[1] = bond.start[1]; this.start[2] + * = bond.start[2]; * * this.end = new float[3]; * diff --git a/src/MCview/MCMatrix.java b/src/MCview/MCMatrix.java index 252e8f1..bc5ac25 100755 --- a/src/MCview/MCMatrix.java +++ b/src/MCview/MCMatrix.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package MCview; diff --git a/src/MCview/PDBCanvas.java b/src/MCview/PDBCanvas.java index 016cd66..b3148df 100755 --- a/src/MCview/PDBCanvas.java +++ b/src/MCview/PDBCanvas.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package MCview; diff --git a/src/MCview/PDBChain.java b/src/MCview/PDBChain.java index a556137..2eaf8a3 100755 --- a/src/MCview/PDBChain.java +++ b/src/MCview/PDBChain.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package MCview; @@ -116,7 +115,7 @@ public class PDBChain * * @param seq * @param status - * The Status of the transferred annotation + * The Status of the transferred annotation * @return the features added to sq (or its dataset) */ public SequenceFeature[] transferRESNUMFeatures(SequenceI seq, @@ -134,8 +133,8 @@ public class PDBChain /** * Remove any existing features for this chain if they exist ? * SequenceFeature[] seqsfeatures=seq.getSequenceFeatures(); int - * totfeat=seqsfeatures.length; // Remove any features for this exact chain ? - * for (int i=0; i62) + if (line.length() > 62) { String tid; - if (line.length()>67) { + if (line.length() > 67) + { tid = line.substring(62, 67).trim(); - } else { - tid=line.substring(62).trim(); } - if (tid.length()>0) + else + { + tid = line.substring(62).trim(); + } + if (tid.length() > 0) { id = tid; } @@ -124,7 +127,7 @@ public class PDBfile extends jalview.io.AlignFile { if (tmpatom.resNumIns.trim().equals(lastID)) { - // phosphorylated protein - seen both CA and P.. + // phosphorylated protein - seen both CA and P.. continue; } tmpchain.atoms.addElement(tmpatom); @@ -157,10 +160,15 @@ public class PDBfile extends jalview.io.AlignFile { entry.setFile(inFile.getAbsolutePath()); } + else + { + // TODO: decide if we should dump the datasource to disk + entry.setFile(getDataName()); + } dataset.addPDBId(entry); SequenceI chainseq = dataset.deriveSequence(); // PDBChain objects - // maintain reference to - // dataset + // maintain reference to + // dataset seqs.addElement(chainseq); AlignmentAnnotation[] chainannot = chainseq.getAnnotation(); if (chainannot != null) @@ -179,6 +187,22 @@ public class PDBfile extends jalview.io.AlignFile } } + /** + * make a friendly ID string. + * + * @param dataName + * @return truncated dataName to after last '/' + */ + private String safeName(String dataName) + { + int p = 0; + while ((p = dataName.indexOf("/")) > -1 && p < dataName.length()) + { + dataName = dataName.substring(p + 1); + } + return dataName; + } + public void makeResidueList() { for (int i = 0; i < chains.size(); i++) diff --git a/src/MCview/Residue.java b/src/MCview/Residue.java index 6e95c89..9485e94 100755 --- a/src/MCview/Residue.java +++ b/src/MCview/Residue.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package MCview; diff --git a/src/MCview/Zsort.java b/src/MCview/Zsort.java index ce24fce..066387d 100755 --- a/src/MCview/Zsort.java +++ b/src/MCview/Zsort.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package MCview; diff --git a/src/ext/vamsas/IRegistry.java b/src/ext/vamsas/IRegistry.java index 949e7fc..7fa56d7 100755 --- a/src/ext/vamsas/IRegistry.java +++ b/src/ext/vamsas/IRegistry.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package ext.vamsas; diff --git a/src/ext/vamsas/IRegistryService.java b/src/ext/vamsas/IRegistryService.java index f8869b9..179ef10 100755 --- a/src/ext/vamsas/IRegistryService.java +++ b/src/ext/vamsas/IRegistryService.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package ext.vamsas; diff --git a/src/ext/vamsas/IRegistryServiceLocator.java b/src/ext/vamsas/IRegistryServiceLocator.java index 0e65f45..8c7ea46 100755 --- a/src/ext/vamsas/IRegistryServiceLocator.java +++ b/src/ext/vamsas/IRegistryServiceLocator.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package ext.vamsas; diff --git a/src/ext/vamsas/Jpred.java b/src/ext/vamsas/Jpred.java index d0d7e7f..e708c57 100755 --- a/src/ext/vamsas/Jpred.java +++ b/src/ext/vamsas/Jpred.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package ext.vamsas; diff --git a/src/ext/vamsas/JpredService.java b/src/ext/vamsas/JpredService.java index 81cdc00..d21fb7f 100755 --- a/src/ext/vamsas/JpredService.java +++ b/src/ext/vamsas/JpredService.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package ext.vamsas; diff --git a/src/ext/vamsas/JpredServiceLocator.java b/src/ext/vamsas/JpredServiceLocator.java index 8ed095b..8843536 100755 --- a/src/ext/vamsas/JpredServiceLocator.java +++ b/src/ext/vamsas/JpredServiceLocator.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package ext.vamsas; diff --git a/src/ext/vamsas/JpredSoapBindingStub.java b/src/ext/vamsas/JpredSoapBindingStub.java index 47a39dc..0579fa8 100755 --- a/src/ext/vamsas/JpredSoapBindingStub.java +++ b/src/ext/vamsas/JpredSoapBindingStub.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package ext.vamsas; diff --git a/src/ext/vamsas/MuscleWS.java b/src/ext/vamsas/MuscleWS.java index 97fe420..8b2421b 100755 --- a/src/ext/vamsas/MuscleWS.java +++ b/src/ext/vamsas/MuscleWS.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ /* * Jalview - A Sequence Alignment Editor and Viewer diff --git a/src/ext/vamsas/MuscleWSService.java b/src/ext/vamsas/MuscleWSService.java index 2f4bf33..727c991 100755 --- a/src/ext/vamsas/MuscleWSService.java +++ b/src/ext/vamsas/MuscleWSService.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ /* * Jalview - A Sequence Alignment Editor and Viewer diff --git a/src/ext/vamsas/MuscleWSServiceLocator.java b/src/ext/vamsas/MuscleWSServiceLocator.java index 56c6f84..859a778 100755 --- a/src/ext/vamsas/MuscleWSServiceLocator.java +++ b/src/ext/vamsas/MuscleWSServiceLocator.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ /* * Jalview - A Sequence Alignment Editor and Viewer diff --git a/src/ext/vamsas/MuscleWSSoapBindingStub.java b/src/ext/vamsas/MuscleWSSoapBindingStub.java index 3741a2d..af62723 100755 --- a/src/ext/vamsas/MuscleWSSoapBindingStub.java +++ b/src/ext/vamsas/MuscleWSSoapBindingStub.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ /* * Jalview - A Sequence Alignment Editor and Viewer diff --git a/src/ext/vamsas/RegistryServiceSoapBindingStub.java b/src/ext/vamsas/RegistryServiceSoapBindingStub.java index 02c0042..0b0028a 100755 --- a/src/ext/vamsas/RegistryServiceSoapBindingStub.java +++ b/src/ext/vamsas/RegistryServiceSoapBindingStub.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package ext.vamsas; diff --git a/src/ext/vamsas/SeqSearchI.java b/src/ext/vamsas/SeqSearchI.java index fd36b53..2bf23b9 100644 --- a/src/ext/vamsas/SeqSearchI.java +++ b/src/ext/vamsas/SeqSearchI.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package ext.vamsas; diff --git a/src/ext/vamsas/SeqSearchServiceLocator.java b/src/ext/vamsas/SeqSearchServiceLocator.java index d8e26a2..d12241c 100644 --- a/src/ext/vamsas/SeqSearchServiceLocator.java +++ b/src/ext/vamsas/SeqSearchServiceLocator.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package ext.vamsas; diff --git a/src/ext/vamsas/SeqSearchServiceService.java b/src/ext/vamsas/SeqSearchServiceService.java index e2bffb5..787764e 100644 --- a/src/ext/vamsas/SeqSearchServiceService.java +++ b/src/ext/vamsas/SeqSearchServiceService.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package ext.vamsas; diff --git a/src/ext/vamsas/SeqSearchServiceSoapBindingStub.java b/src/ext/vamsas/SeqSearchServiceSoapBindingStub.java index 7f6a4f8..9aeee17 100644 --- a/src/ext/vamsas/SeqSearchServiceSoapBindingStub.java +++ b/src/ext/vamsas/SeqSearchServiceSoapBindingStub.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package ext.vamsas; diff --git a/src/ext/vamsas/ServiceHandle.java b/src/ext/vamsas/ServiceHandle.java index 34eb879..0c3106d 100755 --- a/src/ext/vamsas/ServiceHandle.java +++ b/src/ext/vamsas/ServiceHandle.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package ext.vamsas; diff --git a/src/ext/vamsas/ServiceHandles.java b/src/ext/vamsas/ServiceHandles.java index a0fd4f5..5aab3db 100755 --- a/src/ext/vamsas/ServiceHandles.java +++ b/src/ext/vamsas/ServiceHandles.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package ext.vamsas; diff --git a/src/jalview/analysis/AAFrequency.java b/src/jalview/analysis/AAFrequency.java index fc8cb4c..bc178df 100755 --- a/src/jalview/analysis/AAFrequency.java +++ b/src/jalview/analysis/AAFrequency.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.analysis; @@ -194,9 +193,9 @@ public class AAFrequency boolean includeAllConsSymbols) { completeConsensus(consensus, hconsensus, iStart, width, - ignoreGapsInConsensusCalculation, includeAllConsSymbols, - null); //new char[] - // { 'A', 'C', 'G', 'T', 'U' }); + ignoreGapsInConsensusCalculation, includeAllConsSymbols, null); // new + // char[] + // { 'A', 'C', 'G', 'T', 'U' }); } public static void completeConsensus(AlignmentAnnotation consensus, @@ -230,7 +229,7 @@ public class AAFrequency if (profile != null && includeAllConsSymbols) { mouseOver = ""; - if (alphabet!=null) + if (alphabet != null) { for (int c = 0; c < alphabet.length; c++) { diff --git a/src/jalview/analysis/AlignSeq.java b/src/jalview/analysis/AlignSeq.java index c9ae044..15727ef 100755 --- a/src/jalview/analysis/AlignSeq.java +++ b/src/jalview/analysis/AlignSeq.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.analysis; @@ -113,17 +112,17 @@ public class AlignSeq String type; - private int[] charToInt; + private int[] charToInt; /** * Creates a new AlignSeq object. * * @param s1 - * DOCUMENT ME! + * DOCUMENT ME! * @param s2 - * DOCUMENT ME! + * DOCUMENT ME! * @param type - * DOCUMENT ME! + * DOCUMENT ME! */ public AlignSeq(SequenceI s1, SequenceI s2, String type) { @@ -135,11 +134,11 @@ public class AlignSeq * Creates a new AlignSeq object. * * @param s1 - * DOCUMENT ME! + * DOCUMENT ME! * @param s2 - * DOCUMENT ME! + * DOCUMENT ME! * @param type - * DOCUMENT ME! + * DOCUMENT ME! */ public AlignSeq(SequenceI s1, String string1, SequenceI s2, String string2, String type) @@ -271,15 +270,15 @@ public class AlignSeq * DOCUMENT ME! * * @param s1 - * DOCUMENT ME! - * @param string1 - - * string to align for sequence1 + * DOCUMENT ME! + * @param string1 + * - string to align for sequence1 * @param s2 - * sequence 2 - * @param string2 - - * string to align for sequence2 + * sequence 2 + * @param string2 + * - string to align for sequence2 * @param type - * DNA or PEPTIDE + * DNA or PEPTIDE */ public void SeqInit(SequenceI s1, String string1, SequenceI s2, String string2, String type) @@ -604,7 +603,7 @@ public class AlignSeq * DOCUMENT ME! * * @param mat - * DOCUMENT ME! + * DOCUMENT ME! */ public void printScoreMatrix(int[][] mat) { @@ -644,9 +643,9 @@ public class AlignSeq * DOCUMENT ME! * * @param i - * DOCUMENT ME! + * DOCUMENT ME! * @param j - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ @@ -718,7 +717,7 @@ public class AlignSeq { E[i][0] = -gapOpen; F[i][0] = max(score[i - 1][0] - gapOpen, F[i - 1][0] - gapExtend); - + score[i][0] = max(lookup[seq1[i]][seq2[0]] * 10, E[i][0], F[i][0]); traceback[i][0] = -1; } @@ -742,9 +741,9 @@ public class AlignSeq * DOCUMENT ME! * * @param gapChar - * DOCUMENT ME! + * DOCUMENT ME! * @param seq - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ @@ -765,11 +764,11 @@ public class AlignSeq * DOCUMENT ME! * * @param i1 - * DOCUMENT ME! + * DOCUMENT ME! * @param i2 - * DOCUMENT ME! + * DOCUMENT ME! * @param i3 - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ @@ -794,9 +793,9 @@ public class AlignSeq * DOCUMENT ME! * * @param i1 - * DOCUMENT ME! + * DOCUMENT ME! * @param i2 - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ @@ -816,9 +815,9 @@ public class AlignSeq * DOCUMENT ME! * * @param s - * DOCUMENT ME! + * DOCUMENT ME! * @param type - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ @@ -839,11 +838,12 @@ public class AlignSeq try { seq1[i] = charToInt[c]; // set accordingly from setType - if (seq1[i]<0 || seq1[i] > defInt) // set from setType: 23 for peptides, or 4 for NA. + if (seq1[i] < 0 || seq1[i] > defInt) // set from setType: 23 for + // peptides, or 4 for NA. { seq1[i] = defInt; } - + } catch (Exception e) { seq1[i] = defInt; @@ -857,15 +857,15 @@ public class AlignSeq * DOCUMENT ME! * * @param g - * DOCUMENT ME! + * DOCUMENT ME! * @param mat - * DOCUMENT ME! + * DOCUMENT ME! * @param n - * DOCUMENT ME! + * DOCUMENT ME! * @param m - * DOCUMENT ME! + * DOCUMENT ME! * @param psize - * DOCUMENT ME! + * DOCUMENT ME! */ public static void displayMatrix(Graphics g, int[][] mat, int n, int m, int psize) diff --git a/src/jalview/analysis/AlignmentSorter.java b/src/jalview/analysis/AlignmentSorter.java index c4436eb..39af649 100755 --- a/src/jalview/analysis/AlignmentSorter.java +++ b/src/jalview/analysis/AlignmentSorter.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.analysis; @@ -41,8 +40,8 @@ import jalview.util.*; public class AlignmentSorter { /** - * todo: refactor searches to follow a basic pattern: - * (search property, last search state, current sort direction) + * todo: refactor searches to follow a basic pattern: (search property, last + * search state, current sort direction) */ static boolean sortIdAscending = true; @@ -62,11 +61,14 @@ public class AlignmentSorter * last Annotation Label used by sortByScore */ private static String lastSortByScore; + private static boolean sortByScoreAscending = true; + /** * compact representation of last arguments to SortByFeatureScore */ private static String lastSortByFeatureScore; + private static boolean sortByFeatureScoreAscending = true; private static boolean sortLengthAscending; @@ -75,31 +77,33 @@ public class AlignmentSorter * Sort by Percentage Identity w.r.t. s * * @param align - * AlignmentI + * AlignmentI * @param s - * SequenceI + * SequenceI * @param tosort - * sequences from align that are to be sorted. + * sequences from align that are to be sorted. */ public static void sortByPID(AlignmentI align, SequenceI s, SequenceI[] tosort) { - sortByPID(align,s,tosort,0,-1); + sortByPID(align, s, tosort, 0, -1); } + /** * Sort by Percentage Identity w.r.t. s * * @param align - * AlignmentI + * AlignmentI * @param s - * SequenceI + * SequenceI * @param tosort - * sequences from align that are to be sorted. - * @param start start column (0 for beginning + * sequences from align that are to be sorted. + * @param start + * start column (0 for beginning * @param end */ public static void sortByPID(AlignmentI align, SequenceI s, - SequenceI[] tosort,int start, int end) + SequenceI[] tosort, int start, int end) { int nSeq = align.getHeight(); @@ -122,9 +126,9 @@ public class AlignmentSorter * Reverse the order of the sort * * @param align - * DOCUMENT ME! + * DOCUMENT ME! * @param seqs - * DOCUMENT ME! + * DOCUMENT ME! */ private static void setReverseOrder(AlignmentI align, SequenceI[] seqs) { @@ -154,9 +158,9 @@ public class AlignmentSorter * Sets the Alignment object with the given sequences * * @param align - * Alignment object to be updated + * Alignment object to be updated * @param tmp - * sequences as a vector + * sequences as a vector */ private static void setOrder(AlignmentI align, Vector tmp) { @@ -167,9 +171,9 @@ public class AlignmentSorter * Sets the Alignment object with the given sequences * * @param align - * DOCUMENT ME! + * DOCUMENT ME! * @param seqs - * sequences as an array + * sequences as an array */ public static void setOrder(AlignmentI align, SequenceI[] seqs) { @@ -198,7 +202,7 @@ public class AlignmentSorter * Sorts by ID. Numbers are sorted before letters. * * @param align - * The alignment object to sort + * The alignment object to sort */ public static void sortByID(AlignmentI align) { @@ -226,11 +230,12 @@ public class AlignmentSorter sortIdAscending = !sortIdAscending; } + /** * Sorts by sequence length * * @param align - * The alignment object to sort + * The alignment object to sort */ public static void sortByLength(AlignmentI align) { @@ -238,11 +243,11 @@ public class AlignmentSorter float[] length = new float[nSeq]; SequenceI[] seqs = new SequenceI[nSeq]; - + for (int i = 0; i < nSeq; i++) { seqs[i] = align.getSequenceAt(i); - length[i] = (float) (seqs[i].getEnd()-seqs[i].getStart()); + length[i] = (float) (seqs[i].getEnd() - seqs[i].getStart()); } QuickSort.sort(length, seqs); @@ -265,7 +270,7 @@ public class AlignmentSorter * object. * * @param align - * sorts the given alignment object by group + * sorts the given alignment object by group */ public static void sortByGroup(AlignmentI align) { @@ -337,7 +342,7 @@ public class AlignmentSorter * Converts Vector to array. java 1.18 does not have Vector.toArray() * * @param tmp - * Vector of SequenceI objects + * Vector of SequenceI objects * * @return array of Sequence[] */ @@ -357,16 +362,16 @@ public class AlignmentSorter * DOCUMENT ME! * * @param tmp - * DOCUMENT ME! + * DOCUMENT ME! * @param mask - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ private static SequenceI[] vectorSubsetToArray(Vector tmp, Vector mask) { Vector seqs = new Vector(); - int i,idx; + int i, idx; boolean[] tmask = new boolean[mask.size()]; for (i = 0; i < mask.size(); i++) @@ -377,8 +382,8 @@ public class AlignmentSorter for (i = 0; i < tmp.size(); i++) { Object sq = tmp.elementAt(i); - idx = mask.indexOf(sq); - if (idx>-1 && tmask[idx]) + idx = mask.indexOf(sq); + if (idx > -1 && tmask[idx]) { tmask[idx] = false; seqs.addElement(sq); @@ -400,9 +405,9 @@ public class AlignmentSorter * Sorts by a given AlignmentOrder object * * @param align - * Alignment to order + * Alignment to order * @param order - * specified order for alignment + * specified order for alignment */ public static void sortBy(AlignmentI align, AlignmentOrder order) { @@ -432,9 +437,9 @@ public class AlignmentSorter * DOCUMENT ME! * * @param align - * alignment to order + * alignment to order * @param tree - * tree which has + * tree which has * * @return DOCUMENT ME! */ @@ -470,9 +475,9 @@ public class AlignmentSorter * Sorts the alignment by a given tree * * @param align - * alignment to order + * alignment to order * @param tree - * tree which has + * tree which has */ public static void sortByTree(AlignmentI align, NJTree tree) { @@ -503,9 +508,9 @@ public class AlignmentSorter * DOCUMENT ME! * * @param align - * DOCUMENT ME! + * DOCUMENT ME! * @param seqs - * DOCUMENT ME! + * DOCUMENT ME! */ private static void addStrays(AlignmentI align, Vector seqs) { @@ -530,11 +535,11 @@ public class AlignmentSorter * DOCUMENT ME! * * @param node - * DOCUMENT ME! + * DOCUMENT ME! * @param tmp - * DOCUMENT ME! + * DOCUMENT ME! * @param seqset - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ @@ -600,17 +605,17 @@ public class AlignmentSorter * particular scoreLabel. Or reverse if same label was used previously * * @param scoreLabel - * exact label for sequence associated AlignmentAnnotation - * scores to use for sorting. + * exact label for sequence associated AlignmentAnnotation scores to + * use for sorting. * @param alignment - * sequences to be sorted + * sequences to be sorted */ public static void sortByAnnotationScore(String scoreLabel, AlignmentI alignment) { SequenceI[] seqs = alignment.getSequencesArray(); boolean[] hasScore = new boolean[seqs.length]; // per sequence score - // presence + // presence int hasScores = 0; // number of scores present on set double[] scores = new double[seqs.length]; double min = 0, max = 0; @@ -622,7 +627,7 @@ public class AlignmentSorter hasScores++; hasScore[i] = true; scores[i] = scoreAnn[0].getScore(); // take the first instance of this - // score. + // score. if (hasScores == 1) { max = min = scores[i]; @@ -654,7 +659,7 @@ public class AlignmentSorter { if (!hasScore[i]) { - scores[i] = (max + i+1.0); + scores[i] = (max + i + 1.0); } } } @@ -670,73 +675,94 @@ public class AlignmentSorter setReverseOrder(alignment, seqs); } } + /** - * types of feature ordering: - * Sort by score : average score - or total score - over all features in region - * Sort by feature label text: (or if null - feature type text) - numerical or alphabetical - * Sort by feature density: based on counts - ignoring individual text or scores for each feature + * types of feature ordering: Sort by score : average score - or total score - + * over all features in region Sort by feature label text: (or if null - + * feature type text) - numerical or alphabetical Sort by feature density: + * based on counts - ignoring individual text or scores for each feature */ - public static String FEATURE_SCORE="average_score"; - public static String FEATURE_LABEL="text"; - public static String FEATURE_DENSITY="density"; - + public static String FEATURE_SCORE = "average_score"; + + public static String FEATURE_LABEL = "text"; + + public static String FEATURE_DENSITY = "density"; + /** - * sort the alignment using the features on each sequence found between start and stop with the given featureLabel (and optional group qualifier) - * @param featureLabel (may not be null) - * @param groupLabel (may be null) - * @param start (-1 to include non-positional features) - * @param stop (-1 to only sort on non-positional features) - * @param alignment - aligned sequences containing features - * @param method - one of the string constants FEATURE_SCORE, FEATURE_LABEL, FEATURE_DENSITY + * sort the alignment using the features on each sequence found between start + * and stop with the given featureLabel (and optional group qualifier) + * + * @param featureLabel + * (may not be null) + * @param groupLabel + * (may be null) + * @param start + * (-1 to include non-positional features) + * @param stop + * (-1 to only sort on non-positional features) + * @param alignment + * - aligned sequences containing features + * @param method + * - one of the string constants FEATURE_SCORE, FEATURE_LABEL, + * FEATURE_DENSITY */ - public static void sortByFeature(String featureLabel, String groupLabel, int start, int stop, - AlignmentI alignment, String method) + public static void sortByFeature(String featureLabel, String groupLabel, + int start, int stop, AlignmentI alignment, String method) { - sortByFeature(featureLabel==null ? null : new String[] {featureLabel}, - groupLabel==null ? null : new String[] {groupLabel}, start, stop, alignment, method); + sortByFeature(featureLabel == null ? null : new String[] + { featureLabel }, groupLabel == null ? null : new String[] + { groupLabel }, start, stop, alignment, method); } - private static boolean containsIgnoreCase(final String lab, final String[] labs) + + private static boolean containsIgnoreCase(final String lab, + final String[] labs) { - if (labs==null) + if (labs == null) { return true; } - if (lab==null) + if (lab == null) { return false; } - for (int q=0;q sstop) || // or ignore based on selection criteria - (featureLabels != null && !AlignmentSorter.containsIgnoreCase(sf[f].type, featureLabels)) + (featureLabels != null && !AlignmentSorter + .containsIgnoreCase(sf[f].type, featureLabels)) || (groupLabels != null - // problem here: we cannot eliminate null feature group features - && (sf[f].getFeatureGroup() != null - && !AlignmentSorter.containsIgnoreCase(sf[f].getFeatureGroup(), groupLabels)))) + // problem here: we cannot eliminate null feature group features + && (sf[f].getFeatureGroup() != null && !AlignmentSorter + .containsIgnoreCase(sf[f].getFeatureGroup(), + groupLabels)))) { // forget about this feature sf[f] = null; n--; - } else { + } + else + { // or, also take a look at the scores if necessary. - if (!ignoreScore && sf[f].getScore()!=Float.NaN) + if (!ignoreScore && sf[f].getScore() != Float.NaN) { - if (seqScores[i]==0) + if (seqScores[i] == 0) { hasScores++; } seqScores[i]++; hasScore[i] = true; scores[i] += sf[f].getScore(); // take the first instance of this - // score. + // score. } } } SequenceFeature[] fs; feats[i] = fs = new SequenceFeature[n]; - if (n>0) + if (n > 0) { - n=0; - for (int f=0;f. */ package jalview.analysis; @@ -73,18 +72,17 @@ public class Conservation * Creates a new Conservation object. * * @param name - * Name of conservation + * Name of conservation * @param propHash - * hash of properties for each symbol + * hash of properties for each symbol * @param threshold - * to count the residues in residueHash(). commonly used value - * is 3 + * to count the residues in residueHash(). commonly used value is 3 * @param sequences - * sequences to be used in calculation + * sequences to be used in calculation * @param start - * start residue position + * start residue position * @param end - * end residue position + * end residue position */ public Conservation(String name, Hashtable propHash, int threshold, Vector sequences, int start, int end) @@ -332,10 +330,10 @@ public class Conservation * Calculates the conservation sequence * * @param consflag - * if true, poitiveve conservation; false calculates negative - * conservation + * if true, poitiveve conservation; false calculates negative + * conservation * @param percentageGaps - * commonly used value is 25 + * commonly used value is 25 */ public void verdict(boolean consflag, float percentageGaps) { @@ -489,9 +487,9 @@ public class Conservation * Calculates the quality of the set of sequences * * @param start - * Start residue + * Start residue * @param end - * End residue + * End residue */ public void findQuality(int start, int end) { @@ -594,12 +592,18 @@ public class Conservation } /** - * complete the given consensus and quuality annotation rows. - * Note: currently this method will enlarge the given annotation row if it is too small, otherwise will leave its length unchanged. - * @param conservation conservation annotation row - * @param quality2 (optional - may be null) - * @param istart first column for conservation - * @param alWidth extent of conservation + * complete the given consensus and quuality annotation rows. Note: currently + * this method will enlarge the given annotation row if it is too small, + * otherwise will leave its length unchanged. + * + * @param conservation + * conservation annotation row + * @param quality2 + * (optional - may be null) + * @param istart + * first column for conservation + * @param alWidth + * extent of conservation */ public void completeAnnotations(AlignmentAnnotation conservation, AlignmentAnnotation quality2, int istart, int alWidth) @@ -617,7 +621,7 @@ public class Conservation maxR = 1.0f - minR; maxG = 0.9f - minG; maxB = 0f - minB; // scalable range for colouring both Conservation and - // Quality + // Quality float min = 0f; float max = 11f; @@ -626,14 +630,18 @@ public class Conservation char c; - if (conservation.annotations !=null && conservation.annotations.length. */ package jalview.analysis; @@ -79,7 +78,7 @@ public class CrossRef /** * @param dna - * true if seqs are DNA seqs + * true if seqs are DNA seqs * @param seqs * @return a list of sequence database cross reference source types */ @@ -93,7 +92,7 @@ public class CrossRef * any of the direct DBRefEntrys on the given sequences. * * @param dna - * true if seqs are DNA seqs + * true if seqs are DNA seqs * @param seqs * @return a list of sequence database cross reference source types */ @@ -219,7 +218,7 @@ public class CrossRef * @param dna * @param source * @param dataset - * alignment to search for product sequences. + * alignment to search for product sequences. * @return products (as dataset sequences) */ public static Alignment findXrefSequences(SequenceI[] seqs, boolean dna, @@ -449,7 +448,7 @@ public class CrossRef * @param xrf * @param dataset * @param rseqs - * set of unique sequences + * set of unique sequences * @param cf * @return true if one or more unique sequences were found and added */ @@ -468,10 +467,10 @@ public class CrossRef * @param xrf * @param dataset * @param rseqs - * @param direct - - * search all references or only subset + * @param direct + * - search all references or only subset * @param dna - * search dna or protein xrefs (if direct=false) + * search dna or protein xrefs (if direct=false) * @return true if relationship found and sequence added. */ public static boolean searchDataset(SequenceI sequenceI, DBRefEntry xrf, @@ -515,12 +514,11 @@ public class CrossRef DBRefEntry[] poss = nxt.getDBRef(), cands = null; if (direct) { - cands = jalview.util.DBRefUtils.searchRefs(poss , xrf); + cands = jalview.util.DBRefUtils.searchRefs(poss, xrf); } else { - poss = CrossRef - .findXDbRefs(dna, poss); // + poss = CrossRef.findXDbRefs(dna, poss); // cands = jalview.util.DBRefUtils.searchRefs(poss, xrf); } if (cands != null) @@ -572,8 +570,8 @@ public class CrossRef * @param dna * @param seqs * @param dataset - * @param fake - - * don't actually build lists - just get types + * @param fake + * - don't actually build lists - just get types * @return public static Object[] buildXProductsList(boolean dna, SequenceI[] * seqs, AlignmentI dataset, boolean fake) { String types[] = * jalview.analysis.CrossRef.findSequenceXrefTypes( dna, seqs, @@ -582,19 +580,19 @@ public class CrossRef * System.out.println("Type: " + types[t]); SequenceI[] prod = * jalview.analysis.CrossRef.findXrefSequences(seqs, dna, types[t]); * System.out.println("Found " + ((prod == null) ? "no" : "" + - * prod.length) + " products"); if (prod!=null) { for (int p=0; p. */ package jalview.analysis; @@ -85,7 +84,7 @@ public class Dna * @param annotations * @param aWidth * @param dataset - * destination dataset for translated sequences and mappings + * destination dataset for translated sequences and mappings * @return */ public static AlignmentI CdnaTranslate(SequenceI[] selection, @@ -100,9 +99,9 @@ public class Dna * * @param selection * @param seqstring - * @param product - - * array of DbRefEntry objects from which exon map in seqstring - * is derived + * @param product + * - array of DbRefEntry objects from which exon map in seqstring is + * derived * @param viscontigs * @param gapCharacter * @param annotations @@ -128,7 +127,7 @@ public class Dna SequenceI newseq = translateCodingRegion(selection[s], seqstring[s], viscontigs, codons, gapCharacter, (product != null) ? product[s] : null); // possibly anonymous - // product + // product if (newseq != null) { pepseqs.addElement(newseq); @@ -215,7 +214,7 @@ public class Dna * @param viscontigs * @param gapCharacter * @param dataset - * destination dataset for translated sequences + * destination dataset for translated sequences * @param annotations * @param aWidth * @return @@ -364,42 +363,45 @@ public class Dna { // Have a look at all the codon positions for annotation and put the first // one found into the translated annotation pos. - int contrib=0; + int contrib = 0; Annotation annot = null; for (int p = 0; p < 3; p++) { if (annotations[is[p]] != null) { - if (annot==null) { + if (annot == null) + { annot = new Annotation(annotations[is[p]]); contrib = 1; - } else { + } + else + { // merge with last Annotation cpy = new Annotation(annotations[is[p]]); - if (annot.colour==null) + if (annot.colour == null) { annot.colour = cpy.colour; } - if (annot.description==null || annot.description.length()==0) + if (annot.description == null || annot.description.length() == 0) { annot.description = cpy.description; } - if (annot.displayCharacter==null) + if (annot.displayCharacter == null) { annot.displayCharacter = cpy.displayCharacter; } - if (annot.secondaryStructure==0) + if (annot.secondaryStructure == 0) { annot.secondaryStructure = cpy.secondaryStructure; } - annot.value+=cpy.value; + annot.value += cpy.value; contrib++; } } } - if (contrib>1) + if (contrib > 1) { - annot.value/=(float)contrib; + annot.value /= (float) contrib; } return annot; } @@ -408,14 +410,13 @@ public class Dna * Translate a na sequence * * @param selection - * sequence displayed under viscontigs visible columns + * sequence displayed under viscontigs visible columns * @param seqstring - * ORF read in some global alignment reference frame + * ORF read in some global alignment reference frame * @param viscontigs - * mapping from global reference frame to visible seqstring ORF - * read + * mapping from global reference frame to visible seqstring ORF read * @param codons - * Definition of global ORF alignment reference frame + * Definition of global ORF alignment reference frame * @param gapCharacter * @param newSeq * @return sequence ready to be added to alignment. @@ -547,8 +548,9 @@ public class Dna } if (aspos >= codons.aaWidth) { - // update maximum alignment width - // (we can do this without calling checkCodonFrameWidth because it was already done above) + // update maximum alignment width + // (we can do this without calling checkCodonFrameWidth because it was + // already done above) codons.setAaWidth(aspos); } // ready for next translated reading frame alignment position (if any) @@ -617,14 +619,13 @@ public class Dna * new ranges to exclude untranslated regions. if (skip.size()>0) { * Vector narange = new Vector(); for (vc=0; vc=skipint[0] && iv[0]<=skipint[1]) { if (iv[0]==skipint[0]) { // - * delete beginning of range } else { // truncate range and create new - * one if necessary iv = (int[]) narange.elementAt(vc+1); if (iv[0]<=skipint[1]) { // - * truncate range iv[0] = skipint[1]; } else { - * } } } else if (iv[0]=skipint[0] && + * iv[0]<=skipint[1]) { if (iv[0]==skipint[0]) { // delete beginning of + * range } else { // truncate range and create new one if necessary iv = + * (int[]) narange.elementAt(vc+1); if (iv[0]<=skipint[1]) { // truncate + * range iv[0] = skipint[1]; } else { } } } else if (iv[0]. */ package jalview.analysis; @@ -53,7 +52,9 @@ public class Finder } /** - * restart search at given sequence and residue on alignment and (optionally) contained in selection + * restart search at given sequence and residue on alignment and (optionally) + * contained in selection + * * @param alignment * @param selectionGroup * @param seqIndex @@ -119,7 +120,7 @@ public class Finder { seq = (Sequence) alignment.getSequenceAt(seqIndex); - if ((selection != null && selection.getSize()>0) + if ((selection != null && selection.getSize() > 0) && !selection.getSequences(null).contains(seq)) { seqIndex++; @@ -127,8 +128,9 @@ public class Finder continue; } - if (resIndex<0) { - resIndex=0; + if (resIndex < 0) + { + resIndex = 0; if (regex.search(seq.getName())) { idMatch.addElement(seq); @@ -136,7 +138,7 @@ public class Finder if (!findAll) { // stop and return the match - found=true; + found = true; break; } } @@ -176,7 +178,7 @@ public class Finder { resIndex = regex.matchedFrom(); - if ((selection != null && selection.getSize()>0) + if ((selection != null && selection.getSize() > 0) && ((resIndex + Integer.parseInt(spaces.elementAt( resIndex).toString())) < selection.getStartRes())) { @@ -219,15 +221,11 @@ public class Finder } /** - * 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; - } - } */ + * 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; } } + */ return hasResults; } @@ -241,7 +239,7 @@ public class Finder /** * @param alignment - * the alignment to set + * the alignment to set */ public void setAlignment(AlignmentI alignment) { @@ -258,7 +256,7 @@ public class Finder /** * @param caseSensitive - * the caseSensitive to set + * the caseSensitive to set */ public void setCaseSensitive(boolean caseSensitive) { @@ -275,7 +273,7 @@ public class Finder /** * @param findAll - * the findAll to set + * the findAll to set */ public void setFindAll(boolean findAll) { @@ -292,7 +290,7 @@ public class Finder /** * @param selection - * the selection to set + * the selection to set */ public void setSelection(jalview.datamodel.SequenceGroup selection) { @@ -333,7 +331,7 @@ public class Finder /** * @param resIndex - * the resIndex to set + * the resIndex to set */ public void setResIndex(int resIndex) { @@ -350,7 +348,7 @@ public class Finder /** * @param seqIndex - * the seqIndex to set + * the seqIndex to set */ public void setSeqIndex(int seqIndex) { diff --git a/src/jalview/analysis/Grouping.java b/src/jalview/analysis/Grouping.java index bba668d..4a641cc 100644 --- a/src/jalview/analysis/Grouping.java +++ b/src/jalview/analysis/Grouping.java @@ -1,3 +1,20 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle + * + * 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 . + */ package jalview.analysis; import jalview.datamodel.AlignmentI; @@ -10,42 +27,50 @@ import java.util.Hashtable; import java.util.Vector; /** - * various methods for defining groups on an alignment based on some other properties + * various methods for defining groups on an alignment based on some other + * properties + * * @author JimP - * + * */ public class Grouping { /** - * Divide the given sequences based on the equivalence of their corresponding selectedChars string. If exgroups is provided, existing groups will be subdivided. + * Divide the given sequences based on the equivalence of their corresponding + * selectedChars string. If exgroups is provided, existing groups will be + * subdivided. + * * @param sequences * @param selectedChars * @param exgroups * @return */ - public static SequenceGroup[] makeGroupsFrom(SequenceI[] sequences, String[] selectedChars, Vector exgroups) + public static SequenceGroup[] makeGroupsFrom(SequenceI[] sequences, + String[] selectedChars, Vector exgroups) { - // TODO: determine how to get/recover input data for group generation + // TODO: determine how to get/recover input data for group generation Hashtable gps = new Hashtable(); - int width = 0,i; + int width = 0, i; Hashtable pgroup = new Hashtable(); - if (exgroups!=null) + if (exgroups != null) { SequenceGroup sg; - for (Enumeration g=exgroups.elements(); g.hasMoreElements(); ) + for (Enumeration g = exgroups.elements(); g.hasMoreElements();) { sg = (SequenceGroup) g.nextElement(); - for (Enumeration sq = sg.getSequences(null).elements(); sq.hasMoreElements(); ) + for (Enumeration sq = sg.getSequences(null).elements(); sq + .hasMoreElements();) pgroup.put(sq.nextElement().toString(), sg); } } for (i = 0; i < sequences.length; i++) { String schar = selectedChars[i]; - SequenceGroup pgp = (SequenceGroup) pgroup.get(((Object) sequences[i]).toString()); - if (pgp!=null) + SequenceGroup pgp = (SequenceGroup) pgroup + .get(((Object) sequences[i]).toString()); + if (pgp != null) { - schar = pgp.getName()+":"+schar; + schar = pgp.getName() + ":" + schar; } Vector svec = (Vector) gps.get(schar); if (svec == null) @@ -53,7 +78,7 @@ public class Grouping svec = new Vector(); gps.put(schar, svec); } - if (width sstop) - || - // or ignore based on selection criteria - (featureLabels != null && !AlignmentSorter.containsIgnoreCase(sf[f].type, featureLabels)) - || (groupLabels != null - // problem here: we cannot eliminate null feature group features - && (sf[f].getFeatureGroup() != null - && !AlignmentSorter.containsIgnoreCase(sf[f].getFeatureGroup(), groupLabels)))) - { - // forget about this feature - sf[f] = null; - n--; - } else { - // or, also take a look at the scores if necessary. - if (!ignoreScore && sf[f].getScore()!=Float.NaN) - { - if (seqScores[i]==0) - { - hasScores++; - } - seqScores[i]++; - hasScore[i] = true; - scores[i] += sf[f].getScore(); // take the first instance of this - // score. - } - } - } - SequenceFeature[] fs; - feats[i] = fs = new SequenceFeature[n]; - if (n>0) - { - n=0; - for (int f=0;f scores[i]) - { - min = scores[i]; - } - } - } - } - - if (method==FEATURE_SCORE) - { - if (hasScores == 0) - { - return; // do nothing - no scores present to sort by. - } - // pad score matrix - if (hasScores < seqs.length) - { - for (int i = 0; i < seqs.length; i++) - { - if (!hasScore[i]) - { - scores[i] = (max + i); - } else { - int nf=(feats[i]==null) ? 0 :((SequenceFeature[]) feats[i]).length; - System.err.println("Sorting on Score: seq "+seqs[i].getName()+ " Feats: "+nf+" Score : "+scores[i]); - } - } - } - - jalview.util.QuickSort.sort(scores, seqs); - } - else - if (method==FEATURE_DENSITY) - { - - // break ties between equivalent numbers for adjacent sequences by adding 1/Nseq*i on the original order - double fr = 0.9/(1.0*seqs.length); - for (int i=0;i sstop) || // or ignore based on + * selection criteria (featureLabels != null && + * !AlignmentSorter.containsIgnoreCase(sf[f].type, featureLabels)) || + * (groupLabels != null // problem here: we cannot eliminate null feature + * group features && (sf[f].getFeatureGroup() != null && + * !AlignmentSorter.containsIgnoreCase(sf[f].getFeatureGroup(), + * groupLabels)))) { // forget about this feature sf[f] = null; n--; } else + * { // or, also take a look at the scores if necessary. if (!ignoreScore && + * sf[f].getScore()!=Float.NaN) { if (seqScores[i]==0) { hasScores++; } + * seqScores[i]++; hasScore[i] = true; scores[i] += sf[f].getScore(); // + * take the first instance of this // score. } } } SequenceFeature[] fs; + * feats[i] = fs = new SequenceFeature[n]; if (n>0) { n=0; for (int + * f=0;f scores[i]) { + * min = scores[i]; } } } } + * + * if (method==FEATURE_SCORE) { if (hasScores == 0) { return; // do nothing + * - no scores present to sort by. } // pad score matrix if (hasScores < + * seqs.length) { for (int i = 0; i < seqs.length; i++) { if (!hasScore[i]) + * { scores[i] = (max + i); } else { int nf=(feats[i]==null) ? 0 + * :((SequenceFeature[]) feats[i]).length; + * System.err.println("Sorting on Score: seq "+seqs[i].getName()+ + * " Feats: "+nf+" Score : "+scores[i]); } } } + * + * jalview.util.QuickSort.sort(scores, seqs); } else if + * (method==FEATURE_DENSITY) { + * + * // break ties between equivalent numbers for adjacent sequences by adding + * 1/Nseq*i on the original order double fr = 0.9/(1.0*seqs.length); for + * (int i=0;i. */ package jalview.analysis; @@ -90,11 +89,11 @@ public class NJTree * and original alignment data represented by Cigar strings. * * @param seqs - * SequenceI[] + * SequenceI[] * @param odata - * Cigar[] + * Cigar[] * @param treefile - * NewickFile + * NewickFile */ public NJTree(SequenceI[] seqs, AlignmentView odata, NewickFile treefile) { @@ -115,9 +114,9 @@ public class NJTree * Creates a new NJTree object from a tree from an external source * * @param seqs - * SequenceI which should be associated with leafs of treefile + * SequenceI which should be associated with leafs of treefile * @param treefile - * A parsed tree + * A parsed tree */ public NJTree(SequenceI[] seqs, NewickFile treefile) { @@ -196,15 +195,15 @@ public class NJTree * Creates a new NJTree object. * * @param sequence - * DOCUMENT ME! + * DOCUMENT ME! * @param type - * DOCUMENT ME! + * DOCUMENT ME! * @param pwtype - * DOCUMENT ME! + * DOCUMENT ME! * @param start - * DOCUMENT ME! + * DOCUMENT ME! * @param end - * DOCUMENT ME! + * DOCUMENT ME! */ public NJTree(SequenceI[] sequence, AlignmentView seqData, String type, String pwtype, int start, int end) @@ -228,7 +227,7 @@ public class NJTree sdata.addOperation(CigarArray.M, end - start + 1); this.seqData = new AlignmentView(sdata, start); } -// System.err.println("Made seqData");// dbg + // System.err.println("Made seqData");// dbg if (!(type.equals("NJ"))) { type = "AV"; @@ -256,15 +255,15 @@ public class NJTree distance = findDistances(this.seqData .getSequenceStrings(Comparison.GapChars.charAt(0))); -// System.err.println("Made distances");// dbg + // System.err.println("Made distances");// dbg makeLeaves(); -// System.err.println("Made leaves");// dbg - + // System.err.println("Made leaves");// dbg + noClus = cluster.size(); cluster(); -// System.err.println("Made clusters");// dbg - + // System.err.println("Made clusters");// dbg + } /** @@ -284,7 +283,7 @@ public class NJTree * used when the alignment associated to a tree has changed. * * @param alignment - * Vector + * Vector */ public void UpdatePlaceHolders(Vector alignment) { @@ -406,9 +405,9 @@ public class NJTree * DOCUMENT ME! * * @param i - * DOCUMENT ME! + * DOCUMENT ME! * @param j - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ @@ -474,11 +473,11 @@ public class NJTree * DOCUMENT ME! * * @param tmpi - * DOCUMENT ME! + * DOCUMENT ME! * @param tmpj - * DOCUMENT ME! + * DOCUMENT ME! * @param dist - * DOCUMENT ME! + * DOCUMENT ME! */ public void findNewNJDistances(SequenceNode tmpi, SequenceNode tmpj, float dist) @@ -502,11 +501,11 @@ public class NJTree * DOCUMENT ME! * * @param tmpi - * DOCUMENT ME! + * DOCUMENT ME! * @param tmpj - * DOCUMENT ME! + * DOCUMENT ME! * @param dist - * DOCUMENT ME! + * DOCUMENT ME! */ public void findNewDistances(SequenceNode tmpi, SequenceNode tmpj, float dist) @@ -537,9 +536,9 @@ public class NJTree * DOCUMENT ME! * * @param i - * DOCUMENT ME! + * DOCUMENT ME! * @param j - * DOCUMENT ME! + * DOCUMENT ME! */ public void findClusterDistance(int i, int j) { @@ -573,9 +572,9 @@ public class NJTree * DOCUMENT ME! * * @param i - * DOCUMENT ME! + * DOCUMENT ME! * @param j - * DOCUMENT ME! + * DOCUMENT ME! */ public void findClusterNJDistance(int i, int j) { @@ -606,9 +605,9 @@ public class NJTree * DOCUMENT ME! * * @param i - * DOCUMENT ME! + * DOCUMENT ME! * @param j - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ @@ -775,15 +774,16 @@ public class NJTree /* * else if (pwtype.equals("SW")) { float max = -1; * - * for (int i = 0; i < (noseqs - 1); i++) { for (int j = i; j < noseqs; j++) { - * AlignSeq as = new AlignSeq(sequence[i], sequence[j], "pep"); + * for (int i = 0; i < (noseqs - 1); i++) { for (int j = i; j < noseqs; j++) + * { AlignSeq as = new AlignSeq(sequence[i], sequence[j], "pep"); * as.calcScoreMatrix(); as.traceAlignment(); as.printAlignment(System.out); * distance[i][j] = (float) as.maxscore; * * if (max < distance[i][j]) { max = distance[i][j]; } } } * - * for (int i = 0; i < (noseqs - 1); i++) { for (int j = i; j < noseqs; j++) { - * distance[i][j] = max - distance[i][j]; distance[j][i] = distance[i][j]; } } }/ + * for (int i = 0; i < (noseqs - 1); i++) { for (int j = i; j < noseqs; j++) + * { distance[i][j] = max - distance[i][j]; distance[j][i] = distance[i][j]; + * } } }/ */ } @@ -814,9 +814,9 @@ public class NJTree * Search for leaf nodes. * * @param node - * root node to search from + * root node to search from * @param leaves - * Vector of leaves to add leaf node objects too. + * Vector of leaves to add leaf node objects too. * * @return Vector of leaf nodes on binary tree */ @@ -828,7 +828,7 @@ public class NJTree } if ((node.left() == null) && (node.right() == null)) // Interior node - // detection + // detection { leaves.addElement(node); @@ -851,9 +851,9 @@ public class NJTree * Find the leaf node with a particular ycount * * @param node - * initial point on tree to search from + * initial point on tree to search from * @param count - * value to search for + * value to search for * * @return null or the node with ycound=count */ @@ -866,7 +866,6 @@ public class NJTree /* * #see findLeaf(SequenceNode node, count) - * */ public Object _findLeaf(SequenceNode node, int count) { @@ -894,7 +893,7 @@ public class NJTree * printNode is mainly for debugging purposes. * * @param node - * SequenceNode + * SequenceNode */ public void printNode(SequenceNode node) { @@ -922,7 +921,7 @@ public class NJTree * DOCUMENT ME! * * @param node - * DOCUMENT ME! + * DOCUMENT ME! */ public void findMaxDist(SequenceNode node) { @@ -972,9 +971,9 @@ public class NJTree * DOCUMENT ME! * * @param node - * DOCUMENT ME! + * DOCUMENT ME! * @param threshold - * DOCUMENT ME! + * DOCUMENT ME! */ public void groupNodes(SequenceNode node, float threshold) { @@ -998,7 +997,7 @@ public class NJTree * DOCUMENT ME! * * @param node - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ @@ -1119,7 +1118,7 @@ public class NJTree * DOCUMENT ME! * * @param node - * DOCUMENT ME! + * DOCUMENT ME! */ public void printN(SequenceNode node) { @@ -1148,28 +1147,30 @@ public class NJTree * DOCUMENT ME! * * @param node - * DOCUMENT ME! + * DOCUMENT ME! */ public void reCount(SequenceNode node) { ycount = 0; - _lycount=0; -// _lylimit = this.node.size(); + _lycount = 0; + // _lylimit = this.node.size(); _reCount(node); } - private long _lycount=0,_lylimit=0; + + private long _lycount = 0, _lylimit = 0; + /** * DOCUMENT ME! * * @param node - * DOCUMENT ME! + * DOCUMENT ME! */ public void _reCount(SequenceNode node) { -// if (_lycount<_lylimit) -// { -// System.err.println("Warning: depth of _recount greater than number of nodes."); -// } + // if (_lycount<_lylimit) + // { + // System.err.println("Warning: depth of _recount greater than number of nodes."); + // } if (node == null) { return; @@ -1178,7 +1179,7 @@ public class NJTree if ((node.left() != null) && (node.right() != null)) { - + _reCount((SequenceNode) node.left()); _reCount((SequenceNode) node.right()); @@ -1200,7 +1201,7 @@ public class NJTree * DOCUMENT ME! * * @param node - * DOCUMENT ME! + * DOCUMENT ME! */ public void swapNodes(SequenceNode node) { @@ -1219,9 +1220,9 @@ public class NJTree * DOCUMENT ME! * * @param node - * DOCUMENT ME! + * DOCUMENT ME! * @param dir - * DOCUMENT ME! + * DOCUMENT ME! */ public void changeDirection(SequenceNode node, SequenceNode dir) { @@ -1320,14 +1321,16 @@ public class NJTree { return hasRootDistance; } + /** * apply the given transform to all the nodes in the tree. + * * @param nodeTransformI */ public void applyToNodes(NodeTransformI nodeTransformI) { - for (Enumeration nodes = node.elements(); nodes.hasMoreElements(); - nodeTransformI.transform((BinaryNode)nodes.nextElement())) + for (Enumeration nodes = node.elements(); nodes.hasMoreElements(); nodeTransformI + .transform((BinaryNode) nodes.nextElement())) ; } } @@ -1346,7 +1349,7 @@ class Cluster * Creates a new Cluster object. * * @param value - * DOCUMENT ME! + * DOCUMENT ME! */ public Cluster(int[] value) { diff --git a/src/jalview/analysis/PCA.java b/src/jalview/analysis/PCA.java index a14be50..c74279b 100755 --- a/src/jalview/analysis/PCA.java +++ b/src/jalview/analysis/PCA.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.analysis; @@ -47,7 +46,7 @@ public class PCA implements Runnable * Creates a new PCA object. * * @param s - * Set of sequences to perform PCA on + * Set of sequences to perform PCA on */ public PCA(String[] s) { @@ -115,7 +114,7 @@ public class PCA implements Runnable * Returns Eigenvalue * * @param i - * Index of diagonal within matrix + * Index of diagonal within matrix * * @return Returns value of diagonal from matrix */ @@ -128,13 +127,13 @@ public class PCA implements Runnable * DOCUMENT ME! * * @param l - * DOCUMENT ME! + * DOCUMENT ME! * @param n - * DOCUMENT ME! + * DOCUMENT ME! * @param mm - * DOCUMENT ME! + * DOCUMENT ME! * @param factor - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ @@ -156,7 +155,7 @@ public class PCA implements Runnable * DOCUMENT ME! * * @param n - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ @@ -177,9 +176,9 @@ public class PCA implements Runnable * DOCUMENT ME! * * @param row - * DOCUMENT ME! + * DOCUMENT ME! * @param n - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ @@ -208,7 +207,8 @@ public class PCA implements Runnable Matrix mt = m.transpose(); details.append(" --- OrigT * Orig ---- \n"); - eigenvector = mt.preMultiply(m2); + // eigenvector = mt.preMultiply(m); // standard seqspace comparison matrix + eigenvector = mt.preMultiply(m2); // jalview variation on seqsmace method PrintStream ps = new PrintStream(System.out) { diff --git a/src/jalview/analysis/ParseProperties.java b/src/jalview/analysis/ParseProperties.java index c79d53b..c65411c 100644 --- a/src/jalview/analysis/ParseProperties.java +++ b/src/jalview/analysis/ParseProperties.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.analysis; @@ -69,17 +68,17 @@ public class ParseProperties * Extract scores for sequences by applying regex to description string. * * @param seqs - * seuqences to extract annotation from. + * seuqences to extract annotation from. * @param ScoreNames - * labels for each numeric field in regex match + * labels for each numeric field in regex match * @param ScoreDescriptions - * description for each numeric field in regex match + * description for each numeric field in regex match * @param regex - * Regular Expression string for passing to - * new com.stevesoft.patt.Regex(regex) + * Regular Expression string for passing to + * new com.stevesoft.patt.Regex(regex) * @param repeat - * true means the regex will be applied multiple times along - * the description string of each sequence + * true means the regex will be applied multiple times along the + * description string of each sequence * @return total number of sequences that matched the regex */ public int getScoresFromDescription(SequenceI[] seqs, diff --git a/src/jalview/analysis/SeqsetUtils.java b/src/jalview/analysis/SeqsetUtils.java index ca00532..d8da497 100755 --- a/src/jalview/analysis/SeqsetUtils.java +++ b/src/jalview/analysis/SeqsetUtils.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.analysis; @@ -50,7 +49,7 @@ public class SeqsetUtils * Keys are Name, Start, End, SeqFeatures, PdbId * * @param seq - * SequenceI + * SequenceI * @return Hashtable */ public static Hashtable SeqCharacterHash(SequenceI seq) @@ -85,9 +84,9 @@ public class SeqsetUtils * these methods with something more elegant. * * @param sq - * SequenceI + * SequenceI * @param sqinfo - * Hashtable + * Hashtable * @return boolean true if name was not updated from sqinfo Name entry */ public static boolean SeqCharacterUnhash(SequenceI sq, Hashtable sqinfo) @@ -151,7 +150,7 @@ public class SeqsetUtils * ordered vector of sequences. * * @param i - * int + * int * @return String */ public static String unique_name(int i) @@ -165,10 +164,10 @@ public class SeqsetUtils * name. * * @param sequences - * SequenceI[] + * SequenceI[] * @param write_names - * boolean set this to rename each of the sequences to its - * unique_name(index) name + * boolean set this to rename each of the sequences to its + * unique_name(index) name * @return Hashtable to be passed to * @see deuniquify to recover original names (and properties) for renamed * sequences @@ -201,9 +200,9 @@ public class SeqsetUtils * * @see uniquify(sequences,true) * @param map - * Hashtable + * Hashtable * @param sequences - * SequenceI[] + * SequenceI[] * @return boolean */ public static boolean deuniquify(Hashtable map, SequenceI[] sequences) @@ -217,12 +216,12 @@ public class SeqsetUtils * * @see uniquify(sequences,true) * @param map - * Hashtable + * Hashtable * @param sequences - * SequenceI[] + * SequenceI[] * @param quiet - * when false, don't complain about sequences without any data - * in the map. + * when false, don't complain about sequences without any data in the + * map. * @return boolean */ public static boolean deuniquify(Hashtable map, SequenceI[] sequences, @@ -277,7 +276,7 @@ public class SeqsetUtils * contain at least one residue. * * @param sequences - * SequenceI[] + * SequenceI[] * @return SequenceI[] */ public static SequenceI[] getNonEmptySequenceSet(SequenceI[] sequences) diff --git a/src/jalview/analysis/SequenceIdMatcher.java b/src/jalview/analysis/SequenceIdMatcher.java index 56b760a..ff5621c 100755 --- a/src/jalview/analysis/SequenceIdMatcher.java +++ b/src/jalview/analysis/SequenceIdMatcher.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.analysis; @@ -56,11 +55,11 @@ public class SequenceIdMatcher { names.put(new SeqIdName(seqs[i].getName()), seqs[i]); // add in any interesting identifiers - if (seqs[i].getDBRef()!=null) + if (seqs[i].getDBRef() != null) { DBRefEntry dbr[] = seqs[i].getDBRef(); - SeqIdName sid=null; - for (int r=0;r. */ package jalview.appletgui; @@ -587,26 +586,25 @@ public class APopupMenu extends java.awt.PopupMenu implements return; } - - int rsize=0,gSize = sg.getSize(); - SequenceI[] rseqs,seqs = new SequenceI[gSize]; - SequenceFeature[] tfeatures,features = new SequenceFeature[gSize]; - + int rsize = 0, gSize = sg.getSize(); + SequenceI[] rseqs, seqs = new SequenceI[gSize]; + SequenceFeature[] tfeatures, features = new SequenceFeature[gSize]; + for (int i = 0; i < gSize; i++) { int start = sg.getSequenceAt(i).findPosition(sg.getStartRes()); int end = sg.findEndRes(sg.getSequenceAt(i)); - if (start<=end) + if (start <= end) { seqs[rsize] = sg.getSequenceAt(i); - features[rsize] = new SequenceFeature(null, null, null, start, end, - "Jalview"); + features[rsize] = new SequenceFeature(null, null, null, start, + end, "Jalview"); rsize++; } } rseqs = new SequenceI[rsize]; tfeatures = new SequenceFeature[rsize]; - System.arraycopy(seqs,0,rseqs, 0, rsize); + System.arraycopy(seqs, 0, rseqs, 0, rsize); System.arraycopy(features, 0, tfeatures, 0, rsize); features = tfeatures; seqs = rseqs; diff --git a/src/jalview/appletgui/AlignFrame.java b/src/jalview/appletgui/AlignFrame.java index 1b2088e..954648e 100755 --- a/src/jalview/appletgui/AlignFrame.java +++ b/src/jalview/appletgui/AlignFrame.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.appletgui; @@ -150,7 +149,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, * DOCUMENT ME! * * @param String - * DOCUMENT ME! + * DOCUMENT ME! */ public void parseFeaturesFile(String file, String type) @@ -176,7 +175,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, } viewport.showSequenceFeatures = true; sequenceFeatures.setState(true); - if (viewport.featureSettings!=null) + if (viewport.featureSettings != null) { viewport.featureSettings.refreshTable(); } @@ -441,13 +440,14 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, } alignPanel.paintAlignment(true); } + /** * called by key handler and the hide all/show all menu items + * * @param toggleSeqs * @param toggleCols */ - private void toggleHiddenRegions(boolean toggleSeqs, - boolean toggleCols) + private void toggleHiddenRegions(boolean toggleSeqs, boolean toggleCols) { boolean hide = false; SequenceGroup sg = viewport.getSelectionGroup(); @@ -456,8 +456,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, // Hide everything by the current selection - this is a hack - we do the // invert and then hide // first check that there will be visible columns after the invert. - if ((viewport.colSel != null - && viewport.colSel.getSelected() != null && viewport.colSel + if ((viewport.colSel != null && viewport.colSel.getSelected() != null && viewport.colSel .getSelected().size() > 0) || (sg != null && sg.getSize() > 0 && sg.getStartRes() <= sg .getEndRes())) @@ -508,6 +507,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, } } } + public void keyReleased(KeyEvent evt) { } @@ -587,7 +587,8 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, else if (evt.getSource() == this.centreColumnLabelFlag) { centreColumnLabelFlag_stateChanged(); - } else if (evt.getSource() == this.followMouseOverFlag) + } + else if (evt.getSource() == this.followMouseOverFlag) { mouseOverFlag_stateChanged(); } @@ -598,7 +599,8 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, private void mouseOverFlag_stateChanged() { viewport.followHighlight = followMouseOverFlag.getState(); - // TODO: could kick the scrollTo mechanism to reset view for current searchresults. + // TODO: could kick the scrollTo mechanism to reset view for current + // searchresults. } private void centreColumnLabelFlag_stateChanged() @@ -761,18 +763,21 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, viewport.hideAllSelectedSeqs(); alignPanel.paintAlignment(true); } - else if (source == hideAllButSelection) { - toggleHiddenRegions(false,false); + else if (source == hideAllButSelection) + { + toggleHiddenRegions(false, false); alignPanel.paintAlignment(true); } - else if (source == hideAllSelection) { + else if (source == hideAllSelection) + { SequenceGroup sg = viewport.getSelectionGroup(); viewport.expandColSelection(sg, false); viewport.hideAllSelectedSeqs(); viewport.hideSelectedColumns(); alignPanel.paintAlignment(true); } - else if (source == showAllHidden) { + else if (source == showAllHidden) + { viewport.showAllHiddenColumns(); viewport.showAllHiddenSeqs(); alignPanel.paintAlignment(true); @@ -996,14 +1001,15 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, private Hashtable getDisplayedFeatureCols() { - if (alignPanel.getFeatureRenderer()!=null) { + if (alignPanel.getFeatureRenderer() != null) + { FeatureRenderer fr = alignPanel.getFeatureRenderer(); Hashtable fcols = new Hashtable(); Enumeration en = viewport.featuresDisplayed.keys(); while (en.hasMoreElements()) { Object col = en.nextElement(); - fcols.put(col,fr.featureColours.get(col)); + fcols.put(col, fr.featureColours.get(col)); } return fcols; } @@ -1191,7 +1197,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, * DOCUMENT ME! * * @param e - * DOCUMENT ME! + * DOCUMENT ME! */ protected void undoMenuItem_actionPerformed() { @@ -1216,7 +1222,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, * DOCUMENT ME! * * @param e - * DOCUMENT ME! + * DOCUMENT ME! */ protected void redoMenuItem_actionPerformed() { @@ -1653,6 +1659,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, this.setVisible(false); } } + protected void makeGrpsFromSelection_actionPerformed() { if (viewport.getSelectionGroup() != null) @@ -1668,7 +1675,8 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, for (int g = 0; g < gps.length; g++) { // gps[g].setShowunconserved(viewport.getShowUnconserved()); - gps[g].setIncludeAllConsSymbols(viewport.isIncludeAllConsensusSymbols()); + gps[g].setIncludeAllConsSymbols(viewport + .isIncludeAllConsensusSymbols()); viewport.alignment.addGroup(gps[g]); Color col = new Color((int) (Math.random() * 255), (int) (Math .random() * 255), (int) (Math.random() * 255)); @@ -1683,6 +1691,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, alignPanel.paintAlignment(true); } } + protected void deleteGroups_actionPerformed() { viewport.alignment.deleteAllGroups(); @@ -1731,6 +1740,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, PaintRefresher.Refresh(alignPanel, viewport.getSequenceSetId()); } + public void invertColSel_actionPerformed() { viewport.invertColumnSelection(); @@ -1976,7 +1986,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, * get sequence feature groups that are hidden or shown * * @param visible - * true is visible + * true is visible * @return list */ public String[] getFeatureGroupsOfState(boolean visible) @@ -1994,9 +2004,9 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, * Change the display state for the given feature groups * * @param groups - * list of group strings + * list of group strings * @param state - * visible or invisible + * visible or invisible */ public void setFeatureGroupState(String[] groups, boolean state) { @@ -2238,6 +2248,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, modifyPID_actionPerformed(); } + public void sortPairwiseMenuItem_actionPerformed() { SequenceI[] oldOrder = viewport.getAlignment().getSequencesArray(); @@ -2253,8 +2264,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, { SequenceI[] oldOrder = viewport.getAlignment().getSequencesArray(); AlignmentSorter.sortByID(viewport.getAlignment()); - addHistoryItem(new OrderCommand("ID Sort", oldOrder, - viewport.alignment)); + addHistoryItem(new OrderCommand("ID Sort", oldOrder, viewport.alignment)); alignPanel.paintAlignment(true); } @@ -2392,28 +2402,36 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, jalview.bin.JalviewLite.addFrame(tp, treeFile, 600, 500); addTreeMenuItem(tp, treeFile); } + /** * sort the alignment using the given treePanel - * @param treePanel tree used to sort view - * @param title string used for undo event name + * + * @param treePanel + * tree used to sort view + * @param title + * string used for undo event name */ public void sortByTree(TreePanel treePanel, String title) { SequenceI[] oldOrder = viewport.getAlignment().getSequencesArray(); - AlignmentSorter.sortByTree(viewport.getAlignment(), treePanel - .getTree()); + AlignmentSorter + .sortByTree(viewport.getAlignment(), treePanel.getTree()); // addHistoryItem(new HistoryItem("Sort", viewport.alignment, // HistoryItem.SORT)); - addHistoryItem(new OrderCommand("Order by "+title, oldOrder, + addHistoryItem(new OrderCommand("Order by " + title, oldOrder, viewport.alignment)); alignPanel.paintAlignment(true); } + /** - * Do any automatic reordering of the alignment and add the necessary bits to the menu structure for the new tree + * Do any automatic reordering of the alignment and add the necessary bits to + * the menu structure for the new tree + * * @param treePanel * @param title */ - protected void addTreeMenuItem(final TreePanel treePanel, final String title) + protected void addTreeMenuItem(final TreePanel treePanel, + final String title) { final MenuItem item = new MenuItem(title); sortByTreeMenu.add(item); @@ -2454,7 +2472,9 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, class AboutPanel extends Canvas { String version; + String builddate; + public AboutPanel(String version, String builddate) { this.version = version; @@ -2475,7 +2495,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, g.setFont(new Font("Helvetica", Font.BOLD, 14)); g.drawString("JalviewLite - Release " + version, x, y += fh); g.setFont(new Font("Helvetica", Font.BOLD, 12)); - g.drawString("Build date: "+builddate, x, y += fh); + g.drawString("Build date: " + builddate, x, y += fh); g.setFont(new Font("Helvetica", Font.PLAIN, 12)); g .drawString( @@ -2491,15 +2511,22 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, "For help, see the FAQ at www.jalview.org and/or join the jalview-discuss@jalview.org mailing list", x, y += fh); g.drawString("If you use Jalview, please cite:", x, y += fh + 8); - g.drawString( - "Waterhouse, A.M., Procter, J.B., Martin, D.M.A, Clamp, M. and Barton, G. J. (2009)",x,y+=fh); - g.drawString("Jalview Version 2 - a multiple sequence alignment editor and analysis workbench",x,y+=fh); - g.drawString("Bioinformatics doi: 10.1093/bioinformatics/btp033",x,y+=fh); + g + .drawString( + "Waterhouse, A.M., Procter, J.B., Martin, D.M.A, Clamp, M. and Barton, G. J. (2009)", + x, y += fh); + g + .drawString( + "Jalview Version 2 - a multiple sequence alignment editor and analysis workbench", + x, y += fh); + g.drawString("Bioinformatics doi: 10.1093/bioinformatics/btp033", + x, y += fh); } } Frame frame = new Frame(); - frame.add(new AboutPanel(JalviewLite.getVersion(), JalviewLite.getBuildDate())); + frame.add(new AboutPanel(JalviewLite.getVersion(), JalviewLite + .getBuildDate())); jalview.bin.JalviewLite.addFrame(frame, "Jalview", 580, 220); } @@ -2514,18 +2541,25 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, { try { - if (url.indexOf(":")==-1) + if (url.indexOf(":") == -1) { - // TODO: verify (Bas Vroling bug) prepend codebase or server URL to form valid URL - if (url.indexOf("/")==0) + // TODO: verify (Bas Vroling bug) prepend codebase or server URL to + // form valid URL + if (url.indexOf("/") == 0) { String codebase = viewport.applet.getCodeBase().toString(); - url = codebase.substring(0,codebase.length()-viewport.applet.getCodeBase().getFile().length())+url; - } else { - url = viewport.applet.getCodeBase()+url; + url = codebase.substring(0, codebase.length() + - viewport.applet.getCodeBase().getFile().length()) + + url; + } + else + { + url = viewport.applet.getCodeBase() + url; } System.out.println("Show url (prepended codebase): " + url); - } else { + } + else + { System.out.println("Show url: " + url); } viewport.applet.getAppletContext().showDocument( @@ -2660,7 +2694,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, MenuItem deleteGroups = new MenuItem(); - MenuItem grpsFromSelection= new MenuItem(); + MenuItem grpsFromSelection = new MenuItem(); MenuItem delete = new MenuItem(); @@ -3042,7 +3076,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, selectMenu.add(invertColSel); selectMenu.add(grpsFromSelection); selectMenu.add(deleteGroups); - + } MenuItem featureSettings = new MenuItem(); @@ -3066,7 +3100,9 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, MenuItem hideSequences = new MenuItem(); MenuItem hideAllButSelection = new MenuItem(); + MenuItem hideAllSelection = new MenuItem(); + MenuItem showAllHidden = new MenuItem(); Menu formatMenu = new Menu(); @@ -3081,8 +3117,8 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, * platform independent manner to avoid OSX/Mac menu appendage daftness. * * @param reallyEmbedded - * true to attach the view to the applet area on the page - * rather than in a new window + * true to attach the view to the applet area on the page rather than + * in a new window */ public void createAlignFrameWindow(boolean reallyEmbedded, String title) { diff --git a/src/jalview/appletgui/AlignViewport.java b/src/jalview/appletgui/AlignViewport.java index 1147526..a954e7b 100755 --- a/src/jalview/appletgui/AlignViewport.java +++ b/src/jalview/appletgui/AlignViewport.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.appletgui; @@ -116,7 +115,9 @@ public class AlignViewport AlignmentAnnotation conservation; AlignmentAnnotation quality; + AlignmentAnnotation[] groupConsensus; + AlignmentAnnotation[] groupConservation; boolean autocalculateConsensus = true; @@ -150,43 +151,53 @@ public class AlignViewport this.endRes = al.getWidth() - 1; this.startSeq = 0; this.endSeq = al.getHeight() - 1; - if (applet!=null) + if (applet != null) { // get the width and height scaling factors if they were specified String param = applet.getParameter("widthScale"); - if (param!=null) + if (param != null) { - try { + try + { widthScale = new Float(param).floatValue(); } catch (Exception e) { } - if (widthScale<=1.0) + if (widthScale <= 1.0) { - System.err.println("Invalid alignment character width scaling factor ("+widthScale+"). Ignoring."); + System.err + .println("Invalid alignment character width scaling factor (" + + widthScale + "). Ignoring."); widthScale = 1; } if (applet.debug) { - System.err.println("Alignment character width scaling factor is now "+widthScale); + System.err + .println("Alignment character width scaling factor is now " + + widthScale); } } param = applet.getParameter("heightScale"); - if (param!=null) + if (param != null) { - try { + try + { heightScale = new Float(param).floatValue(); } catch (Exception e) { } - if (heightScale<=1.0) + if (heightScale <= 1.0) { - System.err.println("Invalid alignment character height scaling factor ("+heightScale+"). Ignoring."); + System.err + .println("Invalid alignment character height scaling factor (" + + heightScale + "). Ignoring."); heightScale = 1; } if (applet.debug) { - System.err.println("Alignment character height scaling factor is now "+heightScale); + System.err + .println("Alignment character height scaling factor is now " + + heightScale); } } } @@ -243,7 +254,7 @@ public class AlignViewport param = applet.getParameter("sortByTree"); if (param != null) { - sortByTree=Boolean.valueOf(param).booleanValue(); + sortByTree = Boolean.valueOf(param).booleanValue(); } } @@ -391,7 +402,7 @@ public class AlignViewport maxR = 1.0f - minR; maxG = 0.9f - minG; maxB = 0f - minB; // scalable range for colouring both Conservation and - // Quality + // Quality float min = 0f; float max = 11f; @@ -428,7 +439,8 @@ public class AlignViewport { value = 10; } - // TODO - refactor to use a graduatedColorScheme to calculate the histogram colors. + // TODO - refactor to use a graduatedColorScheme to calculate the + // histogram colors. float vprop = value - min; vprop /= max; conservation.annotations[i] = new Annotation(String.valueOf(c), @@ -548,8 +560,10 @@ public class AlignViewport hconsensus = new Hashtable[aWidth]; AAFrequency.calculate(alignment.getSequencesArray(), 0, alignment .getWidth(), hconsensus, includeAllConsensusSymbols); - AAFrequency.completeConsensus(consensus,hconsensus,0,aWidth,ignoreGapsInConsensusCalculation, includeAllConsensusSymbols); - + AAFrequency.completeConsensus(consensus, hconsensus, 0, aWidth, + ignoreGapsInConsensusCalculation, + includeAllConsensusSymbols); + if (globalColourScheme != null) { globalColourScheme.setConsensus(hconsensus); @@ -709,7 +723,7 @@ public class AlignViewport protected FeatureSettings featureSettings = null; - private float heightScale=1,widthScale=1; + private float heightScale = 1, widthScale = 1; public void setFont(Font f) { @@ -721,14 +735,14 @@ public class AlignViewport } java.awt.FontMetrics fm = nullFrame.getGraphics().getFontMetrics(font); - setCharHeight((int)(heightScale*fm.getHeight())); - charWidth = (int)(widthScale*fm.charWidth('M')); + setCharHeight((int) (heightScale * fm.getHeight())); + charWidth = (int) (widthScale * fm.charWidth('M')); if (upperCasebold) { Font f2 = new Font(f.getName(), Font.BOLD, f.getSize()); fm = nullFrame.getGraphics().getFontMetrics(f2); - charWidth = (int)(widthScale*(fm.stringWidth("MMMMMMMMMMM") / 10)); + charWidth = (int) (widthScale * (fm.stringWidth("MMMMMMMMMMM") / 10)); } } @@ -955,7 +969,7 @@ public class AlignViewport * Property change listener for changes in alignment * * @param listener - * DOCUMENT ME! + * DOCUMENT ME! */ public void addPropertyChangeListener( java.beans.PropertyChangeListener listener) @@ -967,7 +981,7 @@ public class AlignViewport * DOCUMENT ME! * * @param listener - * DOCUMENT ME! + * DOCUMENT ME! */ public void removePropertyChangeListener( java.beans.PropertyChangeListener listener) @@ -979,11 +993,11 @@ public class AlignViewport * Property change listener for changes in alignment * * @param prop - * DOCUMENT ME! + * DOCUMENT ME! * @param oldvalue - * DOCUMENT ME! + * DOCUMENT ME! * @param newvalue - * DOCUMENT ME! + * DOCUMENT ME! */ public void firePropertyChange(String prop, Object oldvalue, Object newvalue) @@ -1167,6 +1181,7 @@ public class AlignViewport return sequences; } + /** * get the currently selected sequence objects or all the sequences in the * alignment. @@ -1175,8 +1190,8 @@ public class AlignViewport */ public SequenceI[] getSequenceSelection() { - SequenceI[] sequences=null; - if (selectionGroup!=null) + SequenceI[] sequences = null; + if (selectionGroup != null) { sequences = selectionGroup.getSequencesInOrder(alignment); } @@ -1186,6 +1201,7 @@ public class AlignViewport } return sequences; } + /** * This method returns the visible alignment as text, as seen on the GUI, ie * if columns are hidden they will not be returned in the result. Use this for @@ -1207,7 +1223,7 @@ public class AlignViewport seqs = selectionGroup.getSequencesInOrder(alignment); start = selectionGroup.getStartRes(); end = selectionGroup.getEndRes(); // inclusive for start and end in - // SeqCigar constructor + // SeqCigar constructor } else { @@ -1288,7 +1304,7 @@ public class AlignViewport * to an analysis function * * @param selectedOnly - * boolean true to just return the selected view + * boolean true to just return the selected view * @return AlignmentView */ jalview.datamodel.AlignmentView getAlignmentView(boolean selectedOnly) @@ -1514,7 +1530,6 @@ public class AlignViewport boolean centreColumnLabels; - public boolean getCentreColumnLabels() { return centreColumnLabels; @@ -1536,19 +1551,23 @@ public class AlignViewport } } } - public boolean followHighlight=false; - public boolean getFollowHighlight() { + + public boolean followHighlight = false; + + public boolean getFollowHighlight() + { return followHighlight; } + /** * show non-conserved residues only */ - public boolean showUnconserved=false; + public boolean showUnconserved = false; /** * when set, alignment should be reordered according to a newly opened tree */ - public boolean sortByTree=false; + public boolean sortByTree = false; /** * @return the showUnconserved @@ -1559,7 +1578,8 @@ public class AlignViewport } /** - * @param showUnconserved the showUnconserved to set + * @param showUnconserved + * the showUnconserved to set */ public void setShowunconserved(boolean displayNonconserved) { @@ -1568,29 +1588,34 @@ public class AlignViewport /** * consensus annotation includes all percentage for all symbols in column - * DISABLED FOR 2.5 RELEASE (bug #60064 logo rendering is not AWT 1.1 compatible) + * DISABLED FOR 2.5 RELEASE (bug #60064 logo rendering is not AWT 1.1 + * compatible) */ - private boolean includeAllConsensusSymbols=false; - + private boolean includeAllConsensusSymbols = false; + /** - * should conservation rows be shown for groups - * DISABLED FOR 2.5 RELEASE (bug 62446) + * should conservation rows be shown for groups DISABLED FOR 2.5 RELEASE (bug + * 62446) */ boolean showGroupConservation = false; + /** - * should consensus rows be shown for groups - * DISABLED FOR 2.5 RELEASE (bug 62446) + * should consensus rows be shown for groups DISABLED FOR 2.5 RELEASE (bug + * 62446) */ boolean showGroupConsensus = false; + /** - * should consensus profile be rendered by default - * DISABLED FOR 2.5 RELEASE (bug #60064 logo rendering is not AWT 1.1 compatible) + * should consensus profile be rendered by default DISABLED FOR 2.5 RELEASE + * (bug #60064 logo rendering is not AWT 1.1 compatible) */ public boolean showSequenceLogo = false; + /** * should consensus histograms be rendered by default */ public boolean showConsensusHistogram = true; + /** * @return the showConsensusProfile */ @@ -1598,20 +1623,21 @@ public class AlignViewport { return showSequenceLogo; } + /** - * @param showSequenceLogo the new value - public void setShowSequenceLogo(boolean showSequenceLogo) - { - this.showSequenceLogo = showSequenceLogo; - } + * @param showSequenceLogo + * the new value public void setShowSequenceLogo(boolean + * showSequenceLogo) { this.showSequenceLogo = showSequenceLogo; } */ /** - * @param showGroupConsensus the showGroupConsensus to set + * @param showGroupConsensus + * the showGroupConsensus to set */ public void setShowGroupConsensus(boolean showGroupConsensus) { this.showGroupConsensus = showGroupConsensus; } + /** * @return the includeAllConsensusSymbols */ @@ -1619,39 +1645,48 @@ public class AlignViewport { return false; } - + /** * - * @return flag to indicate if the consensus histogram should be rendered by default + * @return flag to indicate if the consensus histogram should be rendered by + * default */ public boolean isShowConsensusHistogram() { return this.showConsensusHistogram; } + /** - * synthesize a column selection if none exists so it covers the given selection group. - * if wholewidth is false, no column selection is made if the selection group covers the whole alignment width. + * synthesize a column selection if none exists so it covers the given + * selection group. if wholewidth is false, no column selection is made if the + * selection group covers the whole alignment width. + * * @param sg - * @param wholewidth + * @param wholewidth */ public void expandColSelection(SequenceGroup sg, boolean wholewidth) { - int sgs,sge; - if (sg!=null && (sgs=sg.getStartRes())>=0 && sg.getStartRes()<=(sge=sg.getEndRes())&& (colSel==null || colSel.getSelected()==null || colSel.getSelected().size()==0)) + int sgs, sge; + if (sg != null + && (sgs = sg.getStartRes()) >= 0 + && sg.getStartRes() <= (sge = sg.getEndRes()) + && (colSel == null || colSel.getSelected() == null || colSel + .getSelected().size() == 0)) { - if (!wholewidth && alignment.getWidth()==(1+sge-sgs)) + if (!wholewidth && alignment.getWidth() == (1 + sge - sgs)) { - // do nothing + // do nothing return; } - if (colSel==null) + if (colSel == null) { colSel = new ColumnSelection(); } - for (int cspos = sg.getStartRes(); cspos<=sg.getEndRes(); cspos++) { + for (int cspos = sg.getStartRes(); cspos <= sg.getEndRes(); cspos++) + { colSel.addElement(cspos); } - } + } } } diff --git a/src/jalview/appletgui/AlignmentPanel.java b/src/jalview/appletgui/AlignmentPanel.java index 874b552..1296829 100755 --- a/src/jalview/appletgui/AlignmentPanel.java +++ b/src/jalview/appletgui/AlignmentPanel.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.appletgui; @@ -229,34 +228,36 @@ public class AlignmentPanel extends Panel implements AdjustmentListener { seqPanel.seqCanvas.highlightSearchResults(results); } + /** - * scroll the view to show the position of the highlighted - * region in results (if any) + * scroll the view to show the position of the highlighted region in results + * (if any) + * * @param results */ public void scrollToPosition(SearchResults results) { // do we need to scroll the panel? - if (results != null && results.getSize()>0) + if (results != null && results.getSize() > 0) { int seqIndex = av.alignment.findIndex(results); - if (seqIndex==-1) + if (seqIndex == -1) { return; } SequenceI seq = av.alignment.getSequenceAt(seqIndex); - int [] r = results.getResults(seq, seq.getStart(), seq.getEnd()); - if (r==null) + int[] r = results.getResults(seq, seq.getStart(), seq.getEnd()); + if (r == null) { return; } int start = r[0]; int end = r[1]; - if (start<0) + if (start < 0) { return; } - if (end==seq.getEnd()) + if (end == seq.getEnd()) { return; } diff --git a/src/jalview/appletgui/AnnotationColourChooser.java b/src/jalview/appletgui/AnnotationColourChooser.java index fb2db99..485ad5e 100755 --- a/src/jalview/appletgui/AnnotationColourChooser.java +++ b/src/jalview/appletgui/AnnotationColourChooser.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.appletgui; diff --git a/src/jalview/appletgui/AnnotationLabels.java b/src/jalview/appletgui/AnnotationLabels.java index d498ca5..54b8a84 100755 --- a/src/jalview/appletgui/AnnotationLabels.java +++ b/src/jalview/appletgui/AnnotationLabels.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.appletgui; @@ -291,7 +290,7 @@ public class AnnotationLabels extends Panel implements ActionListener, * DOCUMENT ME! * * @param e - * DOCUMENT ME! + * DOCUMENT ME! */ protected void copy_annotseqtoclipboard(SequenceI sq) { diff --git a/src/jalview/appletgui/AnnotationPanel.java b/src/jalview/appletgui/AnnotationPanel.java index c5da18b..15b590e 100755 --- a/src/jalview/appletgui/AnnotationPanel.java +++ b/src/jalview/appletgui/AnnotationPanel.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.appletgui; @@ -59,13 +58,14 @@ public class AnnotationPanel extends Panel implements AdjustmentListener, int imgWidth = 0; boolean fastPaint = false; - //Used For mouse Dragging and resizing graphs + + // Used For mouse Dragging and resizing graphs int graphStretch = -1; int graphStretchY = -1; - - boolean mouseDragging=false; - + + boolean mouseDragging = false; + public static int GRAPH_HEIGHT = 40; boolean MAC = false; @@ -99,7 +99,7 @@ public class AnnotationPanel extends Panel implements AdjustmentListener, * DOCUMENT ME! * * @param evt - * DOCUMENT ME! + * DOCUMENT ME! */ public void actionPerformed(ActionEvent evt) { @@ -268,13 +268,12 @@ public class AnnotationPanel extends Panel implements AdjustmentListener, { activeRow = i; } - else if (aa[i].graph > 0) + else if (aa[i].graph > 0) { // Stretch Graph graphStretch = i; graphStretchY = evt.getY(); } - break; } @@ -558,11 +557,11 @@ public class AnnotationPanel extends Panel implements AdjustmentListener, * DOCUMENT ME! * * @param g - * DOCUMENT ME! + * DOCUMENT ME! * @param startRes - * DOCUMENT ME! + * DOCUMENT ME! * @param endRes - * DOCUMENT ME! + * DOCUMENT ME! */ public void drawComponent(Graphics g, int startRes, int endRes) { @@ -602,11 +601,13 @@ public class AnnotationPanel extends Panel implements AdjustmentListener, boolean validRes = false; boolean validEnd = false; boolean labelAllCols = false; - boolean centreColLabels,centreColLabelsDef = av.getCentreColumnLabels(); - boolean scaleColLabel=false; + boolean centreColLabels, centreColLabelsDef = av + .getCentreColumnLabels(); + boolean scaleColLabel = false; boolean[] graphGroupDrawn = new boolean[aa.length]; int charOffset = 0; // offset for a label - float fmWidth, fmScaling = 1f; // scaling for a label to fit it into a column. + float fmWidth, fmScaling = 1f; // scaling for a label to fit it into a + // column. // \u03B2 \u03B1 for (int i = 0; i < aa.length; i++) { @@ -638,7 +639,7 @@ public class AnnotationPanel extends Panel implements AdjustmentListener, y -= av.charHeight; } } - //TODO: else is the logic used in application, applet had no 'else' + // TODO: else is the logic used in application, applet had no 'else' else if (row.hasText) { iconOffset = av.charHeight - fm.getDescent(); @@ -701,31 +702,37 @@ public class AnnotationPanel extends Panel implements AdjustmentListener, && (row.annotations[column].displayCharacter != null && row.annotations[column].displayCharacter .length() > 0)) { - + if (centreColLabels || scaleColLabel) { - fmWidth = (float) fm - .charsWidth(row.annotations[column].displayCharacter - .toCharArray(), 0, - row.annotations[column].displayCharacter.length()); + fmWidth = (float) fm.charsWidth( + row.annotations[column].displayCharacter.toCharArray(), + 0, row.annotations[column].displayCharacter.length()); - if ( scaleColLabel ) { + if (scaleColLabel) + { // justify the label and scale to fit in column - if (fmWidth > av.charWidth) { + if (fmWidth > av.charWidth) + { // scale only if the current font isn't already small enough fmScaling = av.charWidth; fmScaling /= fmWidth; - // not 1.1 // g.setFont(new Font(ofont,AffineTransform.getScaleInstance(fmScaling, 1.0))); + // not 1.1 // g.setFont(new + // Font(ofont,AffineTransform.getScaleInstance(fmScaling, + // 1.0))); // and update the label's width to reflect the scaling. fmWidth = av.charWidth; } } - } else { + } + else + { fmWidth = (float) fm - .charWidth(row.annotations[column].displayCharacter.charAt(0)); + .charWidth(row.annotations[column].displayCharacter + .charAt(0)); } - charOffset = (int) ((av.charWidth - fmWidth) / 2f); - + charOffset = (int) ((av.charWidth - fmWidth) / 2f); + if (row.annotations[column].colour == null) g.setColor(Color.black); else @@ -734,11 +741,13 @@ public class AnnotationPanel extends Panel implements AdjustmentListener, if (column == 0 || row.graph > 0) { g.drawString(row.annotations[column].displayCharacter, - (x * av.charWidth) + charOffset, y + iconOffset + 3); // + 3? + (x * av.charWidth) + charOffset, y + iconOffset + 3); // + + // 3? } else if (row.annotations[column - 1] == null - || (labelAllCols||!row.annotations[column].displayCharacter - .equals(row.annotations[column - 1].displayCharacter) || (row.annotations[column].displayCharacter + || (labelAllCols + || !row.annotations[column].displayCharacter + .equals(row.annotations[column - 1].displayCharacter) || (row.annotations[column].displayCharacter .length() < 2 && row.annotations[column].secondaryStructure == ' '))) { g.drawString(row.annotations[column].displayCharacter, @@ -910,7 +919,7 @@ public class AnnotationPanel extends Panel implements AdjustmentListener, } } - if (row.graph > 0 && row.graphHeight> 0) + if (row.graph > 0 && row.graphHeight > 0) { if (row.graph == AlignmentAnnotation.LINE_GRAPH) { @@ -1024,7 +1033,7 @@ public class AnnotationPanel extends Panel implements AdjustmentListener, } if (aa.annotations[column] == null) // || coaa.annotations[column - 1] == - // null) + // null) { x++; continue; @@ -1065,7 +1074,7 @@ public class AnnotationPanel extends Panel implements AdjustmentListener, int eRes, float min, float max, int y) { ColourSchemeI profcolour = av.getGlobalColourScheme(); - if (profcolour==null) + if (profcolour == null) { profcolour = new jalview.schemes.ZappoColourScheme(); } @@ -1092,18 +1101,15 @@ public class AnnotationPanel extends Panel implements AdjustmentListener, int column; int aaMax = aa.annotations.length - 1; boolean renderHistogram = true, renderProfile = false; - /* Logos are disabled for 2.5 release : Bug # 0060064 - * if (aa.autoCalculated && aa.label.startsWith("Consensus")) { - // TODO: generalise this to have render styles for consensus/profile data - if (aa.groupRef!=null) - { - renderHistogram = aa.groupRef.isShowConsensusHistogram(); - renderProfile = aa.groupRef.isShowSequenceLogo(); - } else { - renderHistogram = av.isShowConsensusHistogram(); - renderProfile = av.isShowSequenceLogo(); - } - }*/ + /* + * Logos are disabled for 2.5 release : Bug # 0060064 if (aa.autoCalculated + * && aa.label.startsWith("Consensus")) { // TODO: generalise this to have + * render styles for consensus/profile data if (aa.groupRef!=null) { + * renderHistogram = aa.groupRef.isShowConsensusHistogram(); renderProfile = + * aa.groupRef.isShowSequenceLogo(); } else { renderHistogram = + * av.isShowConsensusHistogram(); renderProfile = av.isShowSequenceLogo(); } + * } + */ while (x < eRes - sRes) { column = sRes + x; @@ -1132,49 +1138,33 @@ public class AnnotationPanel extends Panel implements AdjustmentListener, - (int) (((aa.annotations[column].value - min) / (range)) * aa.graphHeight); if (renderHistogram) - { - if (y1 - y2 > 0) { - g.fillRect(x * av.charWidth, y2, av.charWidth, y1 - y2); - } - else - { - g.fillRect(x * av.charWidth, y1, av.charWidth, y2 - y1); - } + if (y1 - y2 > 0) + { + g.fillRect(x * av.charWidth, y2, av.charWidth, y1 - y2); + } + else + { + g.fillRect(x * av.charWidth, y1, av.charWidth, y2 - y1); + } } // draw profile if available // Disabled for 2.5 release: see bug #0060064 /** - if (aa.annotations[column].value!=0 && renderProfile) - { - int profl[] = getProfileFor(aa,column); - int ht = y1; //,htn=y2-y1;//aa.graphHeight; - float wdth; - double ht2=0; - char[] dc = new char[1]; - // LineMetrics lm; - for (int c=1;profl!=null && c2) - { - ht+=(int)ht2; - } - { - // not java 1.1 compatible: Bug # 0060064 - g.setFont(ofont.deriveFont(AffineTransform.getScaleInstance(wdth, (ht2=(htn*((double)profl[c++])/100.0))/av.charHeight))); - lm = g.getFontMetrics().getLineMetrics(dc,0,1, g); - g.setColor(profcolour.findColour(dc[0])); - g.drawChars(dc,0,1,x*av.charWidth, (int) (ht+lm.getHeight())); - } - } - g.setFont(ofont); - } - **/ + * if (aa.annotations[column].value!=0 && renderProfile) { int profl[] = + * getProfileFor(aa,column); int ht = y1; //,htn=y2-y1;//aa.graphHeight; + * float wdth; double ht2=0; char[] dc = new char[1]; // LineMetrics lm; + * for (int c=1;profl!=null && c2) { ht+=(int)ht2; } { // not java 1.1 compatible: Bug # 0060064 + * g.setFont(ofont.deriveFont(AffineTransform.getScaleInstance(wdth, + * (ht2=(htn*((double)profl[c++])/100.0))/av.charHeight))); lm = + * g.getFontMetrics().getLineMetrics(dc,0,1, g); + * g.setColor(profcolour.findColour(dc[0])); + * g.drawChars(dc,0,1,x*av.charWidth, (int) (ht+lm.getHeight())); } } + * g.setFont(ofont); } + **/ x++; } @@ -1187,21 +1177,18 @@ public class AnnotationPanel extends Panel implements AdjustmentListener, } /* - * Disabled for 2.5 release - see bug #0060064 - private int[] getProfileFor(AlignmentAnnotation aa, int column) - { -// if (aa.autoCalculated && aa.label.startsWith("Consensus")) { - if (aa.groupRef!=null && aa.groupRef.consensusData!=null) { // && aa.groupRef.isShowSequenceLogo()) { - return AAFrequency.extractProfile(aa.groupRef.consensusData[column],aa.groupRef.getIgnoreGapsConsensus()); - } - // TODO extend annotation row to enable dynamic and static profile data to be stored - if (aa.groupRef==null && aa.sequenceRef==null) // && av.isShowSequenceLogo()) - { - return AAFrequency.extractProfile(av.hconsensus[column],av.getIgnoreGapsConsensus()); - } - // } - return null; - } + * Disabled for 2.5 release - see bug #0060064 private int[] + * getProfileFor(AlignmentAnnotation aa, int column) { // if + * (aa.autoCalculated && aa.label.startsWith("Consensus")) { if + * (aa.groupRef!=null && aa.groupRef.consensusData!=null) { // && + * aa.groupRef.isShowSequenceLogo()) { return + * AAFrequency.extractProfile(aa.groupRef + * .consensusData[column],aa.groupRef.getIgnoreGapsConsensus()); } // TODO + * extend annotation row to enable dynamic and static profile data to be + * stored if (aa.groupRef==null && aa.sequenceRef==null) // && + * av.isShowSequenceLogo()) { return + * AAFrequency.extractProfile(av.hconsensus[column + * ],av.getIgnoreGapsConsensus()); } // } return null; } */ // used by overview window diff --git a/src/jalview/appletgui/AppletJmol.java b/src/jalview/appletgui/AppletJmol.java index 4484b0c..caaffa2 100644 --- a/src/jalview/appletgui/AppletJmol.java +++ b/src/jalview/appletgui/AppletJmol.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.appletgui; @@ -117,20 +116,17 @@ public class AppletJmol extends EmbmenuFrame implements StructureListener, this.protocol = protocol; if (pdbentry.getId() == null || pdbentry.getId().length() < 1) { - if (jalview.bin.JalviewLite.debug) + if (protocol.equals(AppletFormatAdapter.PASTE)) { - System.err.println("Setting PDB id for file " + pdbentry.getFile()); - if (protocol.equals(AppletFormatAdapter.PASTE)) - { - pdbentry.setId("PASTED PDB" - + (chains == null ? "_" : chains.toString())); - } - else - { - pdbentry.setId(pdbentry.getFile()); - } + pdbentry.setId("PASTED PDB" + + (chains == null ? "_" : chains.toString())); + } + else + { + pdbentry.setId(pdbentry.getFile()); } } + if (jalview.bin.JalviewLite.debug) { System.err diff --git a/src/jalview/appletgui/CutAndPasteTransfer.java b/src/jalview/appletgui/CutAndPasteTransfer.java index f4b0a1d..c33fc48 100755 --- a/src/jalview/appletgui/CutAndPasteTransfer.java +++ b/src/jalview/appletgui/CutAndPasteTransfer.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.appletgui; diff --git a/src/jalview/appletgui/EditNameDialog.java b/src/jalview/appletgui/EditNameDialog.java index f5a385d..0efc429 100644 --- a/src/jalview/appletgui/EditNameDialog.java +++ b/src/jalview/appletgui/EditNameDialog.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.appletgui; diff --git a/src/jalview/appletgui/EmbmenuFrame.java b/src/jalview/appletgui/EmbmenuFrame.java index 6ef30ef..c80adb3 100644 --- a/src/jalview/appletgui/EmbmenuFrame.java +++ b/src/jalview/appletgui/EmbmenuFrame.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.appletgui; @@ -80,8 +79,8 @@ public class EmbmenuFrame extends Frame implements MouseListener * menuBar to be embedded, and if so, embeds it. * * @param tobeAdjusted - * the panel that is to be reduced to make space for the - * embedded menu bar + * the panel that is to be reduced to make space for the embedded + * menu bar * @return true if menuBar was embedded and tobeAdjusted's height modified */ protected boolean embedMenuIfNeeded(Panel tobeAdjusted) @@ -118,8 +117,8 @@ public class EmbmenuFrame extends Frame implements MouseListener * @param fstyle * @param fsz * @param overrideFonts - * true if we take the menuBar fonts in preference to the - * supplied defaults + * true if we take the menuBar fonts in preference to the supplied + * defaults * @return the embedded menu instance to be added to the frame. */ protected Panel makeEmbeddedPopupMenu(MenuBar menuBar, String fn, @@ -140,8 +139,8 @@ public class EmbmenuFrame extends Frame implements MouseListener * @param fsz * @param overrideFonts * @param append - * true means existing menu will be emptied before adding new - * elements + * true means existing menu will be emptied before adding new + * elements * @return */ protected Panel makeEmbeddedPopupMenu(MenuBar menuBar, String fn, @@ -176,18 +175,18 @@ public class EmbmenuFrame extends Frame implements MouseListener * already attached. * * @param menuBar - * must be non-null + * must be non-null * @param fn * @param fstyle * @param fsz * @param overrideFonts * @param embeddedPopup - * must be non-null + * must be non-null * @param embeddedMenu - * if null, a new panel will be created and returned - * @param clickHandler - - * usually the instance of EmbmenuFrame that holds references - * to embeddedPopup and embeddedMenu + * if null, a new panel will be created and returned + * @param clickHandler + * - usually the instance of EmbmenuFrame that holds references to + * embeddedPopup and embeddedMenu * @return the panel instance for convenience. */ protected Panel makeEmbeddedPopupMenu(MenuBar menuBar, String fn, @@ -257,7 +256,7 @@ public class EmbmenuFrame extends Frame implements MouseListener * get the menu for source from the hash. * * @param source - * what was clicked on. + * what was clicked on. */ PopupMenu getPopupMenu(Label source) { diff --git a/src/jalview/appletgui/FeatureColourChooser.java b/src/jalview/appletgui/FeatureColourChooser.java index cb8f23b..8790b55 100644 --- a/src/jalview/appletgui/FeatureColourChooser.java +++ b/src/jalview/appletgui/FeatureColourChooser.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.appletgui; @@ -27,38 +26,48 @@ import jalview.datamodel.*; import jalview.schemes.*; import java.awt.Rectangle; -public class FeatureColourChooser extends Panel implements - ActionListener, AdjustmentListener, ItemListener, MouseListener +public class FeatureColourChooser extends Panel implements ActionListener, + AdjustmentListener, ItemListener, MouseListener { JVDialog frame; + Frame owner; + FeatureRenderer fr; + FeatureSettings fs = null; + // AlignmentPanel ap; GraduatedColor cs; + Object oldcs; Hashtable oldgroupColours; - boolean adjusting = false; - private float min,max; - String type=null; - private AlignFrame af=null; + private float min, max; + + String type = null; + + private AlignFrame af = null; + public FeatureColourChooser(AlignFrame af, String type) { this.af = af; init(af.getSeqcanvas().getFeatureRenderer(), type); } + public FeatureColourChooser(FeatureSettings fsettings, String type) { this.fs = fsettings; init(fsettings.fr, type); // this.ap = fsettings.ap; } - private void init(FeatureRenderer frenderer,String type) { + + private void init(FeatureRenderer frenderer, String type) + { this.type = type; fr = frenderer; float mm[] = ((float[][]) fr.minmax.get(type))[0]; @@ -68,7 +77,9 @@ public class FeatureColourChooser extends Panel implements if (oldcs instanceof GraduatedColor) { cs = new GraduatedColor((GraduatedColor) oldcs, min, max); - } else { + } + else + { // promote original color to a graduated color Color bl = Color.black; if (oldcs instanceof Color) @@ -76,7 +87,7 @@ public class FeatureColourChooser extends Panel implements bl = (Color) oldcs; } // original colour becomes the maximum colour - cs = new GraduatedColor(Color.white,bl,mm[0],mm[1]); + cs = new GraduatedColor(Color.white, bl, mm[0], mm[1]); } minColour.setBackground(cs.getMinColor()); maxColour.setBackground(cs.getMaxColor()); @@ -91,25 +102,32 @@ public class FeatureColourChooser extends Panel implements } catch (Exception ex) { } - threshold.select(cs.getThreshType()==AnnotationColourGradient.NO_THRESHOLD ? 0 : cs.getThreshType() == AnnotationColourGradient.ABOVE_THRESHOLD ? 1 : 2); - + threshold + .select(cs.getThreshType() == AnnotationColourGradient.NO_THRESHOLD ? 0 + : cs.getThreshType() == AnnotationColourGradient.ABOVE_THRESHOLD ? 1 + : 2); + adjusting = false; changeColour(); colourFromLabel.addItemListener(this); slider.addAdjustmentListener(this); slider.addMouseListener(this); - owner = (af!=null) ? af : fs.frame; - frame = new JVDialog(owner,"Graduated Feature Colour for "+type,true,480,248); + owner = (af != null) ? af : fs.frame; + frame = new JVDialog(owner, "Graduated Feature Colour for " + type, + true, 480, 248); frame.setMainPanel(this); validate(); frame.setVisible(true); - if (frame.accept) { + if (frame.accept) + { changeColour(); - } else { + } + else + { // cancel - reset(); - PaintRefresher.Refresh(this, fr.av.getSequenceSetId()); - frame.setVisible(false); + reset(); + PaintRefresher.Refresh(this, fr.av.getSequenceSetId()); + frame.setVisible(false); } } @@ -126,14 +144,14 @@ public class FeatureColourChooser extends Panel implements private void jbInit() throws Exception { - Label minLabel = new Label("Min:"),maxLabel=new Label("Max:"); + Label minLabel = new Label("Min:"), maxLabel = new Label("Max:"); minLabel.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); maxLabel.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); - //minColour.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); - //minColour.setLabel("Min Colour"); - - minColour.setBounds(0,0,40,27); - maxColour.setBounds(0,0,40,27); + // minColour.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); + // minColour.setLabel("Min Colour"); + + minColour.setBounds(0, 0, 40, 27); + maxColour.setBounds(0, 0, 40, 27); minColour.addMouseListener(this); maxColour.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); @@ -141,10 +159,10 @@ public class FeatureColourChooser extends Panel implements thresholdIsMin.addItemListener(this); - this.setLayout(new GridLayout(4,1)); + this.setLayout(new GridLayout(4, 1)); jPanel1.setLayout(new FlowLayout()); jPanel2.setLayout(new FlowLayout()); - jPanel3.setLayout(new GridLayout(1,1)); + jPanel3.setLayout(new GridLayout(1, 1)); jPanel4.setLayout(new FlowLayout()); jPanel1.setBackground(Color.white); jPanel2.setBackground(Color.white); @@ -158,18 +176,20 @@ public class FeatureColourChooser extends Panel implements slider.setEnabled(false); slider.setSize(new Dimension(93, 21)); thresholdValue.setEnabled(false); - thresholdValue.setSize(new Dimension(79,22)); //setBounds(new Rectangle(248, 2, 79, 22)); + thresholdValue.setSize(new Dimension(79, 22)); // setBounds(new + // Rectangle(248, 2, 79, + // 22)); thresholdValue.setColumns(5); jPanel3.setBackground(Color.white); - + colourFromLabel.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); colourFromLabel.setLabel("Colour by Label"); - colourFromLabel.setSize(new Dimension(139,22)); - //threshold.setBounds(new Rectangle(11, 3, 139, 22)); + colourFromLabel.setSize(new Dimension(139, 22)); + // threshold.setBounds(new Rectangle(11, 3, 139, 22)); thresholdIsMin.setBackground(Color.white); thresholdIsMin.setLabel("Threshold is min/max"); - thresholdIsMin.setSize(new Dimension(135,23)); - //thresholdIsMin.setBounds(new Rectangle(328, 3, 135, 23)); + thresholdIsMin.setSize(new Dimension(135, 23)); + // thresholdIsMin.setBounds(new Rectangle(328, 3, 135, 23)); jPanel1.add(minLabel); jPanel1.add(minColour); jPanel1.add(maxLabel); @@ -179,17 +199,16 @@ public class FeatureColourChooser extends Panel implements jPanel3.add(slider); jPanel4.add(thresholdValue); jPanel4.add(thresholdIsMin); - this.add(jPanel1);//, java.awt.BorderLayout.NORTH); - this.add(jPanel2);//, java.awt.BorderLayout.NORTH); - this.add(jPanel3);//, java.awt.BorderLayout.CENTER); - this.add(jPanel4);//, java.awt.BorderLayout.CENTER); + this.add(jPanel1);// , java.awt.BorderLayout.NORTH); + this.add(jPanel2);// , java.awt.BorderLayout.NORTH); + this.add(jPanel3);// , java.awt.BorderLayout.CENTER); + this.add(jPanel4);// , java.awt.BorderLayout.CENTER); } Panel minColour = new Panel(); Panel maxColour = new Panel(); - Panel jPanel1 = new Panel(); Panel jPanel2 = new Panel(); @@ -197,16 +216,17 @@ public class FeatureColourChooser extends Panel implements Choice threshold = new Choice(); Panel jPanel3 = new Panel(); + Panel jPanel4 = new Panel(); Scrollbar slider = new Scrollbar(Scrollbar.HORIZONTAL); TextField thresholdValue = new TextField(20); - -// BorderLayout borderLayout1 = new BorderLayout(); + // BorderLayout borderLayout1 = new BorderLayout(); Checkbox thresholdIsMin = new Checkbox(); + Checkbox colourFromLabel = new Checkbox(); private GraphLine threshline; @@ -253,35 +273,45 @@ public class FeatureColourChooser extends Panel implements valueChanged(); } } - protected void valueChanged() { + + protected void valueChanged() + { threshline.value = (float) slider.getValue() / 1000f; cs.setThresh(threshline.value); changeColour(); PaintRefresher.Refresh(this, fr.av.getSequenceSetId()); // ap.paintAlignment(false); } + public void minColour_actionPerformed(Color newCol) { if (newCol == null) { - UserDefinedColours udc = new UserDefinedColours(this,minColour.getBackground(),owner, "Select Colour for Minimum Value"); // frame.owner, - } else { + UserDefinedColours udc = new UserDefinedColours(this, minColour + .getBackground(), owner, "Select Colour for Minimum Value"); // frame.owner, + } + else + { minColour.setBackground(newCol); minColour.setForeground(newCol); minColour.repaint(); changeColour(); } - + } public void maxColour_actionPerformed(Color newCol) { if (newCol == null) { - - // UserDefinedColours udc = new UserDefinedColours(this, "Select Colour for Maximum Value",maxColour.getBackground(),true); - UserDefinedColours udc = new UserDefinedColours(this, maxColour.getBackground(), owner, "Select Colour for Maximum Value"); - } else { + + // UserDefinedColours udc = new UserDefinedColours(this, + // "Select Colour for Maximum Value",maxColour.getBackground(),true); + UserDefinedColours udc = new UserDefinedColours(this, maxColour + .getBackground(), owner, "Select Colour for Maximum Value"); + } + else + { maxColour.setBackground(newCol); maxColour.setForeground(newCol); maxColour.repaint(); @@ -309,7 +339,8 @@ public class FeatureColourChooser extends Panel implements slider.setEnabled(true); thresholdValue.setEnabled(true); - GraduatedColor acg = new GraduatedColor(minColour.getBackground(), maxColour.getBackground(), min, max); + GraduatedColor acg = new GraduatedColor(minColour.getBackground(), + maxColour.getBackground(), min, max); acg.setColourByLabel(colourFromLabel.getState()); maxColour.setEnabled(!colourFromLabel.getState()); @@ -320,14 +351,13 @@ public class FeatureColourChooser extends Panel implements thresholdValue.setEnabled(false); thresholdValue.setText(""); } - + else if (aboveThreshold != AnnotationColourGradient.NO_THRESHOLD && threshline == null) { // todo visual indication of feature threshold - threshline = new jalview.datamodel.GraphLine( - (max - min) / 2f, - "Threshold", Color.black); + threshline = new jalview.datamodel.GraphLine((max - min) / 2f, + "Threshold", Color.black); } if (aboveThreshold != AnnotationColourGradient.NO_THRESHOLD) @@ -335,8 +365,7 @@ public class FeatureColourChooser extends Panel implements adjusting = true; acg.setThresh(threshline.value); - float range = max * 1000f - - min * 1000f; + float range = max * 1000f - min * 1000f; slider.setMinimum((int) (min * 1000)); slider.setMaximum((int) (max * 1000)); @@ -348,17 +377,20 @@ public class FeatureColourChooser extends Panel implements } acg.setThreshType(aboveThreshold); - if (thresholdIsMin.getState() && aboveThreshold != AnnotationColourGradient.NO_THRESHOLD) + if (thresholdIsMin.getState() + && aboveThreshold != AnnotationColourGradient.NO_THRESHOLD) { - if (aboveThreshold==AnnotationColourGradient.ABOVE_THRESHOLD) - { + if (aboveThreshold == AnnotationColourGradient.ABOVE_THRESHOLD) + { acg = new GraduatedColor(acg, threshline.value, max); - } else { - acg = new GraduatedColor(acg, min,threshline.value); + } + else + { + acg = new GraduatedColor(acg, min, threshline.value); } } - - fr.featureColours.put(type,acg); + + fr.featureColours.put(type, acg); cs = acg; PaintRefresher.Refresh(this, fr.av.getSequenceSetId()); // ap.paintAlignment(false); @@ -382,11 +414,13 @@ public class FeatureColourChooser extends Panel implements public void mouseReleased(MouseEvent evt) { - if (evt.getSource()==minColour || evt.getSource()==maxColour) + if (evt.getSource() == minColour || evt.getSource() == maxColour) { // relay the event actionPerformed(new ActionEvent(evt.getSource(), 1, "Clicked")); - } else { + } + else + { PaintRefresher.Refresh(this, fr.av.getSequenceSetId()); } // ap.paintAlignment(true); diff --git a/src/jalview/appletgui/FeatureRenderer.java b/src/jalview/appletgui/FeatureRenderer.java index 2f6fc1b..50bb665 100755 --- a/src/jalview/appletgui/FeatureRenderer.java +++ b/src/jalview/appletgui/FeatureRenderer.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.appletgui; @@ -98,29 +97,33 @@ public class FeatureRenderer boolean deleteFeature = false; FeatureColourPanel colourPanel; - class FeatureColourPanel extends Panel { - String label=""; - + + class FeatureColourPanel extends Panel + { + String label = ""; + private Color maxCol; - private boolean isColourByLabel,isGcol; + + private boolean isColourByLabel, isGcol; + /** * render a feature style in the amend feature dialog box */ public void updateColor(Object newcol) { - - Color bg,col=null; - GraduatedColor gcol=null; + + Color bg, col = null; + GraduatedColor gcol = null; String vlabel = ""; if (newcol instanceof Color) { - isGcol=false; + isGcol = false; col = (Color) newcol; gcol = null; } else if (newcol instanceof GraduatedColor) { - isGcol=true; + isGcol = true; gcol = (GraduatedColor) newcol; col = null; } @@ -130,49 +133,57 @@ public class FeatureRenderer } if (col != null) { - setBackground(bg=col); + setBackground(bg = col); } else { - if (gcol.getThreshType()!=AnnotationColourGradient.NO_THRESHOLD) + if (gcol.getThreshType() != AnnotationColourGradient.NO_THRESHOLD) { - vlabel += " "+((gcol.getThreshType()==AnnotationColourGradient.ABOVE_THRESHOLD) ? "(>)" : "(<)"); + vlabel += " " + + ((gcol.getThreshType() == AnnotationColourGradient.ABOVE_THRESHOLD) ? "(>)" + : "(<)"); } - if (isColourByLabel=gcol.isColourByLabel()) { - setBackground(bg=Color.white); + if (isColourByLabel = gcol.isColourByLabel()) + { + setBackground(bg = Color.white); vlabel += " (by Label)"; - } else { - setBackground(bg=gcol.getMinColor()); + } + else + { + setBackground(bg = gcol.getMinColor()); maxCol = gcol.getMaxColor(); } } - label=vlabel; + label = vlabel; setBackground(bg); repaint(); } - FeatureColourPanel() { + + FeatureColourPanel() + { super(null); } - public void paint(Graphics g) + + public void paint(Graphics g) { Dimension d = getSize(); - if (isGcol) { - if (isColourByLabel) - { - g.setColor(Color.white); - g.fillRect(d.width/2, 0,d.width/2, d.height); - g.setColor(Color.black); - Font f=new Font("Verdana", Font.PLAIN, - 10); - g.setFont(f); - g.drawString("Label", 0, 0); - } - else + if (isGcol) { - g.setColor(maxCol); - g.fillRect(d.width/2, 0,d.width/2, d.height); - - } + if (isColourByLabel) + { + g.setColor(Color.white); + g.fillRect(d.width / 2, 0, d.width / 2, d.height); + g.setColor(Color.black); + Font f = new Font("Verdana", Font.PLAIN, 10); + g.setFont(f); + g.drawString("Label", 0, 0); + } + else + { + g.setColor(maxCol); + g.fillRect(d.width / 2, 0, d.width / 2, d.height); + + } } } @@ -197,7 +208,7 @@ public class FeatureRenderer final FeatureRenderer fr = this; Panel panel = new Panel(new GridLayout(3, 1)); - + featureIndex = 0; // feature to be amended. Panel tmp; @@ -364,18 +375,21 @@ public class FeatureRenderer dialog.setResizable(true); // TODO: render the graduated color in the box. colourPanel.addMouseListener(new java.awt.event.MouseAdapter() + { + public void mousePressed(java.awt.event.MouseEvent evt) { - public void mousePressed(java.awt.event.MouseEvent evt) + if (!colourPanel.isGcol) { - if (!colourPanel.isGcol) - { - new UserDefinedColours(fr, ap.alignFrame); - } else { - FeatureColourChooser fcc = new FeatureColourChooser(ap.alignFrame, name.getText()); - dialog.transferFocus(); - } + new UserDefinedColours(fr, ap.alignFrame); } - }); + else + { + FeatureColourChooser fcc = new FeatureColourChooser( + ap.alignFrame, name.getText()); + dialog.transferFocus(); + } + } + }); dialog.setVisible(true); jalview.io.FeaturesFile ffile = new jalview.io.FeaturesFile(); @@ -402,7 +416,8 @@ public class FeatureRenderer sf.type = lastFeatureAdded; sf.featureGroup = lastFeatureGroupAdded; sf.description = lastDescriptionAdded; - if (!colourPanel.isGcol) { + if (!colourPanel.isGcol) + { // update colour - otherwise its already done. setColour(sf.type, colourPanel.getBackground()); } @@ -446,13 +461,14 @@ public class FeatureRenderer } col = colourPanel.getBackground(); - //setColour(lastFeatureAdded, fcol); + // setColour(lastFeatureAdded, fcol); if (lastFeatureGroupAdded != null) { featureGroups.put(lastFeatureGroupAdded, new Boolean(true)); } - if (fcol instanceof Color) { + if (fcol instanceof Color) + { setColour(lastFeatureAdded, fcol); } av.featuresDisplayed.put(lastFeatureAdded, @@ -472,7 +488,7 @@ public class FeatureRenderer } } // refresh the alignment and the feature settings dialog - if (av.featureSettings!=null) + if (av.featureSettings != null) { av.featureSettings.refreshTable(); } @@ -664,10 +680,11 @@ public class FeatureRenderer else { if (showFeature(sequenceFeatures[sfindex])) - { renderFeature(g, seq, seq - .findIndex(sequenceFeatures[sfindex].begin) - 1, seq - .findIndex(sequenceFeatures[sfindex].end) - 1, - getColour(sequenceFeatures[sfindex]), start, end, y1); + { + renderFeature(g, seq, seq + .findIndex(sequenceFeatures[sfindex].begin) - 1, seq + .findIndex(sequenceFeatures[sfindex].end) - 1, + getColour(sequenceFeatures[sfindex]), start, end, y1); } } @@ -851,6 +868,7 @@ public class FeatureRenderer throw new Error("Implementation Error: Unrecognised render object " + fc.getClass() + " for features of type " + featureType); } + /** * * @param sequenceFeature @@ -862,7 +880,11 @@ public class FeatureRenderer if (fc instanceof GraduatedColor) { return ((GraduatedColor) fc).isColored(sequenceFeature); - } else { return true; } + } + else + { + return true; + } } /** @@ -925,7 +947,7 @@ public class FeatureRenderer for (int i = 0; i < data.length; i++) { String type = data[i][0].toString(); - setColour(type, data[i][1]); + setColour(type, data[i][1]); if (((Boolean) data[i][2]).booleanValue()) { av.featuresDisplayed.put(type, new Integer(getColour(type) diff --git a/src/jalview/appletgui/FeatureSettings.java b/src/jalview/appletgui/FeatureSettings.java index d20d864..bd82b92 100755 --- a/src/jalview/appletgui/FeatureSettings.java +++ b/src/jalview/appletgui/FeatureSettings.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.appletgui; diff --git a/src/jalview/appletgui/Finder.java b/src/jalview/appletgui/Finder.java index 945e900..ea13c33 100755 --- a/src/jalview/appletgui/Finder.java +++ b/src/jalview/appletgui/Finder.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.appletgui; @@ -134,19 +133,21 @@ public class Finder extends Panel implements ActionListener resIndex = finder.getResIndex(); searchResults = finder.getSearchResults(); Vector idMatch = finder.getIdMatch(); - boolean haveResults=false; + boolean haveResults = false; // set or reset the GUI if ((idMatch.size() > 0)) { - haveResults=true; + haveResults = true; ap.idPanel.highlightSearchResults(idMatch); - } else { + } + else + { ap.idPanel.highlightSearchResults(null); } if (searchResults.getSize() > 0) { - haveResults=true; + haveResults = true; createNewGroup.setEnabled(true); } @@ -162,22 +163,26 @@ public class Finder extends Panel implements ActionListener // 'SelectRegion' selection if (!haveResults) { - ap.alignFrame.statusBar.setText("Finished searching."); - resIndex = -1; - seqIndex = 0; + ap.alignFrame.statusBar.setText("Finished searching."); + resIndex = -1; + seqIndex = 0; } if (findAll) { - String message = (idMatch.size()>0) ? ""+idMatch.size()+" IDs" : ""; - if (idMatch.size()>0 && searchResults!=null && searchResults.getSize()>0) { + String message = (idMatch.size() > 0) ? "" + idMatch.size() + " IDs" + : ""; + if (idMatch.size() > 0 && searchResults != null + && searchResults.getSize() > 0) + { message += " and "; } - if (searchResults!=null) { + if (searchResults != null) + { message += searchResults.getSize() + " subsequence matches."; } ap.alignFrame.statusBar.setText("Search results: " + searchString + " : " + message); - + } } diff --git a/src/jalview/appletgui/FontChooser.java b/src/jalview/appletgui/FontChooser.java index 9a3fb6b..42b1850 100755 --- a/src/jalview/appletgui/FontChooser.java +++ b/src/jalview/appletgui/FontChooser.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.appletgui; diff --git a/src/jalview/appletgui/IdCanvas.java b/src/jalview/appletgui/IdCanvas.java index 96318b4..6a941f1 100755 --- a/src/jalview/appletgui/IdCanvas.java +++ b/src/jalview/appletgui/IdCanvas.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.appletgui; diff --git a/src/jalview/appletgui/IdPanel.java b/src/jalview/appletgui/IdPanel.java index d64c9cc..8033725 100755 --- a/src/jalview/appletgui/IdPanel.java +++ b/src/jalview/appletgui/IdPanel.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.appletgui; @@ -88,33 +87,65 @@ public class IdPanel extends Panel implements MouseListener, int seq = alignPanel.seqPanel.findSeq(e); SequenceI sequence = av.getAlignment().getSequenceAt(seq); - + // look for non-pos features StringBuffer tooltiptext = new StringBuffer(); - if (sequence.getDescription() != null) { tooltiptext.append(sequence.getDescription()); tooltiptext.append("\n"); } - + SequenceFeature sf[] = sequence.getSequenceFeatures(); - for (int sl=0;sf!=null && sl0) + if (sf[sl].links != null && sf[sl].links.size() > 0) { - for (int l=0, lSize=sf[sl].links.size(); l. */ package jalview.appletgui; diff --git a/src/jalview/appletgui/JVDialog.java b/src/jalview/appletgui/JVDialog.java index 8bef740..57a4ebd 100644 --- a/src/jalview/appletgui/JVDialog.java +++ b/src/jalview/appletgui/JVDialog.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.appletgui; diff --git a/src/jalview/appletgui/OverviewPanel.java b/src/jalview/appletgui/OverviewPanel.java index 06df9f4..cca50a7 100755 --- a/src/jalview/appletgui/OverviewPanel.java +++ b/src/jalview/appletgui/OverviewPanel.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.appletgui; diff --git a/src/jalview/appletgui/PCAPanel.java b/src/jalview/appletgui/PCAPanel.java index 46b41f2..1a205db 100755 --- a/src/jalview/appletgui/PCAPanel.java +++ b/src/jalview/appletgui/PCAPanel.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.appletgui; diff --git a/src/jalview/appletgui/PaintRefresher.java b/src/jalview/appletgui/PaintRefresher.java index e5e9e89..1340dd6 100755 --- a/src/jalview/appletgui/PaintRefresher.java +++ b/src/jalview/appletgui/PaintRefresher.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.appletgui; @@ -38,9 +37,9 @@ public class PaintRefresher * DOCUMENT ME! * * @param comp - * DOCUMENT ME! + * DOCUMENT ME! * @param al - * DOCUMENT ME! + * DOCUMENT ME! */ public static void Register(Component comp, String seqSetId) { diff --git a/src/jalview/appletgui/PairwiseAlignPanel.java b/src/jalview/appletgui/PairwiseAlignPanel.java index cf82ea0..7a47d02 100755 --- a/src/jalview/appletgui/PairwiseAlignPanel.java +++ b/src/jalview/appletgui/PairwiseAlignPanel.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.appletgui; diff --git a/src/jalview/appletgui/RedundancyPanel.java b/src/jalview/appletgui/RedundancyPanel.java index c9fc0b7..adcd180 100755 --- a/src/jalview/appletgui/RedundancyPanel.java +++ b/src/jalview/appletgui/RedundancyPanel.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.appletgui; @@ -85,9 +84,9 @@ public class RedundancyPanel extends SliderPanel implements Runnable, * slider to dynamically hide redundant sequences * * @param threshold - * DOCUMENT ME! + * DOCUMENT ME! * @param sel - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ diff --git a/src/jalview/appletgui/RotatableCanvas.java b/src/jalview/appletgui/RotatableCanvas.java index 5e90f06..a722718 100755 --- a/src/jalview/appletgui/RotatableCanvas.java +++ b/src/jalview/appletgui/RotatableCanvas.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.appletgui; diff --git a/src/jalview/appletgui/ScalePanel.java b/src/jalview/appletgui/ScalePanel.java index e6c9855..d888d25 100755 --- a/src/jalview/appletgui/ScalePanel.java +++ b/src/jalview/appletgui/ScalePanel.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.appletgui; diff --git a/src/jalview/appletgui/SeqCanvas.java b/src/jalview/appletgui/SeqCanvas.java index f0031a8..f78b630 100755 --- a/src/jalview/appletgui/SeqCanvas.java +++ b/src/jalview/appletgui/SeqCanvas.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.appletgui; diff --git a/src/jalview/appletgui/SeqPanel.java b/src/jalview/appletgui/SeqPanel.java index 28fe5a8..6486647 100755 --- a/src/jalview/appletgui/SeqPanel.java +++ b/src/jalview/appletgui/SeqPanel.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.appletgui; @@ -641,7 +640,7 @@ public class SeqPanel extends Panel implements MouseMotionListener, { seqCanvas.highlightSearchResults(results); if (av.followHighlight) - { + { ap.scrollToPosition(results); } } @@ -1359,13 +1358,13 @@ public class SeqPanel extends Panel implements MouseMotionListener, { if (allFeatures[i].links != null) { - if (links==null) - { + if (links == null) + { links = new Vector(); } for (int j = 0; j < allFeatures[i].links.size(); j++) { - links.addElement(allFeatures[i].links.elementAt(j)); + links.addElement(allFeatures[i].links.elementAt(j)); } } } diff --git a/src/jalview/appletgui/SequenceRenderer.java b/src/jalview/appletgui/SequenceRenderer.java index cf4c359..822e906 100755 --- a/src/jalview/appletgui/SequenceRenderer.java +++ b/src/jalview/appletgui/SequenceRenderer.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.appletgui; @@ -50,7 +49,7 @@ public class SequenceRenderer * DOCUMENT ME! * * @param b - * DOCUMENT ME! + * DOCUMENT ME! */ public void prepare(Graphics g, boolean renderGaps) { @@ -96,7 +95,7 @@ public class SequenceRenderer } } - + public Color findSequenceColour(SequenceI seq, int i) { allGroups = av.alignment.findAllGroups(seq); @@ -222,7 +221,8 @@ public class SequenceRenderer } if (currentSequenceGroup.getShowunconserved()) { - // cheat - use this if we have a consensus for each group: s = getDisplayChar(currentSequenceGroup.getConsensus(), i, s, '.'); + // cheat - use this if we have a consensus for each group: s = + // getDisplayChar(currentSequenceGroup.getConsensus(), i, s, '.'); s = getDisplayChar(av.consensus, i, s, '.'); } } @@ -247,8 +247,8 @@ public class SequenceRenderer } if (av.getShowunconserved()) { - s = getDisplayChar(av.consensus, i, s, '.'); - + s = getDisplayChar(av.consensus, i, s, '.'); + } } @@ -271,7 +271,7 @@ public class SequenceRenderer } } - + charOffset = (av.charWidth - fm.charWidth(s)) / 2; graphics.drawString(String.valueOf(s), charOffset + av.charWidth * (i - start), y1); @@ -279,13 +279,14 @@ public class SequenceRenderer } - - private char getDisplayChar(AlignmentAnnotation consensus, int position, char s, char c) + private char getDisplayChar(AlignmentAnnotation consensus, int position, + char s, char c) { - char conschar = consensus.annotations[position].displayCharacter.charAt(0); - if (conschar!='-' && s==conschar) + char conschar = consensus.annotations[position].displayCharacter + .charAt(0); + if (conschar != '-' && s == conschar) { - s= c; + s = c; } return s; } diff --git a/src/jalview/appletgui/SliderPanel.java b/src/jalview/appletgui/SliderPanel.java index 0e4a379..c494650 100755 --- a/src/jalview/appletgui/SliderPanel.java +++ b/src/jalview/appletgui/SliderPanel.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.appletgui; diff --git a/src/jalview/appletgui/Tooltip.java b/src/jalview/appletgui/Tooltip.java index 7168cf3..fe7fbb7 100755 --- a/src/jalview/appletgui/Tooltip.java +++ b/src/jalview/appletgui/Tooltip.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.appletgui; diff --git a/src/jalview/appletgui/TreeCanvas.java b/src/jalview/appletgui/TreeCanvas.java index f0e7b62..acfe231 100755 --- a/src/jalview/appletgui/TreeCanvas.java +++ b/src/jalview/appletgui/TreeCanvas.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.appletgui; @@ -406,7 +405,7 @@ public class TreeCanvas extends Panel implements MouseListener, { repaint(); } - + int width = scrollPane.getSize().width; int height = scrollPane.getSize().height; if (!fitToWindow) @@ -436,9 +435,9 @@ public class TreeCanvas extends Panel implements MouseListener, g.fillRect(0, 0, width, height); labelLength = g.getFontMetrics(font).stringWidth(longestName) + 20; // 20 - // allows - // for - // scrollbar + // allows + // for + // scrollbar float wscale = (float) (width - labelLength - offx * 2) / tree.getMaxHeight(); diff --git a/src/jalview/appletgui/TreePanel.java b/src/jalview/appletgui/TreePanel.java index f3cde9d..6bf1dc7 100755 --- a/src/jalview/appletgui/TreePanel.java +++ b/src/jalview/appletgui/TreePanel.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.appletgui; @@ -54,17 +53,17 @@ public class TreePanel extends EmbmenuFrame implements ActionListener, * Creates a new TreePanel object. * * @param av - * DOCUMENT ME! + * DOCUMENT ME! * @param seqVector - * DOCUMENT ME! + * DOCUMENT ME! * @param type - * DOCUMENT ME! + * DOCUMENT ME! * @param pwtype - * DOCUMENT ME! + * DOCUMENT ME! * @param s - * DOCUMENT ME! + * DOCUMENT ME! * @param e - * DOCUMENT ME! + * DOCUMENT ME! */ public TreePanel(AlignViewport av, String type, String pwtype) { @@ -84,15 +83,15 @@ public class TreePanel extends EmbmenuFrame implements ActionListener, * Creates a new TreePanel object. * * @param av - * DOCUMENT ME! + * DOCUMENT ME! * @param seqVector - * DOCUMENT ME! + * DOCUMENT ME! * @param newtree - * DOCUMENT ME! + * DOCUMENT ME! * @param type - * DOCUMENT ME! + * DOCUMENT ME! * @param pwtype - * DOCUMENT ME! + * DOCUMENT ME! */ public TreePanel(AlignViewport av, String type, String pwtype, NewickFile newtree) @@ -215,14 +214,20 @@ public class TreePanel extends EmbmenuFrame implements ActionListener, treeCanvas.setTree(tree); if (newtree != null) { - // Set default view, paying lip service to any overriding tree view parameter settings - boolean showDist = newtree.HasDistances() && av.applet.getDefaultParameter("showTreeDistances", newtree.HasDistances()); - boolean showBoots = newtree.HasBootstrap() && av.applet.getDefaultParameter("showTreeBootstraps", newtree.HasBootstrap()); + // Set default view, paying lip service to any overriding tree view + // parameter settings + boolean showDist = newtree.HasDistances() + && av.applet.getDefaultParameter("showTreeDistances", + newtree.HasDistances()); + boolean showBoots = newtree.HasBootstrap() + && av.applet.getDefaultParameter("showTreeBootstraps", + newtree.HasBootstrap()); distanceMenu.setState(showDist); bootstrapMenu.setState(showBoots); treeCanvas.setShowBootstrap(showBoots); treeCanvas.setShowDistances(showDist); - treeCanvas.setMarkPlaceholders(av.applet.getDefaultParameter("showUnlinkedTreeNodes", false)); + treeCanvas.setMarkPlaceholders(av.applet.getDefaultParameter( + "showUnlinkedTreeNodes", false)); } treeCanvas.repaint(); diff --git a/src/jalview/appletgui/UserDefinedColours.java b/src/jalview/appletgui/UserDefinedColours.java index 23a290f..e18bba3 100755 --- a/src/jalview/appletgui/UserDefinedColours.java +++ b/src/jalview/appletgui/UserDefinedColours.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.appletgui; diff --git a/src/jalview/bin/Cache.java b/src/jalview/bin/Cache.java index 9c9b6b0..cebb504 100755 --- a/src/jalview/bin/Cache.java +++ b/src/jalview/bin/Cache.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.bin; @@ -82,8 +81,8 @@ import org.biojava.dasobert.dasregistry.Das1Source; * service *
  • QUESTIONNAIRE last questionnaire:responder id string from questionnaire * service
  • - *
  • USAGESTATS (false - user prompted) Enable google analytics tracker for collecting usage - * statistics
  • + *
  • USAGESTATS (false - user prompted) Enable google analytics tracker for + * collecting usage statistics
  • *
  • DAS_LOCAL_SOURCE list of local das sources
  • *
  • SHOW_OVERVIEW boolean for overview window display
  • *
  • ANTI_ALIAS boolean for smooth fonts
  • @@ -98,14 +97,15 @@ import org.biojava.dasobert.dasregistry.Das1Source; *
  • SORT_ALIGNMENT (No sort|Id|Pairwise Identity)
  • *
  • SEQUENCE_LINKS list of name|URL pairs for opening a url with * $SEQUENCE_ID$
  • - *
  • GROUP_LINKS list of name|URL[|<separator>] tuples - see jalview.utils.GroupURLLink for more info - *
  • + *
  • GROUP_LINKS list of name|URL[|<separator>] tuples - see + * jalview.utils.GroupURLLink for more info
  • *
  • DAS_REGISTRY_URL the registry to query
  • *
  • DEFAULT_BROWSER for unix
  • *
  • DAS_ACTIVE_SOURCE list of active sources
  • *
  • SHOW_MEMUSAGE boolean show memory usage and warning indicator on desktop * (false)
  • - *
  • VERSION_CHECK (true) check for the latest release version from www.jalview.org
  • + *
  • VERSION_CHECK (true) check for the latest release version from + * www.jalview.org
  • *
  • SHOW_NPFEATS_TOOLTIP (true) show non-positional features in the Sequence * ID tooltip
  • *
  • SHOW_DBREFS_TOOLTIP (true) show Database Cross References in the Sequence @@ -114,11 +114,16 @@ import org.biojava.dasobert.dasregistry.Das1Source; * displayed as '.'
  • *
  • SORT_BY_TREE (false) sort the current alignment view according to the * order of a newly displayed tree
  • - *
  • DBFETCH_USEPICR (false) use PICR to recover valid DB references from sequence ID strings before attempting retrieval from any datasource
  • - *
  • SHOW_GROUP_CONSENSUS (false) Show consensus annotation for groups in the alignment.
  • - *
  • SHOW_GROUP_CONSERVATION (false) Show conservation annotation for groups in the alignment.
  • - *
  • SHOW_CONSENSUS_HISTOGRAM (false) Show consensus annotation row's histogram.
  • - *
  • SHOW_CONSENSUS_LOGO (false) Show consensus annotation row's sequence logo.
  • + *
  • DBFETCH_USEPICR (false) use PICR to recover valid DB references from + * sequence ID strings before attempting retrieval from any datasource
  • + *
  • SHOW_GROUP_CONSENSUS (false) Show consensus annotation for groups in the + * alignment.
  • + *
  • SHOW_GROUP_CONSERVATION (false) Show conservation annotation for groups + * in the alignment.
  • + *
  • SHOW_CONSENSUS_HISTOGRAM (false) Show consensus annotation row's + * histogram.
  • + *
  • SHOW_CONSENSUS_LOGO (false) Show consensus annotation row's sequence + * logo.
  • * *
  • * @@ -167,8 +172,9 @@ public class Cache { try { - // TODO: redirect stdout and stderr here in order to grab the output of the log - + // TODO: redirect stdout and stderr here in order to grab the output of + // the log + ConsoleAppender ap = new ConsoleAppender(new SimpleLayout(), "System.err"); ap.setName("JalviewLogger"); @@ -270,7 +276,7 @@ public class Cache // jnlpVersion will be null if we're using InstallAnywhere // Dont do this check if running in headless mode if (jnlpVersion == null - && getDefault("VERSION_CHECK",true) + && getDefault("VERSION_CHECK", true) && (System.getProperty("java.awt.headless") == null || System .getProperty("java.awt.headless").equals("false"))) { @@ -417,8 +423,10 @@ public class Cache } return obj; } + /** * remove the specified property from the jalview properties file + * * @param string */ public static void removeProperty(String string) @@ -426,6 +434,7 @@ public class Cache applicationProperties.remove(string); saveProperties(); } + /** * save the properties to the jalview properties path */ @@ -511,10 +520,11 @@ public class Cache // Tell the user that debug is enabled lgclient.debug("Jalview Groovy Client Debugging Output Follows."); } - } catch (Error e) { + } catch (Error e) + { groovyJarsArePresent = 0; - jalview.bin.Cache.log.debug("Groovy Classes are not present",e); - }catch (Exception e) + jalview.bin.Cache.log.debug("Groovy Classes are not present", e); + } catch (Exception e) { groovyJarsArePresent = 0; jalview.bin.Cache.log.debug("Groovy Classes are not present"); @@ -522,6 +532,7 @@ public class Cache } return (groovyJarsArePresent > 0); } + /** * generate Das1Sources from the local das source list * @@ -563,10 +574,13 @@ public class Cache } /** - * GA tracker object - actually JGoogleAnalyticsTracker null if tracking not enabled. + * GA tracker object - actually JGoogleAnalyticsTracker null if tracking not + * enabled. */ protected static Object tracker = null; + protected static Class trackerfocus = null; + protected static Class jgoogleanalyticstracker = null; /** @@ -576,20 +590,24 @@ public class Cache { if (tracker == null) { - if (jgoogleanalyticstracker==null) + if (jgoogleanalyticstracker == null) { // try to get the tracker class - try { - jgoogleanalyticstracker = Cache.class.getClassLoader().loadClass( - "com.boxysystems.jgoogleanalytics.JGoogleAnalyticsTracker"); + try + { + jgoogleanalyticstracker = Cache.class + .getClassLoader() + .loadClass( + "com.boxysystems.jgoogleanalytics.JGoogleAnalyticsTracker"); trackerfocus = Cache.class.getClassLoader().loadClass( - "com.boxysystems.jgoogleanalytics.FocusPoint"); + "com.boxysystems.jgoogleanalytics.FocusPoint"); } catch (Exception e) { - log.debug("com.boxysystems.jgoogleanalytics package is not present - tracking not enabled."); + log + .debug("com.boxysystems.jgoogleanalytics package is not present - tracking not enabled."); tracker = null; - jgoogleanalyticstracker=null; - trackerfocus=null; + jgoogleanalyticstracker = null; + trackerfocus = null; return; } } @@ -600,14 +618,21 @@ public class Cache try { // Google analytics tracking code for Library Finder - tracker = jgoogleanalyticstracker.getConstructor(new Class[] { String.class,String.class,String.class}).newInstance(new Object[] { "Jalview Desktop", - (vrs = jalview.bin.Cache.getProperty("VERSION") - + "_" - + jalview.bin.Cache.getDefault("BUILD_DATE", - "unknown")), "UA-9060947-1"}); - jgoogleanalyticstracker.getMethod("trackAsynchronously", new Class[] { trackerfocus }) - .invoke(tracker, new Object[] { trackerfocus.getConstructor( - new Class[] { String.class}).newInstance(new Object[] { "Application Started." })}); + tracker = jgoogleanalyticstracker.getConstructor(new Class[] + { String.class, String.class, String.class }).newInstance( + new Object[] + { + "Jalview Desktop", + (vrs = jalview.bin.Cache.getProperty("VERSION") + + "_" + + jalview.bin.Cache.getDefault("BUILD_DATE", + "unknown")), "UA-9060947-1" }); + jgoogleanalyticstracker.getMethod("trackAsynchronously", + new Class[] + { trackerfocus }).invoke(tracker, new Object[] + { trackerfocus.getConstructor(new Class[] + { String.class }).newInstance(new Object[] + { "Application Started." }) }); } catch (RuntimeException e) { re = e; diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index 624ac58..b36ac18 100755 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.bin; @@ -223,8 +222,8 @@ public class Jalview String groovyscript = null; // script to execute after all loading is // completed one way or another // extract groovy argument and execute if necessary - groovyscript = aparser.getValue("groovy",true); - file = aparser.getValue("open",true); + groovyscript = aparser.getValue("groovy", true); + file = aparser.getValue("open", true); if (file == null && desktop == null) { @@ -307,10 +306,10 @@ public class Jalview // session at the user's leisure. Cache.log .info("Skipping Push for import of data into existing vamsas session."); // TODO: - // enable - // this - // when - // debugged + // enable + // this + // when + // debugged // desktop.getVamsasApplication().push_update(); } } @@ -344,7 +343,7 @@ public class Jalview return; } - data = aparser.getValue("colour",true); + data = aparser.getValue("colour", true); if (data != null) { data.replaceAll("%20", " "); @@ -365,20 +364,20 @@ public class Jalview } // Must maintain ability to use the groups flag - data = aparser.getValue("groups",true); + data = aparser.getValue("groups", true); if (data != null) { af.parseFeaturesFile(data, checkProtocol(data)); System.out.println("Added " + data); } - data = aparser.getValue("features",true); + data = aparser.getValue("features", true); if (data != null) { af.parseFeaturesFile(data, checkProtocol(data)); System.out.println("Added " + data); } - data = aparser.getValue("annotations",true); + data = aparser.getValue("annotations", true); if (data != null) { af.loadJalviewDataFile(data); @@ -393,7 +392,7 @@ public class Jalview { af.getViewport().setSortByTree(false); } - data = aparser.getValue("tree",true); + data = aparser.getValue("tree", true); if (data != null) { jalview.io.NewickFile fin = null; @@ -412,26 +411,26 @@ public class Jalview ex.printStackTrace(System.err); } } - // todo - load PDB structure to alignment - // (associate with identical sequence in alignment, or a specified sequence) - - + // todo - load PDB structure to alignment + // (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) + if (ff != null) while (!ff.allFinished() || af.operationInProgress()) { // wait around until fetching is finished. - try - { - Thread.sleep(100); - } catch (Exception e) - { + try + { + Thread.sleep(100); + } catch (Exception e) + { + } } - } getFeatures = null; // have retrieved features - forget them now. } if (groovyscript != null) @@ -526,9 +525,9 @@ public class Jalview getFeatures = checkDasArguments(aparser); // extract groovy arguments before anything else. } - // If the user has specified features to be retrieved, + // 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 + // haven't been done already // fetch features for the default alignment if (getFeatures != null) { @@ -537,7 +536,7 @@ public class Jalview startFeatureFetching(getFeatures); } } - // execute a groovy script. + // execute a groovy script. if (groovyscript != null) { if (jalview.bin.Cache.groovyJarsPresent()) @@ -566,8 +565,8 @@ public class Jalview "USAGESTATS", "Jalview Usage Statistics", "Do you want to help make Jalview better by enabling " - +"the collection of usage statistics with Google Analytics ?" - +"\n\n(you can enable or disable usage tracking in the preferences)", + + "the collection of usage statistics with Google Analytics ?" + + "\n\n(you can enable or disable usage tracking in the preferences)", new Runnable() { public void run() @@ -711,7 +710,7 @@ public class Jalview Vector source = null; String data; String locsources = Cache.getProperty(Cache.DAS_LOCAL_SOURCE); - while ((data = aparser.getValue("dasserver",true)) != null) + while ((data = aparser.getValue("dasserver", true)) != null) { String nickname = null; String url = null; @@ -756,7 +755,7 @@ public class Jalview + locsources); Cache.setProperty(Cache.DAS_LOCAL_SOURCE, locsources); } - while ((data = aparser.getValue("fetchfrom",true)) != null) + while ((data = aparser.getValue("fetchfrom", true)) != null) { System.out.println("adding source '" + data + "'"); if (source == null) @@ -787,6 +786,7 @@ public class Jalview } return ff; } + private static String checkProtocol(String file) { String protocol = jalview.io.FormatAdapter.FILE; @@ -836,19 +836,21 @@ class ArgsParser { return getValue(arg, false); } + public String getValue(String arg, boolean utf8decode) { int index = vargs.indexOf(arg); - String dc=null,ret = null; + String dc = null, ret = null; if (index != -1) { ret = vargs.elementAt(index + 1).toString(); vargs.removeElementAt(index); vargs.removeElementAt(index); - if (utf8decode && ret!=null) + if (utf8decode && ret != null) { - try { - dc = URLDecoder.decode(ret,"UTF-8"); + try + { + dc = URLDecoder.decode(ret, "UTF-8"); ret = dc; } catch (Exception e) { @@ -889,48 +891,59 @@ class ArgsParser } } + /** * keep track of feature fetching tasks. + * * @author JimP - * + * */ -class FeatureFetcher { +class FeatureFetcher +{ /* - * TODO: generalise to track all jalview events to orchestrate batch processing events. + * TODO: generalise to track all jalview events to orchestrate batch + * processing events. */ - private int queued=0; - private int running=0; + private int queued = 0; + + private int running = 0; + public FeatureFetcher() { - + } + public void addFetcher(final AlignFrame af, final Vector dasSources) { - final long id = System.currentTimeMillis(); + final long id = System.currentTimeMillis(); queued++; - final FeatureFetcher us=this; + final FeatureFetcher us = this; new Thread(new Runnable() { public void run() { - synchronized (us) { - queued--; - running++; + synchronized (us) + { + queued--; + running++; } - + af.setProgressBar("DAS features being retrieved...", id); af.featureSettings_actionPerformed(null); af.featureSettings.fetchDasFeatures(dasSources, true); af.setProgressBar(null, id); - synchronized (us) { - running --; + synchronized (us) + { + running--; } } }).start(); } - public synchronized boolean allFinished() { - return queued==0 && running==0; + + public synchronized boolean allFinished() + { + return queued == 0 && running == 0; } }; diff --git a/src/jalview/bin/JalviewLite.java b/src/jalview/bin/JalviewLite.java index af6e1a5..a904d7c 100755 --- a/src/jalview/bin/JalviewLite.java +++ b/src/jalview/bin/JalviewLite.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.bin; @@ -310,7 +309,8 @@ public class JalviewLite extends Applet private boolean checkForJmol = true; private boolean checkedForJmol = false; // ensure we don't check for jmol - // every time the app is re-inited + + // every time the app is re-inited public boolean jmolAvailable = false; @@ -380,10 +380,10 @@ public class JalviewLite extends Applet } if (debug) { - - System.err.println("JalviewLite Version "+getVersion()); - System.err.println("Build Date : "+getBuildDate()); - + + System.err.println("JalviewLite Version " + getVersion()); + System.err.println("Build Date : " + getBuildDate()); + } /** * if true disable the check for jmol diff --git a/src/jalview/bin/JalviewLiteURLRetrieve.java b/src/jalview/bin/JalviewLiteURLRetrieve.java new file mode 100644 index 0000000..6aad432 --- /dev/null +++ b/src/jalview/bin/JalviewLiteURLRetrieve.java @@ -0,0 +1,144 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle + * + * 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 . + */ +package jalview.bin; + +import jalview.datamodel.Alignment; +import jalview.io.AppletFormatAdapter; +import jalview.io.FileParse; + +import java.applet.Applet; +import java.io.BufferedInputStream; +import java.io.BufferedReader; +import java.io.InputStream; +import java.io.InputStreamReader; + +public class JalviewLiteURLRetrieve extends Applet +{ + + private static final long serialVersionUID = 1L; + + /** + * This is the default constructor + */ + public JalviewLiteURLRetrieve() + { + super(); + } + + /** + * This method initializes this + * + * @return void + */ + public void init() + { + this.setSize(300, 200); + String file = getParameter("file"); + if (file == null) + { + System.out + .println("Specify a resource to read on the file parameter"); + return; + } + String protocol = null; + try + { + System.out.println("Loading thread started with:\n>>file\n" + file + + ">>endfile"); + // This might throw a security exception in certain browsers + // Netscape Communicator for instance. + try + { + boolean rtn = false; + InputStream is = getClass().getResourceAsStream("/" + file); + if (is != null) + { + rtn = true; + is.close(); + } + System.err.println("Resource '" + file + "' was " + + (rtn ? "" : "not") + " located by classloader."); + if (rtn) + { + protocol = AppletFormatAdapter.CLASSLOADER; + } + + } catch (Exception ex) + { + System.out.println("Exception checking resources: " + file + " " + + ex); + } + if (file.indexOf("://") > -1) + { + protocol = AppletFormatAdapter.URL; + } + else + { + // skipping codebase prepend check. + protocol = AppletFormatAdapter.FILE; + } + + System.out.println("Trying to get contents of resource:"); + FileParse fp = new FileParse(file, protocol); + if (fp.isValid()) + { + String ln = null; + while ((ln = fp.nextLine()) != null) + { + System.out.print(ln); + } + fp.close(); + } + else + { + System.out.println("Resource at " + file + + " cannot be read with protocol==" + protocol); + return; + } + String format = getParameter("format"); + if (format == null || format.length() == 0) + { + format = new jalview.io.IdentifyFile().Identify(file, protocol); + System.out.println("Format is " + format); + } + else + { + System.out.println("User specified Format is " + format); + } + Alignment al = null; + try + { + al = new AppletFormatAdapter().readFile(file, protocol, format); + } catch (java.io.IOException ex) + { + System.err.println("Failed to open the file."); + ex.printStackTrace(); + } + if (al != null) + { + System.out.println(new AppletFormatAdapter().formatSequences( + "FASTA", al, false)); + } + } catch (Exception e) + { + System.err.println("bailing out : Unexpected exception:"); + e.printStackTrace(); + } + } + +} diff --git a/src/jalview/binding/Alignment.java b/src/jalview/binding/Alignment.java index 86aca8a..8c31a8b 100755 --- a/src/jalview/binding/Alignment.java +++ b/src/jalview/binding/Alignment.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.binding; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,151 +29,162 @@ import org.exolab.castor.xml.Unmarshaller; * * @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); +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 index 36addef..b482598 100755 --- a/src/jalview/binding/Annotation.java +++ b/src/jalview/binding/Annotation.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.binding; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,414 +29,441 @@ import org.exolab.castor.xml.Unmarshaller; * * @version $Revision$ $Date$ */ -public class Annotation implements java.io.Serializable { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _graph. - */ - private boolean _graph; - - /** - * keeps track of state for field: _graph - */ - private boolean _has_graph; - - /** - * Field _graphType. - */ - private int _graphType; - - /** - * keeps track of state for field: _graphType - */ - private boolean _has_graphType; - - /** - * Field _annotationElementList. - */ - private java.util.Vector _annotationElementList; - - /** - * Field _label. - */ - private java.lang.String _label; - - /** - * Field _description. - */ - private java.lang.String _description; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public Annotation() { - super(); - this._annotationElementList = new java.util.Vector(); +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) + "]"); } - - //-----------/ - //- 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); + return (jalview.binding.AnnotationElement) _annotationElementList + .get(index); + } + + /** + * Method getAnnotationElement.Returns the contents of the collection in an + * Array. + *

    + * 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 + * know 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; } - - /** - */ - 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.

    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 know 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; + 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) + "]"); } - /** - * 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); + 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 index 540d3af..bc9571e 100755 --- a/src/jalview/binding/AnnotationElement.java +++ b/src/jalview/binding/AnnotationElement.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.binding; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,273 +29,287 @@ import org.exolab.castor.xml.Unmarshaller; * * @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. +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 -/ + // -----------/ + + /** */ - 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); - } + public void deletePosition() + { + this._has_position = false; + } - /** - * - * - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema + /** */ - public void validate( - ) - throws org.exolab.castor.xml.ValidationException { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); + public 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 index bfc7464..3c052ce 100755 --- a/src/jalview/binding/Colour.java +++ b/src/jalview/binding/Colour.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.binding; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,465 +29,480 @@ import org.exolab.castor.xml.Unmarshaller; * * @version $Revision$ $Date$ */ -public class Colour implements java.io.Serializable { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _name. - */ - private java.lang.String _name; - - /** - * Field _RGB. - */ - private java.lang.String _RGB; - - /** - * Field _minRGB. - */ - private java.lang.String _minRGB; - - /** - * loosely specified enumeration: NONE,ABOVE, or BELOW - */ - private java.lang.String _threshType; - - /** - * Field _threshold. - */ - private float _threshold; - - /** - * keeps track of state for field: _threshold - */ - private boolean _has_threshold; - - /** - * Field _max. - */ - private float _max; - - /** - * keeps track of state for field: _max - */ - private boolean _has_max; - - /** - * Field _min. - */ - private float _min; - - /** - * keeps track of state for field: _min - */ - private boolean _has_min; - - /** - * Field _colourByLabel. - */ - private boolean _colourByLabel; - - /** - * keeps track of state for field: _colourByLabel - */ - private boolean _has_colourByLabel; - - /** - * Field _autoScale. - */ - private boolean _autoScale; - - /** - * keeps track of state for field: _autoScale - */ - private boolean _has_autoScale; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public Colour() { - super(); - } - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - */ - public void deleteAutoScale( - ) { - this._has_autoScale= false; - } - - /** - */ - public void deleteColourByLabel( - ) { - this._has_colourByLabel= false; - } - - /** - */ - public void deleteMax( - ) { - this._has_max= false; - } - - /** - */ - public void deleteMin( - ) { - this._has_min= false; - } - - /** - */ - public void deleteThreshold( - ) { - this._has_threshold= false; - } - - /** - * Returns the value of field 'autoScale'. - * - * @return the value of field 'AutoScale'. - */ - public boolean getAutoScale( - ) { - return this._autoScale; - } - - /** - * Returns the value of field 'colourByLabel'. - * - * @return the value of field 'ColourByLabel'. - */ - public boolean getColourByLabel( - ) { - return this._colourByLabel; - } - - /** - * Returns the value of field 'max'. - * - * @return the value of field 'Max'. - */ - public float getMax( - ) { - return this._max; - } - - /** - * Returns the value of field 'min'. - * - * @return the value of field 'Min'. - */ - public float getMin( - ) { - return this._min; - } - - /** - * Returns the value of field 'minRGB'. - * - * @return the value of field 'MinRGB'. - */ - public java.lang.String getMinRGB( - ) { - return this._minRGB; - } - - /** - * Returns the value of field 'name'. - * - * @return the value of field 'Name'. - */ - public java.lang.String getName( - ) { - return this._name; - } - - /** - * Returns the value of field 'RGB'. - * - * @return the value of field 'RGB'. - */ - public java.lang.String getRGB( - ) { - return this._RGB; - } - - /** - * Returns the value of field 'threshType'. The field - * 'threshType' has the following description: loosely - * specified enumeration: NONE,ABOVE, or BELOW - * - * @return the value of field 'ThreshType'. - */ - public java.lang.String getThreshType( - ) { - return this._threshType; - } - - /** - * Returns the value of field 'threshold'. - * - * @return the value of field 'Threshold'. - */ - public float getThreshold( - ) { - return this._threshold; - } - - /** - * Method hasAutoScale. - * - * @return true if at least one AutoScale has been added - */ - public boolean hasAutoScale( - ) { - return this._has_autoScale; - } - - /** - * Method hasColourByLabel. - * - * @return true if at least one ColourByLabel has been added - */ - public boolean hasColourByLabel( - ) { - return this._has_colourByLabel; - } - - /** - * Method hasMax. - * - * @return true if at least one Max has been added - */ - public boolean hasMax( - ) { - return this._has_max; - } - - /** - * Method hasMin. - * - * @return true if at least one Min has been added - */ - public boolean hasMin( - ) { - return this._has_min; - } - - /** - * Method hasThreshold. - * - * @return true if at least one Threshold has been added - */ - public boolean hasThreshold( - ) { - return this._has_threshold; - } - - /** - * Returns the value of field 'autoScale'. - * - * @return the value of field 'AutoScale'. - */ - public boolean isAutoScale( - ) { - return this._autoScale; - } - - /** - * Returns the value of field 'colourByLabel'. - * - * @return the value of field 'ColourByLabel'. - */ - public boolean isColourByLabel( - ) { - return this._colourByLabel; - } - - /** - * Method isValid. - * - * @return true if this object is valid according to the schema - */ - public boolean isValid( - ) { - try { - validate(); - } catch (org.exolab.castor.xml.ValidationException vex) { - return false; - } - return true; - } - - /** - * - * - * @param out - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - */ - public void marshal( - final java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { - Marshaller.marshal(this, out); - } - - /** - * - * - * @param handler - * @throws java.io.IOException if an IOException occurs during - * marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - */ - public void marshal( - final org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { - Marshaller.marshal(this, handler); - } - - /** - * Sets the value of field 'autoScale'. - * - * @param autoScale the value of field 'autoScale'. - */ - public void setAutoScale( - final boolean autoScale) { - this._autoScale = autoScale; - this._has_autoScale = true; - } - - /** - * Sets the value of field 'colourByLabel'. - * - * @param colourByLabel the value of field 'colourByLabel'. - */ - public void setColourByLabel( - final boolean colourByLabel) { - this._colourByLabel = colourByLabel; - this._has_colourByLabel = true; - } - - /** - * Sets the value of field 'max'. - * - * @param max the value of field 'max'. - */ - public void setMax( - final float max) { - this._max = max; - this._has_max = true; - } - - /** - * Sets the value of field 'min'. - * - * @param min the value of field 'min'. - */ - public void setMin( - final float min) { - this._min = min; - this._has_min = true; - } - - /** - * Sets the value of field 'minRGB'. - * - * @param minRGB the value of field 'minRGB'. - */ - public void setMinRGB( - final java.lang.String minRGB) { - this._minRGB = minRGB; - } - - /** - * Sets the value of field 'name'. - * - * @param name the value of field 'name'. - */ - public void setName( - final java.lang.String name) { - this._name = name; - } - - /** - * Sets the value of field 'RGB'. - * - * @param RGB the value of field 'RGB'. - */ - public void setRGB( - final java.lang.String RGB) { - this._RGB = RGB; - } - - /** - * Sets the value of field 'threshType'. The field 'threshType' - * has the following description: loosely specified - * enumeration: NONE,ABOVE, or BELOW - * - * @param threshType the value of field 'threshType'. - */ - public void setThreshType( - final java.lang.String threshType) { - this._threshType = threshType; - } - - /** - * Sets the value of field 'threshold'. - * - * @param threshold the value of field 'threshold'. - */ - public void setThreshold( - final float threshold) { - this._threshold = threshold; - this._has_threshold = true; - } - - /** - * Method unmarshal. - * - * @param reader - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - * @return the unmarshaled jalview.binding.Colour - */ - public static jalview.binding.Colour unmarshal( - final java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { - return (jalview.binding.Colour) Unmarshaller.unmarshal(jalview.binding.Colour.class, reader); - } - - /** - * - * - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - */ - public void validate( - ) - throws org.exolab.castor.xml.ValidationException { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); - } +public class Colour implements java.io.Serializable +{ + + // --------------------------/ + // - Class/Member Variables -/ + // --------------------------/ + + /** + * Field _name. + */ + private java.lang.String _name; + + /** + * Field _RGB. + */ + private java.lang.String _RGB; + + /** + * Field _minRGB. + */ + private java.lang.String _minRGB; + + /** + * loosely specified enumeration: NONE,ABOVE, or BELOW + */ + private java.lang.String _threshType; + + /** + * Field _threshold. + */ + private float _threshold; + + /** + * keeps track of state for field: _threshold + */ + private boolean _has_threshold; + + /** + * Field _max. + */ + private float _max; + + /** + * keeps track of state for field: _max + */ + private boolean _has_max; + + /** + * Field _min. + */ + private float _min; + + /** + * keeps track of state for field: _min + */ + private boolean _has_min; + + /** + * Field _colourByLabel. + */ + private boolean _colourByLabel; + + /** + * keeps track of state for field: _colourByLabel + */ + private boolean _has_colourByLabel; + + /** + * Field _autoScale. + */ + private boolean _autoScale; + + /** + * keeps track of state for field: _autoScale + */ + private boolean _has_autoScale; + + // ----------------/ + // - Constructors -/ + // ----------------/ + + public Colour() + { + super(); + } + + // -----------/ + // - Methods -/ + // -----------/ + + /** + */ + public void deleteAutoScale() + { + this._has_autoScale = false; + } + + /** + */ + public void deleteColourByLabel() + { + this._has_colourByLabel = false; + } + + /** + */ + public void deleteMax() + { + this._has_max = false; + } + + /** + */ + public void deleteMin() + { + this._has_min = false; + } + + /** + */ + public void deleteThreshold() + { + this._has_threshold = false; + } + + /** + * Returns the value of field 'autoScale'. + * + * @return the value of field 'AutoScale'. + */ + public boolean getAutoScale() + { + return this._autoScale; + } + + /** + * Returns the value of field 'colourByLabel'. + * + * @return the value of field 'ColourByLabel'. + */ + public boolean getColourByLabel() + { + return this._colourByLabel; + } + + /** + * Returns the value of field 'max'. + * + * @return the value of field 'Max'. + */ + public float getMax() + { + return this._max; + } + + /** + * Returns the value of field 'min'. + * + * @return the value of field 'Min'. + */ + public float getMin() + { + return this._min; + } + + /** + * Returns the value of field 'minRGB'. + * + * @return the value of field 'MinRGB'. + */ + public java.lang.String getMinRGB() + { + return this._minRGB; + } + + /** + * Returns the value of field 'name'. + * + * @return the value of field 'Name'. + */ + public java.lang.String getName() + { + return this._name; + } + + /** + * Returns the value of field 'RGB'. + * + * @return the value of field 'RGB'. + */ + public java.lang.String getRGB() + { + return this._RGB; + } + + /** + * Returns the value of field 'threshType'. The field 'threshType' has the + * following description: loosely specified enumeration: NONE,ABOVE, or BELOW + * + * @return the value of field 'ThreshType'. + */ + public java.lang.String getThreshType() + { + return this._threshType; + } + + /** + * Returns the value of field 'threshold'. + * + * @return the value of field 'Threshold'. + */ + public float getThreshold() + { + return this._threshold; + } + + /** + * Method hasAutoScale. + * + * @return true if at least one AutoScale has been added + */ + public boolean hasAutoScale() + { + return this._has_autoScale; + } + + /** + * Method hasColourByLabel. + * + * @return true if at least one ColourByLabel has been added + */ + public boolean hasColourByLabel() + { + return this._has_colourByLabel; + } + + /** + * Method hasMax. + * + * @return true if at least one Max has been added + */ + public boolean hasMax() + { + return this._has_max; + } + + /** + * Method hasMin. + * + * @return true if at least one Min has been added + */ + public boolean hasMin() + { + return this._has_min; + } + + /** + * Method hasThreshold. + * + * @return true if at least one Threshold has been added + */ + public boolean hasThreshold() + { + return this._has_threshold; + } + + /** + * Returns the value of field 'autoScale'. + * + * @return the value of field 'AutoScale'. + */ + public boolean isAutoScale() + { + return this._autoScale; + } + + /** + * Returns the value of field 'colourByLabel'. + * + * @return the value of field 'ColourByLabel'. + */ + public boolean isColourByLabel() + { + return this._colourByLabel; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid() + { + try + { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) + { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + */ + public void marshal(final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException + * if an IOException occurs during marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + */ + public void marshal(final org.xml.sax.ContentHandler handler) + throws java.io.IOException, + org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'autoScale'. + * + * @param autoScale + * the value of field 'autoScale'. + */ + public void setAutoScale(final boolean autoScale) + { + this._autoScale = autoScale; + this._has_autoScale = true; + } + + /** + * Sets the value of field 'colourByLabel'. + * + * @param colourByLabel + * the value of field 'colourByLabel'. + */ + public void setColourByLabel(final boolean colourByLabel) + { + this._colourByLabel = colourByLabel; + this._has_colourByLabel = true; + } + + /** + * Sets the value of field 'max'. + * + * @param max + * the value of field 'max'. + */ + public void setMax(final float max) + { + this._max = max; + this._has_max = true; + } + + /** + * Sets the value of field 'min'. + * + * @param min + * the value of field 'min'. + */ + public void setMin(final float min) + { + this._min = min; + this._has_min = true; + } + + /** + * Sets the value of field 'minRGB'. + * + * @param minRGB + * the value of field 'minRGB'. + */ + public void setMinRGB(final java.lang.String minRGB) + { + this._minRGB = minRGB; + } + + /** + * Sets the value of field 'name'. + * + * @param name + * the value of field 'name'. + */ + public void setName(final java.lang.String name) + { + this._name = name; + } + + /** + * Sets the value of field 'RGB'. + * + * @param RGB + * the value of field 'RGB'. + */ + public void setRGB(final java.lang.String RGB) + { + this._RGB = RGB; + } + + /** + * Sets the value of field 'threshType'. The field 'threshType' has the + * following description: loosely specified enumeration: NONE,ABOVE, or BELOW + * + * @param threshType + * the value of field 'threshType'. + */ + public void setThreshType(final java.lang.String threshType) + { + this._threshType = threshType; + } + + /** + * Sets the value of field 'threshold'. + * + * @param threshold + * the value of field 'threshold'. + */ + public void setThreshold(final float threshold) + { + this._threshold = threshold; + this._has_threshold = true; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + * @return the unmarshaled jalview.binding.Colour + */ + public static jalview.binding.Colour unmarshal(final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + return (jalview.binding.Colour) Unmarshaller.unmarshal( + jalview.binding.Colour.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + */ + public void validate() throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } } diff --git a/src/jalview/binding/Feature.java b/src/jalview/binding/Feature.java index a5f6ff9..39f438c 100755 --- a/src/jalview/binding/Feature.java +++ b/src/jalview/binding/Feature.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.binding; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,272 +29,286 @@ import org.exolab.castor.xml.Unmarshaller; * * @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. +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 -/ + // -----------/ + + /** */ - 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); - } + public void deleteBegin() + { + this._has_begin = false; + } - /** - * - * - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema + /** */ - public void validate( - ) - throws org.exolab.castor.xml.ValidationException { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); + public 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/FeatureSettings.java b/src/jalview/binding/FeatureSettings.java index 1669d2e..8232d14 100755 --- a/src/jalview/binding/FeatureSettings.java +++ b/src/jalview/binding/FeatureSettings.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.binding; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,257 +29,271 @@ import org.exolab.castor.xml.Unmarshaller; * * @version $Revision$ $Date$ */ -public class FeatureSettings implements java.io.Serializable { +public class FeatureSettings implements java.io.Serializable +{ + // --------------------------/ + // - Class/Member Variables -/ + // --------------------------/ - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ + /** + * Field _settingList. + */ + private java.util.Vector _settingList; - /** - * Field _settingList. - */ - private java.util.Vector _settingList; + // ----------------/ + // - Constructors -/ + // ----------------/ + public FeatureSettings() + { + super(); + this._settingList = new java.util.Vector(); + } - //----------------/ - //- Constructors -/ - //----------------/ + // -----------/ + // - Methods -/ + // -----------/ - public FeatureSettings() { - super(); - this._settingList = new java.util.Vector(); - } + /** + * + * + * @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); + } - //-----------/ - //- Methods -/ - //-----------/ + /** + * Method enumerateSetting. + * + * @return an Enumeration over all jalview.binding.Setting elements + */ + public java.util.Enumeration enumerateSetting() + { + return this._settingList.elements(); + } - /** - * - * - * @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); + /** + * 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) + "]"); } - /** - * - * - * @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); - } + return (jalview.binding.Setting) _settingList.get(index); + } - /** - * Method enumerateSetting. - * - * @return an Enumeration over all jalview.binding.Setting - * elements - */ - public java.util.Enumeration enumerateSetting( - ) { - return this._settingList.elements(); - } + /** + * Method getSetting.Returns the contents of the collection in an Array. + *

    + * 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 + * know 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 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 getSettingCount. + * + * @return the size of this collection + */ + public int getSettingCount() + { + return this._settingList.size(); + } - /** - * Method getSetting.Returns the contents of the collection in - * an Array.

    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 know - * 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 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; + } - /** - * Method getSettingCount. - * - * @return the size of this collection - */ - public int getSettingCount( - ) { - return this._settingList.size(); - } + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + */ + public void marshal(final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, out); + } - /** - * Method 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 handler + * @throws java.io.IOException + * if an IOException occurs during marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + */ + public void marshal(final org.xml.sax.ContentHandler handler) + throws java.io.IOException, + org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, handler); + } - /** - * - * - * @param 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); - } + public void removeAllSetting() + { + this._settingList.clear(); + } - /** - * - * - * @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 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; + } - /** - */ - public void removeAllSetting( - ) { - this._settingList.clear(); - } + /** + * 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; + } - /** - * Method removeSetting. - * - * @param vSetting - * @return true if the object was removed from the collection. - */ - public boolean removeSetting( - final jalview.binding.Setting vSetting) { - boolean removed = _settingList.remove(vSetting); - return removed; + /** + * + * + * @param 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) + "]"); } - /** - * 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; - } + this._settingList.set(index, vSetting); + } - /** - * - * - * @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(); - /** - * - * - * @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]); - } + for (int i = 0; i < vSettingArray.length; i++) + { + this._settingList.add(vSettingArray[i]); } + } - /** - * Method unmarshal. - * - * @param reader - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - * @return the unmarshaled jalview.binding.FeatureSettings - */ - public static jalview.binding.FeatureSettings unmarshal( - final java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { - return (jalview.binding.FeatureSettings) Unmarshaller.unmarshal(jalview.binding.FeatureSettings.class, reader); - } + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + * @return the unmarshaled jalview.binding.FeatureSettings + */ + public static jalview.binding.FeatureSettings unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + return (jalview.binding.FeatureSettings) Unmarshaller.unmarshal( + jalview.binding.FeatureSettings.class, reader); + } - /** - * - * - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - */ - public void validate( - ) - throws org.exolab.castor.xml.ValidationException { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); - } + /** + * + * + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + */ + public void validate() throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } } diff --git a/src/jalview/binding/Features.java b/src/jalview/binding/Features.java index e5119e5..ce7467b 100755 --- a/src/jalview/binding/Features.java +++ b/src/jalview/binding/Features.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.binding; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,98 +29,106 @@ import org.exolab.castor.xml.Unmarshaller; * * @version $Revision$ $Date$ */ -public class Features extends Feature -implements java.io.Serializable +public class Features extends Feature implements java.io.Serializable { + // ----------------/ + // - Constructors -/ + // ----------------/ - //----------------/ - //- Constructors -/ - //----------------/ - - public Features() { - super(); - } - + public Features() + { + super(); + } - //-----------/ - //- Methods -/ - //-----------/ + // -----------/ + // - Methods -/ + // -----------/ - /** - * Method isValid. - * - * @return true if this object is valid according to the schema - */ - public boolean isValid( - ) { - try { - validate(); - } catch (org.exolab.castor.xml.ValidationException vex) { - return false; - } - return true; + /** + * 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 out + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + */ + public void marshal(final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, out); + } - /** - * - * - * @param handler - * @throws java.io.IOException if an IOException occurs during - * marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - */ - public void marshal( - final org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { - Marshaller.marshal(this, handler); - } + /** + * + * + * @param handler + * @throws java.io.IOException + * if an IOException occurs during marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + */ + public void marshal(final org.xml.sax.ContentHandler handler) + throws java.io.IOException, + org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, handler); + } - /** - * Method unmarshal. - * - * @param reader - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - * @return the unmarshaled jalview.binding.Feature - */ - public static jalview.binding.Feature unmarshal( - final java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { - return (jalview.binding.Feature) Unmarshaller.unmarshal(jalview.binding.Features.class, reader); - } + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + * @return the unmarshaled jalview.binding.Feature + */ + public static jalview.binding.Feature unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + return (jalview.binding.Feature) Unmarshaller.unmarshal( + jalview.binding.Features.class, reader); + } - /** - * - * - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - */ - public void validate( - ) - throws org.exolab.castor.xml.ValidationException { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); - } + /** + * + * + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + */ + public void validate() throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } } diff --git a/src/jalview/binding/JGroup.java b/src/jalview/binding/JGroup.java index b58ddd4..2109516 100755 --- a/src/jalview/binding/JGroup.java +++ b/src/jalview/binding/JGroup.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.binding; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,721 +29,742 @@ import org.exolab.castor.xml.Unmarshaller; * * @version $Revision$ $Date$ */ -public class JGroup implements java.io.Serializable { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _start. - */ - private int _start; - - /** - * keeps track of state for field: _start - */ - private boolean _has_start; - - /** - * Field _end. - */ - private int _end; - - /** - * keeps track of state for field: _end - */ - private boolean _has_end; - - /** - * Field _name. - */ - private java.lang.String _name; - - /** - * Field _colour. - */ - private java.lang.String _colour; - - /** - * Field _consThreshold. - */ - private int _consThreshold; - - /** - * keeps track of state for field: _consThreshold - */ - private boolean _has_consThreshold; - - /** - * Field _pidThreshold. - */ - private int _pidThreshold; - - /** - * keeps track of state for field: _pidThreshold - */ - private boolean _has_pidThreshold; - - /** - * Field _outlineColour. - */ - private int _outlineColour; - - /** - * keeps track of state for field: _outlineColour - */ - private boolean _has_outlineColour; - - /** - * Field _displayBoxes. - */ - private boolean _displayBoxes; - - /** - * keeps track of state for field: _displayBoxes - */ - private boolean _has_displayBoxes; - - /** - * Field _displayText. - */ - private boolean _displayText; - - /** - * keeps track of state for field: _displayText - */ - private boolean _has_displayText; - - /** - * Field _colourText. - */ - private boolean _colourText; - - /** - * keeps track of state for field: _colourText - */ - private boolean _has_colourText; - - /** - * Field _seqList. - */ - private java.util.Vector _seqList; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public JGroup() { - super(); - this._seqList = new java.util.Vector(); - } - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * - * - * @param vSeq - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - */ - public void addSeq( - final int vSeq) - throws java.lang.IndexOutOfBoundsException { - this._seqList.addElement(new java.lang.Integer(vSeq)); - } - - /** - * - * - * @param index - * @param vSeq - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - */ - public void addSeq( - final int index, - final int vSeq) - throws java.lang.IndexOutOfBoundsException { - this._seqList.add(index, new java.lang.Integer(vSeq)); - } - - /** - */ - public void deleteColourText( - ) { - this._has_colourText= false; - } - - /** - */ - public void deleteConsThreshold( - ) { - this._has_consThreshold= false; - } - - /** - */ - public void deleteDisplayBoxes( - ) { - this._has_displayBoxes= false; - } - - /** - */ - public void deleteDisplayText( - ) { - this._has_displayText= false; - } - - /** - */ - public void deleteEnd( - ) { - this._has_end= false; - } - - /** - */ - public void deleteOutlineColour( - ) { - this._has_outlineColour= false; - } - - /** - */ - public void deletePidThreshold( - ) { - this._has_pidThreshold= false; - } - - /** - */ - public void deleteStart( - ) { - this._has_start= false; - } - - /** - * Method enumerateSeq. - * - * @return an Enumeration over all int elements - */ - public java.util.Enumeration enumerateSeq( - ) { - return this._seqList.elements(); - } - - /** - * Returns the value of field 'colour'. - * - * @return the value of field 'Colour'. - */ - public java.lang.String getColour( - ) { - return this._colour; - } - - /** - * Returns the value of field 'colourText'. - * - * @return the value of field 'ColourText'. - */ - public boolean getColourText( - ) { - return this._colourText; - } - - /** - * Returns the value of field 'consThreshold'. - * - * @return the value of field 'ConsThreshold'. - */ - public int getConsThreshold( - ) { - return this._consThreshold; - } - - /** - * Returns the value of field 'displayBoxes'. - * - * @return the value of field 'DisplayBoxes'. - */ - public boolean getDisplayBoxes( - ) { - return this._displayBoxes; - } - - /** - * Returns the value of field 'displayText'. - * - * @return the value of field 'DisplayText'. - */ - public boolean getDisplayText( - ) { - return this._displayText; - } - - /** - * Returns the value of field 'end'. - * - * @return the value of field 'End'. - */ - public int getEnd( - ) { - return this._end; - } - - /** - * Returns the value of field 'name'. - * - * @return the value of field 'Name'. - */ - public java.lang.String getName( - ) { - return this._name; - } - - /** - * Returns the value of field 'outlineColour'. - * - * @return the value of field 'OutlineColour'. - */ - public int getOutlineColour( - ) { - return this._outlineColour; - } - - /** - * Returns the value of field 'pidThreshold'. - * - * @return the value of field 'PidThreshold'. - */ - public int getPidThreshold( - ) { - return this._pidThreshold; - } - - /** - * Method getSeq. - * - * @param index - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - * @return the value of the int at the given index - */ - public int getSeq( - final int index) - throws java.lang.IndexOutOfBoundsException { - // check bounds for index - if (index < 0 || index >= this._seqList.size()) { - throw new IndexOutOfBoundsException("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); - } +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 index 0a50204..b93386d 100755 --- a/src/jalview/binding/JSeq.java +++ b/src/jalview/binding/JSeq.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.binding; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,605 +29,627 @@ import org.exolab.castor.xml.Unmarshaller; * * @version $Revision$ $Date$ */ -public class JSeq implements java.io.Serializable { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _colour. - */ - private int _colour; - - /** - * keeps track of state for field: _colour - */ - private boolean _has_colour; - - /** - * Field _start. - */ - private int _start; - - /** - * keeps track of state for field: _start - */ - private boolean _has_start; - - /** - * Field _end. - */ - private int _end; - - /** - * keeps track of state for field: _end - */ - private boolean _has_end; - - /** - * Field _id. - */ - private int _id; - - /** - * keeps track of state for field: _id - */ - private boolean _has_id; - - /** - * Field _featuresList. - */ - private java.util.Vector _featuresList; - - /** - * Field _pdbidsList. - */ - private java.util.Vector _pdbidsList; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public JSeq() { - super(); - this._featuresList = new java.util.Vector(); - this._pdbidsList = new java.util.Vector(); - } - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * - * - * @param vFeatures - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - */ - public void addFeatures( - final jalview.binding.Features vFeatures) - throws java.lang.IndexOutOfBoundsException { - this._featuresList.addElement(vFeatures); - } - - /** - * - * - * @param index - * @param vFeatures - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - */ - public void addFeatures( - final int index, - final jalview.binding.Features vFeatures) - throws java.lang.IndexOutOfBoundsException { - this._featuresList.add(index, vFeatures); - } - - /** - * - * - * @param vPdbids - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - */ - public void addPdbids( - final jalview.binding.Pdbids vPdbids) - throws java.lang.IndexOutOfBoundsException { - this._pdbidsList.addElement(vPdbids); - } - - /** - * - * - * @param index - * @param vPdbids - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - */ - public void addPdbids( - final int index, - final jalview.binding.Pdbids vPdbids) - throws java.lang.IndexOutOfBoundsException { - this._pdbidsList.add(index, vPdbids); - } - - /** - */ - public void deleteColour( - ) { - this._has_colour= false; - } - - /** - */ - public void deleteEnd( - ) { - this._has_end= false; - } - - /** - */ - public void deleteId( - ) { - this._has_id= false; - } - - /** - */ - public void deleteStart( - ) { - this._has_start= false; - } - - /** - * Method enumerateFeatures. - * - * @return an Enumeration over all jalview.binding.Features - * elements - */ - public java.util.Enumeration enumerateFeatures( - ) { - return this._featuresList.elements(); - } - - /** - * Method enumeratePdbids. - * - * @return an Enumeration over all jalview.binding.Pdbids - * elements - */ - public java.util.Enumeration enumeratePdbids( - ) { - return this._pdbidsList.elements(); - } - - /** - * Returns the value of field 'colour'. - * - * @return the value of field 'Colour'. - */ - public int getColour( - ) { - return this._colour; - } - - /** - * Returns the value of field 'end'. - * - * @return the value of field 'End'. - */ - public int getEnd( - ) { - return this._end; - } - - /** - * Method getFeatures. - * - * @param index - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - * @return the value of the jalview.binding.Features at the - * given index - */ - public jalview.binding.Features getFeatures( - final int index) - throws java.lang.IndexOutOfBoundsException { - // check bounds for index - if (index < 0 || index >= this._featuresList.size()) { - throw new IndexOutOfBoundsException("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.

    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 know - * 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.

    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 know - * 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); - } +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. + *

    + * 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 + * know 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. + *

    + * 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 + * know 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 index 8348cee..fb9423f 100755 --- a/src/jalview/binding/JalviewModel.java +++ b/src/jalview/binding/JalviewModel.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.binding; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,202 +29,215 @@ import org.exolab.castor.xml.Unmarshaller; * * @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); +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 index dd45d29..f8207eb 100755 --- a/src/jalview/binding/JalviewModelSequence.java +++ b/src/jalview/binding/JalviewModelSequence.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.binding; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,904 +29,937 @@ import org.exolab.castor.xml.Unmarshaller; * * @version $Revision$ $Date$ */ -public class JalviewModelSequence implements java.io.Serializable { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _JSeqList. - */ - private java.util.Vector _JSeqList; - - /** - * Field _JGroupList. - */ - private java.util.Vector _JGroupList; - - /** - * Field _viewportList. - */ - private java.util.Vector _viewportList; - - /** - * Field _userColoursList. - */ - private java.util.Vector _userColoursList; - - /** - * Field _treeList. - */ - private java.util.Vector _treeList; - - /** - * Field _featureSettings. - */ - private jalview.binding.FeatureSettings _featureSettings; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public JalviewModelSequence() { - super(); - this._JSeqList = new java.util.Vector(); - this._JGroupList = new java.util.Vector(); - this._viewportList = new java.util.Vector(); - this._userColoursList = new java.util.Vector(); - this._treeList = new java.util.Vector(); - } - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * - * - * @param vJGroup - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - */ - public void addJGroup( - final jalview.binding.JGroup vJGroup) - throws java.lang.IndexOutOfBoundsException { - this._JGroupList.addElement(vJGroup); - } - - /** - * - * - * @param index - * @param vJGroup - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - */ - public void addJGroup( - final int index, - final jalview.binding.JGroup vJGroup) - throws java.lang.IndexOutOfBoundsException { - this._JGroupList.add(index, vJGroup); - } - - /** - * - * - * @param vJSeq - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - */ - public void addJSeq( - final jalview.binding.JSeq vJSeq) - throws java.lang.IndexOutOfBoundsException { - this._JSeqList.addElement(vJSeq); - } - - /** - * - * - * @param index - * @param vJSeq - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - */ - public void addJSeq( - final int index, - final jalview.binding.JSeq vJSeq) - throws java.lang.IndexOutOfBoundsException { - this._JSeqList.add(index, vJSeq); - } - - /** - * - * - * @param vTree - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - */ - public void addTree( - final jalview.binding.Tree vTree) - throws java.lang.IndexOutOfBoundsException { - this._treeList.addElement(vTree); - } - - /** - * - * - * @param index - * @param vTree - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - */ - public void addTree( - final int index, - final jalview.binding.Tree vTree) - throws java.lang.IndexOutOfBoundsException { - this._treeList.add(index, vTree); - } - - /** - * - * - * @param vUserColours - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - */ - public void addUserColours( - final jalview.binding.UserColours vUserColours) - throws java.lang.IndexOutOfBoundsException { - this._userColoursList.addElement(vUserColours); - } - - /** - * - * - * @param index - * @param vUserColours - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - */ - public void addUserColours( - final int index, - final jalview.binding.UserColours vUserColours) - throws java.lang.IndexOutOfBoundsException { - this._userColoursList.add(index, vUserColours); - } - - /** - * - * - * @param vViewport - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - */ - public void addViewport( - final jalview.binding.Viewport vViewport) - throws java.lang.IndexOutOfBoundsException { - this._viewportList.addElement(vViewport); - } - - /** - * - * - * @param index - * @param vViewport - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - */ - public void addViewport( - final int index, - final jalview.binding.Viewport vViewport) - throws java.lang.IndexOutOfBoundsException { - this._viewportList.add(index, vViewport); - } - - /** - * Method enumerateJGroup. - * - * @return an Enumeration over all jalview.binding.JGroup - * elements - */ - public java.util.Enumeration enumerateJGroup( - ) { - return this._JGroupList.elements(); - } - - /** - * Method enumerateJSeq. - * - * @return an Enumeration over all jalview.binding.JSeq elements - */ - public java.util.Enumeration enumerateJSeq( - ) { - return this._JSeqList.elements(); - } - - /** - * Method enumerateTree. - * - * @return an Enumeration over all jalview.binding.Tree elements - */ - public java.util.Enumeration enumerateTree( - ) { - return this._treeList.elements(); - } - - /** - * Method enumerateUserColours. - * - * @return an Enumeration over all jalview.binding.UserColours - * elements - */ - public java.util.Enumeration enumerateUserColours( - ) { - return this._userColoursList.elements(); - } - - /** - * Method enumerateViewport. - * - * @return an Enumeration over all jalview.binding.Viewport - * elements - */ - public java.util.Enumeration enumerateViewport( - ) { - return this._viewportList.elements(); - } - - /** - * Returns the value of field 'featureSettings'. - * - * @return the value of field 'FeatureSettings'. - */ - public jalview.binding.FeatureSettings getFeatureSettings( - ) { - return this._featureSettings; - } - - /** - * Method getJGroup. - * - * @param index - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - * @return the value of the jalview.binding.JGroup at the given - * index - */ - public jalview.binding.JGroup getJGroup( - final int index) - throws java.lang.IndexOutOfBoundsException { - // check bounds for index - if (index < 0 || index >= this._JGroupList.size()) { - throw new IndexOutOfBoundsException("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.

    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 know - * 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.

    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 know - * 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.

    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 know - * 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.

    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 know - * 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.

    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 know - * 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); - } +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. + *

    + * 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 + * know 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. + *

    + * 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 + * know 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. + *

    + * 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 + * know 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. + *

    + * 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 + * know 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. + *

    + * 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 + * know 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 index a1e84d5..092736a 100755 --- a/src/jalview/binding/JalviewUserColours.java +++ b/src/jalview/binding/JalviewUserColours.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.binding; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,312 +29,326 @@ import org.exolab.castor.xml.Unmarshaller; * * @version $Revision$ $Date$ */ -public class JalviewUserColours implements java.io.Serializable { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _schemeName. - */ - private java.lang.String _schemeName; - - /** - * Jalview colour scheme document version. - * - */ - private java.lang.String _version; - - /** - * Field _colourList. - */ - private java.util.Vector _colourList; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public JalviewUserColours() { - super(); - this._colourList = new java.util.Vector(); +public class JalviewUserColours implements java.io.Serializable +{ + + // --------------------------/ + // - Class/Member Variables -/ + // --------------------------/ + + /** + * Field _schemeName. + */ + private java.lang.String _schemeName; + + /** + * Jalview colour scheme document version. + * + */ + private java.lang.String _version; + + /** + * Field _colourList. + */ + private java.util.Vector _colourList; + + // ----------------/ + // - Constructors -/ + // ----------------/ + + public JalviewUserColours() + { + super(); + this._colourList = new java.util.Vector(); + } + + // -----------/ + // - Methods -/ + // -----------/ + + /** + * + * + * @param vColour + * @throws java.lang.IndexOutOfBoundsException + * if the index given is outside the bounds of the collection + */ + public void addColour(final Colour vColour) + throws java.lang.IndexOutOfBoundsException + { + this._colourList.addElement(vColour); + } + + /** + * + * + * @param index + * @param vColour + * @throws java.lang.IndexOutOfBoundsException + * if the index given is outside the bounds of the collection + */ + public void addColour(final int index, final Colour vColour) + throws java.lang.IndexOutOfBoundsException + { + this._colourList.add(index, vColour); + } + + /** + * Method enumerateColour. + * + * @return an Enumeration over all Colour elements + */ + public java.util.Enumeration enumerateColour() + { + return this._colourList.elements(); + } + + /** + * Method getColour. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException + * if the index given is outside the bounds of the collection + * @return the value of the Colour at the given index + */ + public Colour getColour(final int index) + throws java.lang.IndexOutOfBoundsException + { + // check bounds for index + if (index < 0 || index >= this._colourList.size()) + { + throw new IndexOutOfBoundsException("getColour: Index value '" + + index + "' not in range [0.." + + (this._colourList.size() - 1) + "]"); } - - //-----------/ - //- 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); + return (Colour) _colourList.get(index); + } + + /** + * Method getColour.Returns the contents of the collection in an Array. + *

    + * 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 + * know that the Array returned is of exactly the correct length. + * + * @return this collection as an Array + */ + public Colour[] getColour() + { + Colour[] array = new Colour[0]; + return (Colour[]) this._colourList.toArray(array); + } + + /** + * Method getColourCount. + * + * @return the size of this collection + */ + public int getColourCount() + { + return this._colourList.size(); + } + + /** + * Returns the value of field 'schemeName'. + * + * @return the value of field 'SchemeName'. + */ + public java.lang.String getSchemeName() + { + return this._schemeName; + } + + /** + * Returns the value of field 'version'. The field 'version' has the following + * description: Jalview colour scheme document version. + * + * + * @return the value of field 'Version'. + */ + public java.lang.String getVersion() + { + return this._version; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid() + { + try + { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) + { + return false; } - - /** - * - * - * @param index - * @param vColour - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - */ - public void addColour( - final int index, - final Colour vColour) - throws java.lang.IndexOutOfBoundsException { - this._colourList.add(index, vColour); - } - - /** - * Method enumerateColour. - * - * @return an Enumeration over all Colour elements - */ - public java.util.Enumeration enumerateColour( - ) { - return this._colourList.elements(); - } - - /** - * Method getColour. - * - * @param index - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - * @return the value of the Colour at the given index - */ - public Colour getColour( - final int index) - throws java.lang.IndexOutOfBoundsException { - // check bounds for index - if (index < 0 || index >= this._colourList.size()) { - throw new IndexOutOfBoundsException("getColour: Index value '" + index + "' not in range [0.." + (this._colourList.size() - 1) + "]"); - } - - return (Colour) _colourList.get(index); - } - - /** - * Method getColour.Returns the contents of the collection in - * an Array.

    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 know - * that the Array returned is of exactly the correct length. - * - * @return this collection as an Array - */ - public Colour[] getColour( - ) { - Colour[] array = new Colour[0]; - return (Colour[]) this._colourList.toArray(array); - } - - /** - * Method getColourCount. - * - * @return the size of this collection - */ - public int getColourCount( - ) { - return this._colourList.size(); - } - - /** - * Returns the value of field 'schemeName'. - * - * @return the value of field 'SchemeName'. - */ - public java.lang.String getSchemeName( - ) { - return this._schemeName; - } - - /** - * Returns the value of field 'version'. The field 'version' - * has the following description: Jalview colour scheme - * document version. - * - * - * @return the value of field 'Version'. + 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 java.lang.String getVersion( - ) { - return this._version; + public void removeAllColour() + { + this._colourList.clear(); + } + + /** + * Method removeColour. + * + * @param vColour + * @return true if the object was removed from the collection. + */ + public boolean removeColour(final Colour vColour) + { + boolean removed = _colourList.remove(vColour); + return removed; + } + + /** + * Method removeColourAt. + * + * @param index + * @return the element removed from the collection + */ + public Colour removeColourAt(final int index) + { + java.lang.Object obj = this._colourList.remove(index); + return (Colour) obj; + } + + /** + * + * + * @param index + * @param vColour + * @throws java.lang.IndexOutOfBoundsException + * if the index given is outside the bounds of the collection + */ + public void setColour(final int index, final Colour vColour) + throws java.lang.IndexOutOfBoundsException + { + // check bounds for index + if (index < 0 || index >= this._colourList.size()) + { + throw new IndexOutOfBoundsException("setColour: Index value '" + + index + "' not in range [0.." + + (this._colourList.size() - 1) + "]"); } - /** - * Method isValid. - * - * @return true if this object is valid according to the schema - */ - public boolean isValid( - ) { - try { - validate(); - } catch (org.exolab.castor.xml.ValidationException vex) { - return false; - } - return true; - } - - /** - * - * - * @param out - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - */ - public void marshal( - final java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { - Marshaller.marshal(this, out); - } - - /** - * - * - * @param handler - * @throws java.io.IOException if an IOException occurs during - * marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - */ - public void marshal( - final org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { - Marshaller.marshal(this, handler); - } - - /** - */ - public void removeAllColour( - ) { - this._colourList.clear(); - } - - /** - * Method removeColour. - * - * @param vColour - * @return true if the object was removed from the collection. - */ - public boolean removeColour( - final Colour vColour) { - boolean removed = _colourList.remove(vColour); - return removed; - } - - /** - * Method removeColourAt. - * - * @param index - * @return the element removed from the collection - */ - public Colour removeColourAt( - final int index) { - java.lang.Object obj = this._colourList.remove(index); - return (Colour) obj; - } - - /** - * - * - * @param index - * @param vColour - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - */ - public void setColour( - final int index, - final Colour vColour) - throws java.lang.IndexOutOfBoundsException { - // check bounds for index - if (index < 0 || index >= this._colourList.size()) { - throw new IndexOutOfBoundsException("setColour: Index value '" + index + "' not in range [0.." + (this._colourList.size() - 1) + "]"); - } - - this._colourList.set(index, vColour); - } - - /** - * - * - * @param vColourArray - */ - public void setColour( - final Colour[] vColourArray) { - //-- copy array - _colourList.clear(); - - for (int i = 0; i < vColourArray.length; i++) { - this._colourList.add(vColourArray[i]); - } - } - - /** - * Sets the value of field 'schemeName'. - * - * @param schemeName the value of field 'schemeName'. - */ - public void setSchemeName( - final java.lang.String schemeName) { - this._schemeName = schemeName; - } - - /** - * Sets the value of field 'version'. The field 'version' has - * the following description: Jalview colour scheme document - * version. - * - * - * @param version the value of field 'version'. - */ - public void setVersion( - final java.lang.String version) { - this._version = version; - } - - /** - * Method unmarshal. - * - * @param reader - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - * @return the unmarshaled jalview.binding.JalviewUserColours - */ - public static jalview.binding.JalviewUserColours unmarshal( - final java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { - return (jalview.binding.JalviewUserColours) Unmarshaller.unmarshal(jalview.binding.JalviewUserColours.class, reader); - } - - /** - * - * - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - */ - public void validate( - ) - throws org.exolab.castor.xml.ValidationException { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); + this._colourList.set(index, vColour); + } + + /** + * + * + * @param vColourArray + */ + public void setColour(final Colour[] vColourArray) + { + // -- copy array + _colourList.clear(); + + for (int i = 0; i < vColourArray.length; i++) + { + this._colourList.add(vColourArray[i]); } + } + + /** + * Sets the value of field 'schemeName'. + * + * @param schemeName + * the value of field 'schemeName'. + */ + public void setSchemeName(final java.lang.String schemeName) + { + this._schemeName = schemeName; + } + + /** + * Sets the value of field 'version'. The field 'version' has the following + * description: Jalview colour scheme document version. + * + * + * @param version + * the value of field 'version'. + */ + public void setVersion(final java.lang.String version) + { + this._version = version; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + * @return the unmarshaled jalview.binding.JalviewUserColours + */ + public static jalview.binding.JalviewUserColours unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + return (jalview.binding.JalviewUserColours) Unmarshaller.unmarshal( + jalview.binding.JalviewUserColours.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + */ + public void validate() throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } } diff --git a/src/jalview/binding/Pdbentry.java b/src/jalview/binding/Pdbentry.java index 9672842..32ff535 100755 --- a/src/jalview/binding/Pdbentry.java +++ b/src/jalview/binding/Pdbentry.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.binding; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,308 +29,326 @@ import org.exolab.castor.xml.Unmarshaller; * * @version $Revision$ $Date$ */ -public class Pdbentry implements java.io.Serializable { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _id. - */ - private java.lang.String _id; - - /** - * Field _type. - */ - private java.lang.String _type; - - /** - * Field _items. - */ - private java.util.Vector _items; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public Pdbentry() { - super(); - this._items = new java.util.Vector(); +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) + + "]"); } - - //-----------/ - //- 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); + return (jalview.binding.PdbentryItem) _items.get(index); + } + + /** + * Method getPdbentryItem.Returns the contents of the collection in an Array. + *

    + * 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 + * know 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; } - - /** - * - * - * @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.

    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 know 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'. + 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 java.lang.String getType( - ) { - return this._type; + 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) + + "]"); } - /** - * 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); + 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 index c23a48d..7d4f6a2 100755 --- a/src/jalview/binding/PdbentryItem.java +++ b/src/jalview/binding/PdbentryItem.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.binding; @@ -23,181 +22,185 @@ package jalview.binding; * * @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(); +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) + "]"); } - /** - * 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 + return (jalview.binding.Property) _propertyList.get(index); + } + + /** + * Method getProperty.Returns the contents of the collection in an Array. + *

    + * 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 + * know 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 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); + 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) + "]"); } - /** - * Method getProperty.Returns the contents of the collection in - * an Array.

    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 know - * 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]); - } + 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 index d7c611f..e75b25c 100755 --- a/src/jalview/binding/Pdbids.java +++ b/src/jalview/binding/Pdbids.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.binding; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,98 +29,106 @@ import org.exolab.castor.xml.Unmarshaller; * * @version $Revision$ $Date$ */ -public class Pdbids extends Pdbentry -implements java.io.Serializable +public class Pdbids extends Pdbentry implements java.io.Serializable { + // ----------------/ + // - Constructors -/ + // ----------------/ - //----------------/ - //- Constructors -/ - //----------------/ - - public Pdbids() { - super(); - } - + public Pdbids() + { + super(); + } - //-----------/ - //- Methods -/ - //-----------/ + // -----------/ + // - Methods -/ + // -----------/ - /** - * Method isValid. - * - * @return true if this object is valid according to the schema - */ - public boolean isValid( - ) { - try { - validate(); - } catch (org.exolab.castor.xml.ValidationException vex) { - return false; - } - return true; + /** + * 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 out + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + */ + public void marshal(final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, out); + } - /** - * - * - * @param handler - * @throws java.io.IOException if an IOException occurs during - * marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - */ - public void marshal( - final org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { - Marshaller.marshal(this, handler); - } + /** + * + * + * @param handler + * @throws java.io.IOException + * if an IOException occurs during marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + */ + public void marshal(final org.xml.sax.ContentHandler handler) + throws java.io.IOException, + org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, handler); + } - /** - * Method unmarshal. - * - * @param reader - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - * @return the unmarshaled jalview.binding.Pdbentry - */ - public static jalview.binding.Pdbentry unmarshal( - final java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { - return (jalview.binding.Pdbentry) Unmarshaller.unmarshal(jalview.binding.Pdbids.class, reader); - } + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + * @return the unmarshaled jalview.binding.Pdbentry + */ + public static jalview.binding.Pdbentry unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + return (jalview.binding.Pdbentry) Unmarshaller.unmarshal( + jalview.binding.Pdbids.class, reader); + } - /** - * - * - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - */ - public void validate( - ) - throws org.exolab.castor.xml.ValidationException { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); - } + /** + * + * + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + */ + public void validate() throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } } diff --git a/src/jalview/binding/Property.java b/src/jalview/binding/Property.java index 09ce314..8c80afb 100755 --- a/src/jalview/binding/Property.java +++ b/src/jalview/binding/Property.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.binding; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,151 +29,162 @@ import org.exolab.castor.xml.Unmarshaller; * * @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); +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 index 61ac249..ccc627d 100755 --- a/src/jalview/binding/Sequence.java +++ b/src/jalview/binding/Sequence.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.binding; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,98 +29,106 @@ import org.exolab.castor.xml.Unmarshaller; * * @version $Revision$ $Date$ */ -public class Sequence extends SequenceType -implements java.io.Serializable +public class Sequence extends SequenceType implements java.io.Serializable { + // ----------------/ + // - Constructors -/ + // ----------------/ - //----------------/ - //- Constructors -/ - //----------------/ - - public Sequence() { - super(); - } - + public Sequence() + { + super(); + } - //-----------/ - //- Methods -/ - //-----------/ + // -----------/ + // - Methods -/ + // -----------/ - /** - * Method isValid. - * - * @return true if this object is valid according to the schema - */ - public boolean isValid( - ) { - try { - validate(); - } catch (org.exolab.castor.xml.ValidationException vex) { - return false; - } - return true; + /** + * 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 out + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + */ + public void marshal(final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, out); + } - /** - * - * - * @param handler - * @throws java.io.IOException if an IOException occurs during - * marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - */ - public void marshal( - final org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { - Marshaller.marshal(this, handler); - } + /** + * + * + * @param handler + * @throws java.io.IOException + * if an IOException occurs during marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + */ + public void marshal(final org.xml.sax.ContentHandler handler) + throws java.io.IOException, + org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, handler); + } - /** - * Method unmarshal. - * - * @param reader - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - * @return the unmarshaled jalview.binding.SequenceType - */ - public static jalview.binding.SequenceType unmarshal( - final java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { - return (jalview.binding.SequenceType) Unmarshaller.unmarshal(jalview.binding.Sequence.class, reader); - } + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + * @return the unmarshaled jalview.binding.SequenceType + */ + public static jalview.binding.SequenceType unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + return (jalview.binding.SequenceType) Unmarshaller.unmarshal( + jalview.binding.Sequence.class, reader); + } - /** - * - * - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - */ - public void validate( - ) - throws org.exolab.castor.xml.ValidationException { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); - } + /** + * + * + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + */ + public void validate() throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } } diff --git a/src/jalview/binding/SequenceSet.java b/src/jalview/binding/SequenceSet.java index c093220..1bf6c3d 100755 --- a/src/jalview/binding/SequenceSet.java +++ b/src/jalview/binding/SequenceSet.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.binding; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,496 +29,520 @@ import org.exolab.castor.xml.Unmarshaller; * * @version $Revision$ $Date$ */ -public class SequenceSet implements java.io.Serializable { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _gapChar. - */ - private java.lang.String _gapChar; - - /** - * Field _aligned. - */ - private boolean _aligned; - - /** - * keeps track of state for field: _aligned - */ - private boolean _has_aligned; - - /** - * Field _sequenceList. - */ - private java.util.Vector _sequenceList; - - /** - * Field _annotationList. - */ - private java.util.Vector _annotationList; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public SequenceSet() { - super(); - this._sequenceList = new java.util.Vector(); - this._annotationList = new java.util.Vector(); - } - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * - * - * @param vAnnotation - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - */ - public void addAnnotation( - final jalview.binding.Annotation vAnnotation) - throws java.lang.IndexOutOfBoundsException { - this._annotationList.addElement(vAnnotation); - } - - /** - * - * - * @param index - * @param vAnnotation - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - */ - public void addAnnotation( - final int index, - final jalview.binding.Annotation vAnnotation) - throws java.lang.IndexOutOfBoundsException { - this._annotationList.add(index, vAnnotation); - } - - /** - * - * - * @param vSequence - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - */ - public void addSequence( - final jalview.binding.Sequence vSequence) - throws java.lang.IndexOutOfBoundsException { - this._sequenceList.addElement(vSequence); - } - - /** - * - * - * @param index - * @param vSequence - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - */ - public void addSequence( - final int index, - final jalview.binding.Sequence vSequence) - throws java.lang.IndexOutOfBoundsException { - this._sequenceList.add(index, vSequence); - } - - /** - */ - public void deleteAligned( - ) { - this._has_aligned= false; - } - - /** - * Method enumerateAnnotation. - * - * @return an Enumeration over all jalview.binding.Annotation - * elements - */ - public java.util.Enumeration enumerateAnnotation( - ) { - return this._annotationList.elements(); - } - - /** - * Method enumerateSequence. - * - * @return an Enumeration over all jalview.binding.Sequence - * elements - */ - public java.util.Enumeration enumerateSequence( - ) { - return this._sequenceList.elements(); - } - - /** - * Returns the value of field 'aligned'. - * - * @return the value of field 'Aligned'. - */ - public boolean getAligned( - ) { - return this._aligned; - } - - /** - * Method getAnnotation. - * - * @param index - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - * @return the value of the jalview.binding.Annotation at the - * given index - */ - public jalview.binding.Annotation getAnnotation( - final int index) - throws java.lang.IndexOutOfBoundsException { - // check bounds for index - if (index < 0 || index >= this._annotationList.size()) { - throw new IndexOutOfBoundsException("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.

    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 know - * 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.

    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 know - * 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); - } +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. + *

    + * 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 + * know 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. + *

    + * 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 + * know 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 index dd196d1..698e917 100755 --- a/src/jalview/binding/SequenceType.java +++ b/src/jalview/binding/SequenceType.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.binding; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,176 +29,188 @@ import org.exolab.castor.xml.Unmarshaller; * * @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); +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 index b33f6c8..f790626 100755 --- a/src/jalview/binding/Setting.java +++ b/src/jalview/binding/Setting.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.binding; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,232 +29,244 @@ import org.exolab.castor.xml.Unmarshaller; * * @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 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 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); - } + public void deleteColour() + { + this._has_colour = false; + } - /** - * - * - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema + /** */ - public void validate( - ) - throws org.exolab.castor.xml.ValidationException { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); + public 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 index 10e9a1b..ee0953c 100755 --- a/src/jalview/binding/Tree.java +++ b/src/jalview/binding/Tree.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.binding; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,802 +29,825 @@ import org.exolab.castor.xml.Unmarshaller; * * @version $Revision$ $Date$ */ -public class Tree implements java.io.Serializable { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _width. - */ - private int _width; - - /** - * keeps track of state for field: _width - */ - private boolean _has_width; - - /** - * Field _height. - */ - private int _height; - - /** - * keeps track of state for field: _height - */ - private boolean _has_height; - - /** - * Field _xpos. - */ - private int _xpos; - - /** - * keeps track of state for field: _xpos - */ - private boolean _has_xpos; - - /** - * Field _ypos. - */ - private int _ypos; - - /** - * keeps track of state for field: _ypos - */ - private boolean _has_ypos; - - /** - * Field _fontName. - */ - private java.lang.String _fontName; - - /** - * Field _fontSize. - */ - private int _fontSize; - - /** - * keeps track of state for field: _fontSize - */ - private boolean _has_fontSize; - - /** - * Field _fontStyle. - */ - private int _fontStyle; - - /** - * keeps track of state for field: _fontStyle - */ - private boolean _has_fontStyle; - - /** - * Field _threshold. - */ - private float _threshold; - - /** - * keeps track of state for field: _threshold - */ - private boolean _has_threshold; - - /** - * Field _showBootstrap. - */ - private boolean _showBootstrap; - - /** - * keeps track of state for field: _showBootstrap - */ - private boolean _has_showBootstrap; - - /** - * Field _showDistances. - */ - private boolean _showDistances; - - /** - * keeps track of state for field: _showDistances - */ - private boolean _has_showDistances; - - /** - * Field _markUnlinked. - */ - private boolean _markUnlinked; - - /** - * keeps track of state for field: _markUnlinked - */ - private boolean _has_markUnlinked; - - /** - * Field _fitToWindow. - */ - private boolean _fitToWindow; - - /** - * keeps track of state for field: _fitToWindow - */ - private boolean _has_fitToWindow; - - /** - * Field _currentTree. - */ - private boolean _currentTree; - - /** - * keeps track of state for field: _currentTree - */ - private boolean _has_currentTree; - - /** - * Field _title. - */ - private java.lang.String _title; - - /** - * Field _newick. - */ - private java.lang.String _newick; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public Tree() { - super(); - } - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - */ - public void deleteCurrentTree( - ) { - this._has_currentTree= false; - } - - /** - */ - public void deleteFitToWindow( - ) { - this._has_fitToWindow= false; - } - - /** - */ - public void deleteFontSize( - ) { - this._has_fontSize= false; - } - - /** - */ - public void deleteFontStyle( - ) { - this._has_fontStyle= false; - } - - /** - */ - public void deleteHeight( - ) { - this._has_height= false; - } - - /** - */ - public void deleteMarkUnlinked( - ) { - this._has_markUnlinked= false; - } - - /** - */ - public void deleteShowBootstrap( - ) { - this._has_showBootstrap= false; - } - - /** - */ - public void deleteShowDistances( - ) { - this._has_showDistances= false; - } - - /** - */ - public void deleteThreshold( - ) { - this._has_threshold= false; - } - - /** - */ - public void deleteWidth( - ) { - this._has_width= false; - } - - /** - */ - public void deleteXpos( - ) { - this._has_xpos= false; - } - - /** - */ - public void deleteYpos( - ) { - this._has_ypos= false; - } - - /** - * Returns the value of field 'currentTree'. - * - * @return the value of field 'CurrentTree'. - */ - public boolean getCurrentTree( - ) { - return this._currentTree; - } - - /** - * Returns the value of field 'fitToWindow'. - * - * @return the value of field 'FitToWindow'. - */ - public boolean getFitToWindow( - ) { - return this._fitToWindow; - } - - /** - * Returns the value of field 'fontName'. - * - * @return the value of field 'FontName'. - */ - public java.lang.String getFontName( - ) { - return this._fontName; - } - - /** - * Returns the value of field 'fontSize'. - * - * @return the value of field 'FontSize'. - */ - public int getFontSize( - ) { - return this._fontSize; - } - - /** - * Returns the value of field 'fontStyle'. - * - * @return the value of field 'FontStyle'. - */ - public int getFontStyle( - ) { - return this._fontStyle; - } - - /** - * Returns the value of field 'height'. - * - * @return the value of field 'Height'. - */ - public int getHeight( - ) { - return this._height; - } - - /** - * Returns the value of field 'markUnlinked'. - * - * @return the value of field 'MarkUnlinked'. - */ - public boolean getMarkUnlinked( - ) { - return this._markUnlinked; - } - - /** - * Returns the value of field 'newick'. - * - * @return the value of field 'Newick'. - */ - public java.lang.String getNewick( - ) { - return this._newick; - } - - /** - * Returns the value of field 'showBootstrap'. - * - * @return the value of field 'ShowBootstrap'. - */ - public boolean getShowBootstrap( - ) { - return this._showBootstrap; - } - - /** - * Returns the value of field 'showDistances'. - * - * @return the value of field 'ShowDistances'. - */ - public boolean getShowDistances( - ) { - return this._showDistances; - } - - /** - * Returns the value of field 'threshold'. - * - * @return the value of field 'Threshold'. - */ - public float getThreshold( - ) { - return this._threshold; - } - - /** - * Returns the value of field 'title'. - * - * @return the value of field 'Title'. - */ - public java.lang.String getTitle( - ) { - return this._title; - } - - /** - * Returns the value of field 'width'. - * - * @return the value of field 'Width'. - */ - public int getWidth( - ) { - return this._width; - } - - /** - * Returns the value of field 'xpos'. - * - * @return the value of field 'Xpos'. - */ - public int getXpos( - ) { - return this._xpos; - } - - /** - * Returns the value of field 'ypos'. - * - * @return the value of field 'Ypos'. - */ - public int getYpos( - ) { - return this._ypos; - } - - /** - * Method hasCurrentTree. - * - * @return true if at least one CurrentTree has been added - */ - public boolean hasCurrentTree( - ) { - return this._has_currentTree; - } - - /** - * Method hasFitToWindow. - * - * @return true if at least one FitToWindow has been added - */ - public boolean hasFitToWindow( - ) { - return this._has_fitToWindow; - } - - /** - * Method hasFontSize. - * - * @return true if at least one FontSize has been added - */ - public boolean hasFontSize( - ) { - return this._has_fontSize; - } - - /** - * Method hasFontStyle. - * - * @return true if at least one FontStyle has been added - */ - public boolean hasFontStyle( - ) { - return this._has_fontStyle; - } - - /** - * Method hasHeight. - * - * @return true if at least one Height has been added - */ - public boolean hasHeight( - ) { - return this._has_height; - } - - /** - * Method hasMarkUnlinked. - * - * @return true if at least one MarkUnlinked has been added - */ - public boolean hasMarkUnlinked( - ) { - return this._has_markUnlinked; - } - - /** - * Method hasShowBootstrap. - * - * @return true if at least one ShowBootstrap has been added - */ - public boolean hasShowBootstrap( - ) { - return this._has_showBootstrap; - } - - /** - * Method hasShowDistances. - * - * @return true if at least one ShowDistances has been added - */ - public boolean hasShowDistances( - ) { - return this._has_showDistances; - } - - /** - * Method hasThreshold. - * - * @return true if at least one Threshold has been added - */ - public boolean hasThreshold( - ) { - return this._has_threshold; - } - - /** - * Method hasWidth. - * - * @return true if at least one Width has been added - */ - public boolean hasWidth( - ) { - return this._has_width; - } - - /** - * Method hasXpos. - * - * @return true if at least one Xpos has been added - */ - public boolean hasXpos( - ) { - return this._has_xpos; - } - - /** - * Method hasYpos. - * - * @return true if at least one Ypos has been added - */ - public boolean hasYpos( - ) { - return this._has_ypos; - } - - /** - * Returns the value of field 'currentTree'. - * - * @return the value of field 'CurrentTree'. - */ - public boolean isCurrentTree( - ) { - return this._currentTree; - } - - /** - * Returns the value of field 'fitToWindow'. - * - * @return the value of field 'FitToWindow'. - */ - public boolean isFitToWindow( - ) { - return this._fitToWindow; - } - - /** - * Returns the value of field 'markUnlinked'. - * - * @return the value of field 'MarkUnlinked'. - */ - public boolean isMarkUnlinked( - ) { - return this._markUnlinked; - } - - /** - * Returns the value of field 'showBootstrap'. - * - * @return the value of field 'ShowBootstrap'. - */ - public boolean isShowBootstrap( - ) { - return this._showBootstrap; - } - - /** - * Returns the value of field 'showDistances'. - * - * @return the value of field 'ShowDistances'. - */ - public boolean isShowDistances( - ) { - return this._showDistances; - } - - /** - * Method isValid. - * - * @return true if this object is valid according to the schema - */ - public boolean isValid( - ) { - try { - validate(); - } catch (org.exolab.castor.xml.ValidationException vex) { - return false; - } - return true; - } - - /** - * - * - * @param out - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - */ - public void marshal( - final java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { - Marshaller.marshal(this, out); - } - - /** - * - * - * @param handler - * @throws java.io.IOException if an IOException occurs during - * marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - */ - public void marshal( - final org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { - Marshaller.marshal(this, handler); - } - - /** - * Sets the value of field 'currentTree'. - * - * @param currentTree the value of field 'currentTree'. - */ - public void setCurrentTree( - final boolean currentTree) { - this._currentTree = currentTree; - this._has_currentTree = true; - } - - /** - * Sets the value of field 'fitToWindow'. - * - * @param fitToWindow the value of field 'fitToWindow'. - */ - public void setFitToWindow( - final boolean fitToWindow) { - this._fitToWindow = fitToWindow; - this._has_fitToWindow = true; - } - - /** - * Sets the value of field 'fontName'. - * - * @param fontName the value of field 'fontName'. - */ - public void setFontName( - final java.lang.String fontName) { - this._fontName = fontName; - } - - /** - * Sets the value of field 'fontSize'. - * - * @param fontSize the value of field 'fontSize'. - */ - public void setFontSize( - final int fontSize) { - this._fontSize = fontSize; - this._has_fontSize = true; - } - - /** - * Sets the value of field 'fontStyle'. - * - * @param fontStyle the value of field 'fontStyle'. - */ - public void setFontStyle( - final int fontStyle) { - this._fontStyle = fontStyle; - this._has_fontStyle = true; - } - - /** - * Sets the value of field 'height'. - * - * @param height the value of field 'height'. - */ - public void setHeight( - final int height) { - this._height = height; - this._has_height = true; - } - - /** - * Sets the value of field 'markUnlinked'. - * - * @param markUnlinked the value of field 'markUnlinked'. - */ - public void setMarkUnlinked( - final boolean markUnlinked) { - this._markUnlinked = markUnlinked; - this._has_markUnlinked = true; - } - - /** - * Sets the value of field 'newick'. - * - * @param newick the value of field 'newick'. - */ - public void setNewick( - final java.lang.String newick) { - this._newick = newick; - } - - /** - * Sets the value of field 'showBootstrap'. - * - * @param showBootstrap the value of field 'showBootstrap'. - */ - public void setShowBootstrap( - final boolean showBootstrap) { - this._showBootstrap = showBootstrap; - this._has_showBootstrap = true; - } - - /** - * Sets the value of field 'showDistances'. - * - * @param showDistances the value of field 'showDistances'. - */ - public void setShowDistances( - final boolean showDistances) { - this._showDistances = showDistances; - this._has_showDistances = true; - } - - /** - * Sets the value of field 'threshold'. - * - * @param threshold the value of field 'threshold'. - */ - public void setThreshold( - final float threshold) { - this._threshold = threshold; - this._has_threshold = true; - } - - /** - * Sets the value of field 'title'. - * - * @param title the value of field 'title'. - */ - public void setTitle( - final java.lang.String title) { - this._title = title; - } - - /** - * Sets the value of field 'width'. - * - * @param width the value of field 'width'. - */ - public void setWidth( - final int width) { - this._width = width; - this._has_width = true; - } - - /** - * Sets the value of field 'xpos'. - * - * @param xpos the value of field 'xpos'. - */ - public void setXpos( - final int xpos) { - this._xpos = xpos; - this._has_xpos = true; - } - - /** - * Sets the value of field 'ypos'. - * - * @param ypos the value of field 'ypos'. - */ - public void setYpos( - final int ypos) { - this._ypos = ypos; - this._has_ypos = true; - } - - /** - * Method unmarshal. - * - * @param reader - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - * @return the unmarshaled jalview.binding.Tree - */ - public static jalview.binding.Tree unmarshal( - final java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { - return (jalview.binding.Tree) Unmarshaller.unmarshal(jalview.binding.Tree.class, reader); - } - - /** - * - * - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - */ - public void validate( - ) - throws org.exolab.castor.xml.ValidationException { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); - } +public class Tree implements java.io.Serializable +{ + + // --------------------------/ + // - Class/Member Variables -/ + // --------------------------/ + + /** + * Field _width. + */ + private int _width; + + /** + * keeps track of state for field: _width + */ + private boolean _has_width; + + /** + * Field _height. + */ + private int _height; + + /** + * keeps track of state for field: _height + */ + private boolean _has_height; + + /** + * Field _xpos. + */ + private int _xpos; + + /** + * keeps track of state for field: _xpos + */ + private boolean _has_xpos; + + /** + * Field _ypos. + */ + private int _ypos; + + /** + * keeps track of state for field: _ypos + */ + private boolean _has_ypos; + + /** + * Field _fontName. + */ + private java.lang.String _fontName; + + /** + * Field _fontSize. + */ + private int _fontSize; + + /** + * keeps track of state for field: _fontSize + */ + private boolean _has_fontSize; + + /** + * Field _fontStyle. + */ + private int _fontStyle; + + /** + * keeps track of state for field: _fontStyle + */ + private boolean _has_fontStyle; + + /** + * Field _threshold. + */ + private float _threshold; + + /** + * keeps track of state for field: _threshold + */ + private boolean _has_threshold; + + /** + * Field _showBootstrap. + */ + private boolean _showBootstrap; + + /** + * keeps track of state for field: _showBootstrap + */ + private boolean _has_showBootstrap; + + /** + * Field _showDistances. + */ + private boolean _showDistances; + + /** + * keeps track of state for field: _showDistances + */ + private boolean _has_showDistances; + + /** + * Field _markUnlinked. + */ + private boolean _markUnlinked; + + /** + * keeps track of state for field: _markUnlinked + */ + private boolean _has_markUnlinked; + + /** + * Field _fitToWindow. + */ + private boolean _fitToWindow; + + /** + * keeps track of state for field: _fitToWindow + */ + private boolean _has_fitToWindow; + + /** + * Field _currentTree. + */ + private boolean _currentTree; + + /** + * keeps track of state for field: _currentTree + */ + private boolean _has_currentTree; + + /** + * Field _title. + */ + private java.lang.String _title; + + /** + * Field _newick. + */ + private java.lang.String _newick; + + // ----------------/ + // - Constructors -/ + // ----------------/ + + public Tree() + { + super(); + } + + // -----------/ + // - Methods -/ + // -----------/ + + /** + */ + public void deleteCurrentTree() + { + this._has_currentTree = false; + } + + /** + */ + public void deleteFitToWindow() + { + this._has_fitToWindow = false; + } + + /** + */ + public void deleteFontSize() + { + this._has_fontSize = false; + } + + /** + */ + public void deleteFontStyle() + { + this._has_fontStyle = false; + } + + /** + */ + public void deleteHeight() + { + this._has_height = false; + } + + /** + */ + public void deleteMarkUnlinked() + { + this._has_markUnlinked = false; + } + + /** + */ + public void deleteShowBootstrap() + { + this._has_showBootstrap = false; + } + + /** + */ + public void deleteShowDistances() + { + this._has_showDistances = false; + } + + /** + */ + public void deleteThreshold() + { + this._has_threshold = false; + } + + /** + */ + public void deleteWidth() + { + this._has_width = false; + } + + /** + */ + public void deleteXpos() + { + this._has_xpos = false; + } + + /** + */ + public void deleteYpos() + { + this._has_ypos = false; + } + + /** + * Returns the value of field 'currentTree'. + * + * @return the value of field 'CurrentTree'. + */ + public boolean getCurrentTree() + { + return this._currentTree; + } + + /** + * Returns the value of field 'fitToWindow'. + * + * @return the value of field 'FitToWindow'. + */ + public boolean getFitToWindow() + { + return this._fitToWindow; + } + + /** + * Returns the value of field 'fontName'. + * + * @return the value of field 'FontName'. + */ + public java.lang.String getFontName() + { + return this._fontName; + } + + /** + * Returns the value of field 'fontSize'. + * + * @return the value of field 'FontSize'. + */ + public int getFontSize() + { + return this._fontSize; + } + + /** + * Returns the value of field 'fontStyle'. + * + * @return the value of field 'FontStyle'. + */ + public int getFontStyle() + { + return this._fontStyle; + } + + /** + * Returns the value of field 'height'. + * + * @return the value of field 'Height'. + */ + public int getHeight() + { + return this._height; + } + + /** + * Returns the value of field 'markUnlinked'. + * + * @return the value of field 'MarkUnlinked'. + */ + public boolean getMarkUnlinked() + { + return this._markUnlinked; + } + + /** + * Returns the value of field 'newick'. + * + * @return the value of field 'Newick'. + */ + public java.lang.String getNewick() + { + return this._newick; + } + + /** + * Returns the value of field 'showBootstrap'. + * + * @return the value of field 'ShowBootstrap'. + */ + public boolean getShowBootstrap() + { + return this._showBootstrap; + } + + /** + * Returns the value of field 'showDistances'. + * + * @return the value of field 'ShowDistances'. + */ + public boolean getShowDistances() + { + return this._showDistances; + } + + /** + * Returns the value of field 'threshold'. + * + * @return the value of field 'Threshold'. + */ + public float getThreshold() + { + return this._threshold; + } + + /** + * Returns the value of field 'title'. + * + * @return the value of field 'Title'. + */ + public java.lang.String getTitle() + { + return this._title; + } + + /** + * Returns the value of field 'width'. + * + * @return the value of field 'Width'. + */ + public int getWidth() + { + return this._width; + } + + /** + * Returns the value of field 'xpos'. + * + * @return the value of field 'Xpos'. + */ + public int getXpos() + { + return this._xpos; + } + + /** + * Returns the value of field 'ypos'. + * + * @return the value of field 'Ypos'. + */ + public int getYpos() + { + return this._ypos; + } + + /** + * Method hasCurrentTree. + * + * @return true if at least one CurrentTree has been added + */ + public boolean hasCurrentTree() + { + return this._has_currentTree; + } + + /** + * Method hasFitToWindow. + * + * @return true if at least one FitToWindow has been added + */ + public boolean hasFitToWindow() + { + return this._has_fitToWindow; + } + + /** + * Method hasFontSize. + * + * @return true if at least one FontSize has been added + */ + public boolean hasFontSize() + { + return this._has_fontSize; + } + + /** + * Method hasFontStyle. + * + * @return true if at least one FontStyle has been added + */ + public boolean hasFontStyle() + { + return this._has_fontStyle; + } + + /** + * Method hasHeight. + * + * @return true if at least one Height has been added + */ + public boolean hasHeight() + { + return this._has_height; + } + + /** + * Method hasMarkUnlinked. + * + * @return true if at least one MarkUnlinked has been added + */ + public boolean hasMarkUnlinked() + { + return this._has_markUnlinked; + } + + /** + * Method hasShowBootstrap. + * + * @return true if at least one ShowBootstrap has been added + */ + public boolean hasShowBootstrap() + { + return this._has_showBootstrap; + } + + /** + * Method hasShowDistances. + * + * @return true if at least one ShowDistances has been added + */ + public boolean hasShowDistances() + { + return this._has_showDistances; + } + + /** + * Method hasThreshold. + * + * @return true if at least one Threshold has been added + */ + public boolean hasThreshold() + { + return this._has_threshold; + } + + /** + * Method hasWidth. + * + * @return true if at least one Width has been added + */ + public boolean hasWidth() + { + return this._has_width; + } + + /** + * Method hasXpos. + * + * @return true if at least one Xpos has been added + */ + public boolean hasXpos() + { + return this._has_xpos; + } + + /** + * Method hasYpos. + * + * @return true if at least one Ypos has been added + */ + public boolean hasYpos() + { + return this._has_ypos; + } + + /** + * Returns the value of field 'currentTree'. + * + * @return the value of field 'CurrentTree'. + */ + public boolean isCurrentTree() + { + return this._currentTree; + } + + /** + * Returns the value of field 'fitToWindow'. + * + * @return the value of field 'FitToWindow'. + */ + public boolean isFitToWindow() + { + return this._fitToWindow; + } + + /** + * Returns the value of field 'markUnlinked'. + * + * @return the value of field 'MarkUnlinked'. + */ + public boolean isMarkUnlinked() + { + return this._markUnlinked; + } + + /** + * Returns the value of field 'showBootstrap'. + * + * @return the value of field 'ShowBootstrap'. + */ + public boolean isShowBootstrap() + { + return this._showBootstrap; + } + + /** + * Returns the value of field 'showDistances'. + * + * @return the value of field 'ShowDistances'. + */ + public boolean isShowDistances() + { + return this._showDistances; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid() + { + try + { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) + { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + */ + public void marshal(final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException + * if an IOException occurs during marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + */ + public void marshal(final org.xml.sax.ContentHandler handler) + throws java.io.IOException, + org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'currentTree'. + * + * @param currentTree + * the value of field 'currentTree'. + */ + public void setCurrentTree(final boolean currentTree) + { + this._currentTree = currentTree; + this._has_currentTree = true; + } + + /** + * Sets the value of field 'fitToWindow'. + * + * @param fitToWindow + * the value of field 'fitToWindow'. + */ + public void setFitToWindow(final boolean fitToWindow) + { + this._fitToWindow = fitToWindow; + this._has_fitToWindow = true; + } + + /** + * Sets the value of field 'fontName'. + * + * @param fontName + * the value of field 'fontName'. + */ + public void setFontName(final java.lang.String fontName) + { + this._fontName = fontName; + } + + /** + * Sets the value of field 'fontSize'. + * + * @param fontSize + * the value of field 'fontSize'. + */ + public void setFontSize(final int fontSize) + { + this._fontSize = fontSize; + this._has_fontSize = true; + } + + /** + * Sets the value of field 'fontStyle'. + * + * @param fontStyle + * the value of field 'fontStyle'. + */ + public void setFontStyle(final int fontStyle) + { + this._fontStyle = fontStyle; + this._has_fontStyle = true; + } + + /** + * Sets the value of field 'height'. + * + * @param height + * the value of field 'height'. + */ + public void setHeight(final int height) + { + this._height = height; + this._has_height = true; + } + + /** + * Sets the value of field 'markUnlinked'. + * + * @param markUnlinked + * the value of field 'markUnlinked'. + */ + public void setMarkUnlinked(final boolean markUnlinked) + { + this._markUnlinked = markUnlinked; + this._has_markUnlinked = true; + } + + /** + * Sets the value of field 'newick'. + * + * @param newick + * the value of field 'newick'. + */ + public void setNewick(final java.lang.String newick) + { + this._newick = newick; + } + + /** + * Sets the value of field 'showBootstrap'. + * + * @param showBootstrap + * the value of field 'showBootstrap'. + */ + public void setShowBootstrap(final boolean showBootstrap) + { + this._showBootstrap = showBootstrap; + this._has_showBootstrap = true; + } + + /** + * Sets the value of field 'showDistances'. + * + * @param showDistances + * the value of field 'showDistances'. + */ + public void setShowDistances(final boolean showDistances) + { + this._showDistances = showDistances; + this._has_showDistances = true; + } + + /** + * Sets the value of field 'threshold'. + * + * @param threshold + * the value of field 'threshold'. + */ + public void setThreshold(final float threshold) + { + this._threshold = threshold; + this._has_threshold = true; + } + + /** + * Sets the value of field 'title'. + * + * @param title + * the value of field 'title'. + */ + public void setTitle(final java.lang.String title) + { + this._title = title; + } + + /** + * Sets the value of field 'width'. + * + * @param width + * the value of field 'width'. + */ + public void setWidth(final int width) + { + this._width = width; + this._has_width = true; + } + + /** + * Sets the value of field 'xpos'. + * + * @param xpos + * the value of field 'xpos'. + */ + public void setXpos(final int xpos) + { + this._xpos = xpos; + this._has_xpos = true; + } + + /** + * Sets the value of field 'ypos'. + * + * @param ypos + * the value of field 'ypos'. + */ + public void setYpos(final int ypos) + { + this._ypos = ypos; + this._has_ypos = true; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + * @return the unmarshaled jalview.binding.Tree + */ + public static jalview.binding.Tree unmarshal(final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + return (jalview.binding.Tree) Unmarshaller.unmarshal( + jalview.binding.Tree.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + */ + public void validate() throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } } diff --git a/src/jalview/binding/UserColourScheme.java b/src/jalview/binding/UserColourScheme.java index a596b1f..05b4444 100755 --- a/src/jalview/binding/UserColourScheme.java +++ b/src/jalview/binding/UserColourScheme.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.binding; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,98 +29,107 @@ import org.exolab.castor.xml.Unmarshaller; * * @version $Revision$ $Date$ */ -public class UserColourScheme extends JalviewUserColours -implements java.io.Serializable +public class UserColourScheme extends JalviewUserColours implements + java.io.Serializable { + // ----------------/ + // - Constructors -/ + // ----------------/ - //----------------/ - //- Constructors -/ - //----------------/ - - public UserColourScheme() { - super(); - } - + public UserColourScheme() + { + super(); + } - //-----------/ - //- Methods -/ - //-----------/ + // -----------/ + // - Methods -/ + // -----------/ - /** - * Method isValid. - * - * @return true if this object is valid according to the schema - */ - public boolean isValid( - ) { - try { - validate(); - } catch (org.exolab.castor.xml.ValidationException vex) { - return false; - } - return true; + /** + * 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 out + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + */ + public void marshal(final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, out); + } - /** - * - * - * @param handler - * @throws java.io.IOException if an IOException occurs during - * marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - */ - public void marshal( - final org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { - Marshaller.marshal(this, handler); - } + /** + * + * + * @param handler + * @throws java.io.IOException + * if an IOException occurs during marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + */ + public void marshal(final org.xml.sax.ContentHandler handler) + throws java.io.IOException, + org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, handler); + } - /** - * Method unmarshal. - * - * @param reader - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - * @return the unmarshaled jalview.binding.JalviewUserColours - */ - public static jalview.binding.JalviewUserColours unmarshal( - final java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { - return (jalview.binding.JalviewUserColours) Unmarshaller.unmarshal(jalview.binding.UserColourScheme.class, reader); - } + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + * @return the unmarshaled jalview.binding.JalviewUserColours + */ + public static jalview.binding.JalviewUserColours unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + return (jalview.binding.JalviewUserColours) Unmarshaller.unmarshal( + jalview.binding.UserColourScheme.class, reader); + } - /** - * - * - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - */ - public void validate( - ) - throws org.exolab.castor.xml.ValidationException { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); - } + /** + * + * + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + */ + public void validate() throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } } diff --git a/src/jalview/binding/UserColours.java b/src/jalview/binding/UserColours.java index 47ed4c3..f6f873e 100755 --- a/src/jalview/binding/UserColours.java +++ b/src/jalview/binding/UserColours.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.binding; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,151 +29,163 @@ import org.exolab.castor.xml.Unmarshaller; * * @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); +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 index 20c91d7..2e3d5bc 100755 --- a/src/jalview/binding/VAMSAS.java +++ b/src/jalview/binding/VAMSAS.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.binding; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,563 +29,584 @@ import org.exolab.castor.xml.Unmarshaller; * * @version $Revision$ $Date$ */ -public class VAMSAS implements java.io.Serializable { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _alignmentList. - */ - private java.util.Vector _alignmentList; - - /** - * Field _treeList. - */ - private java.util.Vector _treeList; - - /** - * Field _sequenceSetList. - */ - private java.util.Vector _sequenceSetList; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public VAMSAS() { - super(); - this._alignmentList = new java.util.Vector(); - this._treeList = new java.util.Vector(); - this._sequenceSetList = new java.util.Vector(); - } - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * - * - * @param vAlignment - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - */ - public void addAlignment( - final Alignment vAlignment) - throws java.lang.IndexOutOfBoundsException { - this._alignmentList.addElement(vAlignment); - } - - /** - * - * - * @param index - * @param vAlignment - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - */ - public void addAlignment( - final int index, - final Alignment vAlignment) - throws java.lang.IndexOutOfBoundsException { - this._alignmentList.add(index, vAlignment); - } - - /** - * - * - * @param vSequenceSet - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - */ - public void addSequenceSet( - final SequenceSet vSequenceSet) - throws java.lang.IndexOutOfBoundsException { - this._sequenceSetList.addElement(vSequenceSet); - } - - /** - * - * - * @param index - * @param vSequenceSet - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - */ - public void addSequenceSet( - final int index, - final SequenceSet vSequenceSet) - throws java.lang.IndexOutOfBoundsException { - this._sequenceSetList.add(index, vSequenceSet); - } - - /** - * - * - * @param vTree - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - */ - public void addTree( - final java.lang.String vTree) - throws java.lang.IndexOutOfBoundsException { - this._treeList.addElement(vTree); - } - - /** - * - * - * @param index - * @param vTree - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - */ - public void addTree( - final int index, - final java.lang.String vTree) - throws java.lang.IndexOutOfBoundsException { - this._treeList.add(index, vTree); - } - - /** - * Method enumerateAlignment. - * - * @return an Enumeration over all Alignment elements - */ - public java.util.Enumeration enumerateAlignment( - ) { - return this._alignmentList.elements(); - } - - /** - * Method enumerateSequenceSet. - * - * @return an Enumeration over all SequenceSet elements - */ - public java.util.Enumeration enumerateSequenceSet( - ) { - return this._sequenceSetList.elements(); - } - - /** - * Method enumerateTree. - * - * @return an Enumeration over all java.lang.String elements - */ - public java.util.Enumeration enumerateTree( - ) { - return this._treeList.elements(); - } - - /** - * Method getAlignment. - * - * @param index - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - * @return the value of the Alignment at the given index - */ - public Alignment getAlignment( - final int index) - throws java.lang.IndexOutOfBoundsException { - // check bounds for index - if (index < 0 || index >= this._alignmentList.size()) { - throw new IndexOutOfBoundsException("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.

    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 know - * 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.

    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 know - * 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.

    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 know - * 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); - } +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. + *

    + * 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 + * know 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. + *

    + * 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 + * know 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. + *

    + * 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 + * know 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 index e6386d9..c16ccbf 100755 --- a/src/jalview/binding/VamsasModel.java +++ b/src/jalview/binding/VamsasModel.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.binding; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,98 +29,105 @@ import org.exolab.castor.xml.Unmarshaller; * * @version $Revision$ $Date$ */ -public class VamsasModel extends VAMSAS -implements java.io.Serializable +public class VamsasModel extends VAMSAS implements java.io.Serializable { + // ----------------/ + // - Constructors -/ + // ----------------/ - //----------------/ - //- Constructors -/ - //----------------/ - - public VamsasModel() { - super(); - } - + public VamsasModel() + { + super(); + } - //-----------/ - //- Methods -/ - //-----------/ + // -----------/ + // - Methods -/ + // -----------/ - /** - * Method isValid. - * - * @return true if this object is valid according to the schema - */ - public boolean isValid( - ) { - try { - validate(); - } catch (org.exolab.castor.xml.ValidationException vex) { - return false; - } - return true; + /** + * 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 out + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + */ + public void marshal(final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, out); + } - /** - * - * - * @param handler - * @throws java.io.IOException if an IOException occurs during - * marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - */ - public void marshal( - final org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { - Marshaller.marshal(this, handler); - } + /** + * + * + * @param handler + * @throws java.io.IOException + * if an IOException occurs during marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + */ + public void marshal(final org.xml.sax.ContentHandler handler) + throws java.io.IOException, + org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, handler); + } - /** - * Method unmarshal. - * - * @param reader - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - * @return the unmarshaled jalview.binding.VAMSAS - */ - public static jalview.binding.VAMSAS unmarshal( - final java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { - return (jalview.binding.VAMSAS) Unmarshaller.unmarshal(jalview.binding.VamsasModel.class, reader); - } + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + * @return the unmarshaled jalview.binding.VAMSAS + */ + public static jalview.binding.VAMSAS unmarshal(final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + return (jalview.binding.VAMSAS) Unmarshaller.unmarshal( + jalview.binding.VamsasModel.class, reader); + } - /** - * - * - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - */ - public void validate( - ) - throws org.exolab.castor.xml.ValidationException { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); - } + /** + * + * + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + */ + public void validate() throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } } diff --git a/src/jalview/binding/Viewport.java b/src/jalview/binding/Viewport.java index 9b3a6fc..6e190aa 100755 --- a/src/jalview/binding/Viewport.java +++ b/src/jalview/binding/Viewport.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.binding; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,1414 +29,1445 @@ import org.exolab.castor.xml.Unmarshaller; * * @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; - } +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 -/ + // -----------/ - /** - * 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; - } + public void deleteConsThreshold() + { + this._has_consThreshold = false; + } - /** - * Returns the value of field 'width'. - * - * @return the value of field 'Width'. + /** */ - public int getWidth( - ) { - return this._width; - } + public void deleteConservationSelected() + { + this._has_conservationSelected = false; + } - /** - * Returns the value of field 'wrapAlignment'. - * - * @return the value of field 'WrapAlignment'. + /** */ - public boolean getWrapAlignment( - ) { - return this._wrapAlignment; - } + public void deleteFontSize() + { + this._has_fontSize = false; + } - /** - * Returns the value of field 'xpos'. - * - * @return the value of field 'Xpos'. + /** */ - public int getXpos( - ) { - return this._xpos; - } + public void deleteFontStyle() + { + this._has_fontStyle = false; + } - /** - * Returns the value of field 'ypos'. - * - * @return the value of field 'Ypos'. + /** */ - public int getYpos( - ) { - return this._ypos; - } + public void deleteHeight() + { + this._has_height = false; + } - /** - * Method hasConsThreshold. - * - * @return true if at least one ConsThreshold has been added + /** */ - public boolean hasConsThreshold( - ) { - return this._has_consThreshold; - } + public void deletePidSelected() + { + this._has_pidSelected = false; + } - /** - * Method hasConservationSelected. - * - * @return true if at least one ConservationSelected has been - * added + /** */ - public boolean hasConservationSelected( - ) { - return this._has_conservationSelected; - } + public void deletePidThreshold() + { + this._has_pidThreshold = false; + } - /** - * Method hasFontSize. - * - * @return true if at least one FontSize has been added + /** */ - public boolean hasFontSize( - ) { - return this._has_fontSize; - } + public void deleteRenderGaps() + { + this._has_renderGaps = false; + } - /** - * Method hasFontStyle. - * - * @return true if at least one FontStyle has been added + /** */ - public boolean hasFontStyle( - ) { - return this._has_fontStyle; - } + public void deleteShowAnnotation() + { + this._has_showAnnotation = false; + } - /** - * Method hasHeight. - * - * @return true if at least one Height has been added + /** */ - public boolean hasHeight( - ) { - return this._has_height; - } + public void deleteShowBoxes() + { + this._has_showBoxes = false; + } - /** - * Method hasPidSelected. - * - * @return true if at least one PidSelected has been added + /** */ - public boolean hasPidSelected( - ) { - return this._has_pidSelected; - } + public void deleteShowColourText() + { + this._has_showColourText = false; + } - /** - * Method hasPidThreshold. - * - * @return true if at least one PidThreshold has been added + /** */ - public boolean hasPidThreshold( - ) { - return this._has_pidThreshold; - } + public void deleteShowConservation() + { + this._has_showConservation = false; + } - /** - * Method hasRenderGaps. - * - * @return true if at least one RenderGaps has been added + /** */ - public boolean hasRenderGaps( - ) { - return this._has_renderGaps; - } + public void deleteShowFullId() + { + this._has_showFullId = false; + } - /** - * 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; - } + public void deleteShowIdentity() + { + this._has_showIdentity = false; + } - /** - * Returns the value of field 'showIdentity'. - * - * @return the value of field 'ShowIdentity'. + /** */ - public boolean isShowIdentity( - ) { - return this._showIdentity; - } - - /** - * Returns the value of field 'showQuality'. - * - * @return the value of field 'ShowQuality'. - */ - public boolean isShowQuality( - ) { - return this._showQuality; - } - - /** - * Returns the value of field 'showSequenceFeatures'. - * - * @return the value of field 'ShowSequenceFeatures'. - */ - public boolean isShowSequenceFeatures( - ) { - return this._showSequenceFeatures; - } - - /** - * Returns the value of field 'showText'. - * - * @return the value of field 'ShowText'. - */ - public boolean isShowText( - ) { - return this._showText; - } - - /** - * Method isValid. - * - * @return true if this object is valid according to the schema - */ - public boolean isValid( - ) { - try { - validate(); - } catch (org.exolab.castor.xml.ValidationException vex) { - return false; - } - return true; - } - - /** - * Returns the value of field 'wrapAlignment'. - * - * @return the value of field 'WrapAlignment'. - */ - public boolean isWrapAlignment( - ) { - return this._wrapAlignment; - } - - /** - * - * - * @param out - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - */ - public void marshal( - final java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { - Marshaller.marshal(this, out); - } - - /** - * - * - * @param handler - * @throws java.io.IOException if an IOException occurs during - * marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - */ - public void marshal( - final org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { - Marshaller.marshal(this, handler); - } - - /** - * Sets the value of field 'bgColour'. - * - * @param bgColour the value of field 'bgColour'. - */ - public void setBgColour( - final java.lang.String bgColour) { - this._bgColour = bgColour; - } - - /** - * Sets the value of field 'consThreshold'. - * - * @param consThreshold the value of field 'consThreshold'. - */ - public void setConsThreshold( - final int consThreshold) { - this._consThreshold = consThreshold; - this._has_consThreshold = true; - } - - /** - * Sets the value of field 'conservationSelected'. - * - * @param conservationSelected the value of field - * 'conservationSelected'. - */ - public void setConservationSelected( - final boolean conservationSelected) { - this._conservationSelected = conservationSelected; - this._has_conservationSelected = true; - } - - /** - * Sets the value of field 'fontName'. - * - * @param fontName the value of field 'fontName'. - */ - public void setFontName( - final java.lang.String fontName) { - this._fontName = fontName; - } - - /** - * Sets the value of field 'fontSize'. - * - * @param fontSize the value of field 'fontSize'. - */ - public void setFontSize( - final int fontSize) { - this._fontSize = fontSize; - this._has_fontSize = true; - } - - /** - * Sets the value of field 'fontStyle'. - * - * @param fontStyle the value of field 'fontStyle'. - */ - public void setFontStyle( - final int fontStyle) { - this._fontStyle = fontStyle; - this._has_fontStyle = true; - } - - /** - * Sets the value of field 'height'. - * - * @param height the value of field 'height'. - */ - public void setHeight( - final int height) { - this._height = height; - this._has_height = true; - } - - /** - * Sets the value of field 'pidSelected'. - * - * @param pidSelected the value of field 'pidSelected'. - */ - public void setPidSelected( - final boolean pidSelected) { - this._pidSelected = pidSelected; - this._has_pidSelected = true; - } - - /** - * Sets the value of field 'pidThreshold'. - * - * @param pidThreshold the value of field 'pidThreshold'. - */ - public void setPidThreshold( - final int pidThreshold) { - this._pidThreshold = pidThreshold; - this._has_pidThreshold = true; - } - - /** - * Sets the value of field 'renderGaps'. - * - * @param renderGaps the value of field 'renderGaps'. - */ - public void setRenderGaps( - final boolean renderGaps) { - this._renderGaps = renderGaps; - this._has_renderGaps = true; - } - - /** - * Sets the value of field 'showAnnotation'. - * - * @param showAnnotation the value of field 'showAnnotation'. - */ - public void setShowAnnotation( - final boolean showAnnotation) { - this._showAnnotation = showAnnotation; - this._has_showAnnotation = true; - } - - /** - * Sets the value of field 'showBoxes'. - * - * @param showBoxes the value of field 'showBoxes'. - */ - public void setShowBoxes( - final boolean showBoxes) { - this._showBoxes = showBoxes; - this._has_showBoxes = true; - } - - /** - * Sets the value of field 'showColourText'. - * - * @param showColourText the value of field 'showColourText'. - */ - public void setShowColourText( - final boolean showColourText) { - this._showColourText = showColourText; - this._has_showColourText = true; - } - - /** - * Sets the value of field 'showConservation'. - * - * @param showConservation the value of field 'showConservation' - */ - public void setShowConservation( - final boolean showConservation) { - this._showConservation = showConservation; - this._has_showConservation = true; - } - - /** - * Sets the value of field 'showFullId'. - * - * @param showFullId the value of field 'showFullId'. - */ - public void setShowFullId( - final boolean showFullId) { - this._showFullId = showFullId; - this._has_showFullId = true; - } - - /** - * Sets the value of field 'showIdentity'. - * - * @param showIdentity the value of field 'showIdentity'. - */ - public void setShowIdentity( - final boolean showIdentity) { - this._showIdentity = showIdentity; - this._has_showIdentity = true; - } - - /** - * Sets the value of field 'showQuality'. - * - * @param showQuality the value of field 'showQuality'. - */ - public void setShowQuality( - final boolean showQuality) { - this._showQuality = showQuality; - this._has_showQuality = true; - } - - /** - * Sets the value of field 'showSequenceFeatures'. - * - * @param showSequenceFeatures the value of field - * 'showSequenceFeatures'. - */ - public void setShowSequenceFeatures( - final boolean showSequenceFeatures) { - this._showSequenceFeatures = showSequenceFeatures; - this._has_showSequenceFeatures = true; - } - - /** - * Sets the value of field 'showText'. - * - * @param showText the value of field 'showText'. - */ - public void setShowText( - final boolean showText) { - this._showText = showText; - this._has_showText = true; - } - - /** - * Sets the value of field 'startRes'. - * - * @param startRes the value of field 'startRes'. - */ - public void setStartRes( - final int startRes) { - this._startRes = startRes; - this._has_startRes = true; - } - - /** - * Sets the value of field 'startSeq'. - * - * @param startSeq the value of field 'startSeq'. - */ - public void setStartSeq( - final int startSeq) { - this._startSeq = startSeq; - this._has_startSeq = true; - } - - /** - * Sets the value of field 'title'. - * - * @param title the value of field 'title'. - */ - public void setTitle( - final java.lang.String title) { - this._title = title; - } - - /** - * Sets the value of field 'width'. - * - * @param width the value of field 'width'. - */ - public void setWidth( - final int width) { - this._width = width; - this._has_width = true; - } - - /** - * Sets the value of field 'wrapAlignment'. - * - * @param wrapAlignment the value of field 'wrapAlignment'. - */ - public void setWrapAlignment( - final boolean wrapAlignment) { - this._wrapAlignment = wrapAlignment; - this._has_wrapAlignment = true; - } - - /** - * Sets the value of field 'xpos'. - * - * @param xpos the value of field 'xpos'. - */ - public void setXpos( - final int xpos) { - this._xpos = xpos; - this._has_xpos = true; - } - - /** - * Sets the value of field 'ypos'. - * - * @param ypos the value of field 'ypos'. - */ - public void setYpos( - final int ypos) { - this._ypos = ypos; - this._has_ypos = true; - } - - /** - * Method unmarshal. - * - * @param reader - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - * @return the unmarshaled jalview.binding.Viewport - */ - public static jalview.binding.Viewport unmarshal( - final java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { - return (jalview.binding.Viewport) Unmarshaller.unmarshal(jalview.binding.Viewport.class, reader); - } - - /** - * - * - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - */ - public void validate( - ) - throws org.exolab.castor.xml.ValidationException { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); - } + public 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/commands/ChangeCaseCommand.java b/src/jalview/commands/ChangeCaseCommand.java index a1dc3ba..29cc8d0 100644 --- a/src/jalview/commands/ChangeCaseCommand.java +++ b/src/jalview/commands/ChangeCaseCommand.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.commands; diff --git a/src/jalview/commands/CommandI.java b/src/jalview/commands/CommandI.java index 43d61cf..faf8fe6 100644 --- a/src/jalview/commands/CommandI.java +++ b/src/jalview/commands/CommandI.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.commands; diff --git a/src/jalview/commands/EditCommand.java b/src/jalview/commands/EditCommand.java index 019e11e..414cea7 100644 --- a/src/jalview/commands/EditCommand.java +++ b/src/jalview/commands/EditCommand.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.commands; diff --git a/src/jalview/commands/OrderCommand.java b/src/jalview/commands/OrderCommand.java index ccb0dc6..895d395 100644 --- a/src/jalview/commands/OrderCommand.java +++ b/src/jalview/commands/OrderCommand.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.commands; diff --git a/src/jalview/commands/RemoveGapColCommand.java b/src/jalview/commands/RemoveGapColCommand.java index b9b2648..88203ae 100644 --- a/src/jalview/commands/RemoveGapColCommand.java +++ b/src/jalview/commands/RemoveGapColCommand.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.commands; diff --git a/src/jalview/commands/RemoveGapsCommand.java b/src/jalview/commands/RemoveGapsCommand.java index 7d5f39e..631d50a 100644 --- a/src/jalview/commands/RemoveGapsCommand.java +++ b/src/jalview/commands/RemoveGapsCommand.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.commands; diff --git a/src/jalview/commands/SlideSequencesCommand.java b/src/jalview/commands/SlideSequencesCommand.java index 88e5129..337e9c3 100644 --- a/src/jalview/commands/SlideSequencesCommand.java +++ b/src/jalview/commands/SlideSequencesCommand.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.commands; diff --git a/src/jalview/commands/TrimRegionCommand.java b/src/jalview/commands/TrimRegionCommand.java index a61d491..4925d82 100644 --- a/src/jalview/commands/TrimRegionCommand.java +++ b/src/jalview/commands/TrimRegionCommand.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.commands; diff --git a/src/jalview/datamodel/AlignedCodonFrame.java b/src/jalview/datamodel/AlignedCodonFrame.java index 0e9444f..710c8c5 100644 --- a/src/jalview/datamodel/AlignedCodonFrame.java +++ b/src/jalview/datamodel/AlignedCodonFrame.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.datamodel; @@ -37,8 +36,8 @@ public class AlignedCodonFrame public int[][] codons = null; /** - * width of protein sequence alignement implicit assertion that codons.length >= - * aaWidth + * width of protein sequence alignement implicit assertion that codons.length + * >= aaWidth */ public int aaWidth = 0; @@ -258,7 +257,7 @@ public class AlignedCodonFrame * test to see if codon frame involves seq in any way * * @param seq - * a nucleotide or protein sequence + * a nucleotide or protein sequence * @return true if a mapping exists to or from this sequence to any translated * sequence */ @@ -273,9 +272,9 @@ public class AlignedCodonFrame * * @param seq * @param index - * position in seq + * position in seq * @param results - * where highlighted regions go + * where highlighted regions go */ public void markMappedRegion(SequenceI seq, int index, SearchResults results) diff --git a/src/jalview/datamodel/Alignment.java b/src/jalview/datamodel/Alignment.java index 7fb4659..6a4dcbf 100755 --- a/src/jalview/datamodel/Alignment.java +++ b/src/jalview/datamodel/Alignment.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.datamodel; @@ -345,11 +344,13 @@ public class Alignment implements AlignmentI /** * remove any annotation that references gp - * @param gp (if null, removes all group associated annotation) + * + * @param gp + * (if null, removes all group associated annotation) */ private void removeAnnotationForGroup(SequenceGroup gp) { - if (annotations==null || annotations.length==0) + if (annotations == null || annotations.length == 0) { return; } @@ -607,19 +608,26 @@ public class Alignment implements AlignmentI return gapCharacter; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see jalview.datamodel.AlignmentI#isAligned() */ public boolean isAligned() { return isAligned(false); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see jalview.datamodel.AlignmentI#isAligned(boolean) */ - public boolean isAligned(boolean includeHidden) { + public boolean isAligned(boolean includeHidden) + { int width = getWidth(); - if (hiddenSequences==null || hiddenSequences.getSize()==0) { + if (hiddenSequences == null || hiddenSequences.getSize() == 0) + { includeHidden = true; // no hidden sequences to check against. } for (int i = 0; i < sequences.size(); i++) diff --git a/src/jalview/datamodel/AlignmentAnnotation.java b/src/jalview/datamodel/AlignmentAnnotation.java index ddb420a..8b9c1fb 100755 --- a/src/jalview/datamodel/AlignmentAnnotation.java +++ b/src/jalview/datamodel/AlignmentAnnotation.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.datamodel; @@ -76,7 +75,7 @@ public class AlignmentAnnotation /** Indicates if annotation has a graphical symbol track */ public boolean hasIcons; // - /** Indicates if annotation has a text character label */ + /** Indicates if annotation has a text character label */ public boolean hasText; /** is the row visible */ @@ -101,13 +100,13 @@ public class AlignmentAnnotation public boolean belowAlignment = true; - public SequenceGroup groupRef =null ; + public SequenceGroup groupRef = null; /** * display every column label, even if there is a row of identical labels */ - public boolean showAllColLabels=false; - + public boolean showAllColLabels = false; + /** * scale the column label to fit within the alignment column. */ @@ -118,8 +117,9 @@ public class AlignmentAnnotation */ public boolean centreColLabels = false; - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#finalize() */ protected void finalize() throws Throwable @@ -149,11 +149,11 @@ public class AlignmentAnnotation * Creates a new AlignmentAnnotation object. * * @param label - * short label shown under sequence labels + * short label shown under sequence labels * @param description - * text displayed on mouseover + * text displayed on mouseover * @param annotations - * set of positional annotation elements + * set of positional annotation elements */ public AlignmentAnnotation(String label, String description, Annotation[] annotations) @@ -192,20 +192,28 @@ public class AlignmentAnnotation firstChar = annotations[i].displayCharacter.charAt(0); // check to see if it looks like a sequence or is secondary structure // labelling. - if (annotations[i].secondaryStructure!=' ' && !hasIcons && - // Uncomment to only catch case where displayCharacter==secondary - // Structure - // to correctly redisplay SS annotation imported from Stockholm, - // exported to JalviewXML and read back in again. - // && - // annotations[i].displayCharacter.charAt(0)==annotations[i].secondaryStructure - firstChar != ' ' + if (annotations[i].secondaryStructure != ' ' + && !hasIcons + && + // Uncomment to only catch case where + // displayCharacter==secondary + // Structure + // to correctly redisplay SS annotation imported from Stockholm, + // exported to JalviewXML and read back in again. + // && + // annotations[i].displayCharacter.charAt(0)==annotations[i].secondaryStructure + firstChar != ' ' && firstChar != 'H' && firstChar != 'E' && firstChar != '-' && firstChar < jalview.schemes.ResidueProperties.aaIndex.length) { - if (jalview.schemes.ResidueProperties.aaIndex[firstChar] < 23) // TODO: parameterise to gap symbol number + if (jalview.schemes.ResidueProperties.aaIndex[firstChar] < 23) // TODO: + // parameterise + // to + // gap + // symbol + // number { nonSSLabel = true; } @@ -241,17 +249,17 @@ public class AlignmentAnnotation * Creates a new AlignmentAnnotation object. * * @param label - * DOCUMENT ME! + * DOCUMENT ME! * @param description - * DOCUMENT ME! + * DOCUMENT ME! * @param annotations - * DOCUMENT ME! + * DOCUMENT ME! * @param min - * DOCUMENT ME! + * DOCUMENT ME! * @param max - * DOCUMENT ME! + * DOCUMENT ME! * @param winLength - * DOCUMENT ME! + * DOCUMENT ME! */ public AlignmentAnnotation(String label, String description, Annotation[] annotations, float min, float max, int graphType) @@ -313,14 +321,17 @@ public class AlignmentAnnotation } } // ensure zero is origin for min/max ranges on only one side of zero - if (min>0) { + if (min > 0) + { min = 0; - } else { - if (max<0) + } + else + { + if (max < 0) { max = 0; } - } + } } graphMin = min; @@ -473,7 +484,7 @@ public class AlignmentAnnotation * set the annotation row to be at least length Annotations * * @param length - * minimum number of columns required in the annotation row + * minimum number of columns required in the annotation row * @return false if the annotation row is greater than length */ public boolean padAnnotation(int length) @@ -481,7 +492,7 @@ public class AlignmentAnnotation if (annotations == null) { return true; // annotation row is correct - null == not visible and - // undefined length + // undefined length } if (annotations.length < length) { @@ -524,7 +535,7 @@ public class AlignmentAnnotation buffer.append(", "); } // TODO: remove disgusting hack for 'special' treatment of consensus line. - if (label.indexOf("Consensus")==0) + if (label.indexOf("Consensus") == 0) { buffer.append("\n"); @@ -726,7 +737,7 @@ public class AlignmentAnnotation /** * @param score - * the score to set + * the score to set */ public void setScore(double score) { diff --git a/src/jalview/datamodel/AlignmentI.java b/src/jalview/datamodel/AlignmentI.java index 9f13342..2991a2d 100755 --- a/src/jalview/datamodel/AlignmentI.java +++ b/src/jalview/datamodel/AlignmentI.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.datamodel; @@ -40,17 +39,22 @@ public interface AlignmentI public int getWidth(); /** - * Calculates if this set of sequences (visible and invisible) are all the same length + * Calculates if this set of sequences (visible and invisible) are all the + * same length * * @return true if all sequences in alignment are the same length */ public boolean isAligned(); + /** * Calculates if this set of sequences is all the same length - * @param includeHidden optionally exclude hidden sequences from test - * @return true if all (or just visible) sequences are the same length + * + * @param includeHidden + * optionally exclude hidden sequences from test + * @return true if all (or just visible) sequences are the same length */ public boolean isAligned(boolean includeHidden); + /** * Gets sequences as a Vector * @@ -69,7 +73,7 @@ public interface AlignmentI * Find a specific sequence in this alignment. * * @param i - * Index of required sequence. + * Index of required sequence. * * @return SequenceI at given index. */ @@ -79,7 +83,7 @@ public interface AlignmentI * Add a new sequence to this alignment. * * @param seq - * New sequence will be added at end of alignment. + * New sequence will be added at end of alignment. */ public void addSequence(SequenceI seq); @@ -87,9 +91,9 @@ public interface AlignmentI * Used to set a particular index of the alignment with the given sequence. * * @param i - * Index of sequence to be updated. + * Index of sequence to be updated. * @param seq - * New sequence to be inserted. + * New sequence to be inserted. */ public void setSequenceAt(int i, SequenceI seq); @@ -97,7 +101,7 @@ public interface AlignmentI * Deletes a sequence from the alignment * * @param s - * Sequence to be deleted. + * Sequence to be deleted. */ public void deleteSequence(SequenceI s); @@ -105,7 +109,7 @@ public interface AlignmentI * Deletes a sequence from the alignment. * * @param i - * Index of sequence to be deleted. + * Index of sequence to be deleted. */ public void deleteSequence(int i); @@ -113,7 +117,7 @@ public interface AlignmentI * Finds sequence in alignment using sequence name as query. * * @param name - * Id of sequence to search for. + * Id of sequence to search for. * * @return Sequence matching query, if found. If not found returns null. */ @@ -125,7 +129,7 @@ public interface AlignmentI * Finds index of a given sequence in the alignment. * * @param s - * Sequence to look for. + * Sequence to look for. * * @return Index of sequence within the alignment or -1 if not found */ @@ -135,7 +139,7 @@ public interface AlignmentI * Finds group that given sequence is part of. * * @param s - * Sequence in alignment. + * Sequence in alignment. * * @return First group found for sequence. WARNING : Sequences may be members * of several groups. This method is incomplete. @@ -146,7 +150,7 @@ public interface AlignmentI * Finds all groups that a given sequence is part of. * * @param s - * Sequence in alignment. + * Sequence in alignment. * * @return All groups containing given sequence. */ @@ -156,7 +160,7 @@ public interface AlignmentI * Adds a new SequenceGroup to this alignment. * * @param sg - * New group to be added. + * New group to be added. */ public void addGroup(SequenceGroup sg); @@ -164,7 +168,7 @@ public interface AlignmentI * Deletes a specific SequenceGroup * * @param g - * Group will be deleted from alignment. + * Group will be deleted from alignment. */ public void deleteGroup(SequenceGroup g); @@ -192,9 +196,9 @@ public interface AlignmentI * moves annotation to a specified index in alignment annotation display stack * * @param aa - * the annotation object to be moved + * the annotation object to be moved * @param index - * the destination position + * the destination position */ public void setAnnotationIndex(AlignmentAnnotation aa, int index); @@ -205,7 +209,7 @@ public interface AlignmentI * nothing. * * @param aa - * the annotation to delete + * the annotation to delete * @return true if annotation was deleted from this alignment. */ public boolean deleteAnnotation(AlignmentAnnotation aa); @@ -221,7 +225,7 @@ public interface AlignmentI * Change the gap character used in this alignment to 'gc' * * @param gc - * the new gap character. + * the new gap character. */ public void setGapCharacter(char gc); @@ -257,7 +261,7 @@ public interface AlignmentI * Set the associated dataset for the alignment, or create one. * * @param dataset - * The dataset alignment or null to construct one. + * The dataset alignment or null to construct one. */ public void setDataset(Alignment dataset); @@ -340,10 +344,10 @@ public interface AlignmentI * find sequence with given name in alignment * * @param token - * name to find + * name to find * @param b - * true implies that case insensitive matching will - * also be tried + * true implies that case insensitive matching will also be + * tried * @return matched sequence or null */ public SequenceI findName(String token, boolean b); @@ -353,19 +357,21 @@ public interface AlignmentI * sequence * * @param startAfter - * the sequence after which the search will be started (usually - * the result of the last call to findName) + * the sequence after which the search will be started (usually the + * result of the last call to findName) * @param token - * name to find + * name to find * @param b - * true implies that case insensitive matching will - * also be tried + * true implies that case insensitive matching will also be + * tried * @return matched sequence or null */ public SequenceI findName(SequenceI startAfter, String token, boolean b); /** - * find first sequence in alignment which is involved in the given search result object + * find first sequence in alignment which is involved in the given search + * result object + * * @param results * @return -1 or index of sequence in alignment */ @@ -373,23 +379,30 @@ public interface AlignmentI /** * append sequences and annotation from another alignment object to this one. - * Note: this is a straight transfer of object references, and may result in - * toappend's dependent data being transformed to fit the alignment (changing gap characters, etc...). - * If you are uncertain, use the copy Alignment copy constructor to create a new version - * which can be appended without side effect. - * @param toappend - the alignment to be appended. + * Note: this is a straight transfer of object references, and may result in + * toappend's dependent data being transformed to fit the alignment (changing + * gap characters, etc...). If you are uncertain, use the copy Alignment copy + * constructor to create a new version which can be appended without side + * effect. + * + * @param toappend + * - the alignment to be appended. */ public void append(AlignmentI toappend); + /** - * Justify the sequences to the left or right by deleting and inserting gaps before the initial residue or after the terminal residue - * @param right true if alignment padded to right, false to justify to left - * @return true if alignment was changed - * TODO: return undo object + * Justify the sequences to the left or right by deleting and inserting gaps + * before the initial residue or after the terminal residue + * + * @param right + * true if alignment padded to right, false to justify to left + * @return true if alignment was changed TODO: return undo object */ public boolean justify(boolean right); /** * add given annotation row at given position (0 is start, -1 is end) + * * @param consensus * @param i */ diff --git a/src/jalview/datamodel/AlignmentOrder.java b/src/jalview/datamodel/AlignmentOrder.java index 28ec445..3215865 100755 --- a/src/jalview/datamodel/AlignmentOrder.java +++ b/src/jalview/datamodel/AlignmentOrder.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.datamodel; @@ -82,7 +81,7 @@ public class AlignmentOrder * AlignmentOrder * * @param anOrder - * Vector + * Vector */ public AlignmentOrder(Vector anOrder) { @@ -93,7 +92,7 @@ public class AlignmentOrder * AlignmentOrder * * @param orderFrom - * AlignmentI + * AlignmentI */ public AlignmentOrder(AlignmentI orderFrom) { @@ -109,7 +108,7 @@ public class AlignmentOrder * Creates a new AlignmentOrder object. * * @param orderFrom - * DOCUMENT ME! + * DOCUMENT ME! */ public AlignmentOrder(SequenceI[] orderFrom) { @@ -125,7 +124,7 @@ public class AlignmentOrder * DOCUMENT ME! * * @param Type - * DOCUMENT ME! + * DOCUMENT ME! */ public void setType(int Type) { @@ -146,7 +145,7 @@ public class AlignmentOrder * DOCUMENT ME! * * @param Name - * DOCUMENT ME! + * DOCUMENT ME! */ public void setName(String Name) { @@ -167,7 +166,7 @@ public class AlignmentOrder * DOCUMENT ME! * * @param Order - * DOCUMENT ME! + * DOCUMENT ME! */ public void setOrder(Vector Order) { @@ -217,9 +216,9 @@ public class AlignmentOrder * equivalence - will throw Error at moment * * @param o - * @param identity - - * false - use weak equivalence (refers to same or different - * parts of same sequence) + * @param identity + * - false - use weak equivalence (refers to same or different parts + * of same sequence) * @return true if o orders equivalent sequenceI objects in the same way */ public boolean equals(AlignmentOrder o, boolean identity) @@ -271,12 +270,11 @@ public class AlignmentOrder /** * Consistency test for alignmentOrders * - * @param o // - * TODO: Weak SequenceI equivalence - will throw Error at - * moment - * @param identity - - * false - use weak equivalence (refers to same or different - * parts of same sequence) + * @param o + * // TODO: Weak SequenceI equivalence - will throw Error at moment + * @param identity + * - false - use weak equivalence (refers to same or different parts + * of same sequence) * @return true if o contains or is contained by this and the common SequenceI * objects are ordered in the same way */ @@ -312,7 +310,7 @@ public class AlignmentOrder for (int i = 0, j = s.size(); i < j; i++) { int pos = c.indexOf(s.elementAt(i)); // JBPNote - optimize by - // incremental position search + // incremental position search if (pos > last) { last = pos; @@ -335,15 +333,14 @@ public class AlignmentOrder * AlignmentOrder * * @param orderThis - * AlignmentI + * AlignmentI * @param byThat - * AlignmentI + * AlignmentI */ /* * public AlignmentOrder(AlignmentI orderThis, AlignmentI byThat) { // Vector * is an ordering of this alignment using the order of sequence objects in - * byThat, // where ids and unaligned sequences must match - * } + * byThat, // where ids and unaligned sequences must match } */ } diff --git a/src/jalview/datamodel/AlignmentView.java b/src/jalview/datamodel/AlignmentView.java index db95c71..65e84d1 100644 --- a/src/jalview/datamodel/AlignmentView.java +++ b/src/jalview/datamodel/AlignmentView.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.datamodel; @@ -107,7 +106,7 @@ public class AlignmentView * regions * * @param gapCharacter - * char + * char * @return Object[] { SequenceI[], ColumnSelection} */ public Object[] getAlignmentAndColumnSelection(char gapCharacter) @@ -124,7 +123,7 @@ public class AlignmentView * getSequenceStrings * * @param c - * char + * char * @return String[] */ public String[] getSequenceStrings(char c) @@ -170,7 +169,7 @@ public class AlignmentView * get the contiguous subalignments in an alignment view. * * @param gapCharacter - * char + * char * @return SequenceI[][] */ public SequenceI[][] getVisibleContigs(char gapCharacter) @@ -193,7 +192,7 @@ public class AlignmentView njobs++; } fwidth += contigs[contig + 2]; // end up with full region width - // (including hidden regions) + // (including hidden regions) start = contigs[contig + 1] + contigs[contig + 2]; } if (start < fwidth) @@ -247,9 +246,9 @@ public class AlignmentView * sub alignments * * @param nvismsa - * SequenceI[][] + * SequenceI[][] * @param orders - * AlignmentOrder[] corresponding to each SequenceI[] block. + * AlignmentOrder[] corresponding to each SequenceI[] block. * @return Object[] */ public Object[] getUpdatedView(SequenceI[][] nvismsa, @@ -294,7 +293,7 @@ public class AlignmentView + sequences.length + ")"); } swidth = mseq[0].getLength(); // JBPNote: could ensure padded - // here. + // here. for (int s = 0; s < mseq.length; s++) { if (alignment[s] == null) @@ -495,7 +494,7 @@ public class AlignmentView nvis++; } fwidth += contigs[contig + 2]; // end up with full region width - // (including hidden regions) + // (including hidden regions) start = contigs[contig + 1] + contigs[contig + 2]; } if (start < fwidth) diff --git a/src/jalview/datamodel/Annotation.java b/src/jalview/datamodel/Annotation.java index a73ea7a..55833e5 100755 --- a/src/jalview/datamodel/Annotation.java +++ b/src/jalview/datamodel/Annotation.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.datamodel; @@ -49,13 +48,13 @@ public class Annotation * Creates a new Annotation object. * * @param displayChar - * DOCUMENT ME! + * DOCUMENT ME! * @param desc - * DOCUMENT ME! + * DOCUMENT ME! * @param ss - * DOCUMENT ME! + * DOCUMENT ME! * @param val - * DOCUMENT ME! + * DOCUMENT ME! */ public Annotation(String displayChar, String desc, char ss, float val) { @@ -69,15 +68,15 @@ public class Annotation * Creates a new Annotation object. * * @param displayChar - * DOCUMENT ME! + * DOCUMENT ME! * @param desc - * DOCUMENT ME! + * DOCUMENT ME! * @param ss - * DOCUMENT ME! + * DOCUMENT ME! * @param val - * DOCUMENT ME! + * DOCUMENT ME! * @param colour - * DOCUMENT ME! + * DOCUMENT ME! */ public Annotation(String displayChar, String desc, char ss, float val, Color colour) @@ -91,7 +90,7 @@ public class Annotation * attributes as the given template * * @param that - * template annotation + * template annotation */ public Annotation(Annotation that) { @@ -112,7 +111,7 @@ public class Annotation * Value only annotation. * * @param val - * value at this annotation position + * value at this annotation position */ public Annotation(float val) { diff --git a/src/jalview/datamodel/BinaryNode.java b/src/jalview/datamodel/BinaryNode.java index bfe8c04..d36a9c3 100755 --- a/src/jalview/datamodel/BinaryNode.java +++ b/src/jalview/datamodel/BinaryNode.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.datamodel; @@ -52,11 +51,11 @@ public class BinaryNode * Creates a new BinaryNode object. * * @param element - * DOCUMENT ME! + * DOCUMENT ME! * @param parent - * DOCUMENT ME! + * DOCUMENT ME! * @param name - * DOCUMENT ME! + * DOCUMENT ME! */ public BinaryNode(Object element, BinaryNode parent, String name) { @@ -81,7 +80,7 @@ public class BinaryNode * DOCUMENT ME! * * @param v - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ @@ -104,7 +103,7 @@ public class BinaryNode * DOCUMENT ME! * * @param n - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ @@ -127,7 +126,7 @@ public class BinaryNode * DOCUMENT ME! * * @param n - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ @@ -150,7 +149,7 @@ public class BinaryNode * DOCUMENT ME! * * @param n - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ @@ -260,6 +259,7 @@ public class BinaryNode /** * * set the display name + * * @param new name */ public void setName(String name) @@ -288,7 +288,8 @@ public class BinaryNode } /** - * get bootstrap + * get bootstrap + * * @return integer value */ public int getBootstrap() diff --git a/src/jalview/datamodel/BinarySequence.java b/src/jalview/datamodel/BinarySequence.java index ce96959..8b54c29 100755 --- a/src/jalview/datamodel/BinarySequence.java +++ b/src/jalview/datamodel/BinarySequence.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.datamodel; @@ -36,7 +35,7 @@ public class BinarySequence extends Sequence * Creates a new BinarySequence object. * * @param s - * DOCUMENT ME! + * DOCUMENT ME! */ public BinarySequence(String s) { diff --git a/src/jalview/datamodel/CigarArray.java b/src/jalview/datamodel/CigarArray.java index aeaa374..6fef9a4 100644 --- a/src/jalview/datamodel/CigarArray.java +++ b/src/jalview/datamodel/CigarArray.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.datamodel; @@ -52,7 +51,7 @@ public class CigarArray extends CigarBase * any of cigar are actually CigarArrays. * * @param cigar - * Cigar[] + * Cigar[] */ public CigarArray(CigarSimple[] cigars) { @@ -75,7 +74,7 @@ public class CigarArray extends CigarBase /** * @see Cigar.getSequenceAndDeletions * @param GapChar - * char + * char * @return Object[][] */ protected Object[][] getArrayofSequenceAndDeletions(char GapChar) @@ -106,7 +105,7 @@ public class CigarArray extends CigarBase * @return String formed by newline concatenated results of applying CIGAR * operations to each reference object in turn. * @param GapChar - * char + * char * @return '\n' separated strings (empty results included as \n\n) */ public String getSequenceString(char GapChar) @@ -133,7 +132,7 @@ public class CigarArray extends CigarBase * return string results of applying cigar string to all reference cigars * * @param GapChar - * char + * char * @return String[] */ public String[] getSequenceStrings(char GapChar) @@ -158,9 +157,9 @@ public class CigarArray extends CigarBase * * @return Cigar[] * - * public CigarBase[] getEditedCigars() { + * public CigarBase[] getEditedCigars() { * - * return new CigarBase[] {}; } + * return new CigarBase[] {}; } */ /** * applyDeletions edits underlying refCigars to propagate deleted regions, and @@ -199,7 +198,7 @@ public class CigarArray extends CigarBase int delstart = cursor, delend = cursor + range[i] - 1; // inclusive delpos.addElement(new int[] { vcursor + offset, range[i] }); // index of right hand column after - // hidden region boundary + // hidden region boundary offset += range[i] - 1; // shift in visible column coordinates System.arraycopy(operation, i + 1, operation, i, length - i); System.arraycopy(range, i + 1, range, i, length - i); diff --git a/src/jalview/datamodel/CigarBase.java b/src/jalview/datamodel/CigarBase.java index 2f20c00..5152a2c 100644 --- a/src/jalview/datamodel/CigarBase.java +++ b/src/jalview/datamodel/CigarBase.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.datamodel; @@ -35,7 +34,8 @@ public abstract class CigarBase protected int length = 0; protected int _inc_length = 10; // extension range for addition of new - // operations + + // operations protected char[] operation = null; @@ -63,11 +63,11 @@ public abstract class CigarBase * and the deletion regions as an array of int pairs May return null for an * empty cigar string. May return null for deletion ranges if there are none. * - * @param reference - - * the symbol sequence to apply the cigar operations to (or - * null if no sequence) - * @param GapChar - - * the symbol to use for Insert operations + * @param reference + * - the symbol sequence to apply the cigar operations to (or null if + * no sequence) + * @param GapChar + * - the symbol to use for Insert operations * @return Object[] { String, int[] {start, startcol, end, endcol}, int[][3] * {start, end, col} or null} the gapped sequence, first and last * residue index, and the deletion ranges on the reference sequence @@ -187,11 +187,11 @@ public abstract class CigarBase * turn a cigar string into a series of operation range pairs * * @param cigarString - * String + * String * @return object[] {char[] operation, int[] range} * @throws java.lang.Exception - * for improperly formated cigar strings or ones with unknown - * operations + * for improperly formated cigar strings or ones with unknown + * operations */ public static Object[] parseCigarString(String cigarString) throws Exception @@ -254,9 +254,9 @@ public abstract class CigarBase * add an operation to cigar string * * @param op - * char + * char * @param range - * int + * int */ public void addOperation(char op, int range) { @@ -316,60 +316,61 @@ public abstract class CigarBase * M, Ds changed to M. (ie "5I5M".insert(4,M,3)->"4I8M") - effectively shifts * sequence left by 1 residue and extends it by 3 ( * "10D5M".insert(-1,M,3)->"3M7D5M") ( "10D5M".insert(0,M,3)->"7D8M") ( - * "10D5M".insert(1,M,3)->"10D8M") - * ( "1M10D5M".insert(0,M,3)->"1M10D8M") ( "1M10D5M".insert(1,M,3)->" + * "10D5M".insert(1,M,3)->"10D8M") ( "1M10D5M".insert(0,M,3)->"1M10D8M") ( + * "1M10D5M".insert(1,M,3)->" * * if pos is beyond width - I operations are added before the operation * * @param pos - * int -1, 0-length of visible region, or greater to append new - * ops (with insertions in between) + * int -1, 0-length of visible region, or greater to append new ops + * (with insertions in between) * @param op - * char + * char * @param range - * int public void addOperationAt(int pos, char op, int range) { - * int cursor = -1; // mark the position for the current - * operation being edited. int o = 0; boolean last_d = false; // - * previous op was a deletion. if (pos < -1) throw new - * Error("pos<-1 is not supported."); while (o0) - * addInsertion(pos-cursor); // then just add the new - * operation. Regardless of what it is. addOperation(op, - * range); } else { int diff = pos - cursor; + * int public void addOperationAt(int pos, char op, int range) { int + * cursor = -1; // mark the position for the current operation being + * edited. int o = 0; boolean last_d = false; // previous op was a + * deletion. if (pos < -1) throw new + * Error("pos<-1 is not supported."); while (o0) addInsertion(pos-cursor); + * // then just add the new operation. Regardless of what it is. + * addOperation(op, range); } else { int diff = pos - cursor; * - * int e_length = length-o; // new edit operation array length. // diff<0 - - * can only happen before first insertion or match. - affects op and all - * following // dif==0 - only when at first position of existing op - // - * diff>0 - must preserve some existing operations int[] e_range = new - * int[e_length]; System.arraycopy(this.range, o, e_range, 0, e_length); - * char[] e_op = new char[e_length]; System.arraycopy(this.operation, o, e_op, - * 0, e_length); length = o; // can now use add_operation to extend list. int - * e_o=0; // current operation being edited. switch (op) { case M: switch - * (e_op[e_o]) { case M: if (last_d && diff <= 0) { // reduce D's, if possible - * if (range<=this.range[o-1]) { this.range[o - 1] -= range; } else { - * this.range[o-1]=0; } if (this.range[o-1]==0) o--; // lose this op. } - * e_range[e_o] += range; // just add more matched residues break; case I: // - * change from insertion to match if (last_d && diff<=0) { // reduce D's, if - * possible if (range<=this.range[o-1]) { this.range[o - 1] -= range; } else { - * this.range[o-1]=0; } if (this.range[o-1]==0) o--; // lose this op. } - * e_range[e_o] break; default: throw new Inp } + * int e_length = length-o; // new edit operation array length. // + * diff<0 - can only happen before first insertion or match. - + * affects op and all following // dif==0 - only when at first + * position of existing op - // diff>0 - must preserve some existing + * operations int[] e_range = new int[e_length]; + * System.arraycopy(this.range, o, e_range, 0, e_length); char[] e_op + * = new char[e_length]; System.arraycopy(this.operation, o, e_op, 0, + * e_length); length = o; // can now use add_operation to extend + * list. int e_o=0; // current operation being edited. switch (op) { + * case M: switch (e_op[e_o]) { case M: if (last_d && diff <= 0) { // + * reduce D's, if possible if (range<=this.range[o-1]) { this.range[o + * - 1] -= range; } else { this.range[o-1]=0; } if + * (this.range[o-1]==0) o--; // lose this op. } e_range[e_o] += + * range; // just add more matched residues break; case I: // change + * from insertion to match if (last_d && diff<=0) { // reduce D's, if + * possible if (range<=this.range[o-1]) { this.range[o - 1] -= range; + * } else { this.range[o-1]=0; } if (this.range[o-1]==0) o--; // lose + * this op. } e_range[e_o] break; default: throw new Inp } * - * break; case I: break; case D: } break; default: throw new - * Error("Implementation Error: Unknown operation in addOperation!"); } // - * finally, add remaining ops. while (e_o

    + * 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 + * know 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) + "]"); } - /** - * - * - * @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); + return (jalview.schemabinding.version2.Alcodon) _alcodonList.get(index); + } + + /** + * Method getAlcodon.Returns the contents of the collection in an Array. + *

    + * 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 + * know 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; } - - /** - * - * - * @param index - * @param vAlcodon - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection + 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 addAlcodon( - final int index, - final jalview.schemabinding.version2.Alcodon vAlcodon) - throws java.lang.IndexOutOfBoundsException { - this._alcodonList.add(index, vAlcodon); - } + public void removeAllAlcodMap() + { + this._alcodMapList.clear(); + } - /** - * Method enumerateAlcodMap. - * - * @return an Enumeration over all - * jalview.schemabinding.version2.AlcodMap elements + /** */ - public java.util.Enumeration enumerateAlcodMap( - ) { - return this._alcodMapList.elements(); + 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) + "]"); } - /** - * Method enumerateAlcodon. - * - * @return an Enumeration over all - * jalview.schemabinding.version2.Alcodon elements - */ - public java.util.Enumeration enumerateAlcodon( - ) { - return this._alcodonList.elements(); + 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]); } - - /** - * 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.

    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 know - * 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.

    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 know - * 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 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) + "]"); } - /** - * - * - * @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); + 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 index b7056c4..ade97c7 100755 --- a/src/jalview/schemabinding/version2/Annotation.java +++ b/src/jalview/schemabinding/version2/Annotation.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,1014 +29,1054 @@ import org.exolab.castor.xml.Unmarshaller; * * @version $Revision$ $Date$ */ -public class Annotation implements java.io.Serializable { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _graph. - */ - private boolean _graph; - - /** - * keeps track of state for field: _graph - */ - private boolean _has_graph; - - /** - * Field _graphType. - */ - private int _graphType; - - /** - * keeps track of state for field: _graphType - */ - private boolean _has_graphType; - - /** - * Field _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; - - /** - * 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; - - /** - * 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; - - - //----------------/ - //- 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.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); - } - - /** - */ - public void deleteAutoCalculated( - ) { - this._has_autoCalculated= 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 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 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.

    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 know 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 '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 '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; - } - - /** - * 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 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 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 '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(); - } - - /** - * 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; - } - - /** - * - * - * @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 '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 '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; - } - - /** - * 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); - } +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; + + /** + * 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; + + /** + * 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; + + // ----------------/ + // - 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.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); + } + + /** + */ + public void deleteAutoCalculated() + { + this._has_autoCalculated = 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 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 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. + *

    + * 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 + * know 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 '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 '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; + } + + /** + * 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 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 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 '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(); + } + + /** + * 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; + } + + /** + * + * + * @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 '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 '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; + } + + /** + * 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/AnnotationColours.java b/src/jalview/schemabinding/version2/AnnotationColours.java index 9cbf27c..2a3b82c 100755 --- a/src/jalview/schemabinding/version2/AnnotationColours.java +++ b/src/jalview/schemabinding/version2/AnnotationColours.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,344 +29,360 @@ import org.exolab.castor.xml.Unmarshaller; * * @version $Revision$ $Date$ */ -public class AnnotationColours implements java.io.Serializable { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _aboveThreshold. - */ - private int _aboveThreshold; - - /** - * keeps track of state for field: _aboveThreshold - */ - private boolean _has_aboveThreshold; - - /** - * Field _annotation. - */ - private java.lang.String _annotation; - - /** - * Field _minColour. - */ - private int _minColour; - - /** - * keeps track of state for field: _minColour - */ - private boolean _has_minColour; - - /** - * Field _maxColour. - */ - private int _maxColour; - - /** - * keeps track of state for field: _maxColour - */ - private boolean _has_maxColour; - - /** - * Field _colourScheme. - */ - private java.lang.String _colourScheme; - - /** - * Field _threshold. - */ - private float _threshold; - - /** - * keeps track of state for field: _threshold - */ - private boolean _has_threshold; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public AnnotationColours() { - super(); - } - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - */ - public void deleteAboveThreshold( - ) { - this._has_aboveThreshold= false; - } - - /** - */ - public void deleteMaxColour( - ) { - this._has_maxColour= false; - } - - /** - */ - public void deleteMinColour( - ) { - this._has_minColour= false; - } - - /** - */ - public void 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 '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 hasThreshold. - * - * @return true if at least one Threshold has been added - */ - public boolean hasThreshold( - ) { - return this._has_threshold; - } - - /** - * 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 'threshold'. - * - * @param threshold the value of field 'threshold'. - */ - public void setThreshold( - final float threshold) { - this._threshold = threshold; - this._has_threshold = true; - } - - /** - * Method unmarshal. - * - * @param reader - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - * @return the unmarshaled - * jalview.schemabinding.version2.AnnotationColours - */ - public static jalview.schemabinding.version2.AnnotationColours unmarshal( - final java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { - return (jalview.schemabinding.version2.AnnotationColours) Unmarshaller.unmarshal(jalview.schemabinding.version2.AnnotationColours.class, reader); - } - - /** - * - * - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - */ - public void validate( - ) - throws org.exolab.castor.xml.ValidationException { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); +public class AnnotationColours implements java.io.Serializable +{ + + // --------------------------/ + // - Class/Member Variables -/ + // --------------------------/ + + /** + * Field _aboveThreshold. + */ + private int _aboveThreshold; + + /** + * keeps track of state for field: _aboveThreshold + */ + private boolean _has_aboveThreshold; + + /** + * Field _annotation. + */ + private java.lang.String _annotation; + + /** + * Field _minColour. + */ + private int _minColour; + + /** + * keeps track of state for field: _minColour + */ + private boolean _has_minColour; + + /** + * Field _maxColour. + */ + private int _maxColour; + + /** + * keeps track of state for field: _maxColour + */ + private boolean _has_maxColour; + + /** + * Field _colourScheme. + */ + private java.lang.String _colourScheme; + + /** + * Field _threshold. + */ + private float _threshold; + + /** + * keeps track of state for field: _threshold + */ + private boolean _has_threshold; + + // ----------------/ + // - Constructors -/ + // ----------------/ + + public AnnotationColours() + { + super(); + } + + // -----------/ + // - Methods -/ + // -----------/ + + /** + */ + public void deleteAboveThreshold() + { + this._has_aboveThreshold = false; + } + + /** + */ + public void deleteMaxColour() + { + this._has_maxColour = false; + } + + /** + */ + public void deleteMinColour() + { + this._has_minColour = false; + } + + /** + */ + public void 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 '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 hasThreshold. + * + * @return true if at least one Threshold has been added + */ + public boolean hasThreshold() + { + return this._has_threshold; + } + + /** + * 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 'threshold'. + * + * @param threshold + * the value of field 'threshold'. + */ + public void setThreshold(final float threshold) + { + this._threshold = threshold; + this._has_threshold = true; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + * @return the unmarshaled jalview.schemabinding.version2.AnnotationColours + */ + public static jalview.schemabinding.version2.AnnotationColours unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + return (jalview.schemabinding.version2.AnnotationColours) Unmarshaller + .unmarshal( + jalview.schemabinding.version2.AnnotationColours.class, + reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + */ + public void validate() throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } } diff --git a/src/jalview/schemabinding/version2/AnnotationElement.java b/src/jalview/schemabinding/version2/AnnotationElement.java index 5772e00..137d945 100755 --- a/src/jalview/schemabinding/version2/AnnotationElement.java +++ b/src/jalview/schemabinding/version2/AnnotationElement.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,322 +29,338 @@ import org.exolab.castor.xml.Unmarshaller; * * @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); +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/Colour.java b/src/jalview/schemabinding/version2/Colour.java index fe36779..1ebe7f7 100755 --- a/src/jalview/schemabinding/version2/Colour.java +++ b/src/jalview/schemabinding/version2/Colour.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,465 +29,481 @@ import org.exolab.castor.xml.Unmarshaller; * * @version $Revision$ $Date$ */ -public class Colour implements java.io.Serializable { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _name. - */ - private java.lang.String _name; - - /** - * Field _RGB. - */ - private java.lang.String _RGB; - - /** - * Field _minRGB. - */ - private java.lang.String _minRGB; - - /** - * loosely specified enumeration: NONE,ABOVE, or BELOW - */ - private java.lang.String _threshType; - - /** - * Field _threshold. - */ - private float _threshold; - - /** - * keeps track of state for field: _threshold - */ - private boolean _has_threshold; - - /** - * Field _max. - */ - private float _max; - - /** - * keeps track of state for field: _max - */ - private boolean _has_max; - - /** - * Field _min. - */ - private float _min; - - /** - * keeps track of state for field: _min - */ - private boolean _has_min; - - /** - * Field _colourByLabel. - */ - private boolean _colourByLabel; - - /** - * keeps track of state for field: _colourByLabel - */ - private boolean _has_colourByLabel; - - /** - * Field _autoScale. - */ - private boolean _autoScale; - - /** - * keeps track of state for field: _autoScale - */ - private boolean _has_autoScale; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public Colour() { - super(); - } - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - */ - public void deleteAutoScale( - ) { - this._has_autoScale= false; - } - - /** - */ - public void deleteColourByLabel( - ) { - this._has_colourByLabel= false; - } - - /** - */ - public void deleteMax( - ) { - this._has_max= false; - } - - /** - */ - public void deleteMin( - ) { - this._has_min= false; - } - - /** - */ - public void deleteThreshold( - ) { - this._has_threshold= false; - } - - /** - * Returns the value of field 'autoScale'. - * - * @return the value of field 'AutoScale'. - */ - public boolean getAutoScale( - ) { - return this._autoScale; - } - - /** - * Returns the value of field 'colourByLabel'. - * - * @return the value of field 'ColourByLabel'. - */ - public boolean getColourByLabel( - ) { - return this._colourByLabel; - } - - /** - * Returns the value of field 'max'. - * - * @return the value of field 'Max'. - */ - public float getMax( - ) { - return this._max; - } - - /** - * Returns the value of field 'min'. - * - * @return the value of field 'Min'. - */ - public float getMin( - ) { - return this._min; - } - - /** - * Returns the value of field 'minRGB'. - * - * @return the value of field 'MinRGB'. - */ - public java.lang.String getMinRGB( - ) { - return this._minRGB; - } - - /** - * Returns the value of field 'name'. - * - * @return the value of field 'Name'. - */ - public java.lang.String getName( - ) { - return this._name; - } - - /** - * Returns the value of field 'RGB'. - * - * @return the value of field 'RGB'. - */ - public java.lang.String getRGB( - ) { - return this._RGB; - } - - /** - * Returns the value of field 'threshType'. The field - * 'threshType' has the following description: loosely - * specified enumeration: NONE,ABOVE, or BELOW - * - * @return the value of field 'ThreshType'. - */ - public java.lang.String getThreshType( - ) { - return this._threshType; - } - - /** - * Returns the value of field 'threshold'. - * - * @return the value of field 'Threshold'. - */ - public float getThreshold( - ) { - return this._threshold; - } - - /** - * Method hasAutoScale. - * - * @return true if at least one AutoScale has been added - */ - public boolean hasAutoScale( - ) { - return this._has_autoScale; - } - - /** - * Method hasColourByLabel. - * - * @return true if at least one ColourByLabel has been added - */ - public boolean hasColourByLabel( - ) { - return this._has_colourByLabel; - } - - /** - * Method hasMax. - * - * @return true if at least one Max has been added - */ - public boolean hasMax( - ) { - return this._has_max; - } - - /** - * Method hasMin. - * - * @return true if at least one Min has been added - */ - public boolean hasMin( - ) { - return this._has_min; - } - - /** - * Method hasThreshold. - * - * @return true if at least one Threshold has been added - */ - public boolean hasThreshold( - ) { - return this._has_threshold; - } - - /** - * Returns the value of field 'autoScale'. - * - * @return the value of field 'AutoScale'. - */ - public boolean isAutoScale( - ) { - return this._autoScale; - } - - /** - * Returns the value of field 'colourByLabel'. - * - * @return the value of field 'ColourByLabel'. - */ - public boolean isColourByLabel( - ) { - return this._colourByLabel; - } - - /** - * Method isValid. - * - * @return true if this object is valid according to the schema - */ - public boolean isValid( - ) { - try { - validate(); - } catch (org.exolab.castor.xml.ValidationException vex) { - return false; - } - return true; - } - - /** - * - * - * @param out - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - */ - public void marshal( - final java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { - Marshaller.marshal(this, out); - } - - /** - * - * - * @param handler - * @throws java.io.IOException if an IOException occurs during - * marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - */ - public void marshal( - final org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { - Marshaller.marshal(this, handler); - } - - /** - * Sets the value of field 'autoScale'. - * - * @param autoScale the value of field 'autoScale'. - */ - public void setAutoScale( - final boolean autoScale) { - this._autoScale = autoScale; - this._has_autoScale = true; - } - - /** - * Sets the value of field 'colourByLabel'. - * - * @param colourByLabel the value of field 'colourByLabel'. - */ - public void setColourByLabel( - final boolean colourByLabel) { - this._colourByLabel = colourByLabel; - this._has_colourByLabel = true; - } - - /** - * Sets the value of field 'max'. - * - * @param max the value of field 'max'. - */ - public void setMax( - final float max) { - this._max = max; - this._has_max = true; - } - - /** - * Sets the value of field 'min'. - * - * @param min the value of field 'min'. - */ - public void setMin( - final float min) { - this._min = min; - this._has_min = true; - } - - /** - * Sets the value of field 'minRGB'. - * - * @param minRGB the value of field 'minRGB'. - */ - public void setMinRGB( - final java.lang.String minRGB) { - this._minRGB = minRGB; - } - - /** - * Sets the value of field 'name'. - * - * @param name the value of field 'name'. - */ - public void setName( - final java.lang.String name) { - this._name = name; - } - - /** - * Sets the value of field 'RGB'. - * - * @param RGB the value of field 'RGB'. - */ - public void setRGB( - final java.lang.String RGB) { - this._RGB = RGB; - } - - /** - * Sets the value of field 'threshType'. The field 'threshType' - * has the following description: loosely specified - * enumeration: NONE,ABOVE, or BELOW - * - * @param threshType the value of field 'threshType'. - */ - public void setThreshType( - final java.lang.String threshType) { - this._threshType = threshType; - } - - /** - * Sets the value of field 'threshold'. - * - * @param threshold the value of field 'threshold'. - */ - public void setThreshold( - final float threshold) { - this._threshold = threshold; - this._has_threshold = true; - } - - /** - * Method unmarshal. - * - * @param reader - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - * @return the unmarshaled jalview.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); - } +public class Colour implements java.io.Serializable +{ + + // --------------------------/ + // - Class/Member Variables -/ + // --------------------------/ + + /** + * Field _name. + */ + private java.lang.String _name; + + /** + * Field _RGB. + */ + private java.lang.String _RGB; + + /** + * Field _minRGB. + */ + private java.lang.String _minRGB; + + /** + * loosely specified enumeration: NONE,ABOVE, or BELOW + */ + private java.lang.String _threshType; + + /** + * Field _threshold. + */ + private float _threshold; + + /** + * keeps track of state for field: _threshold + */ + private boolean _has_threshold; + + /** + * Field _max. + */ + private float _max; + + /** + * keeps track of state for field: _max + */ + private boolean _has_max; + + /** + * Field _min. + */ + private float _min; + + /** + * keeps track of state for field: _min + */ + private boolean _has_min; + + /** + * Field _colourByLabel. + */ + private boolean _colourByLabel; + + /** + * keeps track of state for field: _colourByLabel + */ + private boolean _has_colourByLabel; + + /** + * Field _autoScale. + */ + private boolean _autoScale; + + /** + * keeps track of state for field: _autoScale + */ + private boolean _has_autoScale; + + // ----------------/ + // - Constructors -/ + // ----------------/ + + public Colour() + { + super(); + } + + // -----------/ + // - Methods -/ + // -----------/ + + /** + */ + public void deleteAutoScale() + { + this._has_autoScale = false; + } + + /** + */ + public void deleteColourByLabel() + { + this._has_colourByLabel = false; + } + + /** + */ + public void deleteMax() + { + this._has_max = false; + } + + /** + */ + public void deleteMin() + { + this._has_min = false; + } + + /** + */ + public void deleteThreshold() + { + this._has_threshold = false; + } + + /** + * Returns the value of field 'autoScale'. + * + * @return the value of field 'AutoScale'. + */ + public boolean getAutoScale() + { + return this._autoScale; + } + + /** + * Returns the value of field 'colourByLabel'. + * + * @return the value of field 'ColourByLabel'. + */ + public boolean getColourByLabel() + { + return this._colourByLabel; + } + + /** + * Returns the value of field 'max'. + * + * @return the value of field 'Max'. + */ + public float getMax() + { + return this._max; + } + + /** + * Returns the value of field 'min'. + * + * @return the value of field 'Min'. + */ + public float getMin() + { + return this._min; + } + + /** + * Returns the value of field 'minRGB'. + * + * @return the value of field 'MinRGB'. + */ + public java.lang.String getMinRGB() + { + return this._minRGB; + } + + /** + * Returns the value of field 'name'. + * + * @return the value of field 'Name'. + */ + public java.lang.String getName() + { + return this._name; + } + + /** + * Returns the value of field 'RGB'. + * + * @return the value of field 'RGB'. + */ + public java.lang.String getRGB() + { + return this._RGB; + } + + /** + * Returns the value of field 'threshType'. The field 'threshType' has the + * following description: loosely specified enumeration: NONE,ABOVE, or BELOW + * + * @return the value of field 'ThreshType'. + */ + public java.lang.String getThreshType() + { + return this._threshType; + } + + /** + * Returns the value of field 'threshold'. + * + * @return the value of field 'Threshold'. + */ + public float getThreshold() + { + return this._threshold; + } + + /** + * Method hasAutoScale. + * + * @return true if at least one AutoScale has been added + */ + public boolean hasAutoScale() + { + return this._has_autoScale; + } + + /** + * Method hasColourByLabel. + * + * @return true if at least one ColourByLabel has been added + */ + public boolean hasColourByLabel() + { + return this._has_colourByLabel; + } + + /** + * Method hasMax. + * + * @return true if at least one Max has been added + */ + public boolean hasMax() + { + return this._has_max; + } + + /** + * Method hasMin. + * + * @return true if at least one Min has been added + */ + public boolean hasMin() + { + return this._has_min; + } + + /** + * Method hasThreshold. + * + * @return true if at least one Threshold has been added + */ + public boolean hasThreshold() + { + return this._has_threshold; + } + + /** + * Returns the value of field 'autoScale'. + * + * @return the value of field 'AutoScale'. + */ + public boolean isAutoScale() + { + return this._autoScale; + } + + /** + * Returns the value of field 'colourByLabel'. + * + * @return the value of field 'ColourByLabel'. + */ + public boolean isColourByLabel() + { + return this._colourByLabel; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid() + { + try + { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) + { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + */ + public void marshal(final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException + * if an IOException occurs during marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + */ + public void marshal(final org.xml.sax.ContentHandler handler) + throws java.io.IOException, + org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'autoScale'. + * + * @param autoScale + * the value of field 'autoScale'. + */ + public void setAutoScale(final boolean autoScale) + { + this._autoScale = autoScale; + this._has_autoScale = true; + } + + /** + * Sets the value of field 'colourByLabel'. + * + * @param colourByLabel + * the value of field 'colourByLabel'. + */ + public void setColourByLabel(final boolean colourByLabel) + { + this._colourByLabel = colourByLabel; + this._has_colourByLabel = true; + } + + /** + * Sets the value of field 'max'. + * + * @param max + * the value of field 'max'. + */ + public void setMax(final float max) + { + this._max = max; + this._has_max = true; + } + + /** + * Sets the value of field 'min'. + * + * @param min + * the value of field 'min'. + */ + public void setMin(final float min) + { + this._min = min; + this._has_min = true; + } + + /** + * Sets the value of field 'minRGB'. + * + * @param minRGB + * the value of field 'minRGB'. + */ + public void setMinRGB(final java.lang.String minRGB) + { + this._minRGB = minRGB; + } + + /** + * Sets the value of field 'name'. + * + * @param name + * the value of field 'name'. + */ + public void setName(final java.lang.String name) + { + this._name = name; + } + + /** + * Sets the value of field 'RGB'. + * + * @param RGB + * the value of field 'RGB'. + */ + public void setRGB(final java.lang.String RGB) + { + this._RGB = RGB; + } + + /** + * Sets the value of field 'threshType'. The field 'threshType' has the + * following description: loosely specified enumeration: NONE,ABOVE, or BELOW + * + * @param threshType + * the value of field 'threshType'. + */ + public void setThreshType(final java.lang.String threshType) + { + this._threshType = threshType; + } + + /** + * Sets the value of field 'threshold'. + * + * @param threshold + * the value of field 'threshold'. + */ + public void setThreshold(final float threshold) + { + this._threshold = threshold; + this._has_threshold = true; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + * @return the unmarshaled jalview.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/DBRef.java b/src/jalview/schemabinding/version2/DBRef.java index 1ab08b4..ea968ac 100644 --- a/src/jalview/schemabinding/version2/DBRef.java +++ b/src/jalview/schemabinding/version2/DBRef.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,201 +29,215 @@ import org.exolab.castor.xml.Unmarshaller; * * @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); +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 index fe0192b..a5a4944 100755 --- a/src/jalview/schemabinding/version2/Feature.java +++ b/src/jalview/schemabinding/version2/Feature.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,501 +29,530 @@ import org.exolab.castor.xml.Unmarshaller; * * @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.

    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 know - * 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); - } +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. + *

    + * 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 + * know 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/FeatureSettings.java b/src/jalview/schemabinding/version2/FeatureSettings.java index 0d4246e..5723850 100755 --- a/src/jalview/schemabinding/version2/FeatureSettings.java +++ b/src/jalview/schemabinding/version2/FeatureSettings.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,414 +29,444 @@ import org.exolab.castor.xml.Unmarshaller; * * @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(); +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) + "]"); } - - //-----------/ - //- 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); + return (jalview.schemabinding.version2.Group) _groupList.get(index); + } + + /** + * Method getGroup.Returns the contents of the collection in an Array. + *

    + * 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 + * know 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) + "]"); } - /** - * - * - * @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); + return (jalview.schemabinding.version2.Setting) _settingList.get(index); + } + + /** + * Method getSetting.Returns the contents of the collection in an Array. + *

    + * 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 + * know 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; } - - /** - * - * - * @param index - * @param vSetting - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection + 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 addSetting( - final int index, - final jalview.schemabinding.version2.Setting vSetting) - throws java.lang.IndexOutOfBoundsException { - this._settingList.add(index, vSetting); - } + public void removeAllGroup() + { + this._groupList.clear(); + } - /** - * Method enumerateGroup. - * - * @return an Enumeration over all - * jalview.schemabinding.version2.Group elements + /** */ - public java.util.Enumeration enumerateGroup( - ) { - return this._groupList.elements(); + 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) + "]"); } - /** - * Method enumerateSetting. - * - * @return an Enumeration over all - * jalview.schemabinding.version2.Setting elements - */ - public java.util.Enumeration enumerateSetting( - ) { - return this._settingList.elements(); + 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]); } - - /** - * 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.

    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 know - * 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.

    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 know - * 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 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) + "]"); } - /** - * - * - * @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); + 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 index a3f9161..a828da7 100755 --- a/src/jalview/schemabinding/version2/Features.java +++ b/src/jalview/schemabinding/version2/Features.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,98 +29,106 @@ import org.exolab.castor.xml.Unmarshaller; * * @version $Revision$ $Date$ */ -public class Features extends Feature -implements java.io.Serializable +public class Features extends Feature implements java.io.Serializable { + // ----------------/ + // - Constructors -/ + // ----------------/ - //----------------/ - //- Constructors -/ - //----------------/ - - public Features() { - super(); - } - + public Features() + { + super(); + } - //-----------/ - //- Methods -/ - //-----------/ + // -----------/ + // - Methods -/ + // -----------/ - /** - * Method isValid. - * - * @return true if this object is valid according to the schema - */ - public boolean isValid( - ) { - try { - validate(); - } catch (org.exolab.castor.xml.ValidationException vex) { - return false; - } - return true; + /** + * 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 out + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + */ + public void marshal(final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, out); + } - /** - * - * - * @param handler - * @throws java.io.IOException if an IOException occurs during - * marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - */ - public void marshal( - final org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { - Marshaller.marshal(this, handler); - } + /** + * + * + * @param handler + * @throws java.io.IOException + * if an IOException occurs during marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + */ + public void marshal(final org.xml.sax.ContentHandler handler) + throws java.io.IOException, + org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, handler); + } - /** - * Method unmarshal. - * - * @param reader - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - * @return the unmarshaled jalview.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); - } + /** + * 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); - } + /** + * + * + * @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 index 751e209..344fcda 100644 --- a/src/jalview/schemabinding/version2/Group.java +++ b/src/jalview/schemabinding/version2/Group.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,184 +29,195 @@ import org.exolab.castor.xml.Unmarshaller; * * @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 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 validate( - ) - throws org.exolab.castor.xml.ValidationException { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); + 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 index 017b3df..f0b9e66 100644 --- a/src/jalview/schemabinding/version2/HiddenColumns.java +++ b/src/jalview/schemabinding/version2/HiddenColumns.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,198 +29,209 @@ import org.exolab.castor.xml.Unmarshaller; * * @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); +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 index e75a332..8c11375 100755 --- a/src/jalview/schemabinding/version2/JGroup.java +++ b/src/jalview/schemabinding/version2/JGroup.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,1132 +29,1156 @@ import org.exolab.castor.xml.Unmarshaller; * * @version $Revision$ $Date$ */ -public class JGroup implements java.io.Serializable { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _start. - */ - private int _start; - - /** - * keeps track of state for field: _start - */ - private boolean _has_start; - - /** - * Field _end. - */ - private int _end; - - /** - * keeps track of state for field: _end - */ - private boolean _has_end; - - /** - * Field _name. - */ - private java.lang.String _name; - - /** - * Field _colour. - */ - private java.lang.String _colour; - - /** - * Field _consThreshold. - */ - private int _consThreshold; - - /** - * keeps track of state for field: _consThreshold - */ - private boolean _has_consThreshold; - - /** - * Field _pidThreshold. - */ - private int _pidThreshold; - - /** - * keeps track of state for field: _pidThreshold - */ - private boolean _has_pidThreshold; - - /** - * Field _outlineColour. - */ - private int _outlineColour; - - /** - * keeps track of state for field: _outlineColour - */ - private boolean _has_outlineColour; - - /** - * Field _displayBoxes. - */ - private boolean _displayBoxes; - - /** - * keeps track of state for field: _displayBoxes - */ - private boolean _has_displayBoxes; - - /** - * Field _displayText. - */ - private boolean _displayText; - - /** - * keeps track of state for field: _displayText - */ - private boolean _has_displayText; - - /** - * Field _colourText. - */ - private boolean _colourText; - - /** - * keeps track of state for field: _colourText - */ - private boolean _has_colourText; - - /** - * Field _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; - - /** - * Optional sequence group ID (only needs to be unique for this - * alignment) - * - */ - private java.lang.String _id; - - /** - * 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 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 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 '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 '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.

    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 know - * 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 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 '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 '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 '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); - } +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; + + /** + * Optional sequence group ID (only needs to be unique for this alignment) + * + */ + private java.lang.String _id; + + /** + * 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 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 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 '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 '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. + *

    + * 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 + * know 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 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 '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 '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 '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 index 05a0708..a146b1d 100755 --- a/src/jalview/schemabinding/version2/JSeq.java +++ b/src/jalview/schemabinding/version2/JSeq.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,796 +29,847 @@ import org.exolab.castor.xml.Unmarshaller; * * @version $Revision$ $Date$ */ -public class JSeq implements java.io.Serializable { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _colour. - */ - private int _colour; - - /** - * keeps track of state for field: _colour - */ - private boolean _has_colour; - - /** - * Field _start. - */ - private int _start; - - /** - * keeps track of state for field: _start - */ - private boolean _has_start; - - /** - * Field _end. - */ - private int _end; - - /** - * keeps track of state for field: _end - */ - private boolean _has_end; - - /** - * Field _id. - */ - private java.lang.String _id; - - /** - * Field _hidden. - */ - private boolean _hidden; - - /** - * keeps track of state for field: _hidden - */ - private boolean _has_hidden; - - /** - * Field _featuresList. - */ - private java.util.Vector _featuresList; - - /** - * Field _pdbidsList. - */ - private java.util.Vector _pdbidsList; - - /** - * Field _hiddenSequencesList. - */ - private java.util.Vector _hiddenSequencesList; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public JSeq() { - super(); - this._featuresList = new java.util.Vector(); - this._pdbidsList = new java.util.Vector(); - this._hiddenSequencesList = 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); - } - - /** - */ - 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; - } - - /** - * 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(); - } - - /** - * 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.

    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 know - * 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.

    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 know - * 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(); - } - - /** - * 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 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; - } - - /** - * 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; - } - - /** - * - * - * @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(); - } - - /** - * 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; - } - - /** - * 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]); - } - } - - /** - * 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.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); - } +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 _featuresList. + */ + private java.util.Vector _featuresList; + + /** + * Field _pdbidsList. + */ + private java.util.Vector _pdbidsList; + + /** + * Field _hiddenSequencesList. + */ + private java.util.Vector _hiddenSequencesList; + + // ----------------/ + // - Constructors -/ + // ----------------/ + + public JSeq() + { + super(); + this._featuresList = new java.util.Vector(); + this._pdbidsList = new java.util.Vector(); + this._hiddenSequencesList = 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); + } + + /** + */ + 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; + } + + /** + * 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(); + } + + /** + * 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. + *

    + * 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 + * know 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. + *

    + * 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 + * know 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(); + } + + /** + * 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 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; + } + + /** + * 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; + } + + /** + * + * + * @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(); + } + + /** + * 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; + } + + /** + * 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]); + } + } + + /** + * 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.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 index b28570a..46b858f 100755 --- a/src/jalview/schemabinding/version2/JalviewModel.java +++ b/src/jalview/schemabinding/version2/JalviewModel.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,203 +29,217 @@ import org.exolab.castor.xml.Unmarshaller; * * @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); +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 index 3ef30ad..03ee4d3 100755 --- a/src/jalview/schemabinding/version2/JalviewModelSequence.java +++ b/src/jalview/schemabinding/version2/JalviewModelSequence.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,907 +29,968 @@ import org.exolab.castor.xml.Unmarshaller; * * @version $Revision$ $Date$ */ -public class JalviewModelSequence implements java.io.Serializable { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _JSeqList. - */ - private java.util.Vector _JSeqList; - - /** - * Field _JGroupList. - */ - private java.util.Vector _JGroupList; - - /** - * Field _viewportList. - */ - private java.util.Vector _viewportList; - - /** - * Field _userColoursList. - */ - private java.util.Vector _userColoursList; - - /** - * Field _treeList. - */ - private java.util.Vector _treeList; - - /** - * Field _featureSettings. - */ - private jalview.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.

    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 know - * 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.

    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 know - * 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.

    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 know - * 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.

    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 know - * 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.

    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 know - * 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); - } +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. + *

    + * 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 + * know 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. + *

    + * 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 + * know 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. + *

    + * 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 + * know 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. + *

    + * 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 + * know 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. + *

    + * 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 + * know 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 index c6760ab..f1217e7 100755 --- a/src/jalview/schemabinding/version2/JalviewUserColours.java +++ b/src/jalview/schemabinding/version2/JalviewUserColours.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,313 +29,328 @@ import org.exolab.castor.xml.Unmarshaller; * * @version $Revision$ $Date$ */ -public class JalviewUserColours implements java.io.Serializable { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _schemeName. - */ - private java.lang.String _schemeName; - - /** - * Jalview colour scheme document version. - * - */ - private java.lang.String _version; - - /** - * Field _colourList. - */ - private java.util.Vector _colourList; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public JalviewUserColours() { - super(); - this._colourList = new java.util.Vector(); +public class JalviewUserColours implements java.io.Serializable +{ + + // --------------------------/ + // - Class/Member Variables -/ + // --------------------------/ + + /** + * Field _schemeName. + */ + private java.lang.String _schemeName; + + /** + * Jalview colour scheme document version. + * + */ + private java.lang.String _version; + + /** + * Field _colourList. + */ + private java.util.Vector _colourList; + + // ----------------/ + // - Constructors -/ + // ----------------/ + + public JalviewUserColours() + { + super(); + this._colourList = new java.util.Vector(); + } + + // -----------/ + // - Methods -/ + // -----------/ + + /** + * + * + * @param vColour + * @throws java.lang.IndexOutOfBoundsException + * if the index given is outside the bounds of the collection + */ + public void addColour(final Colour vColour) + throws java.lang.IndexOutOfBoundsException + { + this._colourList.addElement(vColour); + } + + /** + * + * + * @param index + * @param vColour + * @throws java.lang.IndexOutOfBoundsException + * if the index given is outside the bounds of the collection + */ + public void addColour(final int index, final Colour vColour) + throws java.lang.IndexOutOfBoundsException + { + this._colourList.add(index, vColour); + } + + /** + * Method enumerateColour. + * + * @return an Enumeration over all Colour elements + */ + public java.util.Enumeration enumerateColour() + { + return this._colourList.elements(); + } + + /** + * Method getColour. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException + * if the index given is outside the bounds of the collection + * @return the value of the Colour at the given index + */ + public Colour getColour(final int index) + throws java.lang.IndexOutOfBoundsException + { + // check bounds for index + if (index < 0 || index >= this._colourList.size()) + { + throw new IndexOutOfBoundsException("getColour: Index value '" + + index + "' not in range [0.." + + (this._colourList.size() - 1) + "]"); } - - //-----------/ - //- 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); + return (Colour) _colourList.get(index); + } + + /** + * Method getColour.Returns the contents of the collection in an Array. + *

    + * 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 + * know that the Array returned is of exactly the correct length. + * + * @return this collection as an Array + */ + public Colour[] getColour() + { + Colour[] array = new Colour[0]; + return (Colour[]) this._colourList.toArray(array); + } + + /** + * Method getColourCount. + * + * @return the size of this collection + */ + public int getColourCount() + { + return this._colourList.size(); + } + + /** + * Returns the value of field 'schemeName'. + * + * @return the value of field 'SchemeName'. + */ + public java.lang.String getSchemeName() + { + return this._schemeName; + } + + /** + * Returns the value of field 'version'. The field 'version' has the following + * description: Jalview colour scheme document version. + * + * + * @return the value of field 'Version'. + */ + public java.lang.String getVersion() + { + return this._version; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid() + { + try + { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) + { + return false; } - - /** - * - * - * @param index - * @param vColour - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - */ - public void addColour( - final int index, - final Colour vColour) - throws java.lang.IndexOutOfBoundsException { - this._colourList.add(index, vColour); - } - - /** - * Method enumerateColour. - * - * @return an Enumeration over all Colour elements - */ - public java.util.Enumeration enumerateColour( - ) { - return this._colourList.elements(); - } - - /** - * Method getColour. - * - * @param index - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - * @return the value of the Colour at the given index - */ - public Colour getColour( - final int index) - throws java.lang.IndexOutOfBoundsException { - // check bounds for index - if (index < 0 || index >= this._colourList.size()) { - throw new IndexOutOfBoundsException("getColour: Index value '" + index + "' not in range [0.." + (this._colourList.size() - 1) + "]"); - } - - return (Colour) _colourList.get(index); - } - - /** - * Method getColour.Returns the contents of the collection in - * an Array.

    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 know - * that the Array returned is of exactly the correct length. - * - * @return this collection as an Array - */ - public Colour[] getColour( - ) { - Colour[] array = new Colour[0]; - return (Colour[]) this._colourList.toArray(array); - } - - /** - * Method getColourCount. - * - * @return the size of this collection - */ - public int getColourCount( - ) { - return this._colourList.size(); - } - - /** - * Returns the value of field 'schemeName'. - * - * @return the value of field 'SchemeName'. - */ - public java.lang.String getSchemeName( - ) { - return this._schemeName; - } - - /** - * Returns the value of field 'version'. The field 'version' - * has the following description: Jalview colour scheme - * document version. - * - * - * @return the value of field 'Version'. + 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 java.lang.String getVersion( - ) { - return this._version; + public void removeAllColour() + { + this._colourList.clear(); + } + + /** + * Method removeColour. + * + * @param vColour + * @return true if the object was removed from the collection. + */ + public boolean removeColour(final Colour vColour) + { + boolean removed = _colourList.remove(vColour); + return removed; + } + + /** + * Method removeColourAt. + * + * @param index + * @return the element removed from the collection + */ + public Colour removeColourAt(final int index) + { + java.lang.Object obj = this._colourList.remove(index); + return (Colour) obj; + } + + /** + * + * + * @param index + * @param vColour + * @throws java.lang.IndexOutOfBoundsException + * if the index given is outside the bounds of the collection + */ + public void setColour(final int index, final Colour vColour) + throws java.lang.IndexOutOfBoundsException + { + // check bounds for index + if (index < 0 || index >= this._colourList.size()) + { + throw new IndexOutOfBoundsException("setColour: Index value '" + + index + "' not in range [0.." + + (this._colourList.size() - 1) + "]"); } - /** - * Method isValid. - * - * @return true if this object is valid according to the schema - */ - public boolean isValid( - ) { - try { - validate(); - } catch (org.exolab.castor.xml.ValidationException vex) { - return false; - } - return true; - } - - /** - * - * - * @param out - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - */ - public void marshal( - final java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { - Marshaller.marshal(this, out); - } - - /** - * - * - * @param handler - * @throws java.io.IOException if an IOException occurs during - * marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - */ - public void marshal( - final org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { - Marshaller.marshal(this, handler); - } - - /** - */ - public void removeAllColour( - ) { - this._colourList.clear(); - } - - /** - * Method removeColour. - * - * @param vColour - * @return true if the object was removed from the collection. - */ - public boolean removeColour( - final Colour vColour) { - boolean removed = _colourList.remove(vColour); - return removed; - } - - /** - * Method removeColourAt. - * - * @param index - * @return the element removed from the collection - */ - public Colour removeColourAt( - final int index) { - java.lang.Object obj = this._colourList.remove(index); - return (Colour) obj; - } - - /** - * - * - * @param index - * @param vColour - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - */ - public void setColour( - final int index, - final Colour vColour) - throws java.lang.IndexOutOfBoundsException { - // check bounds for index - if (index < 0 || index >= this._colourList.size()) { - throw new IndexOutOfBoundsException("setColour: Index value '" + index + "' not in range [0.." + (this._colourList.size() - 1) + "]"); - } - - this._colourList.set(index, vColour); - } - - /** - * - * - * @param vColourArray - */ - public void setColour( - final Colour[] vColourArray) { - //-- copy array - _colourList.clear(); - - for (int i = 0; i < vColourArray.length; i++) { - this._colourList.add(vColourArray[i]); - } - } - - /** - * Sets the value of field 'schemeName'. - * - * @param schemeName the value of field 'schemeName'. - */ - public void setSchemeName( - final java.lang.String schemeName) { - this._schemeName = schemeName; - } - - /** - * Sets the value of field 'version'. The field 'version' has - * the following description: Jalview colour scheme document - * version. - * - * - * @param version the value of field 'version'. - */ - public void setVersion( - final java.lang.String version) { - this._version = version; - } - - /** - * Method unmarshal. - * - * @param reader - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - * @return the unmarshaled - * jalview.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); + this._colourList.set(index, vColour); + } + + /** + * + * + * @param vColourArray + */ + public void setColour(final Colour[] vColourArray) + { + // -- copy array + _colourList.clear(); + + for (int i = 0; i < vColourArray.length; i++) + { + this._colourList.add(vColourArray[i]); } + } + + /** + * Sets the value of field 'schemeName'. + * + * @param schemeName + * the value of field 'schemeName'. + */ + public void setSchemeName(final java.lang.String schemeName) + { + this._schemeName = schemeName; + } + + /** + * Sets the value of field 'version'. The field 'version' has the following + * description: Jalview colour scheme document version. + * + * + * @param version + * the value of field 'version'. + */ + public void setVersion(final java.lang.String version) + { + this._version = version; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + * @return the unmarshaled jalview.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 index cda570a..8e03000 100644 --- a/src/jalview/schemabinding/version2/MapListFrom.java +++ b/src/jalview/schemabinding/version2/MapListFrom.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,198 +29,209 @@ import org.exolab.castor.xml.Unmarshaller; * * @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); +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 index ac44ae0..30adb05 100644 --- a/src/jalview/schemabinding/version2/MapListTo.java +++ b/src/jalview/schemabinding/version2/MapListTo.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,198 +29,209 @@ import org.exolab.castor.xml.Unmarshaller; * * @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); +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 index e80def9..696df36 100644 --- a/src/jalview/schemabinding/version2/MapListType.java +++ b/src/jalview/schemabinding/version2/MapListType.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -28,566 +27,581 @@ 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 - * + * + * 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.

    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 know - * 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.

    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 know - * 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); - } +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. + *

    + * 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 + * know 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. + *

    + * 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 + * know 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 index 78ac9ee..4c3ec44 100644 --- a/src/jalview/schemabinding/version2/Mapping.java +++ b/src/jalview/schemabinding/version2/Mapping.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,147 +29,155 @@ import org.exolab.castor.xml.Unmarshaller; * * @version $Revision$ $Date$ */ -public class Mapping extends jalview.schemabinding.version2.MapListType -implements java.io.Serializable +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); + // --------------------------/ + // - 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 index 4b80d5f..176b64b 100644 --- a/src/jalview/schemabinding/version2/MappingChoice.java +++ b/src/jalview/schemabinding/version2/MappingChoice.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,152 +29,164 @@ import org.exolab.castor.xml.Unmarshaller; * * @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); +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/OtherData.java b/src/jalview/schemabinding/version2/OtherData.java index bd1e151..88e0c4e 100644 --- a/src/jalview/schemabinding/version2/OtherData.java +++ b/src/jalview/schemabinding/version2/OtherData.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,152 +29,163 @@ import org.exolab.castor.xml.Unmarshaller; * * @version $Revision$ $Date$ */ -public class OtherData implements java.io.Serializable { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _key. - */ - private java.lang.String _key; - - /** - * 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 '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.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); +public class OtherData implements java.io.Serializable +{ + + // --------------------------/ + // - Class/Member Variables -/ + // --------------------------/ + + /** + * Field _key. + */ + private java.lang.String _key; + + /** + * 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 '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.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 index 016bada..e328463 100755 --- a/src/jalview/schemabinding/version2/Pdbentry.java +++ b/src/jalview/schemabinding/version2/Pdbentry.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,334 +29,357 @@ import org.exolab.castor.xml.Unmarshaller; * * @version $Revision$ $Date$ */ -public class Pdbentry implements java.io.Serializable { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _id. - */ - private java.lang.String _id; - - /** - * Field _type. - */ - private java.lang.String _type; - - /** - * Field _file. - */ - private java.lang.String _file; - - /** - * Field _items. - */ - private java.util.Vector _items; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public Pdbentry() { - super(); - this._items = new java.util.Vector(); +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) + + "]"); } - - //-----------/ - //- 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); + return (jalview.schemabinding.version2.PdbentryItem) _items.get(index); + } + + /** + * Method getPdbentryItem.Returns the contents of the collection in an Array. + *

    + * 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 + * know 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; } - - /** - * - * - * @param index - * @param vPdbentryItem - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection + 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 addPdbentryItem( - final int index, - final jalview.schemabinding.version2.PdbentryItem vPdbentryItem) - throws java.lang.IndexOutOfBoundsException { - this._items.add(index, vPdbentryItem); + 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) + + "]"); } - /** - * 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.

    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 know 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); + 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 index e2f16cc..7e3d8a8 100755 --- a/src/jalview/schemabinding/version2/PdbentryItem.java +++ b/src/jalview/schemabinding/version2/PdbentryItem.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; @@ -23,181 +22,193 @@ package jalview.schemabinding.version2; * * @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(); +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) + "]"); } - /** - * 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 + return (jalview.schemabinding.version2.Property) _propertyList + .get(index); + } + + /** + * Method getProperty.Returns the contents of the collection in an Array. + *

    + * 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 + * know 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 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); + 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) + "]"); } - /** - * Method getProperty.Returns the contents of the collection in - * an Array.

    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 know - * 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]); - } + 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 index 17b7c84..8d78bb6 100755 --- a/src/jalview/schemabinding/version2/Pdbids.java +++ b/src/jalview/schemabinding/version2/Pdbids.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,262 +29,285 @@ import org.exolab.castor.xml.Unmarshaller; * * @version $Revision$ $Date$ */ -public class Pdbids extends jalview.schemabinding.version2.Pdbentry -implements java.io.Serializable +public class Pdbids extends jalview.schemabinding.version2.Pdbentry + implements java.io.Serializable { + // --------------------------/ + // - Class/Member Variables -/ + // --------------------------/ - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ + /** + * Field _structureStateList. + */ + private java.util.Vector _structureStateList; - /** - * Field _structureStateList. - */ - private java.util.Vector _structureStateList; + // ----------------/ + // - Constructors -/ + // ----------------/ + public Pdbids() + { + super(); + this._structureStateList = new java.util.Vector(); + } - //----------------/ - //- Constructors -/ - //----------------/ + // -----------/ + // - Methods -/ + // -----------/ - public Pdbids() { - super(); - this._structureStateList = new java.util.Vector(); - } + /** + * + * + * @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); + } - //-----------/ - //- Methods -/ - //-----------/ + /** + * Method enumerateStructureState. + * + * @return an Enumeration over all + * jalview.schemabinding.version2.StructureState elements + */ + public java.util.Enumeration enumerateStructureState() + { + return this._structureStateList.elements(); + } - /** - * - * - * @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); + /** + * 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) + "]"); } - /** - * - * - * @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); - } + return (jalview.schemabinding.version2.StructureState) _structureStateList + .get(index); + } - /** - * Method enumerateStructureState. - * - * @return an Enumeration over all - * jalview.schemabinding.version2.StructureState elements - */ - public java.util.Enumeration enumerateStructureState( - ) { - return this._structureStateList.elements(); - } + /** + * Method getStructureState.Returns the contents of the collection in an + * Array. + *

    + * 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 + * know 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 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 getStructureStateCount. + * + * @return the size of this collection + */ + public int getStructureStateCount() + { + return this._structureStateList.size(); + } - /** - * Method getStructureState.Returns the contents of the - * collection in an Array.

    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 know 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 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; + } - /** - * Method getStructureStateCount. - * - * @return the size of this collection - */ - public int getStructureStateCount( - ) { - return this._structureStateList.size(); - } + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + */ + public void marshal(final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, out); + } - /** - * Method 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 handler + * @throws java.io.IOException + * if an IOException occurs during marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + */ + public void marshal(final org.xml.sax.ContentHandler handler) + throws java.io.IOException, + org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, handler); + } - /** - * - * - * @param 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); - } + public void removeAllStructureState() + { + this._structureStateList.clear(); + } - /** - * - * - * @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 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; + } - /** - */ - public void removeAllStructureState( - ) { - this._structureStateList.clear(); - } + /** + * 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; + } - /** - * 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; + /** + * + * + * @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) + "]"); } - /** - * 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; - } + this._structureStateList.set(index, vStructureState); + } - /** - * - * - * @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(); - /** - * - * - * @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]); - } + 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); - } + /** + * 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); - } + /** + * + * + * @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 index 4e514f0..9ac096d 100755 --- a/src/jalview/schemabinding/version2/Property.java +++ b/src/jalview/schemabinding/version2/Property.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,152 +29,163 @@ import org.exolab.castor.xml.Unmarshaller; * * @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); +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/Sequence.java b/src/jalview/schemabinding/version2/Sequence.java index 46058a6..31ddb31 100755 --- a/src/jalview/schemabinding/version2/Sequence.java +++ b/src/jalview/schemabinding/version2/Sequence.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,293 +29,310 @@ import org.exolab.castor.xml.Unmarshaller; * * @version $Revision$ $Date$ */ -public class Sequence extends jalview.schemabinding.version2.SequenceType -implements java.io.Serializable +public class Sequence extends jalview.schemabinding.version2.SequenceType + implements java.io.Serializable { + // --------------------------/ + // - Class/Member Variables -/ + // --------------------------/ - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ + /** + * dataset sequence id for this sequence. Will be created as union of + * sequences. + * + */ + private java.lang.String _dsseqid; - /** - * 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; - /** - * Field _DBRefList. - */ - private java.util.Vector _DBRefList; + // ----------------/ + // - Constructors -/ + // ----------------/ + public Sequence() + { + super(); + this._DBRefList = new java.util.Vector(); + } - //----------------/ - //- Constructors -/ - //----------------/ + // -----------/ + // - Methods -/ + // -----------/ - public Sequence() { - super(); - this._DBRefList = new java.util.Vector(); - } + /** + * + * + * @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); + } - //-----------/ - //- Methods -/ - //-----------/ + /** + * Method enumerateDBRef. + * + * @return an Enumeration over all jalview.schemabinding.version2.DBRef + * elements + */ + public java.util.Enumeration enumerateDBRef() + { + return this._DBRefList.elements(); + } - /** - * - * - * @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); + /** + * 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) + "]"); } - /** - * - * - * @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); - } + return (jalview.schemabinding.version2.DBRef) _DBRefList.get(index); + } - /** - * Method enumerateDBRef. - * - * @return an Enumeration over all - * jalview.schemabinding.version2.DBRef elements - */ - public java.util.Enumeration enumerateDBRef( - ) { - return this._DBRefList.elements(); - } + /** + * Method getDBRef.Returns the contents of the collection in an Array. + *

    + * 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 + * know 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 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 getDBRefCount. + * + * @return the size of this collection + */ + public int getDBRefCount() + { + return this._DBRefList.size(); + } - /** - * Method getDBRef.Returns the contents of the collection in an - * Array.

    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 know - * 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); - } + /** + * 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 getDBRefCount. - * - * @return the size of this collection - */ - public int getDBRefCount( - ) { - return this._DBRefList.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; + } - /** - * 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; - } + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + */ + public void marshal(final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, out); + } - /** - * Method 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 handler + * @throws java.io.IOException + * if an IOException occurs during marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + */ + public void marshal(final org.xml.sax.ContentHandler handler) + throws java.io.IOException, + org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, handler); + } - /** - * - * - * @param 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); - } + public void removeAllDBRef() + { + this._DBRefList.clear(); + } - /** - * - * - * @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 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; + } - /** - */ - public void removeAllDBRef( - ) { - this._DBRefList.clear(); - } + /** + * 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; + } - /** - * 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; + /** + * + * + * @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) + "]"); } - /** - * 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; - } + this._DBRefList.set(index, vDBRef); + } - /** - * - * - * @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(); - /** - * - * - * @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]); - } + 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; - } + /** + * 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); - } + /** + * 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); - } + /** + * + * + * @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 index 1be0f65..6bcb600 100755 --- a/src/jalview/schemabinding/version2/SequenceSet.java +++ b/src/jalview/schemabinding/version2/SequenceSet.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,789 +29,854 @@ import org.exolab.castor.xml.Unmarshaller; * * @version $Revision$ $Date$ */ -public class SequenceSet implements java.io.Serializable { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _gapChar. - */ - private java.lang.String _gapChar; - - /** - * 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.

    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 know 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.

    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 know - * 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.

    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 know - * 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.

    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 know 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); - } +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. + *

    + * 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 + * know 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. + *

    + * 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 + * know 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. + *

    + * 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 + * know 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. + *

    + * 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 + * know 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 index 5d30b41..fbc1447 100644 --- a/src/jalview/schemabinding/version2/SequenceSetProperties.java +++ b/src/jalview/schemabinding/version2/SequenceSetProperties.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,152 +29,165 @@ import org.exolab.castor.xml.Unmarshaller; * * @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); +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 index c8e54c8..12e1bb1 100755 --- a/src/jalview/schemabinding/version2/SequenceType.java +++ b/src/jalview/schemabinding/version2/SequenceType.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,202 +29,215 @@ import org.exolab.castor.xml.Unmarshaller; * * @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); +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 index a221125..ab10f37 100755 --- a/src/jalview/schemabinding/version2/Setting.java +++ b/src/jalview/schemabinding/version2/Setting.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,648 +29,662 @@ import org.exolab.castor.xml.Unmarshaller; * * @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; - - /** - * 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; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public Setting() { - super(); - } - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - */ - 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; - } - - /** - * 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 '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 '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); - } - - /** - * 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 '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 '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); - } +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; + + /** + * 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; + + // ----------------/ + // - Constructors -/ + // ----------------/ + + public Setting() + { + super(); + } + + // -----------/ + // - Methods -/ + // -----------/ + + /** + */ + 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; + } + + /** + * 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 '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 '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); + } + + /** + * 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 '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 '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 index cec96b0..537f2b7 100644 --- a/src/jalview/schemabinding/version2/StructureState.java +++ b/src/jalview/schemabinding/version2/StructureState.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,430 +29,435 @@ import org.exolab.castor.xml.Unmarshaller; * * @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; - - /** - * 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; - - /** - * additional identifier which properly disambiguates - * the structure view from any other view with the same - * attributes. This is not an ID, - * because it is possible to have many references to the same - * physical structure view - * from different sequences in an alignment. A structureState - * element citing the same - * viewId will appear for each instance. - */ - private java.lang.String _viewId; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public StructureState() { - super(); - setContent(""); - } - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - */ - 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 '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 '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 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; - } - - /** - * 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 '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 '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); +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; + + /** + * 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; + + /** + * additional identifier which properly disambiguates the structure view from + * any other view with the same attributes. This is not an ID, because it is + * possible to have many references to the same physical structure view from + * different sequences in an alignment. A structureState element citing the + * same viewId will appear for each instance. + */ + private java.lang.String _viewId; + + // ----------------/ + // - Constructors -/ + // ----------------/ + + public StructureState() + { + super(); + setContent(""); + } + + // -----------/ + // - Methods -/ + // -----------/ + + /** + */ + 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 '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 '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 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; + } + + /** + * 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 '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 '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 index 467f3e0..1040811 100755 --- a/src/jalview/schemabinding/version2/ThresholdLine.java +++ b/src/jalview/schemabinding/version2/ThresholdLine.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,223 +29,235 @@ import org.exolab.castor.xml.Unmarshaller; * * @version $Revision$ $Date$ */ -public class ThresholdLine implements java.io.Serializable { - +public class ThresholdLine implements java.io.Serializable +{ - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _label. - */ - private java.lang.String _label; + // --------------------------/ + // - Class/Member Variables -/ + // --------------------------/ - /** - * Field _value. - */ - private float _value; + /** + * Field _label. + */ + private java.lang.String _label; - /** - * keeps track of state for field: _value - */ - private boolean _has_value; + /** + * Field _value. + */ + private float _value; - /** - * Field _colour. - */ - private int _colour; + /** + * keeps track of state for field: _value + */ + private boolean _has_value; - /** - * keeps track of state for field: _colour - */ - private boolean _has_colour; + /** + * Field _colour. + */ + private int _colour; + /** + * keeps track of state for field: _colour + */ + private boolean _has_colour; - //----------------/ - //- Constructors -/ - //----------------/ + // ----------------/ + // - Constructors -/ + // ----------------/ - public ThresholdLine() { - super(); - } + public ThresholdLine() + { + super(); + } + // -----------/ + // - Methods -/ + // -----------/ - //-----------/ - //- Methods -/ - //-----------/ - - /** + /** */ - public void deleteColour( - ) { - this._has_colour= false; - } + public void deleteColour() + { + this._has_colour = false; + } - /** + /** */ - public void deleteValue( - ) { - this._has_value= 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 '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 '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; - } + /** + * 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 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 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; + /** + * 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 out + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + */ + public void marshal(final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, out); + } - /** - * - * - * @param handler - * @throws java.io.IOException if an IOException occurs during - * marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - */ - public void marshal( - final org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { - Marshaller.marshal(this, handler); - } + /** + * + * + * @param handler + * @throws java.io.IOException + * if an IOException occurs during marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + */ + public void marshal(final org.xml.sax.ContentHandler handler) + throws java.io.IOException, + org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, handler); + } - /** - * 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 '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 '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; - } + /** + * 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); - } + /** + * 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); - } + /** + * + * + * @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 index cfc6c1c..7ffa841 100755 --- a/src/jalview/schemabinding/version2/Tree.java +++ b/src/jalview/schemabinding/version2/Tree.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,834 +29,857 @@ import org.exolab.castor.xml.Unmarshaller; * * @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; - - /** - * Tree ID added for binding tree visualization settings to - * vamsas document trees in jalview 2.4.1 - */ - private java.lang.String _id; - - /** - * 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); - } +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; + + /** + * Tree ID added for binding tree visualization settings to vamsas document + * trees in jalview 2.4.1 + */ + private java.lang.String _id; + + /** + * 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 index 126aa02..510444e 100755 --- a/src/jalview/schemabinding/version2/UserColourScheme.java +++ b/src/jalview/schemabinding/version2/UserColourScheme.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,99 +29,109 @@ import org.exolab.castor.xml.Unmarshaller; * * @version $Revision$ $Date$ */ -public class UserColourScheme extends JalviewUserColours -implements java.io.Serializable +public class UserColourScheme extends JalviewUserColours implements + java.io.Serializable { + // ----------------/ + // - Constructors -/ + // ----------------/ - //----------------/ - //- Constructors -/ - //----------------/ - - public UserColourScheme() { - super(); - } - + public UserColourScheme() + { + super(); + } - //-----------/ - //- Methods -/ - //-----------/ + // -----------/ + // - Methods -/ + // -----------/ - /** - * Method isValid. - * - * @return true if this object is valid according to the schema - */ - public boolean isValid( - ) { - try { - validate(); - } catch (org.exolab.castor.xml.ValidationException vex) { - return false; - } - return true; + /** + * 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 out + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + */ + public void marshal(final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, out); + } - /** - * - * - * @param handler - * @throws java.io.IOException if an IOException occurs during - * marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - */ - public void marshal( - final org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { - Marshaller.marshal(this, handler); - } + /** + * + * + * @param handler + * @throws java.io.IOException + * if an IOException occurs during marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + */ + public void marshal(final org.xml.sax.ContentHandler handler) + throws java.io.IOException, + org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, handler); + } - /** - * Method unmarshal. - * - * @param reader - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - * @return the unmarshaled - * jalview.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); - } + /** + * 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); - } + /** + * + * + * @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 index c38c588..325e1f1 100755 --- a/src/jalview/schemabinding/version2/UserColours.java +++ b/src/jalview/schemabinding/version2/UserColours.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,152 +29,164 @@ import org.exolab.castor.xml.Unmarshaller; * * @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); +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 index 2081ddd..8669eb1 100755 --- a/src/jalview/schemabinding/version2/VAMSAS.java +++ b/src/jalview/schemabinding/version2/VAMSAS.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,411 +29,436 @@ import org.exolab.castor.xml.Unmarshaller; * * @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(); +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) + "]"); } - - //-----------/ - //- 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); + return (jalview.schemabinding.version2.SequenceSet) _sequenceSetList + .get(index); + } + + /** + * Method getSequenceSet.Returns the contents of the collection in an Array. + *

    + * 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 + * know 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) + "]"); } - /** - * - * - * @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); + return (java.lang.String) _treeList.get(index); + } + + /** + * Method getTree.Returns the contents of the collection in an Array. + *

    + * 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 + * know 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; } - - /** - * - * - * @param index - * @param vTree - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection + 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 addTree( - final int index, - final java.lang.String vTree) - throws java.lang.IndexOutOfBoundsException { - this._treeList.add(index, vTree); - } + public void removeAllSequenceSet() + { + this._sequenceSetList.clear(); + } - /** - * Method enumerateSequenceSet. - * - * @return an Enumeration over all - * jalview.schemabinding.version2.SequenceSet elements + /** */ - public java.util.Enumeration enumerateSequenceSet( - ) { - return this._sequenceSetList.elements(); + 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) + "]"); } - /** - * Method enumerateTree. - * - * @return an Enumeration over all java.lang.String elements - */ - public java.util.Enumeration enumerateTree( - ) { - return this._treeList.elements(); + 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]); } - - /** - * 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.

    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 know - * 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.

    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 know - * 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 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) + "]"); } - /** - * - * - * @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); + 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 index d094c54..d527e84 100755 --- a/src/jalview/schemabinding/version2/VamsasModel.java +++ b/src/jalview/schemabinding/version2/VamsasModel.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,98 +29,106 @@ import org.exolab.castor.xml.Unmarshaller; * * @version $Revision$ $Date$ */ -public class VamsasModel extends VAMSAS -implements java.io.Serializable +public class VamsasModel extends VAMSAS implements java.io.Serializable { + // ----------------/ + // - Constructors -/ + // ----------------/ - //----------------/ - //- Constructors -/ - //----------------/ - - public VamsasModel() { - super(); - } - + public VamsasModel() + { + super(); + } - //-----------/ - //- Methods -/ - //-----------/ + // -----------/ + // - Methods -/ + // -----------/ - /** - * Method isValid. - * - * @return true if this object is valid according to the schema - */ - public boolean isValid( - ) { - try { - validate(); - } catch (org.exolab.castor.xml.ValidationException vex) { - return false; - } - return true; + /** + * 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 out + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + */ + public void marshal(final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, out); + } - /** - * - * - * @param handler - * @throws java.io.IOException if an IOException occurs during - * marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - */ - public void marshal( - final org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { - Marshaller.marshal(this, handler); - } + /** + * + * + * @param handler + * @throws java.io.IOException + * if an IOException occurs during marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + */ + public void marshal(final org.xml.sax.ContentHandler handler) + throws java.io.IOException, + org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, handler); + } - /** - * Method unmarshal. - * - * @param reader - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - * @return the unmarshaled jalview.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); - } + /** + * 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); - } + /** + * + * + * @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 index b7f14f5..38f8c4a 100755 --- a/src/jalview/schemabinding/version2/Viewport.java +++ b/src/jalview/schemabinding/version2/Viewport.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -30,2416 +29,2465 @@ import org.exolab.castor.xml.Unmarshaller; * * @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 _ignoreGapsinConsensus. - */ - private boolean _ignoreGapsinConsensus = true; - - /** - * keeps track of state for field: _ignoreGapsinConsensus - */ - private boolean _has_ignoreGapsinConsensus; - - /** - * 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; +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 _ignoreGapsinConsensus. + */ + private boolean _ignoreGapsinConsensus = true; + + /** + * keeps track of state for field: _ignoreGapsinConsensus + */ + private boolean _has_ignoreGapsinConsensus; + + /** + * 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; + + /** + * 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; + + /** + * Field _annotationColours. + */ + private jalview.schemabinding.version2.AnnotationColours _annotationColours; + + /** + * Field _hiddenColumnsList. + */ + private java.util.Vector _hiddenColumnsList; + + // ----------------/ + // - Constructors -/ + // ----------------/ + + public Viewport() + { + super(); + this._hiddenColumnsList = new java.util.Vector(); + } + + // -----------/ + // - Methods -/ + // -----------/ + + /** + * + * + * @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; + } - /** - * Field _fontName. + /** */ - private java.lang.String _fontName; + public void deleteGatheredViews() + { + this._has_gatheredViews = false; + } - /** - * Field _fontSize. + /** */ - private int _fontSize; + public void deleteHeight() + { + this._has_height = false; + } - /** - * keeps track of state for field: _fontSize + /** */ - private boolean _has_fontSize; + public void deleteIgnoreGapsinConsensus() + { + this._has_ignoreGapsinConsensus = false; + } - /** - * Field _fontStyle. + /** */ - private int _fontStyle; + public void deletePidSelected() + { + this._has_pidSelected = false; + } - /** - * keeps track of state for field: _fontStyle + /** */ - private boolean _has_fontStyle; + public void deletePidThreshold() + { + this._has_pidThreshold = false; + } - /** - * Field _viewName. + /** */ - private java.lang.String _viewName; + public void deleteRenderGaps() + { + this._has_renderGaps = false; + } - /** - * Field _sequenceSetId. + /** */ - private java.lang.String _sequenceSetId; + public void deleteRightAlignIds() + { + this._has_rightAlignIds = false; + } - /** - * Field _gatheredViews. + /** */ - private boolean _gatheredViews; + public void deleteShowAnnotation() + { + this._has_showAnnotation = false; + } - /** - * keeps track of state for field: _gatheredViews + /** */ - private boolean _has_gatheredViews; + public void deleteShowBoxes() + { + this._has_showBoxes = false; + } - /** - * Field _textCol1. + /** */ - private int _textCol1; + public void deleteShowColourText() + { + this._has_showColourText = false; + } - /** - * keeps track of state for field: _textCol1 + /** */ - private boolean _has_textCol1; + public void deleteShowConsensusHistogram() + { + this._has_showConsensusHistogram = false; + } - /** - * Field _textCol2. + /** */ - private int _textCol2; + public void deleteShowDbRefTooltip() + { + this._has_showDbRefTooltip = false; + } - /** - * keeps track of state for field: _textCol2 + /** */ - private boolean _has_textCol2; + public void deleteShowFullId() + { + this._has_showFullId = false; + } - /** - * Field _textColThreshold. + /** */ - private int _textColThreshold; + public void deleteShowGroupConsensus() + { + this._has_showGroupConsensus = false; + } - /** - * keeps track of state for field: _textColThreshold + /** */ - private boolean _has_textColThreshold; + public void deleteShowGroupConservation() + { + this._has_showGroupConservation = false; + } - /** - * unique id used by jalview to synchronize between stored and - * instantiated views - * + /** */ - private java.lang.String _id; + public void deleteShowNPfeatureTooltip() + { + this._has_showNPfeatureTooltip = false; + } - /** - * Field _annotationColours. + /** */ - private jalview.schemabinding.version2.AnnotationColours _annotationColours; + public void deleteShowSequenceFeatures() + { + this._has_showSequenceFeatures = false; + } - /** - * Field _hiddenColumnsList. + /** */ - private java.util.Vector _hiddenColumnsList; + public void deleteShowSequenceLogo() + { + this._has_showSequenceLogo = false; + } - - //----------------/ - //- Constructors -/ - //----------------/ - - public Viewport() { - super(); - this._hiddenColumnsList = new java.util.Vector(); - } - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * - * - * @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 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 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 deleteShowText() + { + this._has_showText = false; + } - /** + /** */ - public void deleteXpos( - ) { - this._has_xpos= false; - } - - /** - */ - public void deleteYpos( - ) { - this._has_ypos= false; - } - - /** - * 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; - } - - /** - * Returns the value of field 'centreColumnLabels'. - * - * @return the value of field 'CentreColumnLabels'. - */ - public boolean getCentreColumnLabels( - ) { - return this._centreColumnLabels; - } + public void deleteShowUnconserved() + { + this._has_showUnconserved = false; + } - /** - * 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.

    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 know 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 '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 '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 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 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 '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 '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 removeAllHiddenColumns( - ) { - this._hiddenColumnsList.clear(); - } - - /** - * 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; - } - - /** - * 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 '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 '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 '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); - } + 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 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; + } + + /** + * Returns the value of field 'centreColumnLabels'. + * + * @return the value of field 'CentreColumnLabels'. + */ + public boolean getCentreColumnLabels() + { + return this._centreColumnLabels; + } + + /** + * 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. + *

    + * 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 + * know 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 '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 '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 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 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 '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 '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 removeAllHiddenColumns() + { + this._hiddenColumnsList.clear(); + } + + /** + * 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; + } + + /** + * 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 '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 '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 '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/descriptors/AlcodMapDescriptor.java b/src/jalview/schemabinding/version2/descriptors/AlcodMapDescriptor.java index d532d8e..d6bb94f 100644 --- a/src/jalview/schemabinding/version2/descriptors/AlcodMapDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/AlcodMapDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.AlcodMap; @@ -29,217 +28,230 @@ import jalview.schemabinding.version2.AlcodMap; * * @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); - } +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; - //-----------/ - //- Methods -/ - //-----------/ + /** + * 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()); + } + } - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode( - ) { + public java.lang.Object newInstance(java.lang.Object parent) + { return null; - } + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); - /** - * Method getIdentity. - * - * @return the identity field, null if this class has no - * identity. - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity( - ) { - return super.getIdentity(); + // -- validation code for: _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 - /** - * Method getJavaClass. - * - * @return the Java class represented by this descriptor. - */ - public java.lang.Class getJavaClass( - ) { - return jalview.schemabinding.version2.AlcodMap.class; - } + // -- _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(); + } - /** - * Method getNameSpacePrefix. - * - * @return the namespace prefix to use when marshaling as XML. - */ - public java.lang.String getNameSpacePrefix( - ) { - return _nsPrefix; - } + 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()); + } + } - /** - * Method getNameSpaceURI. - * - * @return the namespace URI used when marshaling and - * unmarshaling as XML. - */ - public java.lang.String getNameSpaceURI( - ) { - return _nsURI; - } + 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); - /** - * Method getValidator. - * - * @return a specific validator for the class described by this - * ClassDescriptor. - */ - public org.exolab.castor.xml.TypeValidator getValidator( - ) { - return this; + // -- validation code for: _mapping + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { // -- local scope } + desc.setValidator(fieldValidator); + } - /** - * Method getXMLName. - * - * @return the XML Name for the Class being described. - */ - public java.lang.String getXMLName( - ) { - return _xmlName; - } + // -----------/ + // - Methods -/ + // -----------/ - /** - * 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; - } + /** + * 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 index d662ffd..acb4c2b 100644 --- a/src/jalview/schemabinding/version2/descriptors/AlcodonDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/AlcodonDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.Alcodon; @@ -29,263 +28,296 @@ import jalview.schemabinding.version2.Alcodon; * * @version $Revision$ $Date$ */ -public class AlcodonDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { +public class AlcodonDescriptor extends + org.exolab.castor.xml.util.XMLClassDescriptorImpl +{ + // --------------------------/ + // - Class/Member Variables -/ + // --------------------------/ - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; - /** - * Field _elementDefinition. - */ - private boolean _elementDefinition; + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; - /** - * Field _nsPrefix. - */ - private java.lang.String _nsPrefix; + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; - /** - * Field _nsURI. - */ - private java.lang.String _nsURI; + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; - /** - * 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 - //----------------/ - //- Constructors -/ - //----------------/ + // -- _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 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); + 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()); } - 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); + } + + 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; } - 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); + 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()); } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - } + } + public java.lang.Object newInstance(java.lang.Object parent) + { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); - //-----------/ - //- Methods -/ - //-----------/ + // -- validation code for: _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()); + } - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode( - ) { + 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); - /** - * Method getIdentity. - * - * @return the identity field, null if this class has no - * identity. - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity( - ) { - return super.getIdentity(); + // -- validation code for: _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 - /** - * 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; - } + // -----------/ + // - Methods -/ + // -----------/ - /** - * Method getNameSpaceURI. - * - * @return the namespace URI used when marshaling and - * unmarshaling as XML. - */ - public java.lang.String getNameSpaceURI( - ) { - return _nsURI; - } + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } - /** - * Method getValidator. - * - * @return a specific validator for the class described by this - * ClassDescriptor. - */ - public org.exolab.castor.xml.TypeValidator getValidator( - ) { - return this; - } + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + return super.getIdentity(); + } - /** - * Method getXMLName. - * - * @return the XML Name for the Class being described. - */ - public java.lang.String getXMLName( - ) { - return _xmlName; - } + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass() + { + return jalview.schemabinding.version2.Alcodon.class; + } - /** - * 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; - } + /** + * 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 index 56827b5..2450033 100644 --- a/src/jalview/schemabinding/version2/descriptors/AlcodonFrameDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/AlcodonFrameDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.AlcodonFrame; @@ -29,227 +28,251 @@ import jalview.schemabinding.version2.AlcodonFrame; * * @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 +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()); } - 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 + } + + 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()); } - desc.setValidator(fieldValidator); + } + + 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()); + } + } - //-----------/ - //- Methods -/ - //-----------/ + 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()); + } + } - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode( - ) { - return null; - } + 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); - /** - * Method getIdentity. - * - * @return the identity field, null if this class has no - * identity. - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity( - ) { - return super.getIdentity(); + // -- validation code for: _alcodMapList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { // -- local scope } + desc.setValidator(fieldValidator); + } - /** - * Method getJavaClass. - * - * @return the Java class represented by this descriptor. - */ - public java.lang.Class getJavaClass( - ) { - return jalview.schemabinding.version2.AlcodonFrame.class; - } + // -----------/ + // - Methods -/ + // -----------/ - /** - * Method getNameSpacePrefix. - * - * @return the namespace prefix to use when marshaling as XML. - */ - public java.lang.String getNameSpacePrefix( - ) { - return _nsPrefix; - } + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } - /** - * Method getNameSpaceURI. - * - * @return the namespace URI used when marshaling and - * unmarshaling as XML. - */ - public java.lang.String getNameSpaceURI( - ) { - return _nsURI; - } + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + return super.getIdentity(); + } - /** - * Method getValidator. - * - * @return a specific validator for the class described by this - * ClassDescriptor. - */ - public org.exolab.castor.xml.TypeValidator getValidator( - ) { - return this; - } + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass() + { + return jalview.schemabinding.version2.AlcodonFrame.class; + } - /** - * Method getXMLName. - * - * @return the XML Name for the Class being described. - */ - public java.lang.String getXMLName( - ) { - return _xmlName; - } + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix() + { + return _nsPrefix; + } - /** - * 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; - } + /** + * 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 index dc652b9..096578c 100644 --- a/src/jalview/schemabinding/version2/descriptors/AnnotationColoursDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/AnnotationColoursDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.AnnotationColours; @@ -29,386 +28,447 @@ import jalview.schemabinding.version2.AnnotationColours; * * @version $Revision$ $Date$ */ -public class AnnotationColoursDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _elementDefinition. - */ - private boolean _elementDefinition; - - /** - * Field _nsPrefix. - */ - private java.lang.String _nsPrefix; - - /** - * Field _nsURI. - */ - private java.lang.String _nsURI; - - /** - * Field _xmlName. - */ - private java.lang.String _xmlName; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public AnnotationColoursDescriptor() { - super(); - _nsURI = "www.jalview.org"; - _xmlName = "AnnotationColours"; - _elementDefinition = true; - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.mapping.FieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- _aboveThreshold - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_aboveThreshold", "aboveThreshold", org.exolab.castor.xml.NodeType.Attribute); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - AnnotationColours target = (AnnotationColours) object; - if (!target.hasAboveThreshold()) { return null; } - return new java.lang.Integer(target.getAboveThreshold()); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - AnnotationColours target = (AnnotationColours) object; - // if null, use delete method for optional primitives - if (value == null) { - target.deleteAboveThreshold(); - return; - } - target.setAboveThreshold( ((java.lang.Integer) value).intValue()); - } catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance(java.lang.Object parent) { - return null; - } - }; - desc.setHandler(handler); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _aboveThreshold - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - org.exolab.castor.xml.validators.IntValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.IntValidator(); - fieldValidator.setValidator(typeValidator); - typeValidator.setMinInclusive(-2147483648); - typeValidator.setMaxInclusive(2147483647); - } - desc.setValidator(fieldValidator); - //-- _annotation - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_annotation", "annotation", org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - AnnotationColours target = (AnnotationColours) object; - return target.getAnnotation(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - AnnotationColours target = (AnnotationColours) object; - target.setAnnotation( (java.lang.String) value); - } catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance(java.lang.Object parent) { - return null; - } - }; - desc.setHandler(handler); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _annotation - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - org.exolab.castor.xml.validators.StringValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.StringValidator(); - fieldValidator.setValidator(typeValidator); - typeValidator.setWhiteSpace("preserve"); +public class AnnotationColoursDescriptor extends + org.exolab.castor.xml.util.XMLClassDescriptorImpl +{ + + // --------------------------/ + // - Class/Member Variables -/ + // --------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + // ----------------/ + // - Constructors -/ + // ----------------/ + + public AnnotationColoursDescriptor() + { + super(); + _nsURI = "www.jalview.org"; + _xmlName = "AnnotationColours"; + _elementDefinition = true; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + // -- initialize attribute descriptors + + // -- _aboveThreshold + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( + java.lang.Integer.TYPE, "_aboveThreshold", "aboveThreshold", + org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() + { + public java.lang.Object getValue(java.lang.Object object) + throws IllegalStateException + { + AnnotationColours target = (AnnotationColours) object; + if (!target.hasAboveThreshold()) + { + return null; } - desc.setValidator(fieldValidator); - //-- _minColour - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_minColour", "minColour", org.exolab.castor.xml.NodeType.Attribute); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - AnnotationColours target = (AnnotationColours) object; - if (!target.hasMinColour()) { return null; } - return new java.lang.Integer(target.getMinColour()); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - AnnotationColours target = (AnnotationColours) object; - // if null, use delete method for optional primitives - if (value == null) { - target.deleteMinColour(); - return; - } - target.setMinColour( ((java.lang.Integer) value).intValue()); - } catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance(java.lang.Object parent) { - return null; - } - }; - desc.setHandler(handler); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _minColour - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - org.exolab.castor.xml.validators.IntValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.IntValidator(); - fieldValidator.setValidator(typeValidator); - typeValidator.setMinInclusive(-2147483648); - typeValidator.setMaxInclusive(2147483647); + return new java.lang.Integer(target.getAboveThreshold()); + } + + public void setValue(java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try + { + AnnotationColours target = (AnnotationColours) object; + // if null, use delete method for optional primitives + if (value == null) + { + target.deleteAboveThreshold(); + return; + } + target.setAboveThreshold(((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) + { + throw new IllegalStateException(ex.toString()); } - desc.setValidator(fieldValidator); - //-- _maxColour - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_maxColour", "maxColour", org.exolab.castor.xml.NodeType.Attribute); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - AnnotationColours target = (AnnotationColours) object; - if (!target.hasMaxColour()) { return null; } - return new java.lang.Integer(target.getMaxColour()); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - AnnotationColours target = (AnnotationColours) object; - // if null, use delete method for optional primitives - if (value == null) { - target.deleteMaxColour(); - return; - } - target.setMaxColour( ((java.lang.Integer) value).intValue()); - } catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance(java.lang.Object parent) { - return null; - } - }; - desc.setHandler(handler); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _maxColour - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - org.exolab.castor.xml.validators.IntValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.IntValidator(); - fieldValidator.setValidator(typeValidator); - typeValidator.setMinInclusive(-2147483648); - typeValidator.setMaxInclusive(2147483647); + } + + public java.lang.Object newInstance(java.lang.Object parent) + { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + // -- validation code for: _aboveThreshold + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { // -- local scope + org.exolab.castor.xml.validators.IntValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.IntValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setMinInclusive(-2147483648); + typeValidator.setMaxInclusive(2147483647); + } + desc.setValidator(fieldValidator); + // -- _annotation + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( + java.lang.String.class, "_annotation", "annotation", + org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() + { + public java.lang.Object getValue(java.lang.Object object) + throws IllegalStateException + { + AnnotationColours target = (AnnotationColours) object; + return target.getAnnotation(); + } + + public void setValue(java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try + { + AnnotationColours target = (AnnotationColours) object; + target.setAnnotation((java.lang.String) value); + } catch (java.lang.Exception ex) + { + throw new IllegalStateException(ex.toString()); } - desc.setValidator(fieldValidator); - //-- _colourScheme - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_colourScheme", "colourScheme", org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - AnnotationColours target = (AnnotationColours) object; - return target.getColourScheme(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - AnnotationColours target = (AnnotationColours) object; - target.setColourScheme( (java.lang.String) value); - } catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance(java.lang.Object parent) { - return null; - } - }; - desc.setHandler(handler); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _colourScheme - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - org.exolab.castor.xml.validators.StringValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.StringValidator(); - fieldValidator.setValidator(typeValidator); - typeValidator.setWhiteSpace("preserve"); + } + + public java.lang.Object newInstance(java.lang.Object parent) + { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + // -- validation code for: _annotation + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { // -- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + // -- _minColour + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( + java.lang.Integer.TYPE, "_minColour", "minColour", + org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() + { + public java.lang.Object getValue(java.lang.Object object) + throws IllegalStateException + { + AnnotationColours target = (AnnotationColours) object; + if (!target.hasMinColour()) + { + return null; } - desc.setValidator(fieldValidator); - //-- _threshold - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Float.TYPE, "_threshold", "threshold", org.exolab.castor.xml.NodeType.Attribute); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - AnnotationColours target = (AnnotationColours) object; - if (!target.hasThreshold()) { return null; } - return new java.lang.Float(target.getThreshold()); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - AnnotationColours target = (AnnotationColours) object; - // if null, use delete method for optional primitives - if (value == null) { - target.deleteThreshold(); - return; - } - target.setThreshold( ((java.lang.Float) value).floatValue()); - } catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance(java.lang.Object parent) { - return null; - } - }; - desc.setHandler(handler); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _threshold - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - org.exolab.castor.xml.validators.FloatValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.FloatValidator(); - fieldValidator.setValidator(typeValidator); - typeValidator.setMinInclusive((float) -3.4028235E38); - typeValidator.setMaxInclusive((float) 3.4028235E38); + return new java.lang.Integer(target.getMinColour()); + } + + public void setValue(java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try + { + AnnotationColours target = (AnnotationColours) object; + // if null, use delete method for optional primitives + if (value == null) + { + target.deleteMinColour(); + return; + } + target.setMinColour(((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) + { + throw new IllegalStateException(ex.toString()); } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - } + } + + public java.lang.Object newInstance(java.lang.Object parent) + { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + // -- validation code for: _minColour + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { // -- local scope + org.exolab.castor.xml.validators.IntValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.IntValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setMinInclusive(-2147483648); + typeValidator.setMaxInclusive(2147483647); + } + desc.setValidator(fieldValidator); + // -- _maxColour + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( + java.lang.Integer.TYPE, "_maxColour", "maxColour", + org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() + { + public java.lang.Object getValue(java.lang.Object object) + throws IllegalStateException + { + AnnotationColours target = (AnnotationColours) object; + if (!target.hasMaxColour()) + { + return null; + } + return new java.lang.Integer(target.getMaxColour()); + } - //-----------/ - //- Methods -/ - //-----------/ + public void setValue(java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try + { + AnnotationColours target = (AnnotationColours) object; + // if null, use delete method for optional primitives + if (value == null) + { + target.deleteMaxColour(); + return; + } + target.setMaxColour(((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) + { + throw new IllegalStateException(ex.toString()); + } + } - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode( - ) { + public java.lang.Object newInstance(java.lang.Object parent) + { return null; - } + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); - /** - * Method getIdentity. - * - * @return the identity field, null if this class has no - * identity. - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity( - ) { - return super.getIdentity(); + // -- validation code for: _maxColour + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { // -- local scope + org.exolab.castor.xml.validators.IntValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.IntValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setMinInclusive(-2147483648); + typeValidator.setMaxInclusive(2147483647); } + desc.setValidator(fieldValidator); + // -- _colourScheme + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( + java.lang.String.class, "_colourScheme", "colourScheme", + org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() + { + public java.lang.Object getValue(java.lang.Object object) + throws IllegalStateException + { + AnnotationColours target = (AnnotationColours) object; + return target.getColourScheme(); + } - /** - * Method getJavaClass. - * - * @return the Java class represented by this descriptor. - */ - public java.lang.Class getJavaClass( - ) { - return jalview.schemabinding.version2.AnnotationColours.class; - } + public void setValue(java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try + { + AnnotationColours target = (AnnotationColours) object; + target.setColourScheme((java.lang.String) value); + } catch (java.lang.Exception ex) + { + throw new IllegalStateException(ex.toString()); + } + } - /** - * Method getNameSpacePrefix. - * - * @return the namespace prefix to use when marshaling as XML. - */ - public java.lang.String getNameSpacePrefix( - ) { - return _nsPrefix; - } + public java.lang.Object newInstance(java.lang.Object parent) + { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); - /** - * Method getNameSpaceURI. - * - * @return the namespace URI used when marshaling and - * unmarshaling as XML. - */ - public java.lang.String getNameSpaceURI( - ) { - return _nsURI; + // -- validation code for: _colourScheme + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { // -- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); } + desc.setValidator(fieldValidator); + // -- _threshold + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( + java.lang.Float.TYPE, "_threshold", "threshold", + org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() + { + public java.lang.Object getValue(java.lang.Object object) + throws IllegalStateException + { + AnnotationColours target = (AnnotationColours) object; + if (!target.hasThreshold()) + { + return null; + } + return new java.lang.Float(target.getThreshold()); + } - /** - * Method getValidator. - * - * @return a specific validator for the class described by this - * ClassDescriptor. - */ - public org.exolab.castor.xml.TypeValidator getValidator( - ) { - return this; - } + public void setValue(java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try + { + AnnotationColours target = (AnnotationColours) object; + // if null, use delete method for optional primitives + if (value == null) + { + target.deleteThreshold(); + return; + } + target.setThreshold(((java.lang.Float) value).floatValue()); + } catch (java.lang.Exception ex) + { + throw new IllegalStateException(ex.toString()); + } + } - /** - * Method getXMLName. - * - * @return the XML Name for the Class being described. - */ - public java.lang.String getXMLName( - ) { - return _xmlName; - } + public java.lang.Object newInstance(java.lang.Object parent) + { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); - /** - * 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; + // -- 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); + // -- initialize element descriptors + + } + + // -----------/ + // - Methods -/ + // -----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + return super.getIdentity(); + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass() + { + return jalview.schemabinding.version2.AnnotationColours.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix() + { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI() + { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName() + { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition() + { + return _elementDefinition; + } } diff --git a/src/jalview/schemabinding/version2/descriptors/AnnotationDescriptor.java b/src/jalview/schemabinding/version2/descriptors/AnnotationDescriptor.java index f2c6fcf..455d9ca 100644 --- a/src/jalview/schemabinding/version2/descriptors/AnnotationDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/AnnotationDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.Annotation; @@ -29,866 +28,1073 @@ import jalview.schemabinding.version2.Annotation; * * @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); +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; } - 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"); + 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()); } - 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"); + } + + 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; } - 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); + 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()); } - 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); + } + + 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()); } - 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"); + } + + 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()); } - 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); + } + + 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; } - 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); + 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()); } - 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); + } + + 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; } - 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); + 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()); } - 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); + } + + 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); + // -- _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()); } - 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); + } + + 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; } - 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); + 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()); } - 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 + } + + 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; } - 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"); + 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()); } - 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"); + } + + 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; } - 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 + 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()); } - desc.setValidator(fieldValidator); - } + } + + 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); + } - //-----------/ - //- Methods -/ - //-----------/ + 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()); + } + } - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode( - ) { + public java.lang.Object newInstance(java.lang.Object parent) + { return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + // -- 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); + } - /** - * Method getIdentity. - * - * @return the identity field, null if this class has no - * identity. - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity( - ) { - return super.getIdentity(); + 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); + } - /** - * Method getJavaClass. - * - * @return the Java class represented by this descriptor. - */ - public java.lang.Class getJavaClass( - ) { - return jalview.schemabinding.version2.Annotation.class; + 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); - /** - * Method getNameSpacePrefix. - * - * @return the namespace prefix to use when marshaling as XML. - */ - public java.lang.String getNameSpacePrefix( - ) { - return _nsPrefix; + // -- 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); + // -- initialize element descriptors - /** - * Method getNameSpaceURI. - * - * @return the namespace URI used when marshaling and - * unmarshaling as XML. - */ - public java.lang.String getNameSpaceURI( - ) { - return _nsURI; + // -- _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(); + } - /** - * Method getValidator. - * - * @return a specific validator for the class described by this - * ClassDescriptor. - */ - public org.exolab.castor.xml.TypeValidator getValidator( - ) { - return this; + public void setValue(java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try + { + 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); - /** - * Method getXMLName. - * - * @return the XML Name for the Class being described. - */ - public java.lang.String getXMLName( - ) { - return _xmlName; + // -- 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); - /** - * 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; + // -- validation code for: _thresholdLine + 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.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 index 6c0f2df..f96b5f4 100644 --- a/src/jalview/schemabinding/version2/descriptors/AnnotationElementDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/AnnotationElementDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.AnnotationElement; @@ -29,388 +28,447 @@ import jalview.schemabinding.version2.AnnotationElement; * * @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"); +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; } - 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"); + 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()); } - 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); + } + + 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; } - 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); + 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()); } - desc.setValidator(fieldValidator); + } + + 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(); + } - //-----------/ - //- Methods -/ - //-----------/ + 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()); + } + } - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode( - ) { + public java.lang.Object newInstance(java.lang.Object parent) + { return null; - } + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(false); + addFieldDescriptor(desc); - /** - * Method getIdentity. - * - * @return the identity field, null if this class has no - * identity. - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity( - ) { - return super.getIdentity(); + // -- validation code for: _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(); + } - /** - * Method getJavaClass. - * - * @return the Java class represented by this descriptor. - */ - public java.lang.Class getJavaClass( - ) { - return jalview.schemabinding.version2.AnnotationElement.class; - } + 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()); + } + } - /** - * Method getNameSpacePrefix. - * - * @return the namespace prefix to use when marshaling as XML. - */ - public java.lang.String getNameSpacePrefix( - ) { - return _nsPrefix; - } + public java.lang.Object newInstance(java.lang.Object parent) + { + return null; + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(false); + addFieldDescriptor(desc); - /** - * Method getNameSpaceURI. - * - * @return the namespace URI used when marshaling and - * unmarshaling as XML. - */ - public java.lang.String getNameSpaceURI( - ) { - return _nsURI; + // -- validation code for: _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(); + } - /** - * Method getValidator. - * - * @return a specific validator for the class described by this - * ClassDescriptor. - */ - public org.exolab.castor.xml.TypeValidator getValidator( - ) { - return this; - } + public void setValue(java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try + { + 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); - /** - * Method getXMLName. - * - * @return the XML Name for the Class being described. - */ - public java.lang.String getXMLName( - ) { - return _xmlName; + // -- 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()); + } + } - /** - * Method isElementDefinition. - * - * @return true if XML schema definition of this Class is that - * of a global - * element or element with anonymous type definition. - */ - public boolean isElementDefinition( - ) { - return _elementDefinition; + public 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/ColourDescriptor.java b/src/jalview/schemabinding/version2/descriptors/ColourDescriptor.java index b95332a..a33d2d6 100644 --- a/src/jalview/schemabinding/version2/descriptors/ColourDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/ColourDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.Colour; @@ -29,500 +28,592 @@ import jalview.schemabinding.version2.Colour; * * @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; - 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"); +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; + 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()); } - 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"); + } + + 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()); } - desc.setValidator(fieldValidator); - //-- _threshType - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_threshType", "threshType", 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.getThreshType(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - Colour target = (Colour) object; - target.setThreshType( (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: _threshType - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - org.exolab.castor.xml.validators.StringValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.StringValidator(); - fieldValidator.setValidator(typeValidator); - typeValidator.setWhiteSpace("preserve"); + } + + public java.lang.Object newInstance(java.lang.Object parent) + { + return null; + } + }; + desc.setHandler(handler); + desc.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()); } - 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); + } + + 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); + // -- _threshType + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( + java.lang.String.class, "_threshType", "threshType", + 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.getThreshType(); + } + + public void setValue(java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try + { + Colour target = (Colour) object; + target.setThreshType((java.lang.String) value); + } catch (java.lang.Exception ex) + { + throw new IllegalStateException(ex.toString()); } - 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); + } + + public java.lang.Object newInstance(java.lang.Object parent) + { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + // -- validation code for: _threshType + 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 + { + Colour target = (Colour) object; + if (!target.hasThreshold()) + { + return null; } - 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); + 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()); } - 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); + } + + 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; } - 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); + 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()); } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - } + } + + public java.lang.Object newInstance(java.lang.Object parent) + { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + // -- 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()); + } - //-----------/ - //- Methods -/ - //-----------/ + 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()); + } + } - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode( - ) { + public java.lang.Object newInstance(java.lang.Object parent) + { return null; - } + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); - /** - * Method getIdentity. - * - * @return the identity field, null if this class has no - * identity. - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity( - ) { - return super.getIdentity(); + // -- validation code for: _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); + } - /** - * Method getJavaClass. - * - * @return the Java class represented by this descriptor. - */ - public java.lang.Class getJavaClass( - ) { - return jalview.schemabinding.version2.Colour.class; - } + 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()); + } + } - /** - * Method getNameSpacePrefix. - * - * @return the namespace prefix to use when marshaling as XML. - */ - public java.lang.String getNameSpacePrefix( - ) { - return _nsPrefix; - } + public java.lang.Object newInstance(java.lang.Object parent) + { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); - /** - * Method getNameSpaceURI. - * - * @return the namespace URI used when marshaling and - * unmarshaling as XML. - */ - public java.lang.String getNameSpaceURI( - ) { - return _nsURI; + // -- validation code for: _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); + } - /** - * Method getValidator. - * - * @return a specific validator for the class described by this - * ClassDescriptor. - */ - public org.exolab.castor.xml.TypeValidator getValidator( - ) { - return this; - } + public void setValue(java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try + { + 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()); + } + } - /** - * Method getXMLName. - * - * @return the XML Name for the Class being described. - */ - public java.lang.String getXMLName( - ) { - return _xmlName; - } + public java.lang.Object newInstance(java.lang.Object parent) + { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); - /** - * 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; + // -- 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 + + } + + // -----------/ + // - 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/DBRefDescriptor.java b/src/jalview/schemabinding/version2/descriptors/DBRefDescriptor.java index 0af2893..94a064e 100644 --- a/src/jalview/schemabinding/version2/descriptors/DBRefDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/DBRefDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.DBRef; @@ -29,287 +28,316 @@ import jalview.schemabinding.version2.DBRef; * * @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); - } +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; - //-----------/ - //- Methods -/ - //-----------/ + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode( - ) { + // ----------------/ + // - 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); - /** - * Method getIdentity. - * - * @return the identity field, null if this class has no - * identity. - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity( - ) { - return super.getIdentity(); + // -- validation code for: _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(); + } - /** - * Method getJavaClass. - * - * @return the Java class represented by this descriptor. - */ - public java.lang.Class getJavaClass( - ) { - return jalview.schemabinding.version2.DBRef.class; - } + 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()); + } + } - /** - * Method getNameSpacePrefix. - * - * @return the namespace prefix to use when marshaling as XML. - */ - public java.lang.String getNameSpacePrefix( - ) { - return _nsPrefix; - } + public java.lang.Object newInstance(java.lang.Object parent) + { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); - /** - * Method getNameSpaceURI. - * - * @return the namespace URI used when marshaling and - * unmarshaling as XML. - */ - public java.lang.String getNameSpaceURI( - ) { - return _nsURI; + // -- validation code for: _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(); + } - /** - * Method getValidator. - * - * @return a specific validator for the class described by this - * ClassDescriptor. - */ - public org.exolab.castor.xml.TypeValidator getValidator( - ) { - return this; - } + public void setValue(java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try + { + 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); - /** - * Method getXMLName. - * - * @return the XML Name for the Class being described. - */ - public java.lang.String getXMLName( - ) { - return _xmlName; + // -- 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); - /** - * 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; + // -- 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 index 145e8ac..585d6c9 100644 --- a/src/jalview/schemabinding/version2/descriptors/FeatureDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/FeatureDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.Feature; @@ -29,464 +28,548 @@ import jalview.schemabinding.version2.Feature; * * @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); +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; } - 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 + 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()); } - desc.setValidator(fieldValidator); + } + + 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; + } - //-----------/ - //- Methods -/ - //-----------/ + target.setEnd(((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) + { + throw new IllegalStateException(ex.toString()); + } + } - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode( - ) { + public java.lang.Object newInstance(java.lang.Object parent) + { return null; - } + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); - /** - * Method getIdentity. - * - * @return the identity field, null if this class has no - * identity. - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity( - ) { - return super.getIdentity(); + // -- validation code for: _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()); + } + } - /** - * Method getJavaClass. - * - * @return the Java class represented by this descriptor. - */ - public java.lang.Class getJavaClass( - ) { - return jalview.schemabinding.version2.Feature.class; + 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()); + } + } - /** - * Method getNameSpacePrefix. - * - * @return the namespace prefix to use when marshaling as XML. - */ - public java.lang.String getNameSpacePrefix( - ) { - return _nsPrefix; + public java.lang.Object newInstance(java.lang.Object parent) + { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + // -- 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()); + } + } - /** - * Method getNameSpaceURI. - * - * @return the namespace URI used when marshaling and - * unmarshaling as XML. - */ - public java.lang.String getNameSpaceURI( - ) { - return _nsURI; + 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()); + } + } - /** - * Method getValidator. - * - * @return a specific validator for the class described by this - * ClassDescriptor. - */ - public org.exolab.castor.xml.TypeValidator getValidator( - ) { - return this; + 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); - /** - * Method getXMLName. - * - * @return the XML Name for the Class being described. - */ - public java.lang.String getXMLName( - ) { - return _xmlName; + // -- 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 - /** - * 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; + // -- _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/FeatureSettingsDescriptor.java b/src/jalview/schemabinding/version2/descriptors/FeatureSettingsDescriptor.java index 634dd42..30d0d22 100644 --- a/src/jalview/schemabinding/version2/descriptors/FeatureSettingsDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/FeatureSettingsDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.FeatureSettings; @@ -29,227 +28,250 @@ import jalview.schemabinding.version2.FeatureSettings; * * @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 +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()); } - 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 + } + + 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()); } - desc.setValidator(fieldValidator); + } + + 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()); + } + } - //-----------/ - //- Methods -/ - //-----------/ + 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()); + } + } - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode( - ) { - return null; - } + 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); - /** - * Method getIdentity. - * - * @return the identity field, null if this class has no - * identity. - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity( - ) { - return super.getIdentity(); + // -- validation code for: _groupList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { // -- local scope } + desc.setValidator(fieldValidator); + } - /** - * Method getJavaClass. - * - * @return the Java class represented by this descriptor. - */ - public java.lang.Class getJavaClass( - ) { - return jalview.schemabinding.version2.FeatureSettings.class; - } + // -----------/ + // - Methods -/ + // -----------/ - /** - * Method getNameSpacePrefix. - * - * @return the namespace prefix to use when marshaling as XML. - */ - public java.lang.String getNameSpacePrefix( - ) { - return _nsPrefix; - } + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } - /** - * Method getNameSpaceURI. - * - * @return the namespace URI used when marshaling and - * unmarshaling as XML. - */ - public java.lang.String getNameSpaceURI( - ) { - return _nsURI; - } + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + return super.getIdentity(); + } - /** - * Method getValidator. - * - * @return a specific validator for the class described by this - * ClassDescriptor. - */ - public org.exolab.castor.xml.TypeValidator getValidator( - ) { - return this; - } + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass() + { + return jalview.schemabinding.version2.FeatureSettings.class; + } - /** - * Method getXMLName. - * - * @return the XML Name for the Class being described. - */ - public java.lang.String getXMLName( - ) { - return _xmlName; - } + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix() + { + return _nsPrefix; + } - /** - * 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; - } + /** + * 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 index dcfda85..90d9a82 100644 --- a/src/jalview/schemabinding/version2/descriptors/FeaturesDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/FeaturesDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.Features; @@ -29,134 +28,131 @@ import jalview.schemabinding.version2.Features; * * @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; - } +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/GroupDescriptor.java b/src/jalview/schemabinding/version2/descriptors/GroupDescriptor.java index 59cefe8..7471be9 100644 --- a/src/jalview/schemabinding/version2/descriptors/GroupDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/GroupDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.Group; @@ -29,220 +28,240 @@ import jalview.schemabinding.version2.Group; * * @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); +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()); } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - + } + + 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; + } - //-----------/ - //- Methods -/ - //-----------/ + target.setDisplay(((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) + { + throw new IllegalStateException(ex.toString()); + } + } - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode( - ) { + public java.lang.Object newInstance(java.lang.Object parent) + { return null; - } + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); - /** - * Method getIdentity. - * - * @return the identity field, null if this class has no - * identity. - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity( - ) { - return super.getIdentity(); + // -- validation code for: _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 - /** - * 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; - } + // -----------/ + // - Methods -/ + // -----------/ - /** - * Method getNameSpaceURI. - * - * @return the namespace URI used when marshaling and - * unmarshaling as XML. - */ - public java.lang.String getNameSpaceURI( - ) { - return _nsURI; - } + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } - /** - * Method getValidator. - * - * @return a specific validator for the class described by this - * ClassDescriptor. - */ - public org.exolab.castor.xml.TypeValidator getValidator( - ) { - return this; - } + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + return super.getIdentity(); + } - /** - * Method getXMLName. - * - * @return the XML Name for the Class being described. - */ - public java.lang.String getXMLName( - ) { - return _xmlName; - } + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass() + { + return jalview.schemabinding.version2.Group.class; + } - /** - * 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; - } + /** + * 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 index 0715c21..db9123f 100644 --- a/src/jalview/schemabinding/version2/descriptors/HiddenColumnsDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/HiddenColumnsDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.HiddenColumns; @@ -29,226 +28,247 @@ import jalview.schemabinding.version2.HiddenColumns; * * @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); +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; } - 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); + 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()); } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - } + } + + public java.lang.Object newInstance(java.lang.Object parent) + { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + // -- 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()); + } - //-----------/ - //- Methods -/ - //-----------/ + 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()); + } + } - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode( - ) { + public java.lang.Object newInstance(java.lang.Object parent) + { return null; - } + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); - /** - * Method getIdentity. - * - * @return the identity field, null if this class has no - * identity. - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity( - ) { - return super.getIdentity(); + // -- validation code for: _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 - /** - * 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; - } + // -----------/ + // - Methods -/ + // -----------/ - /** - * Method getNameSpaceURI. - * - * @return the namespace URI used when marshaling and - * unmarshaling as XML. - */ - public java.lang.String getNameSpaceURI( - ) { - return _nsURI; - } + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } - /** - * Method getValidator. - * - * @return a specific validator for the class described by this - * ClassDescriptor. - */ - public org.exolab.castor.xml.TypeValidator getValidator( - ) { - return this; - } + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + return super.getIdentity(); + } - /** - * Method getXMLName. - * - * @return the XML Name for the Class being described. - */ - public java.lang.String getXMLName( - ) { - return _xmlName; - } + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass() + { + return jalview.schemabinding.version2.HiddenColumns.class; + } - /** - * 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; - } + /** + * 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 index 08aeae8..88af06e 100644 --- a/src/jalview/schemabinding/version2/descriptors/JGroupDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/JGroupDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.JGroup; @@ -29,933 +28,1164 @@ import jalview.schemabinding.version2.JGroup; * * @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); - //-- _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); +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()); + } + } - //-----------/ - //- Methods -/ - //-----------/ + public java.lang.Object newInstance(java.lang.Object parent) + { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode( - ) { + // -- 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()); + } + } - /** - * Method getIdentity. - * - * @return the identity field, null if this class has no - * identity. - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity( - ) { - return super.getIdentity(); + 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()); + } + } - /** - * Method getJavaClass. - * - * @return the Java class represented by this descriptor. - */ - public java.lang.Class getJavaClass( - ) { - return jalview.schemabinding.version2.JGroup.class; + 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); - /** - * Method getNameSpacePrefix. - * - * @return the namespace prefix to use when marshaling as XML. - */ - public java.lang.String getNameSpacePrefix( - ) { - return _nsPrefix; + // -- 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); + } - /** - * Method getNameSpaceURI. - * - * @return the namespace URI used when marshaling and - * unmarshaling as XML. - */ - public java.lang.String getNameSpaceURI( - ) { - return _nsURI; + 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); + } - /** - * Method getValidator. - * - * @return a specific validator for the class described by this - * ClassDescriptor. - */ - public org.exolab.castor.xml.TypeValidator getValidator( - ) { - return this; + public void setValue(java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try + { + 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); + // -- _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); - /** - * Method getXMLName. - * - * @return the XML Name for the Class being described. - */ - public java.lang.String getXMLName( - ) { - return _xmlName; + // -- 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 - /** - * 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; + // -- _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); + } + + // -----------/ + // - 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 index 97807f0..275bc1f 100644 --- a/src/jalview/schemabinding/version2/descriptors/JSeqDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/JSeqDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.JSeq; @@ -29,486 +28,587 @@ import jalview.schemabinding.version2.JSeq; * * @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); +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; } - 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 + 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()); } - 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 + } + + 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; } - 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); + 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()); } - desc.setValidator(fieldValidator); + } + + 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; + } - //-----------/ - //- Methods -/ - //-----------/ + target.setEnd(((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) + { + throw new IllegalStateException(ex.toString()); + } + } - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode( - ) { + public java.lang.Object newInstance(java.lang.Object parent) + { return null; - } + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); - /** - * Method getIdentity. - * - * @return the identity field, null if this class has no - * identity. - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity( - ) { - return super.getIdentity(); + // -- validation code for: _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(); + } - /** - * Method getJavaClass. - * - * @return the Java class represented by this descriptor. - */ - public java.lang.Class getJavaClass( - ) { - return jalview.schemabinding.version2.JSeq.class; - } + 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); - /** - * Method getNameSpacePrefix. - * - * @return the namespace prefix to use when marshaling as XML. - */ - public java.lang.String getNameSpacePrefix( - ) { - return _nsPrefix; + // -- 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); - /** - * Method getNameSpaceURI. - * - * @return the namespace URI used when marshaling and - * unmarshaling as XML. - */ - public java.lang.String getNameSpaceURI( - ) { - return _nsURI; + // -- 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); + // -- 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()); + } + } - /** - * Method getValidator. - * - * @return a specific validator for the class described by this - * ClassDescriptor. - */ - public org.exolab.castor.xml.TypeValidator getValidator( - ) { - return this; + 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); - /** - * Method getXMLName. - * - * @return the XML Name for the Class being described. - */ - public java.lang.String getXMLName( - ) { - return _xmlName; + // -- 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(); + } - /** - * Method isElementDefinition. - * - * @return true if XML schema definition of this Class is that - * of a global - * element or element with anonymous type definition. - */ - public boolean isElementDefinition( - ) { - return _elementDefinition; + public void setValue(java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try + { + 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); + } + + // -----------/ + // - 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 index 96fc0e6..d467d9c 100644 --- a/src/jalview/schemabinding/version2/descriptors/JalviewModelDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/JalviewModelDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.JalviewModel; @@ -29,295 +28,329 @@ import jalview.schemabinding.version2.JalviewModel; * * @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.setRequired(true); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _jalviewModelSequence - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope +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()); } - desc.setValidator(fieldValidator); - } + } + + 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(); + } - //-----------/ - //- Methods -/ - //-----------/ + 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()); + } + } - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode( - ) { + public java.lang.Object newInstance(java.lang.Object parent) + { return null; - } + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); - /** - * Method getIdentity. - * - * @return the identity field, null if this class has no - * identity. - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity( - ) { - return super.getIdentity(); + // -- validation code for: _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(); + } - /** - * Method getJavaClass. - * - * @return the Java class represented by this descriptor. - */ - public java.lang.Class getJavaClass( - ) { - return jalview.schemabinding.version2.JalviewModel.class; - } + 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()); + } + } - /** - * Method getNameSpacePrefix. - * - * @return the namespace prefix to use when marshaling as XML. - */ - public java.lang.String getNameSpacePrefix( - ) { - return _nsPrefix; - } + public java.lang.Object newInstance(java.lang.Object parent) + { + return new jalview.schemabinding.version2.VamsasModel(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); - /** - * Method getNameSpaceURI. - * - * @return the namespace URI used when marshaling and - * unmarshaling as XML. - */ - public java.lang.String getNameSpaceURI( - ) { - return _nsURI; + // -- validation code for: _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(); + } - /** - * Method getValidator. - * - * @return a specific validator for the class described by this - * ClassDescriptor. - */ - public org.exolab.castor.xml.TypeValidator getValidator( - ) { - return this; - } + public void setValue(java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try + { + JalviewModel target = (JalviewModel) object; + target + .setJalviewModelSequence((jalview.schemabinding.version2.JalviewModelSequence) value); + } catch (java.lang.Exception ex) + { + throw new IllegalStateException(ex.toString()); + } + } - /** - * Method getXMLName. - * - * @return the XML Name for the Class being described. - */ - public java.lang.String getXMLName( - ) { - return _xmlName; - } + public java.lang.Object newInstance(java.lang.Object parent) + { + return 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.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); - /** - * 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; + // -- validation code for: _jalviewModelSequence + 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.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 index 22b5c8e..7e98f39 100644 --- a/src/jalview/schemabinding/version2/descriptors/JalviewModelSequenceDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/JalviewModelSequenceDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.JalviewModelSequence; @@ -29,387 +28,462 @@ import jalview.schemabinding.version2.JalviewModelSequence; * * @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.setRequired(true); - desc.setMultivalued(true); - addFieldDescriptor(desc); - - //-- validation code for: _JSeqList - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope +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()); } - 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 + } + + 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()); } - 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.setRequired(true); - desc.setMultivalued(true); - addFieldDescriptor(desc); - - //-- validation code for: _viewportList - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope + } + + public java.lang.Object newInstance(java.lang.Object parent) + { + return new jalview.schemabinding.version2.JSeq(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setRequired(true); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + // -- validation code for: _JSeqList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { // -- 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()); } - 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 + } + + 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()); } - 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 + } + + 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()); } - 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 + } + + 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()); } - desc.setValidator(fieldValidator); + } + + public java.lang.Object newInstance(java.lang.Object parent) + { + return new jalview.schemabinding.version2.Viewport(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setRequired(true); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + // -- validation code for: _viewportList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { // -- 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()); + } + } - //-----------/ - //- Methods -/ - //-----------/ + 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()); + } + } - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode( - ) { - return null; - } + 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); - /** - * Method getIdentity. - * - * @return the identity field, null if this class has no - * identity. - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity( - ) { - return super.getIdentity(); + // -- validation code for: _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(); + } - /** - * Method getJavaClass. - * - * @return the Java class represented by this descriptor. - */ - public java.lang.Class getJavaClass( - ) { - return jalview.schemabinding.version2.JalviewModelSequence.class; - } + 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()); + } + } - /** - * Method getNameSpacePrefix. - * - * @return the namespace prefix to use when marshaling as XML. - */ - public java.lang.String getNameSpacePrefix( - ) { - return _nsPrefix; - } + 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()); + } + } - /** - * Method getNameSpaceURI. - * - * @return the namespace URI used when marshaling and - * unmarshaling as XML. - */ - public java.lang.String getNameSpaceURI( - ) { - return _nsURI; - } + 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); - /** - * Method getValidator. - * - * @return a specific validator for the class described by this - * ClassDescriptor. - */ - public org.exolab.castor.xml.TypeValidator getValidator( - ) { - return this; + // -- 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(); + } - /** - * Method getXMLName. - * - * @return the XML Name for the Class being described. - */ - public java.lang.String getXMLName( - ) { - return _xmlName; - } + 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); - /** - * 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; + // -- 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 index 8a23ca5..7167360 100644 --- a/src/jalview/schemabinding/version2/descriptors/JalviewUserColoursDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/JalviewUserColoursDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.JalviewUserColours; @@ -30,258 +29,284 @@ import jalview.schemabinding.version2.Colour; * * @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() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - JalviewUserColours target = (JalviewUserColours) object; - return target.getSchemeName(); - } - 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()); - } - } - 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() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - JalviewUserColours target = (JalviewUserColours) object; - return target.getVersion(); - } - 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()); - } - } - 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() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - JalviewUserColours target = (JalviewUserColours) object; - return target.getColour(); - } - 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()); - } - } - 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()); - } - } - 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 +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() + { + public java.lang.Object getValue(java.lang.Object object) + throws IllegalStateException + { + JalviewUserColours target = (JalviewUserColours) object; + return target.getSchemeName(); + } + + 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()); } - desc.setValidator(fieldValidator); + } + + 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() + { + public java.lang.Object getValue(java.lang.Object object) + throws IllegalStateException + { + JalviewUserColours target = (JalviewUserColours) object; + return target.getVersion(); + } - //-----------/ - //- Methods -/ - //-----------/ + 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()); + } + } - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode( - ) { + public java.lang.Object newInstance(java.lang.Object parent) + { return null; - } + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); - /** - * Method getIdentity. - * - * @return the identity field, null if this class has no - * identity. - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity( - ) { - return super.getIdentity(); + // -- validation code for: _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() + { + public java.lang.Object getValue(java.lang.Object object) + throws IllegalStateException + { + JalviewUserColours target = (JalviewUserColours) object; + return target.getColour(); + } - /** - * Method getJavaClass. - * - * @return the Java class represented by this descriptor. - */ - public java.lang.Class getJavaClass( - ) { - return jalview.schemabinding.version2.JalviewUserColours.class; - } + 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()); + } + } - /** - * Method getNameSpacePrefix. - * - * @return the namespace prefix to use when marshaling as XML. - */ - public java.lang.String getNameSpacePrefix( - ) { - return _nsPrefix; - } + 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()); + } + } - /** - * Method getNameSpaceURI. - * - * @return the namespace URI used when marshaling and - * unmarshaling as XML. - */ - public java.lang.String getNameSpaceURI( - ) { - return _nsURI; - } + public java.lang.Object newInstance(java.lang.Object parent) + { + return new Colour(); + } + }; + desc.setHandler(handler); + desc.setMultivalued(true); + addFieldDescriptor(desc); - /** - * Method getValidator. - * - * @return a specific validator for the class described by this - * ClassDescriptor. - */ - public org.exolab.castor.xml.TypeValidator getValidator( - ) { - return this; + // -- validation code for: _colourList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { // -- local scope } + desc.setValidator(fieldValidator); + } - /** - * Method getXMLName. - * - * @return the XML Name for the Class being described. - */ - public java.lang.String getXMLName( - ) { - return _xmlName; - } + // -----------/ + // - Methods -/ + // -----------/ - /** - * 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; - } + /** + * 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.JalviewUserColours.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/MapListFromDescriptor.java b/src/jalview/schemabinding/version2/descriptors/MapListFromDescriptor.java index 793d302..8728437 100644 --- a/src/jalview/schemabinding/version2/descriptors/MapListFromDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/MapListFromDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.MapListFrom; @@ -29,226 +28,251 @@ import jalview.schemabinding.version2.MapListFrom; * * @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); +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; } - 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); + 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()); } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - + } + + 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; + } - //-----------/ - //- Methods -/ - //-----------/ + target.setEnd(((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) + { + throw new IllegalStateException(ex.toString()); + } + } - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode( - ) { + public java.lang.Object newInstance(java.lang.Object parent) + { return null; - } + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); - /** - * Method getIdentity. - * - * @return the identity field, null if this class has no - * identity. - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity( - ) { - return super.getIdentity(); + // -- validation code for: _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 - /** - * 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; - } + // -----------/ + // - Methods -/ + // -----------/ - /** - * Method getNameSpaceURI. - * - * @return the namespace URI used when marshaling and - * unmarshaling as XML. - */ - public java.lang.String getNameSpaceURI( - ) { - return _nsURI; - } + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } - /** - * Method getValidator. - * - * @return a specific validator for the class described by this - * ClassDescriptor. - */ - public org.exolab.castor.xml.TypeValidator getValidator( - ) { - return this; - } + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + return super.getIdentity(); + } - /** - * Method getXMLName. - * - * @return the XML Name for the Class being described. - */ - public java.lang.String getXMLName( - ) { - return _xmlName; - } + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass() + { + return jalview.schemabinding.version2.MapListFrom.class; + } - /** - * 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; - } + /** + * 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 index 9a8b552..28068a5 100644 --- a/src/jalview/schemabinding/version2/descriptors/MapListToDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/MapListToDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.MapListTo; @@ -29,226 +28,251 @@ import jalview.schemabinding.version2.MapListTo; * * @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); +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; } - 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); + 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()); } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - + } + + 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; + } - //-----------/ - //- Methods -/ - //-----------/ + target.setEnd(((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) + { + throw new IllegalStateException(ex.toString()); + } + } - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode( - ) { + public java.lang.Object newInstance(java.lang.Object parent) + { return null; - } + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); - /** - * Method getIdentity. - * - * @return the identity field, null if this class has no - * identity. - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity( - ) { - return super.getIdentity(); + // -- validation code for: _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 - /** - * 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; - } + // -----------/ + // - Methods -/ + // -----------/ - /** - * Method getNameSpaceURI. - * - * @return the namespace URI used when marshaling and - * unmarshaling as XML. - */ - public java.lang.String getNameSpaceURI( - ) { - return _nsURI; - } + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } - /** - * Method getValidator. - * - * @return a specific validator for the class described by this - * ClassDescriptor. - */ - public org.exolab.castor.xml.TypeValidator getValidator( - ) { - return this; - } + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + return super.getIdentity(); + } - /** - * Method getXMLName. - * - * @return the XML Name for the Class being described. - */ - public java.lang.String getXMLName( - ) { - return _xmlName; - } + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass() + { + return jalview.schemabinding.version2.MapListTo.class; + } - /** - * 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; - } + /** + * 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 index 079b70a..defa081 100644 --- a/src/jalview/schemabinding/version2/descriptors/MapListTypeDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/MapListTypeDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.MapListType; @@ -29,311 +28,366 @@ import jalview.schemabinding.version2.MapListType; * * @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 +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; } - 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 + 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()); } - desc.setValidator(fieldValidator); + } + + 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; + } - //-----------/ - //- Methods -/ - //-----------/ + target.setMapToUnit(((java.lang.Long) value).longValue()); + } catch (java.lang.Exception ex) + { + throw new IllegalStateException(ex.toString()); + } + } - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode( - ) { + public java.lang.Object newInstance(java.lang.Object parent) + { return null; - } + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); - /** - * Method getIdentity. - * - * @return the identity field, null if this class has no - * identity. - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity( - ) { - return super.getIdentity(); + // -- validation code for: _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 - /** - * Method getJavaClass. - * - * @return the Java class represented by this descriptor. - */ - public java.lang.Class getJavaClass( - ) { - return jalview.schemabinding.version2.MapListType.class; - } + // -- _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(); + } - /** - * Method getNameSpacePrefix. - * - * @return the namespace prefix to use when marshaling as XML. - */ - public java.lang.String getNameSpacePrefix( - ) { - return _nsPrefix; - } + 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()); + } + } - /** - * Method getNameSpaceURI. - * - * @return the namespace URI used when marshaling and - * unmarshaling as XML. - */ - public java.lang.String getNameSpaceURI( - ) { - return _nsURI; - } + 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()); + } + } - /** - * Method getValidator. - * - * @return a specific validator for the class described by this - * ClassDescriptor. - */ - public org.exolab.castor.xml.TypeValidator getValidator( - ) { - return this; - } + 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); - /** - * Method getXMLName. - * - * @return the XML Name for the Class being described. - */ - public java.lang.String getXMLName( - ) { - return _xmlName; + // -- 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()); + } + } - /** - * Method isElementDefinition. - * - * @return true if XML schema definition of this Class is that - * of a global - * element or element with anonymous type definition. - */ - public boolean isElementDefinition( - ) { - return _elementDefinition; + public 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 index 8c36802..6804d7b 100644 --- a/src/jalview/schemabinding/version2/descriptors/MappingChoiceDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/MappingChoiceDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.MappingChoice; @@ -29,213 +28,227 @@ import jalview.schemabinding.version2.MappingChoice; * * @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"); +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()); } - desc.setValidator(fieldValidator); + } + + 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()); + } + } - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode( - ) { + public java.lang.Object newInstance(java.lang.Object parent) + { return null; + } + }; + desc.setHandler(handler); + desc.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"); } - - /** - * 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; - } + 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 index cb2b2e1..2e66a3a 100644 --- a/src/jalview/schemabinding/version2/descriptors/MappingDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/MappingDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.Mapping; @@ -29,179 +28,187 @@ import jalview.schemabinding.version2.Mapping; * * @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 +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()); } - 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; + } + + 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/OtherDataDescriptor.java b/src/jalview/schemabinding/version2/descriptors/OtherDataDescriptor.java index a4a4879..afffdd1 100644 --- a/src/jalview/schemabinding/version2/descriptors/OtherDataDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/OtherDataDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.OtherData; @@ -29,218 +28,231 @@ import jalview.schemabinding.version2.OtherData; * * @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); - //-- _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 - - } +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; - //-----------/ - //- Methods -/ - //-----------/ + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode( - ) { + /** + * 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); - /** - * Method getIdentity. - * - * @return the identity field, null if this class has no - * identity. - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity( - ) { - return super.getIdentity(); + // -- validation code for: _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); + // -- _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(); + } - /** - * Method getJavaClass. - * - * @return the Java class represented by this descriptor. - */ - public java.lang.Class getJavaClass( - ) { - return jalview.schemabinding.version2.OtherData.class; - } + 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()); + } + } - /** - * Method getNameSpacePrefix. - * - * @return the namespace prefix to use when marshaling as XML. - */ - public java.lang.String getNameSpacePrefix( - ) { - return _nsPrefix; - } + public java.lang.Object newInstance(java.lang.Object parent) + { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); - /** - * Method getNameSpaceURI. - * - * @return the namespace URI used when marshaling and - * unmarshaling as XML. - */ - public java.lang.String getNameSpaceURI( - ) { - return _nsURI; + // -- validation code for: _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 - /** - * 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; - } + // -----------/ + // - Methods -/ + // -----------/ - /** - * 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; - } + /** + * 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 index 3a0e685..f1e68d9 100644 --- a/src/jalview/schemabinding/version2/descriptors/PdbentryDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/PdbentryDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.Pdbentry; @@ -29,295 +28,331 @@ import jalview.schemabinding.version2.Pdbentry; * * @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); - } +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; - //-----------/ - //- Methods -/ - //-----------/ + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode( - ) { + // ----------------/ + // - 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); - /** - * Method getIdentity. - * - * @return the identity field, null if this class has no - * identity. - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity( - ) { - return super.getIdentity(); + // -- validation code for: _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(); + } - /** - * Method getJavaClass. - * - * @return the Java class represented by this descriptor. - */ - public java.lang.Class getJavaClass( - ) { - return jalview.schemabinding.version2.Pdbentry.class; - } + 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()); + } + } - /** - * Method getNameSpacePrefix. - * - * @return the namespace prefix to use when marshaling as XML. - */ - public java.lang.String getNameSpacePrefix( - ) { - return _nsPrefix; - } + public java.lang.Object newInstance(java.lang.Object parent) + { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); - /** - * Method getNameSpaceURI. - * - * @return the namespace URI used when marshaling and - * unmarshaling as XML. - */ - public java.lang.String getNameSpaceURI( - ) { - return _nsURI; + // -- validation code for: _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(); + } - /** - * Method getValidator. - * - * @return a specific validator for the class described by this - * ClassDescriptor. - */ - public org.exolab.castor.xml.TypeValidator getValidator( - ) { - return this; - } + public void setValue(java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try + { + Pdbentry target = (Pdbentry) object; + target.setFile((java.lang.String) value); + } catch (java.lang.Exception ex) + { + throw new IllegalStateException(ex.toString()); + } + } - /** - * Method getXMLName. - * - * @return the XML Name for the Class being described. - */ - public java.lang.String getXMLName( - ) { - return _xmlName; + public java.lang.Object newInstance(java.lang.Object parent) + { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + // -- validation code for: _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); - /** - * 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; + // -- 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 index 55c2281..9542352 100644 --- a/src/jalview/schemabinding/version2/descriptors/PdbentryItemDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/PdbentryItemDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.PdbentryItem; @@ -29,185 +28,196 @@ import jalview.schemabinding.version2.PdbentryItem; * * @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 +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()); } - 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; + } + + 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 index 079081e..0e3688a 100644 --- a/src/jalview/schemabinding/version2/descriptors/PdbidsDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/PdbidsDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.Pdbids; @@ -29,186 +28,198 @@ import jalview.schemabinding.version2.Pdbids; * * @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 +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()); } - 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; + } + + 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 index c97d5d0..7d86536 100644 --- a/src/jalview/schemabinding/version2/descriptors/PropertyDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/PropertyDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.Property; @@ -29,218 +28,231 @@ import jalview.schemabinding.version2.Property; * * @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 - - } +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; - //-----------/ - //- Methods -/ - //-----------/ + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode( - ) { + /** + * 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); - /** - * Method getIdentity. - * - * @return the identity field, null if this class has no - * identity. - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity( - ) { - return super.getIdentity(); + // -- validation code for: _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(); + } - /** - * Method getJavaClass. - * - * @return the Java class represented by this descriptor. - */ - public java.lang.Class getJavaClass( - ) { - return jalview.schemabinding.version2.Property.class; - } + 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()); + } + } - /** - * Method getNameSpacePrefix. - * - * @return the namespace prefix to use when marshaling as XML. - */ - public java.lang.String getNameSpacePrefix( - ) { - return _nsPrefix; - } + public java.lang.Object newInstance(java.lang.Object parent) + { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); - /** - * Method getNameSpaceURI. - * - * @return the namespace URI used when marshaling and - * unmarshaling as XML. - */ - public java.lang.String getNameSpaceURI( - ) { - return _nsURI; + // -- validation code for: _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 - /** - * 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; - } + // -----------/ + // - Methods -/ + // -----------/ - /** - * 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; - } + /** + * 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/SequenceDescriptor.java b/src/jalview/schemabinding/version2/descriptors/SequenceDescriptor.java index 85a5982..3b4b5ab 100644 --- a/src/jalview/schemabinding/version2/descriptors/SequenceDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/SequenceDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.Sequence; @@ -29,223 +28,241 @@ import jalview.schemabinding.version2.Sequence; * * @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); - } +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; - //-----------/ - //- Methods -/ - //-----------/ + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode( - ) { + // ----------------/ + // - 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); - /** - * Method getIdentity. - * - * @return the identity field, null if this class has no - * identity. - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity( - ) { - return super.getIdentity(); + // -- validation code for: _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 - /** - * Method getJavaClass. - * - * @return the Java class represented by this descriptor. - */ - public java.lang.Class getJavaClass( - ) { - return jalview.schemabinding.version2.Sequence.class; - } + // -- _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(); + } - /** - * Method getNameSpacePrefix. - * - * @return the namespace prefix to use when marshaling as XML. - */ - public java.lang.String getNameSpacePrefix( - ) { - return _nsPrefix; - } + 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()); + } + } - /** - * Method getNameSpaceURI. - * - * @return the namespace URI used when marshaling and - * unmarshaling as XML. - */ - public java.lang.String getNameSpaceURI( - ) { - return _nsURI; - } + 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()); + } + } - /** - * Method getValidator. - * - * @return a specific validator for the class described by this - * ClassDescriptor. - */ - public org.exolab.castor.xml.TypeValidator getValidator( - ) { - return this; - } + 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); - /** - * Method getXMLName. - * - * @return the XML Name for the Class being described. - */ - public java.lang.String getXMLName( - ) { - return _xmlName; + // -- validation code for: _DBRefList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { // -- local scope } + desc.setValidator(fieldValidator); + } - /** - * 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; - } + // -----------/ + // - 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 index abbfab6..1f47044 100644 --- a/src/jalview/schemabinding/version2/descriptors/SequenceSetDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/SequenceSetDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.SequenceSet; @@ -29,387 +28,459 @@ import jalview.schemabinding.version2.SequenceSet; * * @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"); +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()); } - 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"); + } + + 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()); } - 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 + } + + 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()); } - 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 + } + + 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()); } - 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 + } + + 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()); } - 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 + } + + 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()); } - desc.setValidator(fieldValidator); + } + + 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()); + } + } - //-----------/ - //- Methods -/ - //-----------/ + 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()); + } + } - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode( - ) { - return null; - } + 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); - /** - * Method getIdentity. - * - * @return the identity field, null if this class has no - * identity. - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity( - ) { - return super.getIdentity(); + // -- validation code for: _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(); + } - /** - * Method getJavaClass. - * - * @return the Java class represented by this descriptor. - */ - public java.lang.Class getJavaClass( - ) { - return jalview.schemabinding.version2.SequenceSet.class; - } + 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()); + } + } - /** - * Method getNameSpacePrefix. - * - * @return the namespace prefix to use when marshaling as XML. - */ - public java.lang.String getNameSpacePrefix( - ) { - return _nsPrefix; - } + 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()); + } + } - /** - * Method getNameSpaceURI. - * - * @return the namespace URI used when marshaling and - * unmarshaling as XML. - */ - public java.lang.String getNameSpaceURI( - ) { - return _nsURI; - } + 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); - /** - * Method getValidator. - * - * @return a specific validator for the class described by this - * ClassDescriptor. - */ - public org.exolab.castor.xml.TypeValidator getValidator( - ) { - return this; + // -- validation code for: _alcodonFrameList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { // -- local scope } + desc.setValidator(fieldValidator); + } - /** - * Method getXMLName. - * - * @return the XML Name for the Class being described. - */ - public java.lang.String getXMLName( - ) { - return _xmlName; - } + // -----------/ + // - Methods -/ + // -----------/ - /** - * 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; - } + /** + * 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 index 25fdc1f..53bf42a 100644 --- a/src/jalview/schemabinding/version2/descriptors/SequenceSetPropertiesDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/SequenceSetPropertiesDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.SequenceSetProperties; @@ -29,214 +28,227 @@ import jalview.schemabinding.version2.SequenceSetProperties; * * @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"); +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()); } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - } - + } - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode( - ) { + public java.lang.Object newInstance(java.lang.Object parent) + { return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + // -- 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()); + } + } - /** - * 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; + 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 index 63d81f7..45152ae 100644 --- a/src/jalview/schemabinding/version2/descriptors/SequenceTypeDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/SequenceTypeDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.SequenceType; @@ -29,293 +28,322 @@ import jalview.schemabinding.version2.SequenceType; * * @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"); +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()); } - 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"); + } + + 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()); } - desc.setValidator(fieldValidator); + } + + 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(); + } - //-----------/ - //- Methods -/ - //-----------/ + 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()); + } + } - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode( - ) { + public java.lang.Object newInstance(java.lang.Object parent) + { return null; - } + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(false); + addFieldDescriptor(desc); - /** - * Method getIdentity. - * - * @return the identity field, null if this class has no - * identity. - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity( - ) { - return super.getIdentity(); + // -- validation code for: _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(); + } - /** - * Method getJavaClass. - * - * @return the Java class represented by this descriptor. - */ - public java.lang.Class getJavaClass( - ) { - return jalview.schemabinding.version2.SequenceType.class; - } + 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()); + } + } - /** - * Method getNameSpacePrefix. - * - * @return the namespace prefix to use when marshaling as XML. - */ - public java.lang.String getNameSpacePrefix( - ) { - return _nsPrefix; - } + public java.lang.Object newInstance(java.lang.Object parent) + { + return null; + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(false); + addFieldDescriptor(desc); - /** - * Method getNameSpaceURI. - * - * @return the namespace URI used when marshaling and - * unmarshaling as XML. - */ - public java.lang.String getNameSpaceURI( - ) { - return _nsURI; + // -- validation code for: _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); + } - /** - * Method getValidator. - * - * @return a specific validator for the class described by this - * ClassDescriptor. - */ - public org.exolab.castor.xml.TypeValidator getValidator( - ) { - return this; - } + // -----------/ + // - Methods -/ + // -----------/ - /** - * Method getXMLName. - * - * @return the XML Name for the Class being described. - */ - public java.lang.String getXMLName( - ) { - return _xmlName; - } + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } - /** - * 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; - } + /** + * 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 index 889bd07..0969e4b 100644 --- a/src/jalview/schemabinding/version2/descriptors/SettingDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/SettingDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.Setting; @@ -29,603 +28,736 @@ import jalview.schemabinding.version2.Setting; * * @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; - 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"); +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; + 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()); } - 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); + } + + 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; } - 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); + 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()); } - 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); + } + + 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; } - 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); + 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()); } - 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); + } + + 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; } - 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); + 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()); } - 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); + } + + 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; } - 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); + 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()); } - 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); + } + + 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); + // -- _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; } - 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); + 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()); } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - } + } + + public java.lang.Object newInstance(java.lang.Object parent) + { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + // -- 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()); + } - //-----------/ - //- Methods -/ - //-----------/ + 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()); + } + } - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode( - ) { + public java.lang.Object newInstance(java.lang.Object parent) + { return null; - } + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); - /** - * Method getIdentity. - * - * @return the identity field, null if this class has no - * identity. - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity( - ) { - return super.getIdentity(); + // -- validation code for: _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()); + } - /** - * Method getJavaClass. - * - * @return the Java class represented by this descriptor. - */ - public java.lang.Class getJavaClass( - ) { - return jalview.schemabinding.version2.Setting.class; - } + 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()); + } + } - /** - * Method getNameSpacePrefix. - * - * @return the namespace prefix to use when marshaling as XML. - */ - public java.lang.String getNameSpacePrefix( - ) { - return _nsPrefix; - } + public java.lang.Object newInstance(java.lang.Object parent) + { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); - /** - * Method getNameSpaceURI. - * - * @return the namespace URI used when marshaling and - * unmarshaling as XML. - */ - public java.lang.String getNameSpaceURI( - ) { - return _nsURI; + // -- validation code for: _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()); + } + } - /** - * Method getValidator. - * - * @return a specific validator for the class described by this - * ClassDescriptor. - */ - public org.exolab.castor.xml.TypeValidator getValidator( - ) { - return this; + 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); + } - /** - * Method getXMLName. - * - * @return the XML Name for the Class being described. - */ - public java.lang.String getXMLName( - ) { - return _xmlName; + 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); + } - /** - * Method isElementDefinition. - * - * @return true if XML schema definition of this Class is that - * of a global - * element or element with anonymous type definition. - */ - public boolean isElementDefinition( - ) { - return _elementDefinition; + public void setValue(java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try + { + 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 + + } + + // -----------/ + // - 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 index 44eb9d3..cd50167 100644 --- a/src/jalview/schemabinding/version2/descriptors/StructureStateDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/StructureStateDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.StructureState; @@ -29,426 +28,500 @@ import jalview.schemabinding.version2.StructureState; * * @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"); +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()); } - 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); + } + + 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; } - 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); + 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()); } - 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); + } + + 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); + // -- _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; } - 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); + 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()); } - 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); + } + + 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; } - 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"); + 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()); } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - } + } + public java.lang.Object newInstance(java.lang.Object parent) + { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); - //-----------/ - //- Methods -/ - //-----------/ + // -- validation code for: _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); + // -- _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()); + } - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode( - ) { + 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); - /** - * Method getIdentity. - * - * @return the identity field, null if this class has no - * identity. - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity( - ) { - return super.getIdentity(); + // -- validation code for: _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()); + } - /** - * Method getJavaClass. - * - * @return the Java class represented by this descriptor. - */ - public java.lang.Class getJavaClass( - ) { - return jalview.schemabinding.version2.StructureState.class; - } + 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()); + } + } - /** - * Method getNameSpacePrefix. - * - * @return the namespace prefix to use when marshaling as XML. - */ - public java.lang.String getNameSpacePrefix( - ) { - return _nsPrefix; - } + public java.lang.Object newInstance(java.lang.Object parent) + { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); - /** - * Method getNameSpaceURI. - * - * @return the namespace URI used when marshaling and - * unmarshaling as XML. - */ - public java.lang.String getNameSpaceURI( - ) { - return _nsURI; + // -- validation code for: _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); + // -- _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(); + } - /** - * Method getValidator. - * - * @return a specific validator for the class described by this - * ClassDescriptor. - */ - public org.exolab.castor.xml.TypeValidator getValidator( - ) { - return this; - } + public void setValue(java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try + { + StructureState target = (StructureState) object; + target.setViewId((java.lang.String) value); + } catch (java.lang.Exception ex) + { + throw new IllegalStateException(ex.toString()); + } + } - /** - * Method getXMLName. - * - * @return the XML Name for the Class being described. - */ - public java.lang.String getXMLName( - ) { - return _xmlName; - } + public java.lang.Object newInstance(java.lang.Object parent) + { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); - /** - * 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; + // -- 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); + // -- 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 index c1de9c8..d631f0c 100644 --- a/src/jalview/schemabinding/version2/descriptors/ThresholdLineDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/ThresholdLineDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.ThresholdLine; @@ -29,263 +28,292 @@ import jalview.schemabinding.version2.ThresholdLine; * * @version $Revision$ $Date$ */ -public class ThresholdLineDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { +public class ThresholdLineDescriptor extends + org.exolab.castor.xml.util.XMLClassDescriptorImpl +{ + // --------------------------/ + // - Class/Member Variables -/ + // --------------------------/ - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; - /** - * Field _elementDefinition. - */ - private boolean _elementDefinition; + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; - /** - * Field _nsPrefix. - */ - private java.lang.String _nsPrefix; + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; - /** - * Field _nsURI. - */ - private java.lang.String _nsURI; + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; - /** - * 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 - //----------------/ - //- Constructors -/ - //----------------/ + // -- _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 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"); + 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()); } - 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); + } + + 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; } - 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); + 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()); } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - } + } + + public java.lang.Object newInstance(java.lang.Object parent) + { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + // -- 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()); + } - //-----------/ - //- Methods -/ - //-----------/ + 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()); + } + } - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode( - ) { + public java.lang.Object newInstance(java.lang.Object parent) + { return null; - } + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); - /** - * Method getIdentity. - * - * @return the identity field, null if this class has no - * identity. - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity( - ) { - return super.getIdentity(); + // -- validation code for: _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 - /** - * 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; - } + // -----------/ + // - Methods -/ + // -----------/ - /** - * Method getNameSpaceURI. - * - * @return the namespace URI used when marshaling and - * unmarshaling as XML. - */ - public java.lang.String getNameSpaceURI( - ) { - return _nsURI; - } + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } - /** - * Method getValidator. - * - * @return a specific validator for the class described by this - * ClassDescriptor. - */ - public org.exolab.castor.xml.TypeValidator getValidator( - ) { - return this; - } + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + return super.getIdentity(); + } - /** - * Method getXMLName. - * - * @return the XML Name for the Class being described. - */ - public java.lang.String getXMLName( - ) { - return _xmlName; - } + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass() + { + return jalview.schemabinding.version2.ThresholdLine.class; + } - /** - * 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; - } + /** + * 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 index 7bb83ae..49ca27c 100644 --- a/src/jalview/schemabinding/version2/descriptors/TreeDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/TreeDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.Tree; @@ -29,798 +28,980 @@ import jalview.schemabinding.version2.Tree; * * @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 - - //-- _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); +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 + + // -- _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; } - 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); + 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()); } - 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); + } + + 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; } - 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 - { - 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"); + 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()); } - 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); + } + + 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; } - 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); + 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()); } - 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); + } + + 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; } - 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); + 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()); } - 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); + } + + 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); + // -- _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()); } - 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); + } + + 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; } - 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); + 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()); } - 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); + } + + 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; } - 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); + 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()); } - 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"); + } + + 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; } - 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"); + 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()); } - desc.setValidator(fieldValidator); - } + } + + 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); + } - //-----------/ - //- Methods -/ - //-----------/ + 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()); + } + } - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode( - ) { + public java.lang.Object newInstance(java.lang.Object parent) + { return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + // -- 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); - /** - * Method getIdentity. - * - * @return the identity field, null if this class has no - * identity. - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity( - ) { - return super.getIdentity(); + // -- validation code for: _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()); + } + } - /** - * Method getJavaClass. - * - * @return the Java class represented by this descriptor. - */ - public java.lang.Class getJavaClass( - ) { - return jalview.schemabinding.version2.Tree.class; + 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); + } - /** - * Method getNameSpacePrefix. - * - * @return the namespace prefix to use when marshaling as XML. - */ - public java.lang.String getNameSpacePrefix( - ) { - return _nsPrefix; + 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); - /** - * Method getNameSpaceURI. - * - * @return the namespace URI used when marshaling and - * unmarshaling as XML. - */ - public java.lang.String getNameSpaceURI( - ) { - return _nsURI; + // -- 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); - /** - * Method getValidator. - * - * @return a specific validator for the class described by this - * ClassDescriptor. - */ - public org.exolab.castor.xml.TypeValidator getValidator( - ) { - return this; + // -- 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); + // -- initialize element descriptors - /** - * Method getXMLName. - * - * @return the XML Name for the Class being described. - */ - public java.lang.String getXMLName( - ) { - return _xmlName; + // -- _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); - /** - * 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; + // -- 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 index e85beb4..3346ab2 100644 --- a/src/jalview/schemabinding/version2/descriptors/UserColourSchemeDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/UserColourSchemeDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.UserColourScheme; @@ -29,134 +28,132 @@ import jalview.schemabinding.version2.UserColourScheme; * * @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; - } +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 index 4013583..b10fe54 100644 --- a/src/jalview/schemabinding/version2/descriptors/UserColoursDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/UserColoursDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.UserColours; @@ -29,215 +28,230 @@ import jalview.schemabinding.version2.UserColours; * * @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); - } +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; - //-----------/ - //- Methods -/ - //-----------/ + /** + * 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()); + } + } - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode( - ) { + public java.lang.Object newInstance(java.lang.Object parent) + { return null; - } + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); - /** - * Method getIdentity. - * - * @return the identity field, null if this class has no - * identity. - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity( - ) { - return super.getIdentity(); + // -- validation code for: _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 - /** - * Method getJavaClass. - * - * @return the Java class represented by this descriptor. - */ - public java.lang.Class getJavaClass( - ) { - return jalview.schemabinding.version2.UserColours.class; - } + // -- _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(); + } - /** - * Method getNameSpacePrefix. - * - * @return the namespace prefix to use when marshaling as XML. - */ - public java.lang.String getNameSpacePrefix( - ) { - return _nsPrefix; - } + 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()); + } + } - /** - * Method getNameSpaceURI. - * - * @return the namespace URI used when marshaling and - * unmarshaling as XML. - */ - public java.lang.String getNameSpaceURI( - ) { - return _nsURI; - } + 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); - /** - * Method getValidator. - * - * @return a specific validator for the class described by this - * ClassDescriptor. - */ - public org.exolab.castor.xml.TypeValidator getValidator( - ) { - return this; + // -- validation code for: _userColourScheme + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { // -- local scope } + desc.setValidator(fieldValidator); + } - /** - * Method getXMLName. - * - * @return the XML Name for the Class being described. - */ - public java.lang.String getXMLName( - ) { - return _xmlName; - } + // -----------/ + // - Methods -/ + // -----------/ - /** - * 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; - } + /** + * 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 index 417ab89..3b2bb50 100644 --- a/src/jalview/schemabinding/version2/descriptors/VAMSASDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/VAMSASDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.VAMSAS; @@ -29,232 +28,257 @@ import jalview.schemabinding.version2.VAMSAS; * * @version $Revision$ $Date$ */ -public class VAMSASDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { +public class VAMSASDescriptor extends + org.exolab.castor.xml.util.XMLClassDescriptorImpl +{ + + // --------------------------/ + // - Class/Member Variables -/ + // --------------------------/ + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; - /** - * Field _elementDefinition. - */ - private boolean _elementDefinition; + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; - /** - * Field _nsPrefix. - */ - private java.lang.String _nsPrefix; + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; - /** - * Field _nsURI. - */ - private java.lang.String _nsURI; + // ----------------/ + // - Constructors -/ + // ----------------/ - /** - * Field _xmlName. - */ - private java.lang.String _xmlName; + 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 - //----------------/ - //- Constructors -/ - //----------------/ + // -- initialize element descriptors - 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"); + // -- _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()); } - 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 + } + + 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()); } - desc.setValidator(fieldValidator); + } + + 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()); + } + } - //-----------/ - //- Methods -/ - //-----------/ + 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()); + } + } - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode( - ) { - return null; - } + 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); - /** - * Method getIdentity. - * - * @return the identity field, null if this class has no - * identity. - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity( - ) { - return super.getIdentity(); + // -- validation code for: _sequenceSetList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { // -- local scope } + desc.setValidator(fieldValidator); + } - /** - * Method getJavaClass. - * - * @return the Java class represented by this descriptor. - */ - public java.lang.Class getJavaClass( - ) { - return jalview.schemabinding.version2.VAMSAS.class; - } + // -----------/ + // - Methods -/ + // -----------/ - /** - * Method getNameSpacePrefix. - * - * @return the namespace prefix to use when marshaling as XML. - */ - public java.lang.String getNameSpacePrefix( - ) { - return _nsPrefix; - } + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } - /** - * Method getNameSpaceURI. - * - * @return the namespace URI used when marshaling and - * unmarshaling as XML. - */ - public java.lang.String getNameSpaceURI( - ) { - return _nsURI; - } + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + return super.getIdentity(); + } - /** - * Method getValidator. - * - * @return a specific validator for the class described by this - * ClassDescriptor. - */ - public org.exolab.castor.xml.TypeValidator getValidator( - ) { - return this; - } + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass() + { + return jalview.schemabinding.version2.VAMSAS.class; + } - /** - * Method getXMLName. - * - * @return the XML Name for the Class being described. - */ - public java.lang.String getXMLName( - ) { - return _xmlName; - } + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix() + { + return _nsPrefix; + } - /** - * 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; - } + /** + * 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 index 830ea8e..54f4783 100644 --- a/src/jalview/schemabinding/version2/descriptors/VamsasModelDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/VamsasModelDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.VamsasModel; @@ -29,134 +28,131 @@ import jalview.schemabinding.version2.VamsasModel; * * @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; - } +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 index 7c7bc04..b5f8890 100644 --- a/src/jalview/schemabinding/version2/descriptors/ViewportDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/ViewportDescriptor.java @@ -1,25 +1,24 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemabinding.version2.descriptors; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.Viewport; @@ -29,1941 +28,2492 @@ import jalview.schemabinding.version2.Viewport; * * @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); - //-- _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); - //-- _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); - //-- _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); - //-- _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); - //-- _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); - //-- 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); +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); + // -- _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); + // -- _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); + // -- _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); + // -- _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(); + } - //-----------/ - //- Methods -/ - //-----------/ + 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()); + } + } - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode( - ) { + public java.lang.Object newInstance(java.lang.Object parent) + { return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + // -- 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()); + } - /** - * Method getIdentity. - * - * @return the identity field, null if this class has no - * identity. - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity( - ) { - return super.getIdentity(); + 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()); + } - /** - * Method getJavaClass. - * - * @return the Java class represented by this descriptor. - */ - public java.lang.Class getJavaClass( - ) { - return jalview.schemabinding.version2.Viewport.class; + 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); + // -- _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); - /** - * Method getNameSpacePrefix. - * - * @return the namespace prefix to use when marshaling as XML. - */ - public java.lang.String getNameSpacePrefix( - ) { - return _nsPrefix; + // -- 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()); + } + } - /** - * Method getNameSpaceURI. - * - * @return the namespace URI used when marshaling and - * unmarshaling as XML. - */ - public java.lang.String getNameSpaceURI( - ) { - return _nsURI; + 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()); + } + } - /** - * Method getValidator. - * - * @return a specific validator for the class described by this - * ClassDescriptor. - */ - public org.exolab.castor.xml.TypeValidator getValidator( - ) { - return this; + 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()); + } + } - /** - * Method getXMLName. - * - * @return the XML Name for the Class being described. - */ - public java.lang.String getXMLName( - ) { - return _xmlName; + public java.lang.Object newInstance(java.lang.Object parent) + { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + // -- validation code for: _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()); + } - /** - * Method isElementDefinition. - * - * @return true if XML schema definition of this Class is that - * of a global - * element or element with anonymous type definition. - */ - public boolean isElementDefinition( - ) { - return _elementDefinition; + public void setValue(java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try + { + 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); + // -- 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); + } + + // -----------/ + // - 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/schemes/AnnotationColourGradient.java b/src/jalview/schemes/AnnotationColourGradient.java index 860ea7c..56a237b 100755 --- a/src/jalview/schemes/AnnotationColourGradient.java +++ b/src/jalview/schemes/AnnotationColourGradient.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemes; @@ -134,7 +133,7 @@ public class AnnotationColourGradient extends ResidueColourScheme * DOCUMENT ME! * * @param n - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ @@ -147,9 +146,9 @@ public class AnnotationColourGradient extends ResidueColourScheme * DOCUMENT ME! * * @param n - * DOCUMENT ME! + * DOCUMENT ME! * @param j - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ diff --git a/src/jalview/schemes/Blosum62ColourScheme.java b/src/jalview/schemes/Blosum62ColourScheme.java index 898b674..12af6d5 100755 --- a/src/jalview/schemes/Blosum62ColourScheme.java +++ b/src/jalview/schemes/Blosum62ColourScheme.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemes; diff --git a/src/jalview/schemes/BuriedColourScheme.java b/src/jalview/schemes/BuriedColourScheme.java index 201c437..2e9a265 100755 --- a/src/jalview/schemes/BuriedColourScheme.java +++ b/src/jalview/schemes/BuriedColourScheme.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemes; @@ -41,7 +40,7 @@ public class BuriedColourScheme extends ScoreColourScheme * DOCUMENT ME! * * @param c - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ diff --git a/src/jalview/schemes/ClustalxColourScheme.java b/src/jalview/schemes/ClustalxColourScheme.java index 2c3f2c0..c556bb2 100755 --- a/src/jalview/schemes/ClustalxColourScheme.java +++ b/src/jalview/schemes/ClustalxColourScheme.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemes; @@ -25,7 +24,7 @@ import java.awt.*; import jalview.datamodel.*; public class ClustalxColourScheme extends ResidueColourScheme // implements - // IParameterizable +// IParameterizable { public static Hashtable colhash = new Hashtable(); @@ -67,8 +66,8 @@ public class ClustalxColourScheme extends ResidueColourScheme // implements { cons2 = new int[maxWidth][24]; includeGaps = isIncludeGaps(); // does nothing - TODO replace with call to - // get the current setting of the - // includeGaps param. + // get the current setting of the + // includeGaps param. int start = 0; // Initialize the array @@ -312,7 +311,7 @@ public class ClustalxColourScheme extends ResidueColourScheme // implements /** * @param includeGaps - * the includeGaps to set + * the includeGaps to set */ protected void setIncludeGaps(boolean includeGaps) { diff --git a/src/jalview/schemes/ColourSchemeI.java b/src/jalview/schemes/ColourSchemeI.java index f48f679..05fbe75 100755 --- a/src/jalview/schemes/ColourSchemeI.java +++ b/src/jalview/schemes/ColourSchemeI.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemes; diff --git a/src/jalview/schemes/ColourSchemeProperty.java b/src/jalview/schemes/ColourSchemeProperty.java index 3333a82..69d4647 100755 --- a/src/jalview/schemes/ColourSchemeProperty.java +++ b/src/jalview/schemes/ColourSchemeProperty.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemes; diff --git a/src/jalview/schemes/Consensus.java b/src/jalview/schemes/Consensus.java index af2be8d..4f315b9 100755 --- a/src/jalview/schemes/Consensus.java +++ b/src/jalview/schemes/Consensus.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemes; diff --git a/src/jalview/schemes/GraduatedColor.java b/src/jalview/schemes/GraduatedColor.java index de8fd10..8ab60b8 100644 --- a/src/jalview/schemes/GraduatedColor.java +++ b/src/jalview/schemes/GraduatedColor.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemes; @@ -23,53 +22,69 @@ import jalview.datamodel.SequenceFeature; import java.awt.Color; /** - * Value and/or thresholded colour scale used for colouring by annotation and feature score + * Value and/or thresholded colour scale used for colouring by annotation and + * feature score + * * @author JimP - * + * */ public class GraduatedColor { - int thresholdState = AnnotationColourGradient.NO_THRESHOLD; // or ABOVE_THRESHOLD or BELOW_THRESHOLD - float lr,lg,lb,dr,dg,db; + int thresholdState = AnnotationColourGradient.NO_THRESHOLD; // or + // ABOVE_THRESHOLD + // or + // BELOW_THRESHOLD + + float lr, lg, lb, dr, dg, db; + /** - * linear scaling parameters, base, minimum colour threshold, range of linear scale from lower to upper + * linear scaling parameters, base, minimum colour threshold, range of linear + * scale from lower to upper */ - float base,range,thrsh; + float base, range, thrsh; + /** * when true, colour from u to u-d rather than u to u+d */ - boolean tolow=false; + boolean tolow = false; + /** - * when false, min/max range has been manually set so should not be dynamically adjusted. + * when false, min/max range has been manually set so should not be + * dynamically adjusted. */ boolean autoScale = true; + /** * construct a graduatedColor object from simple parameters + * * @param low * @param high * @param min * @param max - * color low->high from min->max + * color low->high from min->max */ - public GraduatedColor(Color low,Color high, float min,float max) + public GraduatedColor(Color low, Color high, float min, float max) { thrsh = Float.NaN; - tolow = min>=max; - lr = low.getRed()/255f; - lg = low.getGreen()/255f; - lb = low.getBlue()/255f; - dr = (high.getRed()/255f)-lr; - dg = (high.getGreen()/255f)-lg; - db = (high.getBlue()/255f)-lb; + tolow = min >= max; + lr = low.getRed() / 255f; + lg = low.getGreen() / 255f; + lb = low.getBlue() / 255f; + dr = (high.getRed() / 255f) - lr; + dg = (high.getGreen() / 255f) - lg; + db = (high.getBlue() / 255f) - lb; if (tolow) { base = max; - range = min-max; - } else { + range = min - max; + } + else + { base = min; - range = max-min; + range = max - min; } } + public GraduatedColor(GraduatedColor oldcs) { lr = oldcs.lr; @@ -84,10 +99,12 @@ public class GraduatedColor thresholdState = oldcs.thresholdState; thrsh = oldcs.thrsh; autoScale = oldcs.autoScale; - colourByLabel = oldcs.colourByLabel; + colourByLabel = oldcs.colourByLabel; } + /** * make a new gradient from an old one with a different scale range + * * @param oldcs * @param min * @param max @@ -97,14 +114,17 @@ public class GraduatedColor this(oldcs); updateBounds(min, max); } + public Color getMinColor() { - return new Color(lr,lg,lb); + return new Color(lr, lg, lb); } + public Color getMaxColor() { - return new Color(lr+dr,lg+dg,lb+db); + return new Color(lr + dr, lg + dg, lb + db); } + /** * * @return true if original min/max scale was from high to low @@ -113,39 +133,46 @@ public class GraduatedColor { return tolow; } + public void setTolow(boolean tolower) { tolow = tolower; } + public boolean isColored(SequenceFeature feature) { float val = feature.getScore(); - if (val==Float.NaN) + if (val == Float.NaN) { return true; } - if (this.thresholdState==AnnotationColourGradient.NO_THRESHOLD) + if (this.thresholdState == AnnotationColourGradient.NO_THRESHOLD) { return true; } - if (this.thrsh==Float.NaN) + if (this.thrsh == Float.NaN) { return true; } - boolean rtn = thresholdState==AnnotationColourGradient.ABOVE_THRESHOLD; - if (val<=thrsh) + boolean rtn = thresholdState == AnnotationColourGradient.ABOVE_THRESHOLD; + if (val <= thrsh) + { + return !rtn; // ? !tolow : tolow; + } + else { - return !rtn; // ? !tolow : tolow; - } else { - return rtn; // ? tolow : !tolow; + return rtn; // ? tolow : !tolow; } } + /** - * default implementor of a getColourFromString method. - * TODO: abstract an interface enabling pluggable colour from string + * default implementor of a getColourFromString method. TODO: abstract an + * interface enabling pluggable colour from string */ private UserColourScheme ucs = null; - private boolean colourByLabel=false; + + private boolean colourByLabel = false; + /** * * @return true if colourByLabel style is set @@ -154,86 +181,115 @@ public class GraduatedColor { return colourByLabel; } + /** - * @param colourByLabel the colourByLabel to set + * @param colourByLabel + * the colourByLabel to set */ public void setColourByLabel(boolean colourByLabel) { this.colourByLabel = colourByLabel; } + public Color findColor(SequenceFeature feature) { if (colourByLabel) { - //TODO: allow user defined feature label colourschemes. Colour space is {type,regex,%anytype%}x{description string, regex, keyword} - if (ucs==null) + // TODO: allow user defined feature label colourschemes. Colour space is + // {type,regex,%anytype%}x{description string, regex, keyword} + if (ucs == null) { ucs = new UserColourScheme(); } return ucs.createColourFromName(feature.getDescription()); } - if (range==0.0) + if (range == 0.0) { return getMaxColor(); } float scr = feature.getScore(); - if (scr==Float.NaN) + if (scr == Float.NaN) { return getMinColor(); } - float scl = (scr-base)/range; - if (tolow) { scl = -scl; } - if (scl<0f) { scl = 0f; } - if (scl>1f) { scl = 1f; } - return new Color(lr+scl*dr,lg+scl*dg,lb+scl*db); + float scl = (scr - base) / range; + if (tolow) + { + scl = -scl; + } + if (scl < 0f) + { + scl = 0f; + } + if (scl > 1f) + { + scl = 1f; + } + return new Color(lr + scl * dr, lg + scl * dg, lb + scl * db); } + public void setThresh(float value) { thrsh = value; } - public float getThresh() { + + public float getThresh() + { return thrsh; } + public void setThreshType(int aboveThreshold) { thresholdState = aboveThreshold; } + public int getThreshType() { return thresholdState; } + public float getMax() { // regenerate the original values passed in to the constructor return (tolow) ? base : (base + range); } + public float getMin() { // regenerate the original value passed in to the constructor - return (tolow) ? (base+range) : base; + return (tolow) ? (base + range) : base; } + public boolean isAutoScale() { return autoScale; } - public void setAutoScaled(boolean autoscale) { + + public void setAutoScaled(boolean autoscale) + { autoScale = autoscale; } + /** - * update the base and range appropriatly for the given minmax range - * @param a float[] {min,max} array containing minmax range for the associated score values + * update the base and range appropriatly for the given minmax range + * + * @param a + * float[] {min,max} array containing minmax range for the associated + * score values */ - public void updateBounds(float min,float max) + public void updateBounds(float min, float max) { - if (max. */ package jalview.schemes; diff --git a/src/jalview/schemes/HydrophobicColourScheme.java b/src/jalview/schemes/HydrophobicColourScheme.java index 0539f51..e3a8e76 100755 --- a/src/jalview/schemes/HydrophobicColourScheme.java +++ b/src/jalview/schemes/HydrophobicColourScheme.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemes; @@ -41,7 +40,7 @@ public class HydrophobicColourScheme extends ScoreColourScheme * DOCUMENT ME! * * @param c - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ diff --git a/src/jalview/schemes/NucleotideColourScheme.java b/src/jalview/schemes/NucleotideColourScheme.java index 7906ed1..c520107 100755 --- a/src/jalview/schemes/NucleotideColourScheme.java +++ b/src/jalview/schemes/NucleotideColourScheme.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemes; @@ -40,7 +39,7 @@ public class NucleotideColourScheme extends ResidueColourScheme * DOCUMENT ME! * * @param n - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ @@ -54,9 +53,9 @@ public class NucleotideColourScheme extends ResidueColourScheme * DOCUMENT ME! * * @param n - * DOCUMENT ME! + * DOCUMENT ME! * @param j - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ diff --git a/src/jalview/schemes/PIDColourScheme.java b/src/jalview/schemes/PIDColourScheme.java index ae148a6..33a2b0a 100755 --- a/src/jalview/schemes/PIDColourScheme.java +++ b/src/jalview/schemes/PIDColourScheme.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemes; diff --git a/src/jalview/schemes/ResidueColourScheme.java b/src/jalview/schemes/ResidueColourScheme.java index 0577656..90c52e2 100755 --- a/src/jalview/schemes/ResidueColourScheme.java +++ b/src/jalview/schemes/ResidueColourScheme.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemes; @@ -35,7 +34,7 @@ public class ResidueColourScheme implements ColourSchemeI boolean conservationColouring = false; - Color[] colors=null; + Color[] colors = null; int threshold = 0; @@ -57,9 +56,9 @@ public class ResidueColourScheme implements ColourSchemeI * Creates a new ResidueColourScheme object. * * @param colors - * DOCUMENT ME! + * DOCUMENT ME! * @param threshold - * DOCUMENT ME! + * DOCUMENT ME! */ public ResidueColourScheme(Color[] colours, int threshold) { @@ -79,7 +78,8 @@ public class ResidueColourScheme implements ColourSchemeI */ public Color findColour(char c) { - return colors==null ? Color.white : colors[ResidueProperties.aaIndex[c]]; + return colors == null ? Color.white + : colors[ResidueProperties.aaIndex[c]]; } public Color findColour(char c, int j) @@ -117,7 +117,7 @@ public class ResidueColourScheme implements ColourSchemeI * DOCUMENT ME! * * @param ct - * DOCUMENT ME! + * DOCUMENT ME! */ public void setThreshold(int ct, boolean ignoreGaps) { @@ -136,9 +136,9 @@ public class ResidueColourScheme implements ColourSchemeI * DOCUMENT ME! * * @param s - * DOCUMENT ME! + * DOCUMENT ME! * @param j - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ @@ -187,7 +187,7 @@ public class ResidueColourScheme implements ColourSchemeI * DOCUMENT ME! * * @param consensus - * DOCUMENT ME! + * DOCUMENT ME! */ public void setConsensus(Hashtable[] consensus) { @@ -224,9 +224,9 @@ public class ResidueColourScheme implements ColourSchemeI * DOCUMENT ME! * * @param s - * DOCUMENT ME! + * DOCUMENT ME! * @param i - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ diff --git a/src/jalview/schemes/ResidueProperties.java b/src/jalview/schemes/ResidueProperties.java index 48a9272..2488d77 100755 --- a/src/jalview/schemes/ResidueProperties.java +++ b/src/jalview/schemes/ResidueProperties.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemes; @@ -93,7 +92,7 @@ public class ResidueProperties aaIndex['z'] = 21; aaIndex['x'] = 22; aaIndex['u'] = 22; // TODO: selenocystine triplet and codons needed. also - // extend subt. matrices + // extend subt. matrices } static @@ -281,12 +280,12 @@ public class ResidueProperties new Color(235, 65, 60), // G new Color(60, 136, 238), // T new Color(60, 136, 238), // U - Color.white, // I - Color.white, // X - Color.white, // R - Color.white, // Y - Color.white, // N - Color.white, // Gap + Color.white, // I + Color.white, // X + Color.white, // R + Color.white, // Y + Color.white, // N + Color.white, // Gap }; // Zappo @@ -496,7 +495,7 @@ public class ResidueProperties -8, -8, -8, -8, -8, -8, 1 }, }; public static final Hashtable ssHash = new Hashtable(); // stores the number - // value of the aa + // value of the aa static { @@ -510,27 +509,24 @@ public class ResidueProperties ssHash.put("I", Color.pink); ssHash.put("B", Color.yellow); } -/* new Color(60, 136, 238), // U - Color.white, // I - Color.white, // X - Color.white, // R - Color.white, // Y - Color.white, // N - Color.white, // Gap -*/ + + /* + * new Color(60, 136, 238), // U Color.white, // I Color.white, // X + * Color.white, // R Color.white, // Y Color.white, // N Color.white, // Gap + */ static final int[][] DNA = { - { 10, -8, -8, -8, 1, 0 ,0 ,0 ,0 ,0 ,1 }, // C - { -8, 10, -8, -8, 1, 0 ,0 ,0 ,0 ,0 ,1 }, // T - { -8, -8, 10, -8, 1, 0 ,0 ,0 ,0 ,0 ,1 }, // A - { -8, -8, -8, 10, 1, 0 ,0 ,0 ,0 ,0 ,1 }, // G - { 1, 1, 1, 1, 10,0 ,0 ,0 ,0 ,0 ,1 }, // - - { 1, 1, 1, 1, 1 ,10 ,0 ,0 ,0 ,0 ,1 }, // - - { 1, 1, 1, 1, 1 ,0 ,10 ,0 ,0 ,0 ,1 }, // - - { 1, 1, 1, 1, 1 ,0 ,0 ,10 ,0 ,0 ,1 }, // - - { 1, 1, 1, 1, 1 ,0 ,0 ,0 ,10 ,0 ,1 }, // - - { 1, 1, 1, 1, 1 ,0 ,0 ,0 ,0 ,10 ,1 }, // - - { 1, 1, 1, 1, 1 ,1 ,1 ,1 ,1 ,1 ,1 }, // - + { 10, -8, -8, -8, 1, 0, 0, 0, 0, 0, 1 }, // C + { -8, 10, -8, -8, 1, 0, 0, 0, 0, 0, 1 }, // T + { -8, -8, 10, -8, 1, 0, 0, 0, 0, 0, 1 }, // A + { -8, -8, -8, 10, 1, 0, 0, 0, 0, 0, 1 }, // G + { 1, 1, 1, 1, 10, 0, 0, 0, 0, 0, 1 }, // - + { 1, 1, 1, 1, 1, 10, 0, 0, 0, 0, 1 }, // - + { 1, 1, 1, 1, 1, 0, 10, 0, 0, 0, 1 }, // - + { 1, 1, 1, 1, 1, 0, 0, 10, 0, 0, 1 }, // - + { 1, 1, 1, 1, 1, 0, 0, 0, 10, 0, 1 }, // - + { 1, 1, 1, 1, 1, 0, 0, 0, 0, 10, 1 }, // - + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, // - }; /** * register matrices in list @@ -964,7 +960,9 @@ public class ResidueProperties charged.put("E", new Integer(1)); charged.put("Q", new Integer(0)); charged.put("D", new Integer(1)); - charged.put("N", new Integer(0)); // Asparagine is polar but not charged. Alternative would be charged and negative (in basic form)? + charged.put("N", new Integer(0)); // Asparagine is polar but not charged. + // Alternative would be charged and + // negative (in basic form)? charged.put("S", new Integer(0)); charged.put("T", new Integer(0)); charged.put("P", new Integer(0)); @@ -1159,9 +1157,9 @@ public class ResidueProperties public static String codonTranslate(String lccodon) { - String codon=lccodon.toUpperCase(); + String codon = lccodon.toUpperCase(); // all base ambiguity codes yield an 'X' amino acid residue - if (codon.indexOf('X')>-1 || codon.indexOf('N')>-1) + if (codon.indexOf('X') > -1 || codon.indexOf('N') > -1) { return "X"; } diff --git a/src/jalview/schemes/ScoreColourScheme.java b/src/jalview/schemes/ScoreColourScheme.java index 9514ac5..b942d10 100755 --- a/src/jalview/schemes/ScoreColourScheme.java +++ b/src/jalview/schemes/ScoreColourScheme.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemes; @@ -41,11 +40,11 @@ public class ScoreColourScheme extends ResidueColourScheme * Creates a new ScoreColourScheme object. * * @param scores - * DOCUMENT ME! + * DOCUMENT ME! * @param min - * DOCUMENT ME! + * DOCUMENT ME! * @param max - * DOCUMENT ME! + * DOCUMENT ME! */ public ScoreColourScheme(double[] scores, double min, double max) { @@ -80,9 +79,9 @@ public class ScoreColourScheme extends ResidueColourScheme * DOCUMENT ME! * * @param s - * DOCUMENT ME! + * DOCUMENT ME! * @param j - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ @@ -115,7 +114,7 @@ public class ScoreColourScheme extends ResidueColourScheme * DOCUMENT ME! * * @param c - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ diff --git a/src/jalview/schemes/ScoreMatrix.java b/src/jalview/schemes/ScoreMatrix.java index 345e206..0bc8eca 100644 --- a/src/jalview/schemes/ScoreMatrix.java +++ b/src/jalview/schemes/ScoreMatrix.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemes; diff --git a/src/jalview/schemes/StrandColourScheme.java b/src/jalview/schemes/StrandColourScheme.java index 04c7d16..d2b57eb 100755 --- a/src/jalview/schemes/StrandColourScheme.java +++ b/src/jalview/schemes/StrandColourScheme.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemes; @@ -41,7 +40,7 @@ public class StrandColourScheme extends ScoreColourScheme * DOCUMENT ME! * * @param c - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ diff --git a/src/jalview/schemes/TaylorColourScheme.java b/src/jalview/schemes/TaylorColourScheme.java index d03c04d..2c22ec8 100755 --- a/src/jalview/schemes/TaylorColourScheme.java +++ b/src/jalview/schemes/TaylorColourScheme.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemes; diff --git a/src/jalview/schemes/TurnColourScheme.java b/src/jalview/schemes/TurnColourScheme.java index 0dafddc..ed56018 100755 --- a/src/jalview/schemes/TurnColourScheme.java +++ b/src/jalview/schemes/TurnColourScheme.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemes; @@ -41,7 +40,7 @@ public class TurnColourScheme extends ScoreColourScheme * DOCUMENT ME! * * @param c - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ diff --git a/src/jalview/schemes/UserColourScheme.java b/src/jalview/schemes/UserColourScheme.java index 9a781cb..a615341 100755 --- a/src/jalview/schemes/UserColourScheme.java +++ b/src/jalview/schemes/UserColourScheme.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemes; diff --git a/src/jalview/schemes/ZappoColourScheme.java b/src/jalview/schemes/ZappoColourScheme.java index 204228d..f6246d5 100755 --- a/src/jalview/schemes/ZappoColourScheme.java +++ b/src/jalview/schemes/ZappoColourScheme.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemes; diff --git a/src/jalview/structure/SelectionListener.java b/src/jalview/structure/SelectionListener.java index 696d860..32ad054 100644 --- a/src/jalview/structure/SelectionListener.java +++ b/src/jalview/structure/SelectionListener.java @@ -1,34 +1,39 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.structure; - /** - * Implemented by objects listening for selection events on SelectionSources + * Implemented by objects listening for selection events on SelectionSources */ public interface SelectionListener { /** - * method called by the event broadcaster (see jalview.structure.StructureSelectionManager) to pass on a selection event to listeners - * @param seqsel - group of selected sequences - * @param colsel - specific columns in selection - * @param source - source of the selection event + * method called by the event broadcaster (see + * jalview.structure.StructureSelectionManager) to pass on a selection event + * to listeners + * + * @param seqsel + * - group of selected sequences + * @param colsel + * - specific columns in selection + * @param source + * - source of the selection event */ - public void selection(jalview.datamodel.SequenceGroup seqsel, jalview.datamodel.ColumnSelection colsel, SelectionSource source); + public void selection(jalview.datamodel.SequenceGroup seqsel, + jalview.datamodel.ColumnSelection colsel, SelectionSource source); } diff --git a/src/jalview/structure/SelectionSource.java b/src/jalview/structure/SelectionSource.java index 25ffa73..37bfe6b 100644 --- a/src/jalview/structure/SelectionSource.java +++ b/src/jalview/structure/SelectionSource.java @@ -1,28 +1,26 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.structure; /** - * an object that can generate selection events - * This is purely a tag for the moment, but there may be - * more interrogative methods in future. - * + * an object that can generate selection events This is purely a tag for the + * moment, but there may be more interrogative methods in future. + * */ public interface SelectionSource { diff --git a/src/jalview/structure/SequenceListener.java b/src/jalview/structure/SequenceListener.java index bf6ceb9..d69e852 100644 --- a/src/jalview/structure/SequenceListener.java +++ b/src/jalview/structure/SequenceListener.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.structure; diff --git a/src/jalview/structure/StructureListener.java b/src/jalview/structure/StructureListener.java index 7468d0a..940a782 100644 --- a/src/jalview/structure/StructureListener.java +++ b/src/jalview/structure/StructureListener.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.structure; diff --git a/src/jalview/structure/StructureMapping.java b/src/jalview/structure/StructureMapping.java index 20c491c..7b32198 100644 --- a/src/jalview/structure/StructureMapping.java +++ b/src/jalview/structure/StructureMapping.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.structure; diff --git a/src/jalview/structure/StructureSelectionManager.java b/src/jalview/structure/StructureSelectionManager.java index 47973d0..478706a 100644 --- a/src/jalview/structure/StructureSelectionManager.java +++ b/src/jalview/structure/StructureSelectionManager.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.structure; @@ -310,13 +309,12 @@ public class StructureSelectionManager * highlight regions associated with a position (indexpos) in seq * * @param seq - * the sequeence that the mouse over occured on + * the sequeence that the mouse over occured on * @param indexpos - * the absolute position being mouseovered in seq (0 to - * seq.length()) + * the absolute position being mouseovered in seq (0 to seq.length()) * @param index - * the sequence position (if -1, seq.findPosition is called to - * resolve the residue number) + * the sequence position (if -1, seq.findPosition is called to + * resolve the residue number) */ public void mouseOverSequence(SequenceI seq, int indexpos, int index) { @@ -418,7 +416,7 @@ public class StructureSelectionManager * * @param sequenceI * @param position - * in an alignment sequence + * in an alignment sequence */ public void mouseOverVamsasSequence(SequenceI sequenceI, int position) { @@ -447,9 +445,10 @@ public class StructureSelectionManager * * for (int j = 0; j < mappings.length; j++) { * - * if (mappings[j].sequence == seq && mappings[j].getPdbId().equals(pdbid) && - * mappings[j].pdbfile.equals(sl.getPdbFile())) { System.out.println(pdbid+" - * "+mappings[j].getPdbId() +" "+mappings[j].pdbfile); + * if (mappings[j].sequence == seq && mappings[j].getPdbId().equals(pdbid) + * && mappings[j].pdbfile.equals(sl.getPdbFile())) { + * System.out.println(pdbid+" "+mappings[j].getPdbId() +" + * "+mappings[j].pdbfile); * * java.awt.Color col; for(int index=0; index0) + if (sel_listeners != null && sel_listeners.size() > 0) { Enumeration listeners = sel_listeners.elements(); while (listeners.hasMoreElements()) { - SelectionListener slis = ((SelectionListener) listeners.nextElement()); - if (slis!=source) { - slis.selection(selection, colsel, source); - }; + SelectionListener slis = ((SelectionListener) listeners + .nextElement()); + if (slis != source) + { + slis.selection(selection, colsel, source); + } + ; } } } diff --git a/src/jalview/structure/VamsasListener.java b/src/jalview/structure/VamsasListener.java index 6f0110f..4161676 100644 --- a/src/jalview/structure/VamsasListener.java +++ b/src/jalview/structure/VamsasListener.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.structure; diff --git a/src/jalview/util/AWTConsole.java b/src/jalview/util/AWTConsole.java new file mode 100644 index 0000000..d26ea66 --- /dev/null +++ b/src/jalview/util/AWTConsole.java @@ -0,0 +1,249 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle + * + * 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 . + */ +package jalview.util; + +// +// A simple Java Console for your application (Swing version) +// Requires Java 1.1.5 or higher +// +// Disclaimer the use of this source is at your own risk. +// +// Permision to use and distribute into your own applications +// +// RJHM van den Bergh , rvdb@comweb.nl + +import java.io.*; +import java.awt.*; +import java.awt.event.*; + +public class AWTConsole extends WindowAdapter implements WindowListener, + ActionListener, Runnable +{ + private Frame frame; + + private TextArea textArea; + + private Thread reader; + + private Thread reader2; + + private boolean quit; + + private final PipedInputStream pin = new PipedInputStream(); + + private final PipedInputStream pin2 = new PipedInputStream(); + + Thread errorThrower; // just for testing (Throws an Exception at this Console + + public AWTConsole() + { + // create all components and add them + frame = new Frame("Java Console"); + Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); + Dimension frameSize = new Dimension((int) (screenSize.width / 2), + (int) (screenSize.height / 2)); + int x = (int) (frameSize.width / 2); + int y = (int) (frameSize.height / 2); + frame.setBounds(x, y, frameSize.width, frameSize.height); + + textArea = new TextArea(); + textArea.setEditable(false); + Button button = new Button("clear"); + + Panel panel = new Panel(); + panel.setLayout(new BorderLayout()); + panel.add(textArea, BorderLayout.CENTER); + panel.add(button, BorderLayout.SOUTH); + frame.add(panel); + + frame.setVisible(true); + + frame.addWindowListener(this); + button.addActionListener(this); + + try + { + PipedOutputStream pout = new PipedOutputStream(this.pin); + System.setOut(new PrintStream(pout, true)); + } catch (java.io.IOException io) + { + textArea.append("Couldn't redirect STDOUT to this console\n" + + io.getMessage()); + } catch (SecurityException se) + { + textArea.append("Couldn't redirect STDOUT to this console\n" + + se.getMessage()); + } + + try + { + PipedOutputStream pout2 = new PipedOutputStream(this.pin2); + System.setErr(new PrintStream(pout2, true)); + } catch (java.io.IOException io) + { + textArea.append("Couldn't redirect STDERR to this console\n" + + io.getMessage()); + } catch (SecurityException se) + { + textArea.append("Couldn't redirect STDERR to this console\n" + + se.getMessage()); + } + + quit = false; // signals the Threads that they should exit + + // Starting two seperate threads to read from the PipedInputStreams + // + reader = new Thread(this); + reader.setDaemon(true); + reader.start(); + // + reader2 = new Thread(this); + reader2.setDaemon(true); + reader2.start(); + + // testing part + // you may omit this part for your application + // + System.out.println("Hello World 2"); + System.out.println("All fonts available to Graphic2D:\n"); + GraphicsEnvironment ge = GraphicsEnvironment + .getLocalGraphicsEnvironment(); + String[] fontNames = ge.getAvailableFontFamilyNames(); + for (int n = 0; n < fontNames.length; n++) + System.out.println(fontNames[n]); + // Testing part: simple an error thrown anywhere in this JVM will be printed + // on the Console + // We do it with a seperate Thread becasue we don't wan't to break a Thread + // used by the Console. + System.out.println("\nLets throw an error on this console"); + errorThrower = new Thread(this); + errorThrower.setDaemon(true); + errorThrower.start(); + } + + public synchronized void windowClosed(WindowEvent evt) + { + quit = true; + this.notifyAll(); // stop all threads + try + { + reader.join(1000); + pin.close(); + } catch (Exception e) + { + } + try + { + reader2.join(1000); + pin2.close(); + } catch (Exception e) + { + } + System.exit(0); + } + + public synchronized void windowClosing(WindowEvent evt) + { + frame.setVisible(false); // default behaviour of JFrame + frame.dispose(); + } + + public synchronized void actionPerformed(ActionEvent evt) + { + textArea.setText(""); + } + + public synchronized void run() + { + try + { + while (Thread.currentThread() == reader) + { + try + { + this.wait(100); + } catch (InterruptedException ie) + { + } + if (pin.available() != 0) + { + String input = this.readLine(pin); + textArea.append(input); + } + if (quit) + return; + } + + while (Thread.currentThread() == reader2) + { + try + { + this.wait(100); + } catch (InterruptedException ie) + { + } + if (pin2.available() != 0) + { + String input = this.readLine(pin2); + textArea.append(input); + } + if (quit) + return; + } + } catch (Exception e) + { + textArea.append("\nConsole reports an Internal error."); + textArea.append("The error is: " + e); + } + + // just for testing (Throw a Nullpointer after 1 second) + if (Thread.currentThread() == errorThrower) + { + try + { + this.wait(1000); + } catch (InterruptedException ie) + { + } + throw new NullPointerException( + "Application test: throwing an NullPointerException It should arrive at the console"); + } + + } + + public synchronized String readLine(PipedInputStream in) + throws IOException + { + String input = ""; + do + { + int available = in.available(); + if (available == 0) + break; + byte b[] = new byte[available]; + in.read(b); + input = input + new String(b, 0, b.length); + } while (!input.endsWith("\n") && !input.endsWith("\r\n") && !quit); + return input; + } + + public static void main(String[] arg) + { + new AWTConsole(); // create console with not reference + } +} diff --git a/src/jalview/util/BrowserLauncher.java b/src/jalview/util/BrowserLauncher.java index 5ea4588..8a90db9 100755 --- a/src/jalview/util/BrowserLauncher.java +++ b/src/jalview/util/BrowserLauncher.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.util; @@ -89,8 +88,8 @@ public class BrowserLauncher * Caches whether any classes, methods, and fields that are not part of the * JDK and need to be dynamically loaded at runtime loaded successfully. *

    - * Note that if this is false, openURL() will - * always return an IOException. + * Note that if this is false, openURL() will always + * return an IOException. */ private static boolean loadedWithoutErrors; @@ -305,8 +304,8 @@ public class BrowserLauncher * Called by a static initializer to load any classes, fields, and methods * required at runtime to locate the user's web browser. * - * @return true if all intialization succeeded - * false if any portion of the initialization failed + * @return true if all intialization succeeded false + * if any portion of the initialization failed */ private static boolean loadClasses() { @@ -683,9 +682,9 @@ public class BrowserLauncher * Attempts to open the default web browser to the given URL. * * @param url - * The URL to open + * The URL to open * @throws IOException - * If the web browser could not be located or does not run + * If the web browser could not be located or does not run */ public static void openURL(String url) throws IOException { diff --git a/src/jalview/util/Comparison.java b/src/jalview/util/Comparison.java index 316cf5b..bb0cdf0 100755 --- a/src/jalview/util/Comparison.java +++ b/src/jalview/util/Comparison.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.util; @@ -35,9 +34,9 @@ public class Comparison * DOCUMENT ME! * * @param ii - * DOCUMENT ME! + * DOCUMENT ME! * @param jj - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ @@ -50,13 +49,13 @@ public class Comparison * this was supposed to be an ungapped pid calculation * * @param ii - * SequenceI + * SequenceI * @param jj - * SequenceI + * SequenceI * @param start - * int + * int * @param end - * int + * int * @return float */ public static float compare(SequenceI ii, SequenceI jj, int start, int end) @@ -119,9 +118,9 @@ public class Comparison * this is a gapped PID calculation * * @param s1 - * SequenceI + * SequenceI * @param s2 - * SequenceI + * SequenceI * @return float */ public final static float PID(String seq1, String seq2) @@ -186,7 +185,7 @@ public class Comparison * DOCUMENT ME! * * @param c - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ diff --git a/src/jalview/util/DBRefUtils.java b/src/jalview/util/DBRefUtils.java index 411a7b9..3c0516a 100755 --- a/src/jalview/util/DBRefUtils.java +++ b/src/jalview/util/DBRefUtils.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.util; @@ -30,9 +29,9 @@ public class DBRefUtils /** * * @param dbrefs - * Vector of DBRef objects to search + * Vector of DBRef objects to search * @param sources - * String[] array of source DBRef IDs to retrieve + * String[] array of source DBRef IDs to retrieve * @return Vector */ public static DBRefEntry[] selectRefs(DBRefEntry[] dbrefs, @@ -79,9 +78,9 @@ public class DBRefUtils * isDasCoordinateSystem * * @param string - * String + * String * @param dBRefEntry - * DBRefEntry + * DBRefEntry * @return boolean true if Source DBRefEntry is compatible with DAS * CoordinateSystem name */ @@ -152,9 +151,9 @@ public class DBRefUtils * attributes. * * @param ref - * Set of references to search + * Set of references to search * @param entry - * pattern to collect - null any entry for wildcard match + * pattern to collect - null any entry for wildcard match * @return */ public static DBRefEntry[] searchRefs(DBRefEntry[] ref, DBRefEntry entry) @@ -362,8 +361,8 @@ public class DBRefUtils { public boolean matches(DBRefEntry refa, DBRefEntry refb) { -// System.err.println("Comparing A: "+refa.getSrcAccString()+(refa.hasMap()?" has map.":".")); -// System.err.println("Comparing B: "+refb.getSrcAccString()+(refb.hasMap()?" has map.":".")); + // System.err.println("Comparing A: "+refa.getSrcAccString()+(refa.hasMap()?" has map.":".")); + // System.err.println("Comparing B: "+refb.getSrcAccString()+(refb.hasMap()?" has map.":".")); if (refa.getSource() != null && refb.getSource() != null && refb.getSource().equals(refa.getSource())) { @@ -382,9 +381,9 @@ public class DBRefUtils && (refb.getMap().getMap() == null && refa.getMap() .getMap() == null) || (refb.getMap().getMap() != null - && refa.getMap().getMap() != null && - (refb - .getMap().getMap().equals(refa.getMap().getMap())))) { // getMap().getMap().containsEither(false,refa.getMap().getMap()) + && refa.getMap().getMap() != null && (refb + .getMap().getMap().equals(refa.getMap().getMap())))) + { // getMap().getMap().containsEither(false,refa.getMap().getMap()) return true; } } @@ -401,7 +400,7 @@ public class DBRefUtils * @param version * @param acn * @param seq - * where to anotate with reference + * where to anotate with reference * @return parsed version of entry that was added to seq (if any) */ public static DBRefEntry parseToDbRef(SequenceI seq, String dbname, diff --git a/src/jalview/util/Format.java b/src/jalview/util/Format.java index 49e4027..e217704 100755 --- a/src/jalview/util/Format.java +++ b/src/jalview/util/Format.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ /** * A class for formatting numbers that follows printf conventions. @@ -56,7 +55,7 @@ public class Format * Creates a new Format object. * * @param s - * DOCUMENT ME! + * DOCUMENT ME! */ public Format(String s) { @@ -206,7 +205,7 @@ public class Format } } - /** +/** * Formats the number following printf conventions. Main limitation: Can only * handle one format parameter at a time Use multiple Format objects to format * more than one number @@ -301,11 +300,11 @@ public class Format * prints a formatted number following printf conventions * * @param s - * a PrintStream + * a PrintStream * @param fmt - * the format string + * the format string * @param x - * the double to print + * the double to print */ public static void print(java.io.PrintStream s, String fmt, double x) { @@ -316,11 +315,11 @@ public class Format * prints a formatted number following printf conventions * * @param s - * a PrintStream + * a PrintStream * @param fmt - * the format string + * the format string * @param x - * the long to print + * the long to print */ public static void print(java.io.PrintStream s, String fmt, long x) { @@ -331,11 +330,11 @@ public class Format * prints a formatted number following printf conventions * * @param s - * a PrintStream + * a PrintStream * @param fmt - * the format string + * the format string * @param x - * the character to + * the character to */ public static void print(java.io.PrintStream s, String fmt, char x) { @@ -346,9 +345,9 @@ public class Format * prints a formatted number following printf conventions * * @param s - * a PrintStream, fmt the format string + * a PrintStream, fmt the format string * @param x - * a string that represents the digits to print + * a string that represents the digits to print */ public static void print(java.io.PrintStream s, String fmt, String x) { @@ -359,7 +358,7 @@ public class Format * Converts a string of digits (decimal, octal or hex) to an integer * * @param s - * a string + * a string * @return the numeric value of the prefix of s representing a base 10 integer */ public static int atoi(String s) @@ -371,7 +370,7 @@ public class Format * Converts a string of digits (decimal, octal or hex) to a long integer * * @param s - * a string + * a string * @return the numeric value of the prefix of s representing a base 10 integer */ public static long atol(String s) @@ -405,9 +404,9 @@ public class Format * DOCUMENT ME! * * @param s - * DOCUMENT ME! + * DOCUMENT ME! * @param base - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ @@ -463,7 +462,7 @@ public class Format * Converts a string of digits to an double * * @param s - * a string + * a string */ public static double atof(String s) { @@ -537,10 +536,10 @@ public class Format * Formats a double into a string (like sprintf in C) * * @param x - * the number to format + * the number to format * @return the formatted string * @exception IllegalArgumentException - * if bad argument + * if bad argument */ public String form(double x) { @@ -579,7 +578,7 @@ public class Format * Formats a long integer into a string (like sprintf in C) * * @param x - * the number to format + * the number to format * @return the formatted string */ public String form(long x) @@ -624,7 +623,7 @@ public class Format * Formats a character into a string (like sprintf in C) * * @param x - * the value to format + * the value to format * @return the formatted string */ public String form(char c) @@ -643,7 +642,7 @@ public class Format * Formats a string into a larger string (like sprintf in C) * * @param x - * the value to format + * the value to format * @return the formatted string */ public String form(String s) @@ -665,9 +664,9 @@ public class Format * DOCUMENT ME! * * @param c - * DOCUMENT ME! + * DOCUMENT ME! * @param n - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ @@ -692,13 +691,13 @@ public class Format * DOCUMENT ME! * * @param x - * DOCUMENT ME! + * DOCUMENT ME! * @param n - * DOCUMENT ME! + * DOCUMENT ME! * @param m - * DOCUMENT ME! + * DOCUMENT ME! * @param d - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ @@ -724,7 +723,7 @@ public class Format * DOCUMENT ME! * * @param r - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ @@ -746,9 +745,9 @@ public class Format * DOCUMENT ME! * * @param s - * DOCUMENT ME! + * DOCUMENT ME! * @param r - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ @@ -807,7 +806,7 @@ public class Format * DOCUMENT ME! * * @param d - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ @@ -879,7 +878,7 @@ public class Format * DOCUMENT ME! * * @param d - * DOCUMENT ME! + * DOCUMENT ME! * * @return DOCUMENT ME! */ diff --git a/src/jalview/util/GroupUrlLink.java b/src/jalview/util/GroupUrlLink.java index 0401bb2..27b81d4 100644 --- a/src/jalview/util/GroupUrlLink.java +++ b/src/jalview/util/GroupUrlLink.java @@ -1,831 +1,854 @@ -/* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ -package jalview.util; - -import jalview.datamodel.Sequence; -import jalview.datamodel.SequenceI; - -import java.util.Hashtable; -import java.util.Vector; - -public class GroupUrlLink -{ - /** - * Helper class based on the UrlLink class which enables URLs to be - * constructed from sequences or IDs associated with a group of sequences. URL - * definitions consist of a pipe separated string containing a

    TableSorter registers itself as a listener to the - * underlying model, just as the JTable itself would. Events recieved from the - * model are examined, sometimes manipulated (typically widened), and then - * passed on to the TableSorter's listeners (typically the JTable). If a change - * to the model has invalidated the order of TableSorter's rows, a note of this - * is made and the sorter will resort the rows the next time a value is - * requested.

    When the tableHeader property is set, either by using the - * setTableHeader() method or the two argument constructor, the table header may - * be used as a complete UI for TableSorter. The default renderer of the - * tableHeader is decorated with a renderer that indicates the sorting status of - * each column. In addition, a mouse listener is installed with the following - * behavior: + * different order. + *

    + * TableSorter registers itself as a listener to the underlying model, just as + * the JTable itself would. Events recieved from the model are examined, + * sometimes manipulated (typically widened), and then passed on to the + * TableSorter's listeners (typically the JTable). If a change to the model has + * invalidated the order of TableSorter's rows, a note of this is made and the + * sorter will resort the rows the next time a value is requested. + *

    + * When the tableHeader property is set, either by using the setTableHeader() + * method or the two argument constructor, the table header may be used as a + * complete UI for TableSorter. The default renderer of the tableHeader is + * decorated with a renderer that indicates the sorting status of each column. + * In addition, a mouse listener is installed with the following behavior: *

      - *
    • Mouse-click: Clears the sorting status of all other columns and advances + *
    • Mouse-click: Clears the sorting status of all other columns and advances * the sorting status of that column through three values: {NOT_SORTED, * ASCENDING, DESCENDING} (then back to NOT_SORTED again). - *
    • SHIFT-mouse-click: Clears the sorting status of all other columns and + *
    • SHIFT-mouse-click: Clears the sorting status of all other columns and * cycles the sorting status of the column through the same three values, in the * opposite order: {NOT_SORTED, DESCENDING, ASCENDING}. - *
    • CONTROL-mouse-click and CONTROL-SHIFT-mouse-click: as above except that + *
    • CONTROL-mouse-click and CONTROL-SHIFT-mouse-click: as above except that * the changes to the column do not cancel the statuses of columns that are * already sorting - giving a way to initiate a compound sort. *
    - *

    This is a long overdue rewrite of a class of the same name that first + *

    + * This is a long overdue rewrite of a class of the same name that first * appeared in the swing table demos in 1997. * * @author Philip Milne diff --git a/src/jalview/util/UrlLink.java b/src/jalview/util/UrlLink.java index 00e33b2..c692872 100644 --- a/src/jalview/util/UrlLink.java +++ b/src/jalview/util/UrlLink.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.util; @@ -28,8 +27,8 @@ public class UrlLink * Jalview 2.4 extension allows regular expressions to be used to parse ID * strings and replace the result in the URL. Regex's operate on the whole ID * string given to the matchURL method, if no regex is supplied, then only - * text following the first pipe symbol will be susbstituted. - * Usage documentation todo. + * text following the first pipe symbol will be susbstituted. Usage + * documentation todo. */ private String url_suffix, url_prefix, target, label, regexReplace; @@ -173,7 +172,9 @@ public class UrlLink /** * Check if URL string was parsed properly. - * @return boolean - if false then getInvalidMessage returns an error message + * + * @return boolean - if false then getInvalidMessage returns an + * error message */ public boolean isValid() { @@ -184,9 +185,9 @@ public class UrlLink * return one or more URL strings by applying regex to the given idstring * * @param idstring - * @param onlyIfMatches - - * when true url strings are only made if regex is defined and - * matches + * @param onlyIfMatches + * - when true url strings are only made if regex is defined and + * matches * @return String[] { part of idstring substituted, full substituted url , .. * next part, next url..} */ @@ -208,8 +209,9 @@ public class UrlLink { rg.stringMatched(), url_prefix + rg.stringMatched() + url_suffix }; } /* - * else if (ns==1) { // take only subgroup match return new String[] { - * rg.stringMatched(1), url_prefix+rg.stringMatched(1)+url_suffix }; } + * else if (ns==1) { // take only subgroup match return new String[] + * { rg.stringMatched(1), url_prefix+rg.stringMatched(1)+url_suffix + * }; } */ else { @@ -329,13 +331,16 @@ public class UrlLink /* * "AlinkT|Target|http://foo.foo.soo/", * "myUrl1|http://$SEQUENCE_ID=/[0-9]+/=$.someserver.org/foo", - * "myUrl2|http://$SEQUENCE_ID=/(([0-9]+).+([A-Za-z]+))/=$.someserver.org/foo", - * "myUrl3|http://$SEQUENCE_ID=/([0-9]+).+([A-Za-z]+)/=$.someserver.org/foo", - * "myUrl4|target|http://$SEQUENCE_ID$.someserver.org/foo|too", - * "PF1|http://us.expasy.org/cgi-bin/niceprot.pl?$SEQUENCE_ID=/(?:PFAM:)?(.+)/=$", - * "PF2|http://us.expasy.org/cgi-bin/niceprot.pl?$SEQUENCE_ID=/(PFAM:)?(.+)/=$", - * "PF3|http://us.expasy.org/cgi-bin/niceprot.pl?$SEQUENCE_ID=/PFAM:(.+)/=$", - * "NOTFER|http://notfer.org/$SEQUENCE_ID=/(?. */ package jalview.util; @@ -22,20 +21,25 @@ import java.io.IOException; import java.util.jar.JarInputStream; /** - * input stream provider interface to be implemented - * by any non-file or URL datasources so that all Jar entries - * can be read from the datasource by repeatedly re-opening the JarInputStream. + * input stream provider interface to be implemented by any non-file or URL + * datasources so that all Jar entries can be read from the datasource by + * repeatedly re-opening the JarInputStream. * - * This is a workaround necessary because castor's unmarshaller will close the input stream after an unmarshalling session, which normally closes the whole Jar input stream, not just the current JarEntry's stream. + * This is a workaround necessary because castor's unmarshaller will close the + * input stream after an unmarshalling session, which normally closes the whole + * Jar input stream, not just the current JarEntry's stream. */ -public interface jarInputStreamProvider { +public interface jarInputStreamProvider +{ /** * @return properly initialized jar input stream */ JarInputStream getJarInputStream() throws IOException; + /** * - * @return human readable name for datasource used when reporting any problems with it + * @return human readable name for datasource used when reporting any problems + * with it */ String getFilename(); } diff --git a/src/jalview/ws/DBRefFetcher.java b/src/jalview/ws/DBRefFetcher.java index 581901a..28ae25d 100644 --- a/src/jalview/ws/DBRefFetcher.java +++ b/src/jalview/ws/DBRefFetcher.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.ws; @@ -500,31 +499,34 @@ public class DBRefFetcher implements Runnable DBRefEntry[] entryRefs = jalview.util.DBRefUtils.selectRefs(entry .getDBRef(), new String[] { dbSource }); - if (entryRefs==null) { - System.err.println("Dud dbSource string ? no entryrefs selected for "+dbSource+ " on "+entry.getName()); + if (entryRefs == null) + { + System.err + .println("Dud dbSource string ? no entryrefs selected for " + + dbSource + " on " + entry.getName()); continue; } for (int j = 0; j < entryRefs.length; j++) + { + String accessionId = entryRefs[j].getAccessionId(); // .getAccession().elementAt(j).toString(); + // match up on accessionId + if (seqRefs.containsKey(accessionId.toUpperCase())) { - String accessionId = entryRefs[j].getAccessionId(); // .getAccession().elementAt(j).toString(); - // match up on accessionId - if (seqRefs.containsKey(accessionId.toUpperCase())) + Vector seqs = (Vector) seqRefs.get(accessionId); + for (int jj = 0; jj < seqs.size(); jj++) { - Vector seqs = (Vector) seqRefs.get(accessionId); - for (int jj = 0; jj < seqs.size(); jj++) + sequence = (SequenceI) seqs.elementAt(jj); + if (!sequenceMatches.contains(sequence)) { - sequence = (SequenceI) seqs.elementAt(jj); - if (!sequenceMatches.contains(sequence)) - { - sequenceMatches.addElement(sequence); - } + sequenceMatches.addElement(sequence); } } } - if (sequenceMatches.size() == 0) - { - // failed to match directly on accessionId==query so just compare all - // sequences to entry + } + if (sequenceMatches.size() == 0) + { + // failed to match directly on accessionId==query so just compare all + // sequences to entry Enumeration e = seqRefs.keys(); while (e.hasMoreElements()) { @@ -616,24 +618,26 @@ public class DBRefFetcher implements Runnable // absStart+sequence.getStart()+entrySeq.length()-1}, // new int[] { entry.getStart(), entry.getEnd() }, 1, 1); // relocate local features for updated start - if (updateRefFrame) { + if (updateRefFrame) + { if (sequence.getSequenceFeatures() != null) { - SequenceFeature[] sf = sequence.getSequenceFeatures(); - int start = sequence.getStart(); - int end = sequence.getEnd(); - int startShift = 1 - absStart - start; // how much the features are - // to be shifted by - for (int sfi = 0; sfi < sf.length; sfi++) - { - if (sf[sfi].getBegin() >= start && sf[sfi].getEnd() <= end) + SequenceFeature[] sf = sequence.getSequenceFeatures(); + int start = sequence.getStart(); + int end = sequence.getEnd(); + int startShift = 1 - absStart - start; // how much the features + // are + // to be shifted by + for (int sfi = 0; sfi < sf.length; sfi++) { - // shift feature along by absstart - sf[sfi].setBegin(sf[sfi].getBegin() + startShift); - sf[sfi].setEnd(sf[sfi].getEnd() + startShift); + if (sf[sfi].getBegin() >= start && sf[sfi].getEnd() <= end) + { + // shift feature along by absstart + sf[sfi].setBegin(sf[sfi].getBegin() + startShift); + sf[sfi].setEnd(sf[sfi].getEnd() + startShift); + } } } - } } } @@ -649,21 +653,28 @@ public class DBRefFetcher implements Runnable sequence.setStart(absStart); sequence.setEnd(absEnd); // search for alignment sequences to update coordinate frame for - for (int alsq = 0; alsq. */ package jalview.ws; @@ -80,9 +79,9 @@ public class DasSequenceFeatureFetcher * Creates a new SequenceFeatureFetcher object. Uses default * * @param align - * DOCUMENT ME! + * DOCUMENT ME! * @param ap - * DOCUMENT ME! + * DOCUMENT ME! */ public DasSequenceFeatureFetcher(SequenceI[] sequences, FeatureSettings fsettings, Vector selectedSources) @@ -94,18 +93,20 @@ public class DasSequenceFeatureFetcher FeatureSettings fsettings, Vector ourselectedSources, boolean checkDbrefs, boolean promptFetchDbrefs) { - this.selectedSources = new Vector(); + this.selectedSources = new Vector(); Enumeration sources = ourselectedSources.elements(); // filter both sequences and sources to eliminate duplicates while (sources.hasMoreElements()) { Object src = sources.nextElement(); - if (!selectedSources.contains(src)) { - selectedSources.addElement(src); - }; + if (!selectedSources.contains(src)) + { + selectedSources.addElement(src); + } + ; } Vector sqs = new Vector(); - for (int i=0; i 0) { // feature is also appended to enable links to be seen. // TODO: consider extending dbrefs to have their own links ? - // TODO: new feature: extract dbref links from DAS servers and add the URL pattern to the list of DB name associated links in the user's preferences ? - // for the moment - just fix up the existing feature so it displays correctly. + // TODO: new feature: extract dbref links from DAS servers and add the + // URL pattern to the list of DB name associated links in the user's + // preferences ? + // for the moment - just fix up the existing feature so it displays + // correctly. // f.setType(dbr.getSource()); - //f.setDescription(); + // f.setDescription(); f.setValue("linkonly", Boolean.TRUE); - //f.setDescription(""); + // f.setDescription(""); Vector newlinks = new Vector(); Enumeration it = f.links.elements(); while (it.hasMoreElements()) { String elm; - UrlLink urllink = new UrlLink(elm = (String)it.nextElement()); - if (urllink.isValid()) { + UrlLink urllink = new UrlLink(elm = (String) it.nextElement()); + if (urllink.isValid()) + { urllink.setLabel(f.getDescription()); newlinks.addElement(urllink.toString()); - } else { - // couldn't parse the link properly. Keep it anyway - just in case. - debug("couldn't parse link string - "+elm); + } + else + { + // couldn't parse the link properly. Keep it anyway - just in + // case. + debug("couldn't parse link string - " + elm); newlinks.addElement(elm); } } @@ -836,7 +852,7 @@ public class DasSequenceFeatureFetcher * query the given URL for DasSources. * * @param registryURL - * return sources from registryURL + * return sources from registryURL */ public static DasSource[] getDASSources(String registryURL) { @@ -872,7 +888,8 @@ public class DasSequenceFeatureFetcher .size()]); } catch (Exception ex) { - System.err.println("Failed to contact DAS1 registry at "+registryURL); + System.err.println("Failed to contact DAS1 registry at " + + registryURL); ex.printStackTrace(); return null; } diff --git a/src/jalview/ws/Discoverer.java b/src/jalview/ws/Discoverer.java index 87e8bb8..f481aa1 100755 --- a/src/jalview/ws/Discoverer.java +++ b/src/jalview/ws/Discoverer.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.ws; @@ -55,7 +54,7 @@ public class Discoverer extends Thread implements Runnable * change listeners are notified of "services" property changes * * @param listener - * to be added that consumes new services Hashtable object. + * to be added that consumes new services Hashtable object. */ public void addPropertyChangeListener( java.beans.PropertyChangeListener listener) @@ -67,7 +66,7 @@ public class Discoverer extends Thread implements Runnable * * * @param listener - * to be removed + * to be removed */ public void removePropertyChangeListener( java.beans.PropertyChangeListener listener) @@ -79,11 +78,11 @@ public class Discoverer extends Thread implements Runnable * Property change listener firing routine * * @param prop - * services + * services * @param oldvalue - * old services hash + * old services hash * @param newvalue - * new services hash + * new services hash */ public void firePropertyChange(String prop, Object oldvalue, Object newvalue) @@ -104,8 +103,8 @@ public class Discoverer extends Thread implements Runnable { server = loc.getRegistryService(WsURL); ((RegistryServiceSoapBindingStub) server).setTimeout(60000); // One - // minute - // timeout + // minute + // timeout } catch (Exception ex) { jalview.bin.Cache.log @@ -127,9 +126,10 @@ public class Discoverer extends Thread implements Runnable static private boolean reallyDiscoverServices = true; public static java.util.Hashtable services = null; // vectors of services - // stored by - // abstractServiceType - // string + + // stored by + // abstractServiceType + // string public static java.util.Vector serviceList = null; // flat list of services @@ -293,11 +293,11 @@ public class Discoverer extends Thread implements Runnable * returns true if ServiceURLList was modified with a new DiscoveryService URL * * @param sh - * ServiceHandle[] + * ServiceHandle[] * @param cat - * Vector + * Vector * @param sscat - * Hashtable + * Hashtable * @return boolean */ static private boolean buildServiceLists(ServiceHandle[] sh, Vector cat, diff --git a/src/jalview/ws/EnfinEnvision2OneWay.java b/src/jalview/ws/EnfinEnvision2OneWay.java index b1a0bdb..53d5b4a 100644 --- a/src/jalview/ws/EnfinEnvision2OneWay.java +++ b/src/jalview/ws/EnfinEnvision2OneWay.java @@ -1,5 +1,19 @@ -/** +/* + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle + * + * 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 . */ package jalview.ws; @@ -37,89 +51,130 @@ import org.xml.sax.helpers.DefaultHandler; /** * Lightweight runnable to discover dynamic 'one way' group URL services + * * @author JimP - * + * */ -public class EnfinEnvision2OneWay extends DefaultHandler implements Runnable,WSMenuEntryProviderI +public class EnfinEnvision2OneWay extends DefaultHandler implements + Runnable, WSMenuEntryProviderI { - private static EnfinEnvision2OneWay groupURLLinksGatherer=null; - public static EnfinEnvision2OneWay getInstance() { - if (groupURLLinksGatherer==null) { + private static EnfinEnvision2OneWay groupURLLinksGatherer = null; + + public static EnfinEnvision2OneWay getInstance() + { + if (groupURLLinksGatherer == null) + { groupURLLinksGatherer = new EnfinEnvision2OneWay(); } return groupURLLinksGatherer; } - private void waitForCompletion() { + + private void waitForCompletion() + { if (groupURLLinksGatherer.isRunning()) { - // wait around and show a visual delay indicator - Cursor oldCursor = Desktop.instance.getCursor(); - Desktop.instance.setCursor(new Cursor(Cursor.WAIT_CURSOR)); - while (groupURLLinksGatherer.isRunning()) - { - try { - Thread.sleep(100); - } catch (InterruptedException e ){}; + // wait around and show a visual delay indicator + Cursor oldCursor = Desktop.instance.getCursor(); + Desktop.instance.setCursor(new Cursor(Cursor.WAIT_CURSOR)); + while (groupURLLinksGatherer.isRunning()) + { + try + { + Thread.sleep(100); + } catch (InterruptedException e) + { + } + ; + } + Desktop.instance.setCursor(oldCursor); } - Desktop.instance.setCursor(oldCursor); - } } - public Vector getEnvisionServiceGroupURLS() { + + public Vector getEnvisionServiceGroupURLS() + { waitForCompletion(); return groupURLLinks; } + /** - * indicate if + * indicate if */ - private static String BACKGROUND="BACKGROUNDPARAM"; + private static String BACKGROUND = "BACKGROUNDPARAM"; + /** - * contains null strings or one of the above constants - indicate if this URL is a special case. + * contains null strings or one of the above constants - indicate if this URL + * is a special case. */ private Vector additionalPar = new Vector(); + /** * the enfin service URL */ - private String enfinService=null; - private String description=null; + private String enfinService = null; + + private String description = null; + private String wfname; - /* (non-Javadoc) - * @see org.xml.sax.helpers.DefaultHandler#endElement(java.lang.String, java.lang.String, java.lang.String) + + /* + * (non-Javadoc) + * + * @see org.xml.sax.helpers.DefaultHandler#endElement(java.lang.String, + * java.lang.String, java.lang.String) */ public void endElement(String uri, String localName, String qName) throws SAXException { - -// System.err.println("End element: : '"+uri+" "+localName+" "+qName); - if (qName.equalsIgnoreCase("workflow") && description!=null && description.length()>0) + + // System.err.println("End element: : '"+uri+" "+localName+" "+qName); + if (qName.equalsIgnoreCase("workflow") && description != null + && description.length() > 0) { - //groupURLLinks.addElement("UNIPROT|EnVision2|http://www.ebi.ac.uk/enfin-srv/envision2/pages/linkin.jsf?tool=Jalview&workflow=Default&datasetName=JalviewIDs$DATASETID$&input=$SEQUENCEIDS$&inputType=0|,"); - //groupURLLinks.addElement("Seqs|EnVision2|http://www.ebi.ac.uk/enfin-srv/envision2/pages/linkin.jsf?tool=Jalview&workflow=Default&datasetName=JalviewSeqs$DATASETID$&input=$SEQUENCES=/([A-Za-z]+)+/=$&inputType=1|,"); - System.err.println("Adding entry for "+wfname+" "+description); - if (wfname.toLowerCase().indexOf("funcnet")==-1) + // groupURLLinks.addElement("UNIPROT|EnVision2|http://www.ebi.ac.uk/enfin-srv/envision2/pages/linkin.jsf?tool=Jalview&workflow=Default&datasetName=JalviewIDs$DATASETID$&input=$SEQUENCEIDS$&inputType=0|,"); + // groupURLLinks.addElement("Seqs|EnVision2|http://www.ebi.ac.uk/enfin-srv/envision2/pages/linkin.jsf?tool=Jalview&workflow=Default&datasetName=JalviewSeqs$DATASETID$&input=$SEQUENCES=/([A-Za-z]+)+/=$&inputType=1|,"); + System.err.println("Adding entry for " + wfname + " " + description); + if (wfname.toLowerCase().indexOf("funcnet") == -1) { groupURLdescr.addElement(description); groupURLdescr.addElement(description); - groupURLLinks.addElement(wfname+"|"+"http://www.ebi.ac.uk/enfin-srv/envision2/pages/linkin.jsf?tool=Jalview&workflow="+wfname+"&datasetName=JalviewSeqs$DATASETID$&input=$SEQUENCEIDS$&inputType=0|,"); // #"+description+"#"); - groupURLLinks.addElement(wfname+"|"+"http://www.ebi.ac.uk/enfin-srv/envision2/pages/linkin.jsf?tool=Jalview&workflow="+wfname+"&datasetName=JalviewSeqs$DATASETID$&input=$SEQUENCES=/([A-Za-z]+)+/=$&inputType=1|,"); // #"+description+"#"); + groupURLLinks + .addElement(wfname + + "|" + + "http://www.ebi.ac.uk/enfin-srv/envision2/pages/linkin.jsf?tool=Jalview&workflow=" + + wfname + + "&datasetName=JalviewSeqs$DATASETID$&input=$SEQUENCEIDS$&inputType=0|,"); // #"+description+"#"); + groupURLLinks + .addElement(wfname + + "|" + + "http://www.ebi.ac.uk/enfin-srv/envision2/pages/linkin.jsf?tool=Jalview&workflow=" + + wfname + + "&datasetName=JalviewSeqs$DATASETID$&input=$SEQUENCES=/([A-Za-z]+)+/=$&inputType=1|,"); // #"+description+"#"); } } } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.xml.sax.helpers.DefaultHandler#characters(char[], int, int) */ public void characters(char[] ch, int start, int length) throws SAXException { - if (description!=null) { - for (int i=start; iend) + // we skip sequences which do not have any non-gaps in the region of + // interest + if (start > end) { continue; } // just collect ids from dataset sequence - // TODO: check if IDs collected from selecton group intersects with the current selection, too + // TODO: check if IDs collected from selecton group intersects with the + // current selection, too SequenceI sqi = seqs[sq]; - while (sqi.getDatasetSequence()!=null) { - sqi = sqi.getDatasetSequence(); } + while (sqi.getDatasetSequence() != null) + { + sqi = sqi.getDatasetSequence(); + } DBRefEntry[] dbr = sqi.getDBRef(); - if (dbr!=null && dbr.length>0) + if (dbr != null && dbr.length > 0) { - for (int d=0;d0) + if (linkMenus[m] != null + && linkMenus[m].getMenuComponentCount() > 0) { groupLinksMenu.add(linkMenus[m]); } } - + return groupLinksMenu; } return null; } private boolean createAndAddLinks(JMenu[] linkMenus, boolean usingNames, - GroupUrlLink urlLink, String label, String ltarget, String descr, String[] ids, - String[] seqstr) + GroupUrlLink urlLink, String label, String ltarget, String descr, + String[] ids, String[] seqstr) { - Object[] urlset = urlLink.makeUrlStubs(ids,seqstr, "FromJalview"+System.currentTimeMillis(),false); - if (urlset!=null) + Object[] urlset = urlLink.makeUrlStubs(ids, seqstr, "FromJalview" + + System.currentTimeMillis(), false); + if (urlset != null) { int type = urlLink.getGroupURLType() & 3; - //System.out.println(urlLink.getGroupURLType() +" "+((String[])urlset[3])[0]); + // System.out.println(urlLink.getGroupURLType() + // +" "+((String[])urlset[3])[0]); // first two bits ofurlLink type bitfield are sequenceids and sequences // TODO: FUTURE: ensure the groupURL menu structure can be generalised - addshowLink(linkMenus[type], label + " "+(usingNames ? (((type & 1)==1) ? "(Names)" : "") : ("("+ltarget+")")), descr, urlLink, urlset); + addshowLink(linkMenus[type], label + + " " + + (usingNames ? (((type & 1) == 1) ? "(Names)" : "") : ("(" + + ltarget + ")")), descr, urlLink, urlset); return true; } return false; } - /// end of stuff copied from popupmenu - public void attachWSMenuEntry(final JMenu wsmenu, final AlignFrame alignFrame) + + // / end of stuff copied from popupmenu + public void attachWSMenuEntry(final JMenu wsmenu, + final AlignFrame alignFrame) { final JMenu enfinServiceMenu = new JMenu("Envision 2"); wsmenu.add(enfinServiceMenu); enfinServiceMenu.setEnabled(false); wsmenu.addMenuListener(new MenuListener() - { - // this listener remembers when the menu was first selected, and - // doesn't rebuild the session list until it has been cleared and - // reselected again. - boolean refresh = true; + { + // this listener remembers when the menu was first selected, and + // doesn't rebuild the session list until it has been cleared and + // reselected again. + boolean refresh = true; - public void menuCanceled(MenuEvent e) - { - refresh = true; - } + public void menuCanceled(MenuEvent e) + { + refresh = true; + } - public void menuDeselected(MenuEvent e) - { - refresh = true; - } + public void menuDeselected(MenuEvent e) + { + refresh = true; + } - public void menuSelected(MenuEvent e) + public void menuSelected(MenuEvent e) + { + if (refresh) { - if (refresh) + try { - try { - buildGroupLinkMenu(enfinServiceMenu,alignFrame); - } catch (OutOfMemoryError ex) - { - Cache.log.error("Out of memory when calculating the Envision2 links.",ex); - enfinServiceMenu.setEnabled(false); - } - refresh = false; + buildGroupLinkMenu(enfinServiceMenu, alignFrame); + } catch (OutOfMemoryError ex) + { + Cache.log.error( + "Out of memory when calculating the Envision2 links.", + ex); + enfinServiceMenu.setEnabled(false); } + refresh = false; } - }); - - + } + }); + } } diff --git a/src/jalview/ws/JPredClient.java b/src/jalview/ws/JPredClient.java index 0e33e02..bb691dc 100755 --- a/src/jalview/ws/JPredClient.java +++ b/src/jalview/ws/JPredClient.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.ws; @@ -36,15 +35,15 @@ public class JPredClient extends WSClient * crate a new GUI JPred Job * * @param sh - * ServiceHandle + * ServiceHandle * @param title - * String + * String * @param msa - * boolean - true - submit alignment as a sequence profile + * boolean - true - submit alignment as a sequence profile * @param alview - * AlignmentView + * AlignmentView * @param viewonly - * TODO + * TODO */ public JPredClient(ext.vamsas.ServiceHandle sh, String title, boolean msa, AlignmentView alview, AlignFrame parentFrame, @@ -66,14 +65,14 @@ public class JPredClient extends WSClient * and short seqs) * * @param title - * String + * String * @param msa - * boolean + * boolean * @param alview - * AlignmentView + * AlignmentView * @param viewonly - * if true then the prediction will be made just on the - * concatenated visible regions + * if true then the prediction will be made just on the concatenated + * visible regions */ private void startJPredClient(String title, boolean msa, jalview.datamodel.AlignmentView alview, AlignFrame parentFrame, @@ -337,7 +336,7 @@ public class JPredClient extends WSClient try { server = loc.getjpred(new java.net.URL(WsURL)); // JBPNote will be set - // from properties + // from properties ((JpredSoapBindingStub) server).setTimeout(60000); // one minute stub // ((JpredSoapBindingStub)this.server)._setProperty(org.apache.axis.encoding.C, // Boolean.TRUE); diff --git a/src/jalview/ws/JPredThread.java b/src/jalview/ws/JPredThread.java index 272b147..98c9506 100644 --- a/src/jalview/ws/JPredThread.java +++ b/src/jalview/ws/JPredThread.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.ws; @@ -38,7 +37,8 @@ class JPredThread extends WSThread implements WSClientI // TODO: make JPredJob deal only with what was sent to and received from a // JNet service int[] predMap = null; // mapping from sequence(i) to the original - // sequence(predMap[i]) being predicted on + + // sequence(predMap[i]) being predicted on vamsas.objects.simple.Sequence sequence; @@ -47,8 +47,9 @@ class JPredThread extends WSThread implements WSClientI java.util.Hashtable SequenceInfo = null; int msaIndex = 0; // the position of the original sequence in the array of - // Sequences in the input object that this job holds a - // prediction for + + // Sequences in the input object that this job holds a + // prediction for /** * @@ -270,7 +271,7 @@ class JPredThread extends WSThread implements WSClientI nview.pruneDeletions(ShiftList .parseMap((origseq = ((SequenceI[]) alandcolsel[0])[0]) .gapMap())); // recover original prediction sequence's - // mapping to view. + // mapping to view. int[] viscontigs = nview.getVisibleContigs(0, profileseq.getLength()); int spos = 0; int offset = 0; @@ -438,7 +439,7 @@ class JPredThread extends WSThread implements WSClientI else if (job.sequence != null) { job.jobId = server.predict(job.sequence); // debug like : job.jobId = - // "/jobs/www-jpred/jp_Yatat29";// + // "/jobs/www-jpred/jp_Yatat29";// } if (job.jobId != null) @@ -614,8 +615,9 @@ class JPredThread extends WSThread implements WSClientI { /* * java.lang.Object[] alandcolsel = - * input.getAlignmentAndColumnSelection(alignFrame.getViewport().getGapCharacter()); - * if (((SequenceI[])alandcolsel[0])[0].getLength()!=res.getWidth()) { + * input.getAlignmentAndColumnSelection + * (alignFrame.getViewport().getGapCharacter()); if + * (((SequenceI[])alandcolsel[0])[0].getLength()!=res.getWidth()) { * if (msa) { throw new Error("Implementation Error! ColumnSelection * from input alignment will not map to result alignment!"); } } if * (!msa) { // update hidden regions to account for loss of gaps in diff --git a/src/jalview/ws/MsaWSClient.java b/src/jalview/ws/MsaWSClient.java index ddd00c3..19fa0d3 100755 --- a/src/jalview/ws/MsaWSClient.java +++ b/src/jalview/ws/MsaWSClient.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.ws; @@ -47,15 +46,15 @@ public class MsaWSClient extends WSClient * retrieved ServiceHandle * * @param sh - * service handle of type AbstractName(MsaWS) + * service handle of type AbstractName(MsaWS) * @param altitle - * DOCUMENT ME! + * DOCUMENT ME! * @param msa - * DOCUMENT ME! + * DOCUMENT ME! * @param submitGaps - * DOCUMENT ME! + * DOCUMENT ME! * @param preserveOrder - * DOCUMENT ME! + * DOCUMENT ME! */ public MsaWSClient(ext.vamsas.ServiceHandle sh, String altitle, @@ -150,7 +149,7 @@ public class MsaWSClient extends WSClient { this.server = (MuscleWS) loc.getMuscleWS(new java.net.URL(WsURL)); ((MuscleWSSoapBindingStub) this.server).setTimeout(60000); // One minute - // timeout + // timeout } catch (Exception ex) { wsInfo.setProgressText("Serious! " + WebServiceName diff --git a/src/jalview/ws/MsaWSThread.java b/src/jalview/ws/MsaWSThread.java index 5189b91..7142e5c 100644 --- a/src/jalview/ws/MsaWSThread.java +++ b/src/jalview/ws/MsaWSThread.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.ws; @@ -66,9 +65,9 @@ class MsaWSThread extends WSThread implements WSClientI * MsaWSJob * * @param jobNum - * int + * int * @param jobId - * String + * String */ public MsaWSJob(int jobNum, SequenceI[] inSeqs) { @@ -92,9 +91,9 @@ class MsaWSThread extends WSThread implements WSClientI * prepare input sequences for MsaWS service * * @param seqs - * jalview sequences to be prepared + * jalview sequences to be prepared * @param minlen - * minimum number of residues required for this MsaWS service + * minimum number of residues required for this MsaWS service * @return true if seqs contains sequences to be submitted to service. */ private boolean prepareInput(SequenceI[] seqs, int minlen) @@ -303,9 +302,9 @@ class MsaWSThread extends WSThread implements WSClientI * set basic options for this (group) of Msa jobs * * @param subgaps - * boolean + * boolean * @param presorder - * boolean + * boolean */ MsaWSThread(ext.vamsas.MuscleWS server, String wsUrl, WebserviceInfo wsinfo, jalview.gui.AlignFrame alFrame, @@ -322,15 +321,15 @@ class MsaWSThread extends WSThread implements WSClientI * create one or more Msa jobs to align visible seuqences in _msa * * @param title - * String + * String * @param _msa - * AlignmentView + * AlignmentView * @param subgaps - * boolean + * boolean * @param presorder - * boolean + * boolean * @param seqset - * Alignment + * Alignment */ MsaWSThread(ext.vamsas.MuscleWS server, String wsUrl, WebserviceInfo wsinfo, jalview.gui.AlignFrame alFrame, diff --git a/src/jalview/ws/SeqSearchWSClient.java b/src/jalview/ws/SeqSearchWSClient.java index 31fbe85..2e246ab 100644 --- a/src/jalview/ws/SeqSearchWSClient.java +++ b/src/jalview/ws/SeqSearchWSClient.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.ws; @@ -52,15 +51,15 @@ public class SeqSearchWSClient extends WSClient * retrieved ServiceHandle * * @param sh - * service handle of type AbstractName(MsaWS) + * service handle of type AbstractName(MsaWS) * @param altitle - * DOCUMENT ME! + * DOCUMENT ME! * @param msa - * DOCUMENT ME! + * DOCUMENT ME! * @param submitGaps - * DOCUMENT ME! + * DOCUMENT ME! * @param preserveOrder - * DOCUMENT ME! + * DOCUMENT ME! */ public SeqSearchWSClient(ext.vamsas.ServiceHandle sh, String altitle, @@ -120,8 +119,8 @@ public class SeqSearchWSClient extends WSClient return; } String visdb = (db == null || db == "") ? "default" : db; // need a visible - // name for a - // sequence db + // name for a + // sequence db boolean profileSearch = msa.getSequences().length > 2 ? true : false; // single sequence or profile from alignment view wsInfo.setProgressText("Searching " @@ -161,8 +160,8 @@ public class SeqSearchWSClient extends WSClient this.server = (SeqSearchI) loc.getSeqSearchService(new java.net.URL( WsURL)); ((SeqSearchServiceSoapBindingStub) this.server).setTimeout(60000); // One - // minute - // timeout + // minute + // timeout } catch (Exception ex) { wsInfo.setProgressText("Serious! " + WebServiceName diff --git a/src/jalview/ws/SeqSearchWSThread.java b/src/jalview/ws/SeqSearchWSThread.java index d96131d..2f28d64 100644 --- a/src/jalview/ws/SeqSearchWSThread.java +++ b/src/jalview/ws/SeqSearchWSThread.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.ws; @@ -63,9 +62,9 @@ class SeqSearchWSThread extends WSThread implements WSClientI * MsaWSJob * * @param jobNum - * int + * int * @param jobId - * String + * String */ public SeqSearchWSJob(int jobNum, SequenceI[] inSeqs) { @@ -89,9 +88,9 @@ class SeqSearchWSThread extends WSThread implements WSClientI * prepare input sequences for service * * @param seqs - * jalview sequences to be prepared + * jalview sequences to be prepared * @param minlen - * minimum number of residues required for this MsaWS service + * minimum number of residues required for this MsaWS service * @return true if seqs contains sequences to be submitted to service. */ private boolean prepareInput(SequenceI[] seqs, int minlen) @@ -110,11 +109,11 @@ class SeqSearchWSThread extends WSThread implements WSClientI } } boolean valid = nseqs >= 1; // need at least one sequence for valid input - // TODO: generalise + // TODO: generalise vamsas.objects.simple.Sequence[] seqarray = (valid) ? new vamsas.objects.simple.Sequence[nseqs] : null; boolean submitGaps = (nseqs == 1) ? false : true; // profile is submitted - // with gaps + // with gaps for (int i = 0, n = 0; i < seqs.length; i++) { @@ -318,9 +317,9 @@ class SeqSearchWSThread extends WSThread implements WSClientI * set basic options for this (group) of Msa jobs * * @param subgaps - * boolean + * boolean * @param presorder - * boolean + * boolean */ SeqSearchWSThread(ext.vamsas.SeqSearchI server, String wsUrl, WebserviceInfo wsinfo, jalview.gui.AlignFrame alFrame, @@ -335,15 +334,15 @@ class SeqSearchWSThread extends WSThread implements WSClientI * create one or more Msa jobs to align visible seuqences in _msa * * @param title - * String + * String * @param _msa - * AlignmentView + * AlignmentView * @param subgaps - * boolean + * boolean * @param presorder - * boolean + * boolean * @param seqset - * Alignment + * Alignment */ SeqSearchWSThread(ext.vamsas.SeqSearchI server, String wsUrl, WebserviceInfo wsinfo, jalview.gui.AlignFrame alFrame, @@ -648,8 +647,8 @@ class SeqSearchWSThread extends WSThread implements WSClientI * like this: 1. Merge each domain hit back onto the visible segments in * the same way as a Jnet prediction is mapped back * - * Object[] newview = input.getUpdatedView(results, orders, getGapChar()); // - * trash references to original result data for (int j = 0; j < + * Object[] newview = input.getUpdatedView(results, orders, getGapChar()); + * // trash references to original result data for (int j = 0; j < * jobs.length; j++) { results[j] = null; orders[j] = null; } SequenceI[] * alignment = (SequenceI[]) newview[0]; ColumnSelection columnselection = * (ColumnSelection) newview[1]; Alignment al = new Alignment(alignment); diff --git a/src/jalview/ws/SequenceFetcher.java b/src/jalview/ws/SequenceFetcher.java index adf386c..0202936 100644 --- a/src/jalview/ws/SequenceFetcher.java +++ b/src/jalview/ws/SequenceFetcher.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.ws; @@ -59,9 +58,9 @@ public class SequenceFetcher extends ASequenceFetcher addDBRefSourceImpl(jalview.ws.dbsources.Pdb.class); addDBRefSourceImpl(jalview.ws.dbsources.PfamFull.class); addDBRefSourceImpl(jalview.ws.dbsources.PfamSeed.class); // ensures Seed - // alignment is - // 'default' for - // PFAM + // alignment is + // 'default' for + // PFAM registerDasSequenceSources(); } @@ -320,86 +319,89 @@ public class SequenceFetcher extends ASequenceFetcher { DasSource[] sources = jalview.ws.DasSequenceFeatureFetcher .getDASSources(); - if (sources!=null) + if (sources != null) { - for (int s=0; sources!=null && s. */ package jalview.ws; @@ -97,7 +96,7 @@ public abstract class WSClient implements WSMenuEntryProviderI * * @param sh * @param headless - * true implies no GUI objects will be created. + * true implies no GUI objects will be created. * @return the service instance information GUI for this client and job. */ protected WebserviceInfo setWebService(ServiceHandle sh, boolean headless) @@ -106,7 +105,7 @@ public abstract class WSClient implements WSMenuEntryProviderI if (ServiceActions.containsKey(sh.getAbstractName())) { WebServiceJobTitle = sh.getName(); // TODO: control sh.Name specification - // properly + // properly // add this for short names. +(String) // ServiceActions.get(sh.getAbstractName()); } @@ -130,11 +129,9 @@ public abstract class WSClient implements WSMenuEntryProviderI * this service on to the menu entry constructor * * @param wsmenu - * the menu to which any menu entries/sub menus are to be - * attached + * the menu to which any menu entries/sub menus are to be attached * @param alignFrame - * the alignFrame instance that provides input data for the - * service + * the alignFrame instance that provides input data for the service */ public void attachWSMenuEntry(JMenu wsmenu, final AlignFrame alignFrame) { @@ -151,10 +148,10 @@ public abstract class WSClient implements WSMenuEntryProviderI * entries that enact their service using data from alignFrame. * * @param wsmenu - * where new menu entries (and submenus) are to be attached + * where new menu entries (and submenus) are to be attached * @param serviceHandle - * the serviceHandle document for the service that entries are - * created for + * the serviceHandle document for the service that entries are + * created for * @param alignFrame */ public abstract void attachWSMenuEntry(JMenu wsmenu, diff --git a/src/jalview/ws/WSClientI.java b/src/jalview/ws/WSClientI.java index 8832443..b4f8054 100755 --- a/src/jalview/ws/WSClientI.java +++ b/src/jalview/ws/WSClientI.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.ws; diff --git a/src/jalview/ws/WSMenuEntryProviderI.java b/src/jalview/ws/WSMenuEntryProviderI.java index 49afb91..0a9f65e 100644 --- a/src/jalview/ws/WSMenuEntryProviderI.java +++ b/src/jalview/ws/WSMenuEntryProviderI.java @@ -1,3 +1,20 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle + * + * 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 . + */ package jalview.ws; import jalview.gui.AlignFrame; diff --git a/src/jalview/ws/WSThread.java b/src/jalview/ws/WSThread.java index 03cfba7..65c1c96 100644 --- a/src/jalview/ws/WSThread.java +++ b/src/jalview/ws/WSThread.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.ws; @@ -240,13 +239,13 @@ public abstract class WSThread extends Thread String WsUrl = null; /** - * query web service for status of job. on return, job.result must not be null - - * if it is then it will be assumed that the job status query timed out and a - * server exception will be logged. + * query web service for status of job. on return, job.result must not be null + * - if it is then it will be assumed that the job status query timed out and + * a server exception will be logged. * * @param job * @throws Exception - * will be logged as a server exception for this job + * will be logged as a server exception for this job */ abstract void pollJob(WSJob job) throws Exception; @@ -416,15 +415,15 @@ public abstract class WSThread extends Thread /** * * @param alignFrame - * reference for copying mappings across + * reference for copying mappings across * @param wsInfo - * gui attachment point + * gui attachment point * @param input - * input data for the calculation + * input data for the calculation * @param webServiceName - * name of service + * name of service * @param wsUrl - * url of the service being invoked + * url of the service being invoked */ public WSThread(AlignFrame alignFrame, WebserviceInfo wsinfo, AlignmentView input, String webServiceName, String wsUrl) @@ -446,14 +445,14 @@ public abstract class WSThread extends Thread /** * - * @param alframe - - * reference for copying mappings and display styles across - * @param wsinfo2 - - * gui attachment point - * @param alview - - * input data for the calculation - * @param wsurl2 - - * url of the service being invoked + * @param alframe + * - reference for copying mappings and display styles across + * @param wsinfo2 + * - gui attachment point + * @param alview + * - input data for the calculation + * @param wsurl2 + * - url of the service being invoked */ public WSThread(AlignFrame alframe, WebserviceInfo wsinfo2, AlignmentView alview, String wsurl2) diff --git a/src/jalview/ws/dbsources/DasSequenceSource.java b/src/jalview/ws/dbsources/DasSequenceSource.java index c0b288f..ca45d78 100644 --- a/src/jalview/ws/dbsources/DasSequenceSource.java +++ b/src/jalview/ws/dbsources/DasSequenceSource.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.ws.dbsources; @@ -56,16 +55,16 @@ public class DasSequenceSource extends DbSourceProxyImpl implements * create a new DbSource proxy for a DAS 1 source * * @param dbnbame - * Human Readable Name to use when fetching from this source + * Human Readable Name to use when fetching from this source * @param dbrefname - * DbRefName for DbRefs attached to sequences retrieved from - * this source + * DbRefName for DbRefs attached to sequences retrieved from this + * source * @param source - * Das1Source + * Das1Source * @param coordsys - * specific coordinate system to use for this source + * specific coordinate system to use for this source * @throws Exception - * if source is not capable of the 'sequence' command + * if source is not capable of the 'sequence' command */ public DasSequenceSource(String dbname, String dbrefname, Das1Source source, DasCoordinateSystem coordsys) throws Exception diff --git a/src/jalview/ws/dbsources/EbiFileRetrievedProxy.java b/src/jalview/ws/dbsources/EbiFileRetrievedProxy.java index 7cfa7ac..75651bd 100644 --- a/src/jalview/ws/dbsources/EbiFileRetrievedProxy.java +++ b/src/jalview/ws/dbsources/EbiFileRetrievedProxy.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.ws.dbsources; diff --git a/src/jalview/ws/dbsources/EmblCdsSouce.java b/src/jalview/ws/dbsources/EmblCdsSouce.java index a8dcda2..5b43fc4 100644 --- a/src/jalview/ws/dbsources/EmblCdsSouce.java +++ b/src/jalview/ws/dbsources/EmblCdsSouce.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.ws.dbsources; @@ -53,7 +52,7 @@ public class EmblCdsSouce extends EmblXmlSource implements DbSourceProxy public String getDbVersion() { return "0"; // TODO : this is dynamically set for a returned record - not - // tied to proxy + // tied to proxy } public AlignmentI getSequenceRecords(String queries) throws Exception @@ -69,7 +68,8 @@ public class EmblCdsSouce extends EmblXmlSource implements DbSourceProxy { // most embl CDS refs look like .. // TODO: improve EMBLCDS regex - return (accession==null || accession.length()<2) ? false : getAccessionValidator().search(accession); + return (accession == null || accession.length() < 2) ? false + : getAccessionValidator().search(accession); } /** diff --git a/src/jalview/ws/dbsources/EmblSource.java b/src/jalview/ws/dbsources/EmblSource.java index 08c020e..d4eb7c9 100644 --- a/src/jalview/ws/dbsources/EmblSource.java +++ b/src/jalview/ws/dbsources/EmblSource.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.ws.dbsources; @@ -98,7 +97,7 @@ public class EmblSource extends EmblXmlSource implements DbSourceProxy { return getEmblSequenceRecords(DBRefSource.EMBL, queries); } - + /* * (non-Javadoc) * @@ -107,9 +106,10 @@ public class EmblSource extends EmblXmlSource implements DbSourceProxy public boolean isValidReference(String accession) { // most embl refs look like .. - - return (accession==null || accession.length()<2) ? false : getAccessionValidator().search(accession); - + + return (accession == null || accession.length() < 2) ? false + : getAccessionValidator().search(accession); + } /** diff --git a/src/jalview/ws/dbsources/EmblXmlSource.java b/src/jalview/ws/dbsources/EmblXmlSource.java index 01f502b..7a1ed17 100644 --- a/src/jalview/ws/dbsources/EmblXmlSource.java +++ b/src/jalview/ws/dbsources/EmblXmlSource.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.ws.dbsources; @@ -45,8 +44,8 @@ public abstract class EmblXmlSource extends EbiFileRetrievedProxy * retrieve and parse an emblxml file * * @param emprefx - * either EMBL or EMBLCDS strings are allowed - anything else - * will not retrieve emblxml + * either EMBL or EMBLCDS strings are allowed - anything else will + * not retrieve emblxml * @param query * @return * @throws Exception @@ -74,11 +73,11 @@ public abstract class EmblXmlSource extends EbiFileRetrievedProxy * parse an emblxml file stored locally * * @param emprefx - * either EMBL or EMBLCDS strings are allowed - anything else - * will not retrieve emblxml + * either EMBL or EMBLCDS strings are allowed - anything else will + * not retrieve emblxml * @param query * @param file - * the EMBL XML file containing the results of a query + * the EMBL XML file containing the results of a query * @return * @throws Exception */ @@ -107,15 +106,15 @@ public abstract class EmblXmlSource extends EbiFileRetrievedProxy { EmblEntry entry = (EmblEntry) i.next(); SequenceI[] seqparts = entry.getSequences(false, true, emprefx); // TODO: - // use - // !fetchNa,!fetchPeptide - // here - // instead - // - - // see - // todo - // in - // emblEntry + // use + // !fetchNa,!fetchPeptide + // here + // instead + // - + // see + // todo + // in + // emblEntry if (seqparts != null) { SequenceI[] newseqs = null; @@ -137,7 +136,7 @@ public abstract class EmblXmlSource extends EbiFileRetrievedProxy for (int j = 0; j < seqparts.length; si++, j++) { newseqs[si] = seqparts[j].deriveSequence(); // place DBReferences on - // dataset and refer + // dataset and refer } seqs = newseqs; diff --git a/src/jalview/ws/dbsources/GeneDbSource.java b/src/jalview/ws/dbsources/GeneDbSource.java index 57baf52..297d293 100644 --- a/src/jalview/ws/dbsources/GeneDbSource.java +++ b/src/jalview/ws/dbsources/GeneDbSource.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.ws.dbsources; @@ -36,18 +35,22 @@ import jalview.ws.seqfetcher.DbSourceProxyImpl; /** * Test class for accessing GeneDB - not yet finished. + * * @author JimP - * + * */ public class GeneDbSource extends EmblXmlSource implements DbSourceProxy { - public GeneDbSource() { + public GeneDbSource() + { addDbSourceProperty(DBRefSource.DNASEQDB); addDbSourceProperty(DBRefSource.CODINGSEQDB); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see jalview.ws.DbSourceProxy#getAccessionSeparator() */ public String getAccessionSeparator() @@ -56,7 +59,9 @@ public class GeneDbSource extends EmblXmlSource implements DbSourceProxy return null; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see jalview.ws.DbSourceProxy#getAccessionValidator() */ public Regex getAccessionValidator() @@ -65,14 +70,19 @@ public class GeneDbSource extends EmblXmlSource implements DbSourceProxy return null; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see jalview.ws.DbSourceProxy#getDbSource() */ public String getDbSource() { return DBRefSource.GENEDB; } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see jalview.ws.DbSourceProxy#getDbVersion() */ public String getDbVersion() @@ -81,16 +91,22 @@ public class GeneDbSource extends EmblXmlSource implements DbSourceProxy return "0"; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see jalview.ws.DbSourceProxy#getSequenceRecords(java.lang.String[]) */ public AlignmentI getSequenceRecords(String queries) throws Exception { - // query of form http://www.genedb.org/genedb/ArtemisFormHandler?id=&dest=EMBL + // query of form + // http://www.genedb.org/genedb/ArtemisFormHandler?id=&dest=EMBL // return getEmblSequenceRecords(DBRefSource.GENEDB, queries); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see jalview.ws.DbSourceProxy#isValidReference(java.lang.String) */ public boolean isValidReference(String accession) @@ -100,7 +116,7 @@ public class GeneDbSource extends EmblXmlSource implements DbSourceProxy } /** - * return T.Brucei Mannosyl-Transferase TbPIG-M + * return T.Brucei Mannosyl-Transferase TbPIG-M */ public String getTestQuery() { diff --git a/src/jalview/ws/dbsources/Pdb.java b/src/jalview/ws/dbsources/Pdb.java index 48ea306..087a78f 100644 --- a/src/jalview/ws/dbsources/Pdb.java +++ b/src/jalview/ws/dbsources/Pdb.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.ws.dbsources; @@ -156,8 +155,8 @@ public class Pdb extends EbiFileRetrievedProxy implements DbSourceProxy * PDBEntry entry = new PDBEntry(); // Construct the PDBEntry * entry.setId(id); if (entry.getProperty() == null) * entry.setProperty(new Hashtable()); - * entry.getProperty().put("chains", pdbchain.id + "=" + sq.getStart() + - * "-" + sq.getEnd()); sq.getDatasetSequence().addPDBId(entry); + * entry.getProperty().put("chains", pdbchain.id + "=" + sq.getStart() + * + "-" + sq.getEnd()); sq.getDatasetSequence().addPDBId(entry); */ // Add PDB DB Refs // We make a DBRefEtntry because we have obtained the PDB file from a diff --git a/src/jalview/ws/dbsources/Pfam.java b/src/jalview/ws/dbsources/Pfam.java index 7a99213..d5b6505 100644 --- a/src/jalview/ws/dbsources/Pfam.java +++ b/src/jalview/ws/dbsources/Pfam.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.ws.dbsources; @@ -75,17 +74,17 @@ abstract public class Pfam extends DbSourceProxyImpl implements * (non-Javadoc) * * @see jalview.ws.DbSourceProxy#getDbSource() public String getDbSource() { * - * this doesn't work - DbSource is key for the hash of DbSourceProxy - * instances - 1:many mapping for DbSource to proxy will be lost. * - * suggest : PFAM is an 'alignment' source - means proxy is higher level - * than a sequence source. return jalview.datamodel.DBRefSource.PFAM; } + * this doesn't work - DbSource is key for the hash of DbSourceProxy instances + * - 1:many mapping for DbSource to proxy will be lost. * suggest : PFAM is an + * 'alignment' source - means proxy is higher level than a sequence source. + * return jalview.datamodel.DBRefSource.PFAM; } */ /* * (non-Javadoc) * * @see jalview.ws.DbSourceProxy#getDbSourceProperties() public Hashtable - * getDbSourceProperties() { + * getDbSourceProperties() { * * return null; } */ diff --git a/src/jalview/ws/dbsources/PfamFull.java b/src/jalview/ws/dbsources/PfamFull.java index 0a2a4a4..b93faad 100644 --- a/src/jalview/ws/dbsources/PfamFull.java +++ b/src/jalview/ws/dbsources/PfamFull.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.ws.dbsources; diff --git a/src/jalview/ws/dbsources/PfamSeed.java b/src/jalview/ws/dbsources/PfamSeed.java index 6589b20..885e18a 100644 --- a/src/jalview/ws/dbsources/PfamSeed.java +++ b/src/jalview/ws/dbsources/PfamSeed.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.ws.dbsources; diff --git a/src/jalview/ws/dbsources/Uniprot.java b/src/jalview/ws/dbsources/Uniprot.java index 3331756..e7a6e2c 100644 --- a/src/jalview/ws/dbsources/Uniprot.java +++ b/src/jalview/ws/dbsources/Uniprot.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.ws.dbsources; @@ -116,7 +115,7 @@ public class Uniprot extends DbSourceProxyImpl implements DbSourceProxy Unmarshaller unmar = new Unmarshaller(uni); unmar.setIgnoreExtraElements(true); unmar.setMapping(map); - if (file!=null) + if (file != null) { uni = (UniprotFile) unmar.unmarshal(new FileReader(file)); } @@ -138,7 +137,8 @@ public class Uniprot extends DbSourceProxyImpl implements DbSourceProxy startQuery(); try { - queries = queries.toUpperCase().replaceAll("(UNIPROT\\|?|UNIPROT_|UNIREF\\d+_|UNIREF\\d+\\|?)",""); + queries = queries.toUpperCase().replaceAll( + "(UNIPROT\\|?|UNIPROT_|UNIREF\\d+_|UNIREF\\d+\\|?)", ""); Alignment al = null; ebi = new EBIFetchClient(); StringBuffer result = new StringBuffer(); @@ -208,10 +208,10 @@ public class Uniprot extends DbSourceProxyImpl implements DbSourceProxy /** * add an ordered set of UniprotEntry objects to an ordered set of seuqences. * - * @param al - - * a sequence of n sequences + * @param al + * - a sequence of n sequences * @param entries - * a seuqence of n uniprot entries to be analysed. + * a seuqence of n uniprot entries to be analysed. */ public void addUniprotXrefs(Alignment al, Vector entries) { @@ -278,7 +278,8 @@ public class Uniprot extends DbSourceProxyImpl implements DbSourceProxy public boolean isValidReference(String accession) { // TODO: make the following a standard validator - return (accession==null || accession.length()<2) ? false : getAccessionValidator().search(accession); + return (accession == null || accession.length() < 2) ? false + : getAccessionValidator().search(accession); } /** diff --git a/src/jalview/ws/dbsources/UnprotName.java b/src/jalview/ws/dbsources/UnprotName.java index 93eb32d..2443401 100644 --- a/src/jalview/ws/dbsources/UnprotName.java +++ b/src/jalview/ws/dbsources/UnprotName.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.ws.dbsources; diff --git a/src/jalview/ws/dbsources/das/DasSequenceSourceListener.java b/src/jalview/ws/dbsources/das/DasSequenceSourceListener.java index 3a19875..ddcff02 100644 --- a/src/jalview/ws/dbsources/das/DasSequenceSourceListener.java +++ b/src/jalview/ws/dbsources/das/DasSequenceSourceListener.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.ws.dbsources.das; @@ -45,11 +44,11 @@ public class DasSequenceSourceListener implements SequenceListener /** * * @param source - * the DAS Sequence DbProxy object containing database details - * for this source + * the DAS Sequence DbProxy object containing database details for + * this source * @param query - * the query string sent to the das source that we should be - * listening for. + * the query string sent to the das source that we should be + * listening for. */ public DasSequenceSourceListener(DasSequenceSource source, String query) { diff --git a/src/jalview/ws/ebi/EBIFetchClient.java b/src/jalview/ws/ebi/EBIFetchClient.java index bf1c4fb..d8d14cd 100644 --- a/src/jalview/ws/ebi/EBIFetchClient.java +++ b/src/jalview/ws/ebi/EBIFetchClient.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.ws.ebi; @@ -124,7 +123,7 @@ public class EBIFetchClient String[] data = fetchData(ids, f, s); // TODO: after JV 2.4 - test data==null and pass error(s) back up if // possible (OutOfMemoryErrors are usual problem) - if (data==null) + if (data == null) { return null; } @@ -141,8 +140,7 @@ public class EBIFetchClient index++; } out.close(); - } - catch (Exception ex) + } catch (Exception ex) { } return outFile; @@ -152,10 +150,11 @@ public class EBIFetchClient * Single DB multiple record retrieval * * @param ids - * db:query1;query2;query3 + * db:query1;query2;query3 * @param f - * raw/xml - * @param s ? + * raw/xml + * @param s + * ? * * @return Raw string array result of query set */ diff --git a/src/jalview/ws/seqfetcher/ASequenceFetcher.java b/src/jalview/ws/seqfetcher/ASequenceFetcher.java index 7d2097a..1b0d6c1 100644 --- a/src/jalview/ws/seqfetcher/ASequenceFetcher.java +++ b/src/jalview/ws/seqfetcher/ASequenceFetcher.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.ws.seqfetcher; @@ -211,8 +210,8 @@ public class ASequenceFetcher * Retrieve an instance of the proxy for the given source * * @param db - * database source string TODO: add version string/wildcard for - * retrieval of specific DB source/version combinations. + * database source string TODO: add version string/wildcard for + * retrieval of specific DB source/version combinations. * @return an instance of DbSourceProxy for that db. */ public DbSourceProxy getSourceProxy(String db) @@ -226,11 +225,10 @@ public class ASequenceFetcher * dbrefsource * * @param dbSourceProxy - * reference for class implementing - * jalview.ws.seqfetcher.DbSourceProxy + * reference for class implementing + * jalview.ws.seqfetcher.DbSourceProxy * @throws java.lang.IllegalArgumentException - * if class does not implement - * jalview.ws.seqfetcher.DbSourceProxy + * if class does not implement jalview.ws.seqfetcher.DbSourceProxy */ protected void addDBRefSourceImpl(Class dbSourceProxy) throws java.lang.IllegalArgumentException @@ -299,6 +297,7 @@ public class ASequenceFetcher /** * select sources which are implemented by instances of the given class + * * @param class that implements DbSourceProxy * @return null or vector of source names for fetchers */ @@ -306,9 +305,11 @@ public class ASequenceFetcher { if (!jalview.ws.seqfetcher.DbSourceProxy.class.isAssignableFrom(class1)) { - throw new Error("Implmentation Error - getDbInstances must be given a class that implements jalview.ws.seqfetcher.DbSourceProxy (was given '"+class1+"')"); + throw new Error( + "Implmentation Error - getDbInstances must be given a class that implements jalview.ws.seqfetcher.DbSourceProxy (was given '" + + class1 + "')"); } - if (FETCHABLEDBS==null) + if (FETCHABLEDBS == null) { return null; } @@ -324,7 +325,7 @@ public class ASequenceFetcher src.addElement(dbn); } } - if (src.size()>0) + if (src.size() > 0) { src.copyInto(sources = new String[src.size()]); } diff --git a/src/jalview/ws/seqfetcher/DbSourceProxy.java b/src/jalview/ws/seqfetcher/DbSourceProxy.java index 895c03e..c4bbf14 100644 --- a/src/jalview/ws/seqfetcher/DbSourceProxy.java +++ b/src/jalview/ws/seqfetcher/DbSourceProxy.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.ws.seqfetcher; @@ -105,7 +104,7 @@ public interface DbSourceProxy * @param queries * @return null if queries were successful but result was not parsable * @throws Exception - * TODO + * TODO */ public AlignmentI getSequenceRecords(String queries) throws Exception; diff --git a/src/jalview/ws/seqfetcher/DbSourceProxyImpl.java b/src/jalview/ws/seqfetcher/DbSourceProxyImpl.java index 6c61282..549a5f4 100644 --- a/src/jalview/ws/seqfetcher/DbSourceProxyImpl.java +++ b/src/jalview/ws/seqfetcher/DbSourceProxyImpl.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.ws.seqfetcher; @@ -47,7 +46,7 @@ public abstract class DbSourceProxyImpl implements DbSourceProxy */ public Hashtable getDbSourceProperties() { - if (props==null) + if (props == null) { props = new Hashtable(); } diff --git a/src/uk/ac/ebi/picr/model/CrossReference.java b/src/uk/ac/ebi/picr/model/CrossReference.java index b79d525..69f2c84 100644 --- a/src/uk/ac/ebi/picr/model/CrossReference.java +++ b/src/uk/ac/ebi/picr/model/CrossReference.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package uk.ac.ebi.picr.model; diff --git a/src/uk/ac/ebi/picr/model/CrossReference_Helper.java b/src/uk/ac/ebi/picr/model/CrossReference_Helper.java index a8eb30b..ad8ed23 100644 --- a/src/uk/ac/ebi/picr/model/CrossReference_Helper.java +++ b/src/uk/ac/ebi/picr/model/CrossReference_Helper.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package uk.ac.ebi.picr.model; diff --git a/src/uk/ac/ebi/picr/model/UPEntry.java b/src/uk/ac/ebi/picr/model/UPEntry.java index 166fce1..efba197 100644 --- a/src/uk/ac/ebi/picr/model/UPEntry.java +++ b/src/uk/ac/ebi/picr/model/UPEntry.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package uk.ac.ebi.picr.model; diff --git a/src/uk/ac/ebi/picr/model/UPEntry_Helper.java b/src/uk/ac/ebi/picr/model/UPEntry_Helper.java index 9ce6bc9..f2e11a3 100644 --- a/src/uk/ac/ebi/picr/model/UPEntry_Helper.java +++ b/src/uk/ac/ebi/picr/model/UPEntry_Helper.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package uk.ac.ebi.picr.model; diff --git a/src/uk/ac/ebi/www/Data.java b/src/uk/ac/ebi/www/Data.java index 7f006fa..4ddcfb9 100755 --- a/src/uk/ac/ebi/www/Data.java +++ b/src/uk/ac/ebi/www/Data.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package uk.ac.ebi.www; diff --git a/src/uk/ac/ebi/www/InputParams.java b/src/uk/ac/ebi/www/InputParams.java index a74a9ff..793a278 100755 --- a/src/uk/ac/ebi/www/InputParams.java +++ b/src/uk/ac/ebi/www/InputParams.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package uk.ac.ebi.www; diff --git a/src/uk/ac/ebi/www/WSFile.java b/src/uk/ac/ebi/www/WSFile.java index e38525a..fa3ad74 100755 --- a/src/uk/ac/ebi/www/WSFile.java +++ b/src/uk/ac/ebi/www/WSFile.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package uk.ac.ebi.www; diff --git a/src/uk/ac/ebi/www/WSWUBlast.java b/src/uk/ac/ebi/www/WSWUBlast.java index ba47dd4..2ae6415 100755 --- a/src/uk/ac/ebi/www/WSWUBlast.java +++ b/src/uk/ac/ebi/www/WSWUBlast.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package uk.ac.ebi.www; diff --git a/src/uk/ac/ebi/www/WSWUBlastService.java b/src/uk/ac/ebi/www/WSWUBlastService.java index 87c0d30..0870914 100755 --- a/src/uk/ac/ebi/www/WSWUBlastService.java +++ b/src/uk/ac/ebi/www/WSWUBlastService.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package uk.ac.ebi.www; diff --git a/src/uk/ac/ebi/www/WSWUBlastServiceLocator.java b/src/uk/ac/ebi/www/WSWUBlastServiceLocator.java index f89d382..b4f9c64 100755 --- a/src/uk/ac/ebi/www/WSWUBlastServiceLocator.java +++ b/src/uk/ac/ebi/www/WSWUBlastServiceLocator.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package uk.ac.ebi.www; diff --git a/src/uk/ac/ebi/www/WSWUBlastSoapBindingStub.java b/src/uk/ac/ebi/www/WSWUBlastSoapBindingStub.java index c9f493f..8e8bd43 100755 --- a/src/uk/ac/ebi/www/WSWUBlastSoapBindingStub.java +++ b/src/uk/ac/ebi/www/WSWUBlastSoapBindingStub.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package uk.ac.ebi.www; diff --git a/src/uk/ac/ebi/www/picr/AccessionMappingService/AccessionMapperBindingStub.java b/src/uk/ac/ebi/www/picr/AccessionMappingService/AccessionMapperBindingStub.java index 5c18d77..9f06177 100644 --- a/src/uk/ac/ebi/www/picr/AccessionMappingService/AccessionMapperBindingStub.java +++ b/src/uk/ac/ebi/www/picr/AccessionMappingService/AccessionMapperBindingStub.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package uk.ac.ebi.www.picr.AccessionMappingService; diff --git a/src/uk/ac/ebi/www/picr/AccessionMappingService/AccessionMapperInterface.java b/src/uk/ac/ebi/www/picr/AccessionMappingService/AccessionMapperInterface.java index 212b8e2..8f6493a 100644 --- a/src/uk/ac/ebi/www/picr/AccessionMappingService/AccessionMapperInterface.java +++ b/src/uk/ac/ebi/www/picr/AccessionMappingService/AccessionMapperInterface.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package uk.ac.ebi.www.picr.AccessionMappingService; diff --git a/src/uk/ac/ebi/www/picr/AccessionMappingService/AccessionMapperService.java b/src/uk/ac/ebi/www/picr/AccessionMappingService/AccessionMapperService.java index 2316ccf..9aca6c3 100644 --- a/src/uk/ac/ebi/www/picr/AccessionMappingService/AccessionMapperService.java +++ b/src/uk/ac/ebi/www/picr/AccessionMappingService/AccessionMapperService.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package uk.ac.ebi.www.picr.AccessionMappingService; diff --git a/src/uk/ac/ebi/www/picr/AccessionMappingService/AccessionMapperServiceLocator.java b/src/uk/ac/ebi/www/picr/AccessionMappingService/AccessionMapperServiceLocator.java index 68388e2..057ae04 100644 --- a/src/uk/ac/ebi/www/picr/AccessionMappingService/AccessionMapperServiceLocator.java +++ b/src/uk/ac/ebi/www/picr/AccessionMappingService/AccessionMapperServiceLocator.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package uk.ac.ebi.www.picr.AccessionMappingService; diff --git a/src/vamsas/IMsaWS.java b/src/vamsas/IMsaWS.java index 5035a86..b6e8e35 100755 --- a/src/vamsas/IMsaWS.java +++ b/src/vamsas/IMsaWS.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package vamsas; diff --git a/src/vamsas/objects/simple/Alignment.java b/src/vamsas/objects/simple/Alignment.java index 9072c41..9d4a716 100755 --- a/src/vamsas/objects/simple/Alignment.java +++ b/src/vamsas/objects/simple/Alignment.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package vamsas.objects.simple; diff --git a/src/vamsas/objects/simple/Alignment_Helper.java b/src/vamsas/objects/simple/Alignment_Helper.java index b686925..fdad2b6 100755 --- a/src/vamsas/objects/simple/Alignment_Helper.java +++ b/src/vamsas/objects/simple/Alignment_Helper.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package vamsas.objects.simple; diff --git a/src/vamsas/objects/simple/JpredResult.java b/src/vamsas/objects/simple/JpredResult.java index 4c3ad52..3afc9b4 100755 --- a/src/vamsas/objects/simple/JpredResult.java +++ b/src/vamsas/objects/simple/JpredResult.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package vamsas.objects.simple; diff --git a/src/vamsas/objects/simple/JpredResult_Helper.java b/src/vamsas/objects/simple/JpredResult_Helper.java index c3fe1a2..5f06d1a 100755 --- a/src/vamsas/objects/simple/JpredResult_Helper.java +++ b/src/vamsas/objects/simple/JpredResult_Helper.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package vamsas.objects.simple; diff --git a/src/vamsas/objects/simple/MsaResult.java b/src/vamsas/objects/simple/MsaResult.java index 8edad6a..b8a7eaf 100755 --- a/src/vamsas/objects/simple/MsaResult.java +++ b/src/vamsas/objects/simple/MsaResult.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ /* * Jalview - A Sequence Alignment Editor and Viewer diff --git a/src/vamsas/objects/simple/MsaResult_Helper.java b/src/vamsas/objects/simple/MsaResult_Helper.java index bff7127..6deb640 100755 --- a/src/vamsas/objects/simple/MsaResult_Helper.java +++ b/src/vamsas/objects/simple/MsaResult_Helper.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ /* * Jalview - A Sequence Alignment Editor and Viewer diff --git a/src/vamsas/objects/simple/Msfalignment.java b/src/vamsas/objects/simple/Msfalignment.java index 2b3275c..0f1d5f0 100755 --- a/src/vamsas/objects/simple/Msfalignment.java +++ b/src/vamsas/objects/simple/Msfalignment.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package vamsas.objects.simple; diff --git a/src/vamsas/objects/simple/Msfalignment_Helper.java b/src/vamsas/objects/simple/Msfalignment_Helper.java index 14d8a05..6b898c2 100755 --- a/src/vamsas/objects/simple/Msfalignment_Helper.java +++ b/src/vamsas/objects/simple/Msfalignment_Helper.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package vamsas.objects.simple; diff --git a/src/vamsas/objects/simple/Object.java b/src/vamsas/objects/simple/Object.java index 240c4a3..2a25397 100755 --- a/src/vamsas/objects/simple/Object.java +++ b/src/vamsas/objects/simple/Object.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package vamsas.objects.simple; diff --git a/src/vamsas/objects/simple/Object_Helper.java b/src/vamsas/objects/simple/Object_Helper.java index dd44b00..03a2daf 100755 --- a/src/vamsas/objects/simple/Object_Helper.java +++ b/src/vamsas/objects/simple/Object_Helper.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package vamsas.objects.simple; diff --git a/src/vamsas/objects/simple/Result.java b/src/vamsas/objects/simple/Result.java index 50397a6..f77c15e 100755 --- a/src/vamsas/objects/simple/Result.java +++ b/src/vamsas/objects/simple/Result.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package vamsas.objects.simple; diff --git a/src/vamsas/objects/simple/Result_Helper.java b/src/vamsas/objects/simple/Result_Helper.java index 299384e..b5a8f51 100755 --- a/src/vamsas/objects/simple/Result_Helper.java +++ b/src/vamsas/objects/simple/Result_Helper.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package vamsas.objects.simple; diff --git a/src/vamsas/objects/simple/Secstructpred.java b/src/vamsas/objects/simple/Secstructpred.java index 722a9f8..de2e68e 100755 --- a/src/vamsas/objects/simple/Secstructpred.java +++ b/src/vamsas/objects/simple/Secstructpred.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package vamsas.objects.simple; diff --git a/src/vamsas/objects/simple/Secstructpred_Helper.java b/src/vamsas/objects/simple/Secstructpred_Helper.java index 2e362a7..894f1d2 100755 --- a/src/vamsas/objects/simple/Secstructpred_Helper.java +++ b/src/vamsas/objects/simple/Secstructpred_Helper.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package vamsas.objects.simple; diff --git a/src/vamsas/objects/simple/SeqSearchResult.java b/src/vamsas/objects/simple/SeqSearchResult.java index 978e095..19f020b 100644 --- a/src/vamsas/objects/simple/SeqSearchResult.java +++ b/src/vamsas/objects/simple/SeqSearchResult.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package vamsas.objects.simple; diff --git a/src/vamsas/objects/simple/SeqSearchResult_Helper.java b/src/vamsas/objects/simple/SeqSearchResult_Helper.java index 30d84a0..b73ccee 100644 --- a/src/vamsas/objects/simple/SeqSearchResult_Helper.java +++ b/src/vamsas/objects/simple/SeqSearchResult_Helper.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package vamsas.objects.simple; diff --git a/src/vamsas/objects/simple/Sequence.java b/src/vamsas/objects/simple/Sequence.java index 1328877..e2a10da 100755 --- a/src/vamsas/objects/simple/Sequence.java +++ b/src/vamsas/objects/simple/Sequence.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package vamsas.objects.simple; diff --git a/src/vamsas/objects/simple/SequenceSet.java b/src/vamsas/objects/simple/SequenceSet.java index e041436..2c7a643 100755 --- a/src/vamsas/objects/simple/SequenceSet.java +++ b/src/vamsas/objects/simple/SequenceSet.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package vamsas.objects.simple; diff --git a/src/vamsas/objects/simple/SequenceSet_Helper.java b/src/vamsas/objects/simple/SequenceSet_Helper.java index b0a61fd..a8f14fe 100755 --- a/src/vamsas/objects/simple/SequenceSet_Helper.java +++ b/src/vamsas/objects/simple/SequenceSet_Helper.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package vamsas.objects.simple; diff --git a/src/vamsas/objects/simple/Sequence_Helper.java b/src/vamsas/objects/simple/Sequence_Helper.java index 1d98093..e44498b 100755 --- a/src/vamsas/objects/simple/Sequence_Helper.java +++ b/src/vamsas/objects/simple/Sequence_Helper.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package vamsas.objects.simple; diff --git a/src/vamsas/objects/simple/WsJobId.java b/src/vamsas/objects/simple/WsJobId.java index 3381ef0..8fc34c5 100755 --- a/src/vamsas/objects/simple/WsJobId.java +++ b/src/vamsas/objects/simple/WsJobId.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package vamsas.objects.simple; diff --git a/src/vamsas/objects/simple/WsJobId_Helper.java b/src/vamsas/objects/simple/WsJobId_Helper.java index cf8b861..385e47a 100755 --- a/src/vamsas/objects/simple/WsJobId_Helper.java +++ b/src/vamsas/objects/simple/WsJobId_Helper.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package vamsas.objects.simple; diff --git a/utils/InstallAnywhere/jalview_buildinstaller.xml b/utils/InstallAnywhere/jalview_buildinstaller.xml index 86effb6..6a5b0f7 100644 --- a/utils/InstallAnywhere/jalview_buildinstaller.xml +++ b/utils/InstallAnywhere/jalview_buildinstaller.xml @@ -1,21 +1,20 @@ diff --git a/utils/eclipse/JalviewCodeStyle.xml b/utils/eclipse/JalviewCodeStyle.xml index a138f61..9ae4579 100644 --- a/utils/eclipse/JalviewCodeStyle.xml +++ b/utils/eclipse/JalviewCodeStyle.xml @@ -1,4 +1,21 @@ + diff --git a/utils/getJavaVersion.java b/utils/getJavaVersion.java index 4f517a4..8116feb 100644 --- a/utils/getJavaVersion.java +++ b/utils/getJavaVersion.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ import java.io.*; import java.util.*; diff --git a/utils/help2Website.java b/utils/help2Website.java index 3de49e5..c18a8ef 100755 --- a/utils/help2Website.java +++ b/utils/help2Website.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ import java.io.*; import java.util.*; diff --git a/utils/jalopy/docs/acknowledge.html b/utils/jalopy/docs/acknowledge.html index 75f10a4..f6a0ec2 100755 --- a/utils/jalopy/docs/acknowledge.html +++ b/utils/jalopy/docs/acknowledge.html @@ -1,4 +1,21 @@ + @@ -46,4 +63,4 @@ infrastructure but also for their help and support in getting things up and runn And finally, my special thanks to the bright light in the big city, whose love has been a home and a foreign country, the best of both worlds.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/bi01.html b/utils/jalopy/docs/bi01.html index 48cb38c..2539e2c 100755 --- a/utils/jalopy/docs/bi01.html +++ b/utils/jalopy/docs/bi01.html @@ -1,4 +1,21 @@ + @@ -18,4 +35,4 @@ This page generated: June 8 2004

    Bibliography

    [Bloch01] Joshua Bloch. Effective Java. Programming Language Guide. Addison-Wesley, 2001. ISBN: 0-201-31005-8.

    [Friedl97] Jeffrey E. F. Friedl. Mastering Regular Expressions. O'Reilly, 1997. ISBN: 1-56592-257-3.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/build.html b/utils/jalopy/docs/build.html index ac24700..38edaf9 100755 --- a/utils/jalopy/docs/build.html +++ b/utils/jalopy/docs/build.html @@ -1,4 +1,21 @@ + @@ -121,4 +138,4 @@ directory. If you make changes to the source code, just run Ant again; this will perform a faster incremental rebuild of the target.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/comments.html b/utils/jalopy/docs/comments.html index 29c8195..bc9c195 100755 --- a/utils/jalopy/docs/comments.html +++ b/utils/jalopy/docs/comments.html @@ -1,4 +1,21 @@ + @@ -114,4 +131,4 @@ asterixes of consecutive comment lines as shown in the examples below. * end. */

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/contact.html b/utils/jalopy/docs/contact.html index 62ebad7..f323c46 100755 --- a/utils/jalopy/docs/contact.html +++ b/utils/jalopy/docs/contact.html @@ -1,4 +1,21 @@ + @@ -30,4 +47,4 @@ users to ask questions, share knowledge, and discuss general Jalopy related issu

    Subscribe/UnsubscribeBrowse archivesjalopy-development

    Hosts development related discussions.

    Subscribe/UnsubscribeBrowse archivesto top
    - Copyright © 2001-2002, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2002, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/contributors.html b/utils/jalopy/docs/contributors.html index c956525..7dcc840 100755 --- a/utils/jalopy/docs/contributors.html +++ b/utils/jalopy/docs/contributors.html @@ -1,4 +1,21 @@ + @@ -28,4 +45,4 @@ David Beutel
  • Kees Kuip
  • to top
    - Copyright © 2001-2002, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2002, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/dedication.html b/utils/jalopy/docs/dedication.html index eb86ec6..0c5d185 100755 --- a/utils/jalopy/docs/dedication.html +++ b/utils/jalopy/docs/dedication.html @@ -1,4 +1,21 @@ + @@ -19,4 +36,4 @@ This work is inspired by and dedicated to the poet who writes:

    Tabacaria

    Não sou nada.
    Nunca serei nada.
    Não posso querer ser nada.
    À parte isso, tenho em mim todos os sonhos do mundo.
     
    Janelas do meu quarto,
    Do meu quarto de um dos milhões do mundo que ninguém sabe quem é
    (E se soubessem quem é, o que saberiam?),
     
    Dais para o mistério de uma rua cruzada constantemente por gente,
    Para uma rua inacessível a todos os pensamentos,
    Real, impossivelmente real, certa, desconhecidamente certa,
    Com o mistério das coisas por baixo das pedras e dos seres,
    Com a morte a pôr humidade nas paredes e cabelos brancos nos homens,
    Com o Destino a conduzir a carroça de tudo pela estrada de nada.
    Estou hoje vencido, como se soubesse a verdade.
    Estou hoje lúcido, como se estivesse para morrer,
    E não tivesse mais irmandade com as coisas
    Senão uma despedida, tornando-se esta casa e este lado da rua
    A fileira de carruagens de um comboio, e uma partida apitada
    De dentro da minha cabeça,
    E uma sacudidela dos meus nervos e um ranger de ossos na ida.
     
    Estou hoje perplexo como quem pensou e achou e esqueceu.
    Estou hoje dividido entre a lealdade que devo
    Estou hoje dividido entre a lealdade que devo
    E à sensação de que tudo é sonho, como coisa real por dentro.
     
    Falhei em tudo.
    Como não fiz propósito nenhum, talvez tudo fosse nada.
    A aprendizagem que me deram,
    Desci dela pela janela das traseiras da casa,
    Fui até ao campo com grandes propósitos.
    Mas lá encontrei só ervas e árvores,
    E quando havia gente era igual à outra.
    Saio da janela, sento-me numa cadeira. Em que hei-de pensar?
     
    Que sei eu do que serei, eu que não sei o que sou?
    Ser o que penso? Mas penso ser tanta coisa!
    E há tantos que pensam ser a mesma coisa que não pode haver tantos!
    Gênio? Neste momento
    Cem mil cérebros se concebem em sonho gênios como eu,
    E a história não marcará, quem sabe?, nem um,
    Nem haverá senão estrume de tantas conquistas futuras.
    Não, não creio em mim.
    Em todos os manicômios há doidos malucos com tantas certezas!
    Eu, que não tenho nenhuma certeza, sou mais certo ou menos certo?
    Não, nem em mim...
     
    Em quantas mansardas e não-mansardas do mundo
    Não estão nesta hora génios-para-si-mesmos sonhando?
    Quantas aspirações altas e nobres e lúcidas -
    Sim, verdadeiramente altas e nobres e lúcidas -,
    E quem sabe se realizáveis,
    Nunca verão a luz do sol real nem acharão ouvidos de gente?
    O mundo é para quem nasce para o conquistar
    E não para quem sonha que pode conquistá-lo, ainda que tenha razão.
    Tenho sonhado mais que o que Napoleão fez.
    Tenho apertado ao peito hipotético mais humanidades do que Cristo,
    Tenho feito filosofias em segredo que nenhum Kant escreveu.
    Mas sou, e talvez serei sempre, o da mansarda,
    Ainda que não more nela;
    Serei sempre o que não nasceu para isso;
    Serei sempre só o que tinha qualidades;
    Serei sempre o que esperou que lhe abrissem a porta ao pé de uma parede sem porta
    E cantou a cantiga do Infinito numa capoeira,
    E ouviu a voz de Deus num poço tapado.
    Crer em mim? Não, nem em nada.
    Derrame-me a Natureza sobre a cabeça ardente
    O seu sol, a sua chuva, o vento que me acha o cabelo,
    E o resto que venha se vier, ou tiver que vir, ou não venha.
    Escravos cardíacos das estrelas,
    Conquistamos todo o mundo antes de nos levantar da cama;
    Mas acordamos e ele é opaco,
    Levantamo-nos e ele é alheio,
    Saímos de casa e ele é a terra inteira,
    Mais o sistema solar e a Via Láctea e o Indefinido.
     
    (Come chocolates, pequena;
    Come chocolates!
    Olha que não há mais metafísica no mundo senão chocolates.
    Olha que as religiões todas não ensinam mais que a confeitaria.
    Come, pequena suja, come!
    Pudesse eu comer chocolates com a mesma verdade com que comes!
    Mas eu penso e, ao tirar o papel de prata, que é de folhas de estanho,
    Deito tudo para o chão, como tenho deitado a vida.)
     
    Mas ao menos fica da amargura do que nunca serei
    A caligrafia rápida destes versos,
    Pórtico partido para o Impossível.
    Mas ao menos consagro a mim mesmo um desprezo sem lágrimas,
    Nobre ao menos no gesto largo com que atiro
    A roupa suja que sou, sem rol, pra o decurso das coisas,
    E fico em casa sem camisa.
     
    (Tu, que consolas, que não existes e por isso consolas,
    Ou deusa grega, concebida como estátua que fosse viva,
    Ou patrícia romana, impossivelmente nobre e nefasta,
    Ou princesa de trovadores, gentilíssima e colorida,
    Ou marquesa do século dezoito, decotada e longínqua,
    Ou cocote célebre do tempo dos nossos pais,
    Ou não sei quê moderno - não concebo bem o quê -,
    Tudo isso, seja o que for, que sejas, se pode inspirar que inspire!
    Meu coração é um balde despejado.
    Como os que invocam espíritos invocam espíritos invoco
    A mim mesmo e não encontro nada.
    Chego à janela e vejo a rua com uma nitidez absoluta.
    Vejo as lojas, vejo os passeios, vejo os carros que passam,
    Vejo os entes vivos vestidos que se cruzam,
    Vejo os cães que também existem,
    E tudo isto me pesa como uma condenação ao degredo,
    E tudo isto é estrangeiro, como tudo.)
     
    Vivi, estudei, amei, e até cri,
    E hoje não há mendigo que eu não inveje só por não ser eu.
    Olho a cada um os andrajos e as chagas e a mentira,
    E penso: talvez nunca vivesses nem estudasses nem amasses nem cresses
    (Porque é possível fazer a realidade de tudo isso sem fazer nada disso);
    Talvez tenhas existido apenas, como um lagarto a quem cortam o rabo
    E que é rabo para aquém do lagarto remexidamente.
     
    Fiz de mim o que não soube,
    E o que podia fazer de mim não o fiz.
    O dominó que vesti era errado. Conheceram-me logo por quem não era e não desmenti, e perdi-me.
    Quando quis tirar a máscara,
    Estava pegada à cara.
    Quando a tirei e me vi ao espelho,
    Já tinha envelhecido.
    Estava bêbado, já não sabia vestir o dominó que não tinha tirado.
    Deitei fora a máscara e dormi no vestiário
    Como um cão tolerado pela gerência
    Por ser inofensivo
    E vou escrever esta história para provar que sou sublime.
     
    Essência musical dos meus versos inúteis,
    Quem me dera encontrar-te como coisa que eu fizesse,
    E não ficasse sempre defronte da Tabacaria de defronte,
    Calcando aos pés a consciência de estar existindo, Como um tapete em que um bêbado tropeça
    Ou um capacho que os ciganos roubaram e não valia nada.
     
    Mas o dono da Tabacaria chegou à porta e ficou à porta.
    Olho-o com o desconforto da cabeça mal voltada
    E com o desconforto da alma mal-entendendo.
    Ele morrerá e eu morrerei.
    Ele deixará a tabuleta, e eu deixarei versos.
    A certa altura morrerá a tabuleta também, e os versos também.
    Depois de certa altura morrerá a rua onde esteve a tabuleta,
    E a língua em que foram escritos os versos.
    Morrerá depois o planeta girante em que tudo isto se deu.
    Em outros satélites de outros sistemas qualquer coisa como gente
    Continuará fazendo coisas como versos e vivendo por baixo de coisas como tabuletas,
    Sempre uma coisa defronte da outra,
    Sempre uma coisa tão inútil como a outra,
    Sempre o impossível tão estúpido como o real,
    Sempre o mistério do fundo tão certo como o sono de mistério da superfície,
    Sempre isto ou sempre outra coisa ou nem uma coisa nem outra.
     
    Mas um homem entrou na Tabacaria (para comprar tabaco?),
    E a realidade plausível cai de repente em cima de mim.
    Semiergo-me enérgico, convencido, humano,
    E vou tencionar escrever estes versos em que digo o contrário.
     
    Acendo um cigarro ao pensar em escrevê-los
    E saboreio no cigarro a libertação de todos os pensamentos.
    Sigo o fumo como uma rota própria,
    E gozo, num momento sensitivo e competente,
    A libertação de todas as especulações
    E a consciência de que a metafísica é uma consequência de estar mal disposto.
     
    Depois deito-me para trás na cadeira
    E continuo fumando.
    Enquanto o Destino mo conceder, continuarei fumando.
     
    (Se eu casasse com a filha da minha lavadeira
    Talvez fosse feliz.)
    Visto isto, levanto-me da cadeira. Vou à janela.
    O homem saiu da Tabacaria (metendo troco na algibeira das calças?).
    Ah, conheço-o: é o Esteves sem metafísica.
    (O dono da Tabacaria chegou à porta.)
    Como por um instinto divino o Esteves voltou-se e viu-me.
    Acenou-me adeus gritei-lhe Adeus ó Esteves!, e o universo
    Reconstruiu-se-me sem ideal nem esperança, e o dono da Tabacaria sorriu.
    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/dependencies.html b/utils/jalopy/docs/dependencies.html index 0dd6ba3..9e0077d 100755 --- a/utils/jalopy/docs/dependencies.html +++ b/utils/jalopy/docs/dependencies.html @@ -1,4 +1,21 @@ + @@ -24,4 +41,4 @@ to avoid classpath clashes. only introduced with 1.2.6URL:http://jakarta.apache.org/log4j/  Name:Moe Editor 1.2.0Author:BlueJ Group at Monash University, Slava PestovLicense:Public DomainInfo:Jalopy incorporates a stripped down version of the syntax package included in the Moe sources URL:http://www.bluej.org/  Name:Oro Regular Expressions 2.0.6Author:Apache Software FoundationLicense:Apache Software LicenseURL:http://jakarta.apache.org/oro/  Name:SAX Simple API for XML 2.0.1 Author:David Megginson, David BrownellLicense:Public DomainURL:http://www.saxproject.org/  

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/docs.html b/utils/jalopy/docs/docs.html index 430271c..e9005aa 100755 --- a/utils/jalopy/docs/docs.html +++ b/utils/jalopy/docs/docs.html @@ -1,4 +1,21 @@ + @@ -27,4 +44,4 @@ highly welcome. Either use the navigation bar at the top of this page or follow this link to access the user manual: http://jalopy.sf.net/manual.html

    to top
    - Copyright © 2001-2002, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2002, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/download.html b/utils/jalopy/docs/download.html index ef87b2d..7a0540a 100755 --- a/utils/jalopy/docs/download.html +++ b/utils/jalopy/docs/download.html @@ -1,4 +1,21 @@ + @@ -28,4 +45,4 @@ Jalopy 1.0 Prior versions can be obtained through the SourceForge file release area: http://sourceforge.net/project/showfiles.php?group_id=45216

    to top
    - Copyright © 2001-2002, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2002, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/environment.html b/utils/jalopy/docs/environment.html index 728cc77..76f6fe0 100755 --- a/utils/jalopy/docs/environment.html +++ b/utils/jalopy/docs/environment.html @@ -1,4 +1,21 @@ + @@ -70,4 +87,4 @@ As you see with the above example, if a variable is not defined, Jalopy won't touch the expression and simply preserve the original content. This way Jalopy works nicely with other source code tools and SCM products.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/faq.html b/utils/jalopy/docs/faq.html index dc2cd8a..f60f167 100755 --- a/utils/jalopy/docs/faq.html +++ b/utils/jalopy/docs/faq.html @@ -1,4 +1,21 @@ + @@ -86,4 +103,4 @@ convention format from 1.0b7 to 1.0b9 failed for some reason. Looking further at the supplied code convention revealed that the value of the sorting key was invalid and the actual cause was easy to spot.

    to top
    - Copyright © 2001-2002, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2002, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/features.html b/utils/jalopy/docs/features.html index d95e444..13782b1 100755 --- a/utils/jalopy/docs/features.html +++ b/utils/jalopy/docs/features.html @@ -1,4 +1,21 @@ + @@ -86,4 +103,4 @@ several Plug-ins to integrate with co
  • "OSI Certified Open Source Software" software, released under a BSD License
  • to top
    - Copyright © 2001-2002, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2002, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/footer.html b/utils/jalopy/docs/footer.html index 6608528..5cb0cf1 100755 --- a/utils/jalopy/docs/footer.html +++ b/utils/jalopy/docs/footer.html @@ -1,4 +1,21 @@ + @@ -21,4 +38,4 @@ explanation of the different options.

    Note that Jalopy always prints one trailing empty line after the footer.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/header.html b/utils/jalopy/docs/header.html index 7b9eb77..e5675bd 100755 --- a/utils/jalopy/docs/header.html +++ b/utils/jalopy/docs/header.html @@ -1,4 +1,21 @@ + @@ -95,4 +112,4 @@ Insert your header template here. You can use variable expressions throughout the header text. Read Section 4.3.8, “Environment” for more information about this feature.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/history.html b/utils/jalopy/docs/history.html index b4a6350..24b6cf6 100755 --- a/utils/jalopy/docs/history.html +++ b/utils/jalopy/docs/history.html @@ -1,4 +1,21 @@ + @@ -999,4 +1016,4 @@ rather shows the system wait cursor and blocks all input
  • Removed the Javadoc documentation from the Plug-in distributions
  • Initial beta version (2002-02-10)

    to top
    - Copyright © 2001-2002, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2002, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/imports.html b/utils/jalopy/docs/imports.html index 50ed77a..a06da9a 100755 --- a/utils/jalopy/docs/imports.html +++ b/utils/jalopy/docs/imports.html @@ -1,4 +1,21 @@ + @@ -118,4 +135,4 @@ If enabled, tries to collapse all single-type statements. Collapsing means to remove all single-type imports of a given package and replace them with one on-demand import statement.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/indentation.html b/utils/jalopy/docs/indentation.html index 7953c4e..cff5f3c 100755 --- a/utils/jalopy/docs/indentation.html +++ b/utils/jalopy/docs/indentation.html @@ -1,4 +1,21 @@ + @@ -425,4 +442,4 @@ String comma = spaceAfterComma --->? COMMA_SPACE --->: COMMA;

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/index.html b/utils/jalopy/docs/index.html index 4454e3a..6202fbd 100755 --- a/utils/jalopy/docs/index.html +++ b/utils/jalopy/docs/index.html @@ -1,4 +1,21 @@ + @@ -50,4 +67,4 @@ refer to Appendix A for the lice accompanying 3rd party libraries and the different Plug-in chapters for the license terms of the provided Plug-ins.

    to top
    - Copyright © 2001-2002, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2002, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/inspector-naming.html b/utils/jalopy/docs/inspector-naming.html index 6de1f5b..48f2314 100755 --- a/utils/jalopy/docs/inspector-naming.html +++ b/utils/jalopy/docs/inspector-naming.html @@ -1,4 +1,21 @@ + @@ -52,4 +69,4 @@ which both performs testing and - on success - closes the dialog and updates the You can always use the Cancel button to cancel editing. The dialog will be closed nd no changes made to the list.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/inspector.html b/utils/jalopy/docs/inspector.html index 796115d..0dd4f9b 100755 --- a/utils/jalopy/docs/inspector.html +++ b/utils/jalopy/docs/inspector.html @@ -1,4 +1,21 @@ + @@ -167,4 +184,4 @@ FileDialog dialog = getString("BTN_SAVE_AS" /* NOI18N */), FileDialog.SAVE);

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/installation.html b/utils/jalopy/docs/installation.html index 4cc9499..87e3b4d 100755 --- a/utils/jalopy/docs/installation.html +++ b/utils/jalopy/docs/installation.html @@ -1,4 +1,21 @@ + @@ -30,4 +47,4 @@ The contained Javadoc parser may not work properly under Sun JDK 1.4. Refer to Installation depends on the distribution you received. Please refer to the individual Plug-in chapters in Part II, “Plug-ins” for detailed information.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/introduction.html b/utils/jalopy/docs/introduction.html index 5f3f803..c32bca8 100755 --- a/utils/jalopy/docs/introduction.html +++ b/utils/jalopy/docs/introduction.html @@ -1,4 +1,21 @@ + @@ -35,4 +52,4 @@ released under a BSD License. For the individual license terms of the provided Plug-ins, please refer to the different Plug-in chapters in Part II, “Plug-ins”.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/ix01.html b/utils/jalopy/docs/ix01.html index 5555e95..31dd732 100755 --- a/utils/jalopy/docs/ix01.html +++ b/utils/jalopy/docs/ix01.html @@ -1,4 +1,21 @@ + @@ -16,4 +33,4 @@ FAQ | Javadoc This page generated: June 8 2004

    Index

    A

    Alignment, Align
    Assignments, Align
    Method Def parameters, Align
    Variables
    assignments, Align
    identifiers, Align
    Ant, Ant Plug-in task
    taskdef, Installation
    Apache Software License, The Apache Software License, Version 1.1
    Assignment operators, Spaces around
    Auto-correction, General

    B

    Bitwise operators, Spaces around
    Blank lines, General, Misc
    After left curly brace, Misc
    Before right curly brace, Misc
    Case blocks, General
    Classes, General
    Control statements, General
    Interfaces, General
    Javadoc, General
    Last Import statement, General
    Methods/Constructors, General
    Multi-line comments, General
    Package statement, General
    Single-line comments, General
    Statement blocks, General
    Variable declarations, General
    Braces, Braces, Spaces around
    cuddle, Empty braces
    Empty, Empty braces
    empty, Empty braces
    insert, Insert braces
    padding, Spaces around
    remove, Remove braces
    style, General
    C, Styles
    custom, Styles
    GNU, Styles
    Sun, Styles
    whitespace, Whitespace
    wrapping, Wrapping
    Brackets, Spaces around
    padding, Spaces around
    Build, Building
    Ant, Prerequisites
    CVS, Prerequisites
    DocBook, Prerequisites
    Prerequisites, Prerequisites
    XSLT, Prerequisites

    C

    Chunks, Chunks
    By Blank lines, Chunks
    By comments, Chunks
    Code Convention, General
    Code Inspector, Code Inspector
    Naming, Naming
    Comma, Space after
    Command line, Synopsis
    arguments, Synopsis
    options, Synopsis
    Comment
    Header, Header
    trailing, Sizes
    Comment-based history, History
    Comments
    for history, History
    Javadoc, Comments, General
    Javadoc comments, Remove, General
    Multi-line, Comments
    Multi-line comments, Remove, Format
    Pragma, Comments
    Separator, Comments
    Single-line, Comments
    Single-line comments, Remove
    Common Public License Version, Common Public License Version 1.0
    Compatibility
    source, Compliance
    Compliance, Compliance
    Console, Console Application
    Continuation, Continuation
    Cuddled braces, Empty braces

    D

    Deep indent, General
    Dependencies, System requirements

    E

    Eclipse, Eclipse Plug-in
    Empty braces, Empty braces
    Empty statement, Empty braces
    Environment, Environment
    Environment variables, Environment
    Extension, JDeveloper Extension

    F

    File-based history, History
    Footer, Footer

    G

    GNU Free Documentation License, GNU Free Documentation License Version 1.1, March 2000
    GNU GENERAL PUBLIC LICENSE, GNU GENERAL PUBLIC LICENSE Version 2, June 1991
    Grouping depth, Grouping

    H

    Header, Header
    Smart Mode, General
    History, History
    comment, History
    file, History

    I

    Imports, Imports
    collapse, Optimize
    expand, Optimize
    grouping,
    on-demand, Optimize
    optimization, Optimize
    single-type, Optimize
    sorting, General
    grouping depth, Grouping
    Indentation, Indentation
    Aligment, Align
    Continutation, Continuation
    sizes, Sizes
    Continuation, Sizes
    extends, Sizes
    General, Sizes
    implements, Sizes
    Leading, Sizes
    Tabular, Sizes
    throws, Sizes
    Trailing comment, Sizes
    Installation, Installation, Installing Jalopy
    Ant, Installation, Installation
    Eclipse Plug-in, Installation
    JBuilder OpenTool, Installation
    JDeveloper Plug-in, Installation
    jEdit Plug-in, Installation
    NetBeans Module, Installation
    Sun ONE Studio Module, Installation
    Interpolation, Environment
    Introduction, Introduction

    J

    Javadoc comments, Comments, Remove, General
    JBuilder, JBuilder OpenTool
    JDeveloper, JDeveloper Extension
    jEdit, jEdit Plug-in

    L

    Label, Wrap always
    indent, Misc
    wrap, Wrap always
    Licenses
    ANTLR, ANTLR SOFTWARE RIGHTS
    Apache Software License, The Apache Software License, Version 1.1
    BSD, The Jalopy BSD License
    Common Public License Version, Common Public License Version 1.0
    GNU Free Documentation License, GNU Free Documentation License Version 1.1, March 2000
    GNU GENERAL PUBLIC LICENSE, GNU GENERAL PUBLIC LICENSE Version 2, June 1991
    Sun Public License Version, SUN PUBLIC LICENSE Version 1.0
    Line length, General
    Line wrapping, Wrapping
    Logical operators, Spaces around

    M

    Mathematical operators, Spaces around
    Method Def parameters, Align, Wrap always
    Module
    NetBeans, NetBeans/Sun ONE Studio module
    Sun ONE Studio, NetBeans/Sun ONE Studio module
    Multi-line comments, Comments, Remove, Format

    O

    OpenTool, JBuilder OpenTool
    Operators
    Assignment, Spaces around
    Bitwise, Spaces around
    Logical, Spaces around
    Mathematical, Spaces around
    Relational, Spaces around
    Shift, Spaces around
    wrap after, Policy
    wrap before, Policy

    P

    Padding, Spaces around
    Parentheses, Space before, Spaces around, Misc
    insert around expressions, Misc
    padding, Spaces around
    Plug-in
    Ant, Ant Plug-in task
    Console, Console Application
    Eclipse, Eclipse Plug-in
    JBuilder, JBuilder OpenTool
    JDeveloper, JDeveloper Extension
    jEdit, jEdit Plug-in
    NetBeans, NetBeans/Sun ONE Studio module
    Policy
    Wrapping, Policy
    Pragma comments, Comments
    Printer, Printer
    Projects, Projects

    R

    Regular expression
    Tester, Regular expression tester
    Regular expression tester, Regular expression tester
    Regular expressions, Synopsis
    Relational operators, Spaces around

    S

    Semicolon, Space after
    Separator comment, Comments
    Separator comments, Comments
    Serial version UID, Misc
    Settings, Settings
    Settings directory, Settings
    Shift operators, Spaces around
    Single-line comments, Comments, Remove
    Software License, The Jalopy BSD License, ANTLR SOFTWARE RIGHTS
    Source compatibility, Compliance
    Sun ONE Studio, NetBeans/Sun ONE Studio module
    Sun Public License, SUN PUBLIC LICENSE Version 1.0
    Synopsis, Synopsis
    System requirements, System requirements

    T

    Tabs
    size, Sizes
    use, Misc
    taskdef, Installation
    Trailing Comment, Sizes
    Type cast, Space after

    U

    Usage, Usage, Synopsis
    examples, Examples

    V

    Variables
    Environment, Environment
    Interpolation, Environment

    W

    White Space, White Space
    Whitespace
    after, Space after
    comma, Space after
    semicolon, Space after
    type cast, Space after
    before, Space before
    braces, Space before
    brackets, Space before
    colon, Space before
    parentheses, Space before
    padding, Spaces around
    Assignment operators, Spaces around
    Bitwise operators, Spaces around
    Braces, Spaces around
    Brackets, Spaces around
    Logical operators, Spaces around
    Mathematical operators, Spaces around
    Parentheses, Spaces around
    Relational operators, Spaces around
    Shift operators, Spaces around
    Wrapping, Wrapping
    Deep indent, General
    Line length, General
    Method Def parameters, Wrap always
    Policy, Policy
    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/javadoc.html b/utils/jalopy/docs/javadoc.html index 62e1c7c..8159c2b 100755 --- a/utils/jalopy/docs/javadoc.html +++ b/utils/jalopy/docs/javadoc.html @@ -1,4 +1,21 @@ + @@ -150,4 +167,4 @@ to add or remove items from the list. Valid in-line tag names have the form @[a-zA-Z]+, e.g. @mylink.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/license-antlr.html b/utils/jalopy/docs/license-antlr.html index e89941c..824ce87 100755 --- a/utils/jalopy/docs/license-antlr.html +++ b/utils/jalopy/docs/license-antlr.html @@ -1,4 +1,21 @@ + @@ -44,4 +61,4 @@ The primary ANTLR guy:

    Terence Parr

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/license-apache.html b/utils/jalopy/docs/license-apache.html index 9ede370..a89806b 100755 --- a/utils/jalopy/docs/license-apache.html +++ b/utils/jalopy/docs/license-apache.html @@ -1,4 +1,21 @@ + @@ -59,4 +76,4 @@ Apache Software Foundation. Apache Software Foundation, please see http://www.apache.org.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/license-bsd.html b/utils/jalopy/docs/license-bsd.html index 91f08f8..64850ee 100755 --- a/utils/jalopy/docs/license-bsd.html +++ b/utils/jalopy/docs/license-bsd.html @@ -1,4 +1,21 @@ + @@ -30,4 +47,4 @@ Neither the name of the Jalopy Group nor the names of its contributors may be us

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/license-common-public.html b/utils/jalopy/docs/license-common-public.html index 809e66b..4963402 100755 --- a/utils/jalopy/docs/license-common-public.html +++ b/utils/jalopy/docs/license-common-public.html @@ -1,4 +1,21 @@ + @@ -78,4 +95,4 @@ Everyone is permitted to copy and distribute copies of this Agreement, but in or

    This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/license-gnu-doc.html b/utils/jalopy/docs/license-gnu-doc.html index 4adb80a..7332bb7 100755 --- a/utils/jalopy/docs/license-gnu-doc.html +++ b/utils/jalopy/docs/license-gnu-doc.html @@ -1,4 +1,21 @@ + @@ -371,4 +388,4 @@ recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/license-gnu.html b/utils/jalopy/docs/license-gnu.html index cbff6d1..fb88300 100755 --- a/utils/jalopy/docs/license-gnu.html +++ b/utils/jalopy/docs/license-gnu.html @@ -1,4 +1,21 @@ + @@ -353,4 +370,4 @@ consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/license-sun-public.html b/utils/jalopy/docs/license-sun-public.html index de47d7c..c020107 100755 --- a/utils/jalopy/docs/license-sun-public.html +++ b/utils/jalopy/docs/license-sun-public.html @@ -1,4 +1,21 @@ + @@ -44,4 +61,4 @@ either the SPL or the [___] License.

    [NOTE: The text of this Exhibit A may the notices in the Source Code files of the Original Code. You should use the text of this Exhibit A rather than the text found in the Original Code Source Code for Your Modifications.]

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/links.html b/utils/jalopy/docs/links.html index 98d05d1..48a306a 100755 --- a/utils/jalopy/docs/links.html +++ b/utils/jalopy/docs/links.html @@ -1,4 +1,21 @@ + @@ -24,4 +41,4 @@ Sun Java Code Convention to top
    - Copyright © 2001-2002, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2002, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/manual.html b/utils/jalopy/docs/manual.html index 91bc975..b09da06 100755 --- a/utils/jalopy/docs/manual.html +++ b/utils/jalopy/docs/manual.html @@ -1,4 +1,21 @@ + @@ -23,4 +40,4 @@ version published by the Free Software Foundation; with no "Invariant Sections",

    For a copy of the license terms refer to Appendix F, GNU Free Documentation License Version 1.1, March 2000.


    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/messages.html b/utils/jalopy/docs/messages.html index e717378..cfbddcf 100755 --- a/utils/jalopy/docs/messages.html +++ b/utils/jalopy/docs/messages.html @@ -1,4 +1,21 @@ + @@ -58,4 +75,4 @@ Enables or disables the inclusion of the current execution stack trace with error messages. This proves useful in case you need to file a bug report as it reveals the source of the error.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/misc.html b/utils/jalopy/docs/misc.html index 2213d1e..1464711 100755 --- a/utils/jalopy/docs/misc.html +++ b/utils/jalopy/docs/misc.html @@ -1,4 +1,21 @@ + @@ -163,4 +180,4 @@ Number Specifies the number of processing threads to be used. This setting should be equal to the number of processors your system has.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/part-core.html b/utils/jalopy/docs/part-core.html index b2b5c1e..eefdb60 100755 --- a/utils/jalopy/docs/part-core.html +++ b/utils/jalopy/docs/part-core.html @@ -1,4 +1,21 @@ + @@ -20,4 +37,4 @@ This part of the manual covers the core Jalopy engine: generic installation and usage instructions along with a detailed discussion of the available switches to customize application behavior and formatting output.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/part-plugins.html b/utils/jalopy/docs/part-plugins.html index 5cb37d1..df8a125 100755 --- a/utils/jalopy/docs/part-plugins.html +++ b/utils/jalopy/docs/part-plugins.html @@ -1,4 +1,21 @@ + @@ -18,4 +35,4 @@ This page generated: June 8 2004

    Plug-ins

    This part of the manual covers the different Plug-ins available.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/plugin-ant-config.html b/utils/jalopy/docs/plugin-ant-config.html index 7b3e32b..e3e19d7 100755 --- a/utils/jalopy/docs/plugin-ant-config.html +++ b/utils/jalopy/docs/plugin-ant-config.html @@ -1,4 +1,21 @@ + @@ -24,4 +41,4 @@ Of course, you can setup the classpath yourself by adding all

     java Preferences
     

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/plugin-ant-license.html b/utils/jalopy/docs/plugin-ant-license.html index 5bc23d3..cbfab4a 100755 --- a/utils/jalopy/docs/plugin-ant-license.html +++ b/utils/jalopy/docs/plugin-ant-license.html @@ -1,4 +1,21 @@ + @@ -22,4 +39,4 @@ released under a BSD license. See Appendix B, The Jalopy BSD License for the license and refer to Appendix A, Library Dependencies for the license terms of the accompanying 3rd party libraries.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/plugin-ant-usage.html b/utils/jalopy/docs/plugin-ant-usage.html index caa577a..6a7a805 100755 --- a/utils/jalopy/docs/plugin-ant-usage.html +++ b/utils/jalopy/docs/plugin-ant-usage.html @@ -1,4 +1,21 @@ + @@ -126,4 +143,4 @@ to work reliable). </target> </project>

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/plugin-ant.html b/utils/jalopy/docs/plugin-ant.html index 51fa29c..a5a2b67 100755 --- a/utils/jalopy/docs/plugin-ant.html +++ b/utils/jalopy/docs/plugin-ant.html @@ -1,4 +1,21 @@ + @@ -63,4 +80,4 @@ is incompatible with Ant 1.4.1 or prior releases. If you happen to use one of these outdated versions, the parser library must not be copied into the /lib folder (or added to the classpath) otherwise Ant will fail to work!

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/plugin-console-license.html b/utils/jalopy/docs/plugin-console-license.html index bfda380..5739ac5 100755 --- a/utils/jalopy/docs/plugin-console-license.html +++ b/utils/jalopy/docs/plugin-console-license.html @@ -1,4 +1,21 @@ + @@ -23,4 +40,4 @@ for more information. See Appendix B, The Jalopy BSD License for the Jalopy license and refer to Appendix A, Library Dependencies for the license terms of the accompanying 3rd party libraries.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/plugin-console-usage.html b/utils/jalopy/docs/plugin-console-usage.html index 2490d17..88b12d5 100755 --- a/utils/jalopy/docs/plugin-console-usage.html +++ b/utils/jalopy/docs/plugin-console-usage.html @@ -1,4 +1,21 @@ + @@ -92,4 +109,4 @@ current directory.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/plugin-console.html b/utils/jalopy/docs/plugin-console.html index a9ab268..d6a6cad 100755 --- a/utils/jalopy/docs/plugin-console.html +++ b/utils/jalopy/docs/plugin-console.html @@ -1,4 +1,21 @@ + @@ -54,4 +71,4 @@ set CLASSPATH=%CLASSPATH%;<INST_DIR>\l

    Refer to your system documentation on how to apply these changes more permanently.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/plugin-eclipse-integration.html b/utils/jalopy/docs/plugin-eclipse-integration.html index b675ac8..9d6dd4a 100755 --- a/utils/jalopy/docs/plugin-eclipse-integration.html +++ b/utils/jalopy/docs/plugin-eclipse-integration.html @@ -1,4 +1,21 @@ + @@ -50,4 +67,4 @@ Formats the selected files. Depending on the object type (project, folder, file) either all Java source files of the project, the contents of the selected folder(s) (including subfolders) or the currently selected Java source file(s).

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/plugin-eclipse-license.html b/utils/jalopy/docs/plugin-eclipse-license.html index 9a92b1f..80f53fd 100755 --- a/utils/jalopy/docs/plugin-eclipse-license.html +++ b/utils/jalopy/docs/plugin-eclipse-license.html @@ -1,4 +1,21 @@ + @@ -23,4 +40,4 @@ for more information. See Appendix B, The Jalopy BSD License for the Jalopy license and refer to Appendix A, Library Dependencies for the license terms of the accompanying 3rd party libraries.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/plugin-eclipse.html b/utils/jalopy/docs/plugin-eclipse.html index 36549e8..efdd513 100755 --- a/utils/jalopy/docs/plugin-eclipse.html +++ b/utils/jalopy/docs/plugin-eclipse.html @@ -1,4 +1,21 @@ + @@ -46,4 +63,4 @@ folder into your Eclipse plugin directory and restart Eclipse. That's all there is to it, you are now ready to run Jalopy from within Eclipse.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/plugin-jbuilder-integration.html b/utils/jalopy/docs/plugin-jbuilder-integration.html index 6aa708f..8e51488 100755 --- a/utils/jalopy/docs/plugin-jbuilder-integration.html +++ b/utils/jalopy/docs/plugin-jbuilder-integration.html @@ -1,4 +1,21 @@ + @@ -46,4 +63,4 @@ updated.

    Both the Format <file> and Jalopy Options... items can be also reached via the popup menu of the active editor view.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/plugin-jbuilder-license.html b/utils/jalopy/docs/plugin-jbuilder-license.html index e1deb40..a62f7a1 100755 --- a/utils/jalopy/docs/plugin-jbuilder-license.html +++ b/utils/jalopy/docs/plugin-jbuilder-license.html @@ -1,4 +1,21 @@ + @@ -22,4 +39,4 @@ released under a BSD license. See Appendix B, The Jalopy BSD License for the license and refer to Appendix A, Library Dependencies for the license terms of the accompanying 3rd party libraries.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/plugin-jbuilder.html b/utils/jalopy/docs/plugin-jbuilder.html index ed2e836..1b2ca95 100755 --- a/utils/jalopy/docs/plugin-jbuilder.html +++ b/utils/jalopy/docs/plugin-jbuilder.html @@ -1,4 +1,21 @@ + @@ -47,4 +64,4 @@ Further installation is simple: just copy all files from your into the /lib/ext directory of your JBuilder distribution. JBuilder will then need to be restarted before Jalopy begins working.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/plugin-jdev-integration.html b/utils/jalopy/docs/plugin-jdev-integration.html index 7930ed1..f8290d6 100755 --- a/utils/jalopy/docs/plugin-jdev-integration.html +++ b/utils/jalopy/docs/plugin-jdev-integration.html @@ -1,4 +1,21 @@ + @@ -51,4 +68,4 @@ preferences are stored whenever the user leaves a page. If the user moves to another settings page, all settings are stored to disk even if the user chooses to cancel the preferences dialog later on.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/plugin-jdev-license.html b/utils/jalopy/docs/plugin-jdev-license.html index 3bc3b04..e73602e 100755 --- a/utils/jalopy/docs/plugin-jdev-license.html +++ b/utils/jalopy/docs/plugin-jdev-license.html @@ -1,4 +1,21 @@ + @@ -22,4 +39,4 @@ released under a BSD license. See Appendix B, The Jalopy BSD License for the license and refer to Appendix A, Library Dependencies for the license terms of the accompanying 3rd party libraries.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/plugin-jdev.html b/utils/jalopy/docs/plugin-jdev.html index 396105c..9f7f5b4 100755 --- a/utils/jalopy/docs/plugin-jdev.html +++ b/utils/jalopy/docs/plugin-jdev.html @@ -1,4 +1,21 @@ + @@ -46,4 +63,4 @@ into the /jdev/lib/ext directory of your JDeveloper distribution. JDeveloper will then need to be restarted before Jalopy begins working.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/plugin-jedit-integration.html b/utils/jalopy/docs/plugin-jedit-integration.html index 967c266..3438cae 100755 --- a/utils/jalopy/docs/plugin-jedit-integration.html +++ b/utils/jalopy/docs/plugin-jedit-integration.html @@ -1,4 +1,21 @@ + @@ -37,4 +54,4 @@ layout of any formatted code.

    These options are available under jEdit's Global Options dialog, too.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/plugin-jedit-license.html b/utils/jalopy/docs/plugin-jedit-license.html index 8c2817a..0e4ac59 100755 --- a/utils/jalopy/docs/plugin-jedit-license.html +++ b/utils/jalopy/docs/plugin-jedit-license.html @@ -1,4 +1,21 @@ + @@ -23,4 +40,4 @@ See Appendix B for the license and refer to Appendix A for the license terms of the accompanying 3rd party libraries.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/plugin-jedit.html b/utils/jalopy/docs/plugin-jedit.html index f069d64..4bbb776 100755 --- a/utils/jalopy/docs/plugin-jedit.html +++ b/utils/jalopy/docs/plugin-jedit.html @@ -1,4 +1,21 @@ + @@ -51,4 +68,4 @@ contained in the <INST_DIR&g into the /jars directory of your jEdit distribution. jEdit will then need to be restarted before Jalopy begins working.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/plugin-netbeans-integration.html b/utils/jalopy/docs/plugin-netbeans-integration.html index e79f6a6..d242ca0 100755 --- a/utils/jalopy/docs/plugin-netbeans-integration.html +++ b/utils/jalopy/docs/plugin-netbeans-integration.html @@ -1,4 +1,21 @@ + @@ -43,4 +60,4 @@ If it happens that a file has an open editor view, this view will be updated, not the actual file. You have to save the view first to see the physical file updated.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/plugin-netbeans-license.html b/utils/jalopy/docs/plugin-netbeans-license.html index cff0efe..431270a 100755 --- a/utils/jalopy/docs/plugin-netbeans-license.html +++ b/utils/jalopy/docs/plugin-netbeans-license.html @@ -1,4 +1,21 @@ + @@ -23,4 +40,4 @@ for more information. See Appendix B, The Jalopy BSD License for the Jalopy license and refer to Appendix A, Library Dependencies for the license terms of the accompanying 3rd party libraries.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/plugin-netbeans.html b/utils/jalopy/docs/plugin-netbeans.html index ff1bca4..01a46df 100755 --- a/utils/jalopy/docs/plugin-netbeans.html +++ b/utils/jalopy/docs/plugin-netbeans.html @@ -1,4 +1,21 @@ + @@ -56,4 +73,4 @@ Downloaded Modules (.nbm Files)', select the .nbm cont in <INST_DIR>/lib and proceed through all steps of the wizard as outlined.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/plugins.html b/utils/jalopy/docs/plugins.html index a6e716d..619c698 100755 --- a/utils/jalopy/docs/plugins.html +++ b/utils/jalopy/docs/plugins.html @@ -1,4 +1,21 @@ + @@ -20,4 +37,4 @@ to get more information.

    More to come!

    to top
    - Copyright © 2001-2002, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2002, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/printer.html b/utils/jalopy/docs/printer.html index 804a409..523af86 100755 --- a/utils/jalopy/docs/printer.html +++ b/utils/jalopy/docs/printer.html @@ -1,4 +1,21 @@ + @@ -197,4 +214,4 @@ if (in != null) catch (IOException ignored) {} }

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/project.html b/utils/jalopy/docs/project.html index fc4a9ca..d5dda34 100755 --- a/utils/jalopy/docs/project.html +++ b/utils/jalopy/docs/project.html @@ -1,4 +1,21 @@ + @@ -37,4 +54,4 @@ avoid characters that your platform does not allow to be used in file paths. is not active. The default project cannot be removed.

  • Activate

    Activates the selected project. The stored settings will be loaded and the configuration dialog updates accordingly.

  • to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/separation.html b/utils/jalopy/docs/separation.html index 29d2cb3..1d6776d 100755 --- a/utils/jalopy/docs/separation.html +++ b/utils/jalopy/docs/separation.html @@ -1,4 +1,21 @@ + @@ -283,4 +300,4 @@ Add separator comments for inner classes The insertion of separator comments for inner classes/interfaces may lead to confusion, therefore you can control it here separately.

    4.3.5.3.2. Descriptions

    Lets you define the description text for each of the different class elements.

    4.3.5.3.3. Fill character

    Lets you define the fill character for the comments.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/settings.html b/utils/jalopy/docs/settings.html index ff38d85..edc24ff 100755 --- a/utils/jalopy/docs/settings.html +++ b/utils/jalopy/docs/settings.html @@ -1,4 +1,21 @@ + @@ -70,4 +87,4 @@ However if the backup directory setting is left untouched, the directory is stored relative to the Jalopy settings directory. This way you can savely share your code convention across different systems and platforms.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/sorting.html b/utils/jalopy/docs/sorting.html index f1c46d7..8dc5575 100755 --- a/utils/jalopy/docs/sorting.html +++ b/utils/jalopy/docs/sorting.html @@ -1,4 +1,21 @@ + @@ -73,4 +90,4 @@ Lets you specify the order in which the individual modifiers should appear. Select an entry and use the Up and Down buttons to move it to the desired location.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/usage.html b/utils/jalopy/docs/usage.html index 7779394..e823adc 100755 --- a/utils/jalopy/docs/usage.html +++ b/utils/jalopy/docs/usage.html @@ -1,4 +1,21 @@ + @@ -18,4 +35,4 @@ This page generated: June 8 2004

    Chapter 3. Usage

    Usage depends on the distribution you received. Please refer to the individual Plug-in chapters in Part II, “Plug-ins” for details.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/whitespace.html b/utils/jalopy/docs/whitespace.html index 9d2348e..e5ae4b1 100755 --- a/utils/jalopy/docs/whitespace.html +++ b/utils/jalopy/docs/whitespace.html @@ -1,4 +1,21 @@ + @@ -222,4 +239,4 @@ int line = ((JavaAST) int line = (( JavaAST )node).getStartLine();

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/docs/wrapping.html b/utils/jalopy/docs/wrapping.html index 54a037d..e2352b6 100755 --- a/utils/jalopy/docs/wrapping.html +++ b/utils/jalopy/docs/wrapping.html @@ -1,4 +1,21 @@ + @@ -583,4 +600,4 @@ String[] constraints = { | If both options are left disabled, the array elements will be printed in one line, right after the left curly brace.

    to top
    - Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net \ No newline at end of file + Copyright © 2001-2004, Marco Hunsicker. All rights reserved. Hosted by SourceForge.net diff --git a/utils/jalopy/readme.html b/utils/jalopy/readme.html index 45008c9..8b7cca1 100755 --- a/utils/jalopy/readme.html +++ b/utils/jalopy/readme.html @@ -1,4 +1,21 @@ +
    OverviewDownload • @@ -50,4 +67,4 @@ For a list of project contributors, see /docs/contributors.html.

    to top

    \ No newline at end of file + -- 1.7.10.2